From eb29942f5da15e47d73310349f3af2e67551c3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=AF=E6=99=AE?= <18691763612@163.com> Date: Tue, 26 May 2026 18:09:16 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E5=8D=87=E7=BA=A7=E6=88=AA?= =?UTF-8?q?=E5=9B=BE=E4=BD=BF=E7=94=A8=E7=9A=84SDK=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- node_modules/.bin/chrome-devtools | 16 - node_modules/.bin/chrome-devtools-mcp | 16 - node_modules/.bin/chrome-devtools-mcp.cmd | 17 - node_modules/.bin/chrome-devtools-mcp.ps1 | 28 - node_modules/.bin/chrome-devtools.cmd | 17 - node_modules/.bin/chrome-devtools.ps1 | 28 - node_modules/.bin/playwright | 16 - node_modules/.bin/playwright-core | 16 - node_modules/.bin/playwright-core.cmd | 17 - node_modules/.bin/playwright-core.ps1 | 28 - node_modules/.bin/playwright.cmd | 17 - node_modules/.bin/playwright.ps1 | 28 - node_modules/.package-lock.json | 302 +- node_modules/@babel/code-frame/LICENSE | 22 + node_modules/@babel/code-frame/README.md | 19 + node_modules/@babel/code-frame/lib/index.js | 217 + .../@babel/code-frame/lib/index.js.map | 1 + node_modules/@babel/code-frame/package.json | 32 + .../helper-validator-identifier/LICENSE | 22 + .../helper-validator-identifier/README.md | 19 + .../lib/identifier.js | 70 + .../lib/identifier.js.map | 1 + .../helper-validator-identifier/lib/index.js | 57 + .../lib/index.js.map | 1 + .../lib/keyword.js | 35 + .../lib/keyword.js.map | 1 + .../helper-validator-identifier/package.json | 31 + .../@puppeteer/browsers/lib/cjs/CLI.js | 2 +- .../@puppeteer/browsers/lib/cjs/install.js | 2 +- .../browsers/lib/cjs/install.js.map | 2 +- .../@puppeteer/browsers/lib/esm/CLI.js | 2 +- .../@puppeteer/browsers/lib/esm/install.js | 2 +- .../browsers/lib/esm/install.js.map | 2 +- node_modules/@puppeteer/browsers/package.json | 2 +- node_modules/@puppeteer/browsers/src/CLI.ts | 2 +- .../@puppeteer/browsers/src/install.ts | 2 +- node_modules/@types/node/README.md | 2 +- node_modules/@types/node/async_hooks.d.ts | 108 + node_modules/@types/node/crypto.d.ts | 17 +- node_modules/@types/node/events.d.ts | 15 +- node_modules/@types/node/fs.d.ts | 138 +- node_modules/@types/node/fs/promises.d.ts | 151 +- node_modules/@types/node/http2.d.ts | 12 + node_modules/@types/node/index.d.ts | 2 + .../@types/node/inspector.generated.d.ts | 5 + node_modules/@types/node/module.d.ts | 1 + node_modules/@types/node/package.json | 6 +- node_modules/@types/node/process.d.ts | 79 +- node_modules/@types/node/quic.d.ts | 4 +- node_modules/@types/node/repl.d.ts | 15 + node_modules/@types/node/sqlite.d.ts | 61 +- node_modules/@types/node/stream.d.ts | 2 +- node_modules/@types/node/stream/iter.d.ts | 301 + node_modules/@types/node/test.d.ts | 109 +- node_modules/@types/node/test/reporters.d.ts | 1 + node_modules/@types/node/ts5.6/index.d.ts | 2 + node_modules/@types/node/ts5.7/index.d.ts | 2 + node_modules/@types/node/url.d.ts | 30 +- node_modules/@types/node/vm.d.ts | 144 +- node_modules/@types/node/zlib/iter.d.ts | 131 + node_modules/argparse/CHANGELOG.md | 216 + node_modules/argparse/LICENSE | 254 + node_modules/argparse/README.md | 84 + node_modules/argparse/argparse.js | 3707 + node_modules/argparse/lib/sub.js | 67 + node_modules/argparse/lib/textwrap.js | 440 + node_modules/argparse/package.json | 31 + node_modules/bare-events/package.json | 12 +- node_modules/bare-events/web.js | 46 +- node_modules/callsites/index.d.ts | 96 + node_modules/callsites/index.js | 13 + node_modules/callsites/license | 9 + node_modules/callsites/package.json | 39 + node_modules/callsites/readme.md | 48 + node_modules/chrome-devtools-mcp/LICENSE | 202 - node_modules/chrome-devtools-mcp/README.md | 770 - .../build/src/DevToolsConnectionAdapter.js | 69 - .../build/src/DevtoolsUtils.js | 294 - .../build/src/McpContext.js | 707 - .../chrome-devtools-mcp/build/src/McpPage.js | 95 - .../build/src/McpResponse.js | 668 - .../chrome-devtools-mcp/build/src/Mutex.js | 37 - .../build/src/PageCollector.js | 310 - .../build/src/SlimMcpResponse.js | 18 - .../build/src/WaitForHelper.js | 139 - .../src/bin/chrome-devtools-cli-options.js | 651 - .../bin/chrome-devtools-mcp-cli-options.js | 322 - .../build/src/bin/chrome-devtools-mcp-main.js | 35 - .../build/src/bin/chrome-devtools-mcp.js | 22 - .../build/src/bin/chrome-devtools.js | 188 - .../build/src/bin/cliDefinitions.js | 615 - .../chrome-devtools-mcp/build/src/browser.js | 203 - .../build/src/daemon/client.js | 152 - .../build/src/daemon/daemon.js | 206 - .../build/src/daemon/types.js | 6 - .../build/src/daemon/utils.js | 109 - .../build/src/formatters/ConsoleFormatter.js | 241 - .../build/src/formatters/IssueFormatter.js | 192 - .../build/src/formatters/NetworkFormatter.js | 218 - .../build/src/formatters/SnapshotFormatter.js | 134 - .../chrome-devtools-mcp/build/src/index.js | 219 - .../build/src/issue-descriptions.js | 39 - .../chrome-devtools-mcp/build/src/logger.js | 36 - .../chrome-devtools-mcp/build/src/polyfill.js | 7 - .../build/src/telemetry/ClearcutLogger.js | 219 - .../build/src/telemetry/WatchdogClient.js | 60 - .../build/src/telemetry/flagUtils.js | 45 - .../build/src/telemetry/metricUtils.js | 14 - .../build/src/telemetry/persistence.js | 53 - .../build/src/telemetry/types.js | 38 - .../src/telemetry/watchdog/ClearcutSender.js | 203 - .../build/src/telemetry/watchdog/main.js | 127 - .../build/src/third_party/THIRD_PARTY_NOTICES | 4297 - .../src/third_party/bundled-packages.json | 9 - .../third_party/devtools-formatter-worker.js | 15436 -- .../build/src/third_party/index.js | 181796 --------------- ...SandboxedIframeCannotNavigateToCoopPage.md | 4 - .../CoepCorpNotSameOrigin.md | 8 - ...eOriginAfterDefaultedToSameOriginByCoep.md | 18 - .../issue-descriptions/CoepCorpNotSameSite.md | 7 - .../CoepFrameResourceNeedsCoepHeader.md | 10 - .../CompatibilityModeQuirks.md | 5 - .../CookieAttributeValueExceedsMaxSize.md | 5 - .../issue-descriptions/LowTextContrast.md | 5 - .../SameSiteExcludeContextDowngradeRead.md | 8 - .../SameSiteExcludeContextDowngradeSet.md | 8 - ...meSiteExcludeNavigationContextDowngrade.md | 8 - .../SameSiteNoneInsecureErrorRead.md | 8 - .../SameSiteNoneInsecureErrorSet.md | 8 - .../SameSiteNoneInsecureWarnRead.md | 8 - .../SameSiteNoneInsecureWarnSet.md | 8 - .../SameSiteUnspecifiedLaxAllowUnsafeRead.md | 9 - .../SameSiteUnspecifiedLaxAllowUnsafeSet.md | 9 - .../SameSiteWarnCrossDowngradeRead.md | 8 - .../SameSiteWarnCrossDowngradeSet.md | 8 - .../SameSiteWarnStrictLaxDowngradeStrict.md | 8 - .../issue-descriptions/arInsecureContext.md | 7 - .../issue-descriptions/arInvalidInfoHeader.md | 5 - .../arInvalidRegisterOsSourceHeader.md | 5 - .../arInvalidRegisterOsTriggerHeader.md | 5 - .../arInvalidRegisterSourceHeader.md | 5 - .../arInvalidRegisterTriggerHeader.md | 5 - ...gationRegistrationUniqueScopeAlreadySet.md | 5 - ...istrationWithoutTransientUserActivation.md | 6 - .../arNoRegisterOsSourceHeader.md | 5 - .../arNoRegisterOsTriggerHeader.md | 5 - .../arNoRegisterSourceHeader.md | 5 - .../arNoRegisterTriggerHeader.md | 5 - .../issue-descriptions/arNoWebOrOsSupport.md | 4 - .../issue-descriptions/arOsSourceIgnored.md | 18 - .../issue-descriptions/arOsTriggerIgnored.md | 19 - .../arPermissionPolicyDisabled.md | 8 - .../arSourceAndTriggerHeaders.md | 9 - .../issue-descriptions/arSourceIgnored.md | 13 - .../issue-descriptions/arTriggerIgnored.md | 12 - .../arUntrustworthyReportingOrigin.md | 10 - .../issue-descriptions/arWebAndOsHeaders.md | 11 - .../bounceTrackingMitigations.md | 3 - ...clientHintMetaTagAllowListInvalidOrigin.md | 4 - .../clientHintMetaTagModifiedHTML.md | 4 - ...ectionAllowlistInvalidAllowlistItemType.md | 12 - .../connectionAllowlistInvalidHeader.md | 12 - .../connectionAllowlistInvalidUrlPattern.md | 8 - .../connectionAllowlistItemNotInnerList.md | 12 - .../connectionAllowlistMoreThanOneList.md | 7 - ...ctionAllowlistReportingEndpointNotToken.md | 10 - .../cookieCrossSiteRedirectDowngrade.md | 12 - ...ieExcludeBlockedWithinRelatedWebsiteSet.md | 4 - .../cookieExcludeDomainNonAscii.md | 11 - .../cookieExcludePortMismatch.md | 8 - .../cookieExcludeSchemeMismatch.md | 7 - .../cookieExcludeThirdPartyPhaseoutRead.md | 6 - .../cookieExcludeThirdPartyPhaseoutSet.md | 6 - .../cookieWarnDomainNonAscii.md | 11 - .../cookieWarnMetadataGrantRead.md | 4 - .../cookieWarnMetadataGrantSet.md | 4 - .../cookieWarnThirdPartyPhaseoutRead.md | 6 - .../cookieWarnThirdPartyPhaseoutSet.md | 6 - .../corsAllowCredentialsRequired.md | 6 - .../issue-descriptions/corsDisabledScheme.md | 7 - .../corsDisallowedByMode.md | 7 - ...corsHeaderDisallowedByPreflightResponse.md | 5 - .../corsInvalidHeaderValues.md | 7 - .../corsLocalNetworkAccessPermissionDenied.md | 19 - ...corsMethodDisallowedByPreflightResponse.md | 5 - .../corsNoCorsRedirectModeNotFollow.md | 5 - .../issue-descriptions/corsOriginMismatch.md | 6 - .../corsPreflightResponseInvalid.md | 5 - .../corsRedirectContainsCredentials.md | 5 - .../corsWildcardOriginNotAllowed.md | 8 - .../issue-descriptions/cspEvalViolation.md | 9 - .../issue-descriptions/cspInlineViolation.md | 10 - .../cspTrustedTypesPolicyViolation.md | 5 - .../cspTrustedTypesSinkViolation.md | 8 - .../issue-descriptions/cspURLViolation.md | 10 - .../issue-descriptions/deprecation.md | 3 - ...ederatedAuthRequestAccountsHttpNotFound.md | 1 - ...ratedAuthRequestAccountsInvalidResponse.md | 1 - .../federatedAuthRequestAccountsNoResponse.md | 1 - .../federatedAuthRequestApprovalDeclined.md | 1 - .../federatedAuthRequestCanceled.md | 1 - ...federatedAuthRequestErrorFetchingSignin.md | 1 - .../federatedAuthRequestErrorIdToken.md | 1 - ...federatedAuthRequestIdTokenHttpNotFound.md | 1 - ...deratedAuthRequestIdTokenInvalidRequest.md | 1 - ...eratedAuthRequestIdTokenInvalidResponse.md | 1 - .../federatedAuthRequestIdTokenNoResponse.md | 1 - ...deratedAuthRequestInvalidSigninResponse.md | 1 - ...ederatedAuthRequestManifestHttpNotFound.md | 1 - ...ratedAuthRequestManifestInvalidResponse.md | 1 - .../federatedAuthRequestManifestNoResponse.md | 1 - .../federatedAuthRequestTooManyRequests.md | 1 - ...hUserInfoRequestInvalidAccountsResponse.md | 1 - ...UserInfoRequestInvalidConfigOrWellKnown.md | 1 - ...erInfoRequestNoAccountSharingPermission.md | 1 - ...ratedAuthUserInfoRequestNoApiPermission.md | 1 - ...questNoReturningUserFromFetchedAccounts.md | 1 - .../federatedAuthUserInfoRequestNotIframe.md | 1 - ...serInfoRequestNotPotentiallyTrustworthy.md | 1 - ...deratedAuthUserInfoRequestNotSameOrigin.md | 1 - ...edAuthUserInfoRequestNotSignedInWithIdp.md | 1 - .../fetchingPartitionedBlobURL.md | 7 - ...cFormAriaLabelledByToNonExistingIdError.md | 8 - ...ericFormAutocompleteAttributeEmptyError.md | 5 - .../genericFormDuplicateIdForInputError.md | 5 - ...rmEmptyIdAndNameAttributesForInputError.md | 5 - ...tocompleteValueToIdOrNameAttributeError.md | 5 - ...ngButWellIntendedAutocompleteValueError.md | 5 - .../genericFormInputWithNoLabelError.md | 5 - ...icFormLabelForMatchesNonExistingIdError.md | 5 - .../genericFormLabelForNameError.md | 5 - ...rmLabelHasNeitherForNorNestedInputError.md | 5 - .../genericNavigationEntryMarkedSkippable.md | 7 - .../genericResponseWasBlockedByORB.md | 4 - .../third_party/issue-descriptions/heavyAd.md | 10 - .../issue-descriptions/mixedContent.md | 5 - .../navigatingPartitionedBlobURL.md | 5 - .../permissionElementActivationDisabled.md | 7 - ...onElementActivationDisabledWithOccluder.md | 9 - ...entActivationDisabledWithOccluderParent.md | 9 - ...rmissionElementCspFrameAncestorsMissing.md | 5 - .../permissionElementFencedFrameDisallowed.md | 5 - .../permissionElementFontSizeTooLarge.md | 5 - .../permissionElementFontSizeTooSmall.md | 5 - .../permissionElementGeolocationDeprecated.md | 5 - ...missionElementInsetBoxShadowUnsupported.md | 5 - .../permissionElementInvalidDisplayStyle.md | 5 - .../permissionElementInvalidSizeValue.md | 5 - .../permissionElementInvalidType.md | 5 - .../permissionElementInvalidTypeActivation.md | 5 - .../permissionElementLowContrast.md | 5 - .../permissionElementNonOpaqueColor.md | 5 - ...rmissionElementPaddingBottomUnsupported.md | 6 - ...ermissionElementPaddingRightUnsupported.md | 6 - ...rmissionElementPermissionsPolicyBlocked.md | 5 - .../permissionElementRegistrationFailed.md | 5 - .../permissionElementRequestInProgress.md | 5 - .../permissionElementSecurityChecksFailed.md | 5 - .../permissionElementTypeNotSupported.md | 5 - .../permissionElementUntrustedEvent.md | 7 - ...laceholderDescriptionForInvisibleIssues.md | 3 - .../propertyRuleInvalidNameIssue.md | 3 - .../issue-descriptions/propertyRuleIssue.md | 7 - ...entAccessibilityDisallowedOptGroupChild.md | 7 - ...ementAccessibilityDisallowedSelectChild.md | 7 - ...activeContentAttributesSelectDescendant.md | 3 - ...essibilityInteractiveContentLegendChild.md | 3 - ...essibilityInteractiveContentOptionChild.md | 3 - ...essibilityNonPhrasingContentOptionChild.md | 3 - .../selectivePermissionsIntervention.md | 7 - .../issue-descriptions/sharedArrayBuffer.md | 7 - ...tionaryUseErrorCrossOriginNoCorsRequest.md | 1 - ...DictionaryUseErrorDictionaryLoadFailure.md | 3 - ...ionaryUseErrorMatchingDictionaryNotUsed.md | 3 - ...eErrorUnexpectedContentDictionaryHeader.md | 1 - ...ionaryWriteErrorCossOriginNoCorsRequest.md | 1 - ...ictionaryWriteErrorDisallowedBySettings.md | 1 - ...aredDictionaryWriteErrorExpiredResponse.md | 3 - ...aredDictionaryWriteErrorFeatureDisabled.md | 3 - ...ctionaryWriteErrorInsufficientResources.md | 1 - ...edDictionaryWriteErrorInvalidMatchField.md | 1 - ...ionaryWriteErrorInvalidStructuredHeader.md | 1 - ...aredDictionaryWriteErrorInvalidTTLField.md | 1 - ...edDictionaryWriteErrorNavigationRequest.md | 3 - .../sharedDictionaryWriteErrorNoMatchField.md | 1 - ...dDictionaryWriteErrorNonIntegerTTLField.md | 1 - ...ctionaryWriteErrorNonListMatchDestField.md | 1 - ...redDictionaryWriteErrorNonSecureContext.md | 3 - ...redDictionaryWriteErrorNonStringIdField.md | 1 - ...onaryWriteErrorNonStringInMatchDestList.md | 1 - ...DictionaryWriteErrorNonStringMatchField.md | 1 - ...edDictionaryWriteErrorNonTokenTypeField.md | 1 - ...haredDictionaryWriteErrorRequestAborted.md | 1 - .../sharedDictionaryWriteErrorShuttingDown.md | 1 - ...haredDictionaryWriteErrorTooLongIdField.md | 3 - ...aredDictionaryWriteErrorUnsupportedType.md | 3 - .../sriInvalidSignatureHeader.md | 14 - .../sriInvalidSignatureInputHeader.md | 15 - .../sriMissingSignatureHeader.md | 8 - .../sriMissingSignatureInputHeader.md | 7 - ...riSignatureHeaderValueIsIncorrectLength.md | 11 - ...riSignatureHeaderValueIsNotByteSequence.md | 14 - .../sriSignatureHeaderValueIsParameterized.md | 15 - ...ignatureInputHeaderInvalidComponentName.md | 8 - ...ignatureInputHeaderInvalidComponentType.md | 13 - ...tHeaderInvalidDerivedComponentParameter.md | 4 - ...utHeaderInvalidHeaderComponentParameter.md | 5 - ...sriSignatureInputHeaderInvalidParameter.md | 11 - .../sriSignatureInputHeaderKeyIdLength.md | 12 - .../sriSignatureInputHeaderMissingLabel.md | 6 - ...ureInputHeaderMissingRequiredParameters.md | 8 - ...natureInputHeaderValueMissingComponents.md | 11 - ...riSignatureInputHeaderValueNotInnerList.md | 11 - .../sriValidationFailedIntegrityMismatch.md | 10 - .../sriValidationFailedInvalidLength.md | 5 - .../sriValidationFailedSignatureExpired.md | 6 - .../sriValidationFailedSignatureMismatch.md | 11 - .../stylesheetLateImport.md | 4 - .../stylesheetRequestFailed.md | 3 - ...lityInteractiveContentSummaryDescendant.md | 3 - .../unencodedDigestIncorrectDigestLength.md | 12 - .../unencodedDigestIncorrectDigestType.md | 17 - .../unencodedDigestMalformedDictionary.md | 14 - .../unencodedDigestUnknownAlgorithm.md | 15 - .../lighthouse-devtools-mcp-bundle.js | 59282 ----- .../build/src/tools/ToolDefinition.js | 72 - .../build/src/tools/categories.js | 26 - .../build/src/tools/console.js | 85 - .../build/src/tools/emulation.js | 55 - .../build/src/tools/extensions.js | 96 - .../build/src/tools/inPage.js | 84 - .../build/src/tools/input.js | 377 - .../build/src/tools/lighthouse.js | 123 - .../build/src/tools/memory.js | 28 - .../build/src/tools/network.js | 120 - .../build/src/tools/pages.js | 336 - .../build/src/tools/performance.js | 190 - .../build/src/tools/screencast.js | 79 - .../build/src/tools/screenshot.js | 84 - .../build/src/tools/script.js | 121 - .../build/src/tools/slim/tools.js | 81 - .../build/src/tools/snapshot.js | 56 - .../build/src/tools/tools.js | 53 - .../build/src/trace-processing/parse.js | 84 - .../chrome-devtools-mcp/build/src/types.js | 6 - .../build/src/utils/ExtensionRegistry.js | 35 - .../build/src/utils/files.js | 19 - .../build/src/utils/keyboard.js | 296 - .../build/src/utils/pagination.js | 49 - .../build/src/utils/string.js | 36 - .../build/src/utils/types.js | 6 - .../chrome-devtools-mcp/build/src/version.js | 9 - node_modules/chrome-devtools-mcp/package.json | 84 - node_modules/cosmiconfig/LICENSE | 22 + node_modules/cosmiconfig/README.md | 782 + node_modules/cosmiconfig/dist/Explorer.d.ts | 2 + node_modules/cosmiconfig/dist/Explorer.js | 170 + .../cosmiconfig/dist/ExplorerBase.d.ts | 2 + node_modules/cosmiconfig/dist/ExplorerBase.js | 126 + .../cosmiconfig/dist/ExplorerSync.d.ts | 2 + node_modules/cosmiconfig/dist/ExplorerSync.js | 184 + .../cosmiconfig/dist/cacheWrapper.d.ts | 5 + node_modules/cosmiconfig/dist/cacheWrapper.js | 32 + .../cosmiconfig/dist/canUseDynamicImport.d.ts | 3 + .../cosmiconfig/dist/canUseDynamicImport.js | 23 + node_modules/cosmiconfig/dist/defaults.d.ts | 25 + node_modules/cosmiconfig/dist/defaults.js | 105 + .../cosmiconfig/dist/getDirectory.d.ts | 4 + node_modules/cosmiconfig/dist/getDirectory.js | 38 + .../cosmiconfig/dist/getPropertyByPath.d.ts | 5 + .../cosmiconfig/dist/getPropertyByPath.js | 28 + node_modules/cosmiconfig/dist/index.d.ts | 6 + node_modules/cosmiconfig/dist/index.js | 148 + node_modules/cosmiconfig/dist/loaders.d.ts | 8 + node_modules/cosmiconfig/dist/loaders.js | 150 + node_modules/cosmiconfig/dist/merge.d.ts | 9 + node_modules/cosmiconfig/dist/merge.js | 40 + node_modules/cosmiconfig/dist/readFile.d.ts | 7 + node_modules/cosmiconfig/dist/readFile.js | 56 + node_modules/cosmiconfig/dist/types.d.ts | 98 + node_modules/cosmiconfig/dist/types.js | 3 + node_modules/cosmiconfig/dist/util.d.ts | 2 + node_modules/cosmiconfig/dist/util.js | 99 + node_modules/cosmiconfig/package.json | 103 + node_modules/env-paths/index.d.ts | 101 + node_modules/env-paths/index.js | 74 + node_modules/env-paths/license | 9 + node_modules/env-paths/package.json | 45 + node_modules/env-paths/readme.md | 115 + node_modules/error-ex/LICENSE | 21 + node_modules/error-ex/README.md | 144 + node_modules/error-ex/index.js | 141 + node_modules/error-ex/package.json | 46 + node_modules/import-fresh/index.d.ts | 30 + node_modules/import-fresh/index.js | 34 + node_modules/import-fresh/license | 9 + node_modules/import-fresh/package.json | 48 + node_modules/import-fresh/readme.md | 54 + node_modules/is-arrayish/.editorconfig | 18 + node_modules/is-arrayish/.istanbul.yml | 4 + node_modules/is-arrayish/.npmignore | 5 + node_modules/is-arrayish/.travis.yml | 17 + node_modules/is-arrayish/LICENSE | 21 + node_modules/is-arrayish/README.md | 16 + node_modules/is-arrayish/index.js | 10 + node_modules/is-arrayish/package.json | 34 + node_modules/js-tokens/CHANGELOG.md | 151 + node_modules/js-tokens/LICENSE | 21 + node_modules/js-tokens/README.md | 240 + node_modules/js-tokens/index.js | 23 + node_modules/js-tokens/package.json | 30 + node_modules/js-yaml/LICENSE | 21 + node_modules/js-yaml/README.md | 247 + node_modules/js-yaml/bin/js-yaml.js | 126 + node_modules/js-yaml/dist/js-yaml.js | 3880 + node_modules/js-yaml/dist/js-yaml.min.js | 2 + node_modules/js-yaml/dist/js-yaml.mjs | 3856 + node_modules/js-yaml/index.js | 47 + node_modules/js-yaml/lib/common.js | 59 + node_modules/js-yaml/lib/dumper.js | 965 + node_modules/js-yaml/lib/exception.js | 55 + node_modules/js-yaml/lib/loader.js | 1733 + node_modules/js-yaml/lib/schema.js | 121 + node_modules/js-yaml/lib/schema/core.js | 11 + node_modules/js-yaml/lib/schema/default.js | 22 + node_modules/js-yaml/lib/schema/failsafe.js | 17 + node_modules/js-yaml/lib/schema/json.js | 19 + node_modules/js-yaml/lib/snippet.js | 101 + node_modules/js-yaml/lib/type.js | 66 + node_modules/js-yaml/lib/type/binary.js | 125 + node_modules/js-yaml/lib/type/bool.js | 35 + node_modules/js-yaml/lib/type/float.js | 97 + node_modules/js-yaml/lib/type/int.js | 156 + node_modules/js-yaml/lib/type/map.js | 8 + node_modules/js-yaml/lib/type/merge.js | 12 + node_modules/js-yaml/lib/type/null.js | 35 + node_modules/js-yaml/lib/type/omap.js | 44 + node_modules/js-yaml/lib/type/pairs.js | 53 + node_modules/js-yaml/lib/type/seq.js | 8 + node_modules/js-yaml/lib/type/set.js | 29 + node_modules/js-yaml/lib/type/str.js | 8 + node_modules/js-yaml/lib/type/timestamp.js | 88 + node_modules/js-yaml/package.json | 66 + .../CHANGELOG.md | 50 + .../json-parse-even-better-errors/LICENSE.md | 25 + .../json-parse-even-better-errors/README.md | 96 + .../json-parse-even-better-errors/index.js | 121 + .../package.json | 33 + node_modules/lines-and-columns/LICENSE | 21 + node_modules/lines-and-columns/README.md | 33 + .../lines-and-columns/build/index.d.ts | 13 + node_modules/lines-and-columns/build/index.js | 62 + node_modules/lines-and-columns/package.json | 49 + node_modules/parent-module/index.js | 37 + node_modules/parent-module/license | 9 + node_modules/parent-module/package.json | 46 + node_modules/parent-module/readme.md | 67 + node_modules/parse-json/index.js | 54 + node_modules/parse-json/license | 9 + node_modules/parse-json/package.json | 45 + node_modules/parse-json/readme.md | 119 + node_modules/picocolors/LICENSE | 15 + node_modules/picocolors/README.md | 21 + node_modules/picocolors/package.json | 25 + node_modules/picocolors/picocolors.browser.js | 4 + node_modules/picocolors/picocolors.d.ts | 5 + node_modules/picocolors/picocolors.js | 75 + node_modules/picocolors/types.d.ts | 51 + node_modules/playwright-core/LICENSE | 202 - node_modules/playwright-core/NOTICE | 5 - node_modules/playwright-core/README.md | 3 - .../playwright-core/ThirdPartyNotices.txt | 3552 - .../bin/install_media_pack.ps1 | 5 - .../bin/install_webkit_wsl.ps1 | 33 - .../bin/reinstall_chrome_beta_linux.sh | 42 - .../bin/reinstall_chrome_beta_mac.sh | 13 - .../bin/reinstall_chrome_beta_win.ps1 | 24 - .../bin/reinstall_chrome_stable_linux.sh | 42 - .../bin/reinstall_chrome_stable_mac.sh | 12 - .../bin/reinstall_chrome_stable_win.ps1 | 24 - .../bin/reinstall_msedge_beta_linux.sh | 48 - .../bin/reinstall_msedge_beta_mac.sh | 11 - .../bin/reinstall_msedge_beta_win.ps1 | 23 - .../bin/reinstall_msedge_dev_linux.sh | 48 - .../bin/reinstall_msedge_dev_mac.sh | 11 - .../bin/reinstall_msedge_dev_win.ps1 | 23 - .../bin/reinstall_msedge_stable_linux.sh | 48 - .../bin/reinstall_msedge_stable_mac.sh | 11 - .../bin/reinstall_msedge_stable_win.ps1 | 24 - node_modules/playwright-core/browsers.json | 81 - node_modules/playwright-core/cli.js | 18 - node_modules/playwright-core/index.d.ts | 17 - node_modules/playwright-core/index.js | 32 - node_modules/playwright-core/index.mjs | 28 - .../playwright-core/lib/androidServerImpl.js | 65 - node_modules/playwright-core/lib/bootstrap.js | 77 - .../playwright-core/lib/browserServerImpl.js | 120 - .../playwright-core/lib/cli/browserActions.js | 308 - .../playwright-core/lib/cli/driver.js | 98 - .../playwright-core/lib/cli/installActions.js | 171 - .../playwright-core/lib/cli/program.js | 225 - .../lib/cli/programWithTestStub.js | 74 - .../playwright-core/lib/client/android.js | 361 - .../playwright-core/lib/client/api.js | 137 - .../playwright-core/lib/client/artifact.js | 79 - .../playwright-core/lib/client/browser.js | 169 - .../lib/client/browserContext.js | 563 - .../playwright-core/lib/client/browserType.js | 153 - .../playwright-core/lib/client/cdpSession.js | 55 - .../lib/client/channelOwner.js | 194 - .../lib/client/clientHelper.js | 64 - .../lib/client/clientInstrumentation.js | 55 - .../lib/client/clientStackTrace.js | 69 - .../playwright-core/lib/client/clock.js | 68 - .../playwright-core/lib/client/connect.js | 143 - .../playwright-core/lib/client/connection.js | 322 - .../lib/client/consoleMessage.js | 61 - .../playwright-core/lib/client/coverage.js | 44 - .../playwright-core/lib/client/debugger.js | 57 - .../playwright-core/lib/client/dialog.js | 63 - .../playwright-core/lib/client/disposable.js | 76 - .../playwright-core/lib/client/download.js | 62 - .../playwright-core/lib/client/electron.js | 139 - .../lib/client/elementHandle.js | 281 - .../playwright-core/lib/client/errors.js | 77 - .../lib/client/eventEmitter.js | 314 - .../playwright-core/lib/client/events.js | 103 - .../playwright-core/lib/client/fetch.js | 367 - .../playwright-core/lib/client/fileChooser.js | 46 - .../playwright-core/lib/client/fileUtils.js | 34 - .../playwright-core/lib/client/frame.js | 404 - .../playwright-core/lib/client/harRouter.js | 99 - .../playwright-core/lib/client/input.js | 84 - .../playwright-core/lib/client/jsHandle.js | 105 - .../playwright-core/lib/client/jsonPipe.js | 39 - .../playwright-core/lib/client/localUtils.js | 60 - .../playwright-core/lib/client/locator.js | 367 - .../playwright-core/lib/client/network.js | 750 - .../playwright-core/lib/client/page.js | 731 - .../playwright-core/lib/client/platform.js | 74 - .../playwright-core/lib/client/playwright.js | 71 - .../playwright-core/lib/client/screencast.js | 88 - .../playwright-core/lib/client/selectors.js | 57 - .../playwright-core/lib/client/stream.js | 39 - .../lib/client/timeoutSettings.js | 79 - .../playwright-core/lib/client/tracing.js | 126 - .../playwright-core/lib/client/types.js | 28 - .../playwright-core/lib/client/video.js | 52 - .../playwright-core/lib/client/waiter.js | 142 - .../playwright-core/lib/client/webError.js | 39 - .../playwright-core/lib/client/worker.js | 85 - .../lib/client/writableStream.js | 39 - .../lib/generated/bindingsControllerSource.js | 28 - .../lib/generated/clockSource.js | 28 - .../lib/generated/injectedScriptSource.js | 28 - .../lib/generated/pollingRecorderSource.js | 28 - .../lib/generated/storageScriptSource.js | 28 - .../lib/generated/utilityScriptSource.js | 28 - .../lib/generated/webSocketMockSource.js | 336 - .../playwright-core/lib/inProcessFactory.js | 60 - node_modules/playwright-core/lib/inprocess.js | 3 - node_modules/playwright-core/lib/mcpBundle.js | 78 - .../playwright-core/lib/mcpBundleImpl.js | 91 - .../playwright-core/lib/outofprocess.js | 76 - .../lib/protocol/serializers.js | 197 - .../playwright-core/lib/protocol/validator.js | 3067 - .../lib/protocol/validatorPrimitives.js | 193 - .../lib/remote/playwrightConnection.js | 131 - .../lib/remote/playwrightPipeServer.js | 100 - .../lib/remote/playwrightServer.js | 339 - .../lib/remote/playwrightWebSocketServer.js | 73 - .../lib/remote/serverTransport.js | 96 - .../lib/server/android/android.js | 465 - .../lib/server/android/backendAdb.js | 177 - .../playwright-core/lib/server/artifact.js | 127 - .../lib/server/bidi/bidiBrowser.js | 571 - .../lib/server/bidi/bidiChromium.js | 162 - .../lib/server/bidi/bidiConnection.js | 213 - .../lib/server/bidi/bidiDeserializer.js | 116 - .../lib/server/bidi/bidiExecutionContext.js | 267 - .../lib/server/bidi/bidiFirefox.js | 128 - .../lib/server/bidi/bidiInput.js | 146 - .../lib/server/bidi/bidiNetworkManager.js | 411 - .../lib/server/bidi/bidiOverCdp.js | 102 - .../lib/server/bidi/bidiPage.js | 599 - .../lib/server/bidi/bidiPdf.js | 106 - .../server/bidi/third_party/bidiCommands.d.js | 22 - .../server/bidi/third_party/bidiKeyboard.js | 256 - .../server/bidi/third_party/bidiProtocol.js | 24 - .../bidi/third_party/bidiProtocolCore.js | 180 - .../third_party/bidiProtocolPermissions.js | 42 - .../server/bidi/third_party/bidiSerializer.js | 148 - .../server/bidi/third_party/firefoxPrefs.js | 261 - .../playwright-core/lib/server/browser.js | 212 - .../lib/server/browserContext.js | 741 - .../playwright-core/lib/server/browserType.js | 338 - .../playwright-core/lib/server/callLog.js | 82 - .../lib/server/chromium/appIcon.png | Bin 16565 -> 0 bytes .../lib/server/chromium/chromium.js | 399 - .../lib/server/chromium/chromiumSwitches.js | 104 - .../lib/server/chromium/crBrowser.js | 528 - .../lib/server/chromium/crConnection.js | 197 - .../lib/server/chromium/crCoverage.js | 235 - .../lib/server/chromium/crDevTools.js | 111 - .../lib/server/chromium/crDragDrop.js | 131 - .../lib/server/chromium/crExecutionContext.js | 146 - .../lib/server/chromium/crInput.js | 187 - .../lib/server/chromium/crNetworkManager.js | 707 - .../lib/server/chromium/crPage.js | 963 - .../lib/server/chromium/crPdf.js | 121 - .../lib/server/chromium/crProtocolHelper.js | 145 - .../lib/server/chromium/crServiceWorker.js | 137 - .../server/chromium/defaultFontFamilies.js | 162 - .../lib/server/chromium/protocol.d.js | 16 - .../playwright-core/lib/server/clock.js | 149 - .../lib/server/codegen/csharp.js | 327 - .../lib/server/codegen/java.js | 274 - .../lib/server/codegen/javascript.js | 247 - .../lib/server/codegen/jsonl.js | 52 - .../lib/server/codegen/language.js | 132 - .../lib/server/codegen/languages.js | 68 - .../lib/server/codegen/python.js | 279 - .../lib/server/codegen/types.js | 16 - .../playwright-core/lib/server/console.js | 61 - .../playwright-core/lib/server/cookieStore.js | 206 - .../lib/server/debugController.js | 197 - .../playwright-core/lib/server/debugger.js | 112 - .../lib/server/deviceDescriptors.js | 39 - .../lib/server/deviceDescriptorsSource.json | 1779 - .../playwright-core/lib/server/dialog.js | 116 - .../server/dispatchers/androidDispatcher.js | 325 - .../server/dispatchers/artifactDispatcher.js | 118 - .../dispatchers/browserContextDispatcher.js | 381 - .../server/dispatchers/browserDispatcher.js | 124 - .../dispatchers/browserTypeDispatcher.js | 71 - .../dispatchers/cdpSessionDispatcher.js | 47 - .../dispatchers/debugControllerDispatcher.js | 78 - .../server/dispatchers/debuggerDispatcher.js | 84 - .../server/dispatchers/dialogDispatcher.js | 47 - .../lib/server/dispatchers/dispatcher.js | 364 - .../dispatchers/disposableDispatcher.js | 39 - .../server/dispatchers/electronDispatcher.js | 90 - .../dispatchers/elementHandlerDispatcher.js | 181 - .../lib/server/dispatchers/frameDispatcher.js | 227 - .../server/dispatchers/jsHandleDispatcher.js | 85 - .../server/dispatchers/jsonPipeDispatcher.js | 58 - .../dispatchers/localUtilsDispatcher.js | 185 - .../server/dispatchers/networkDispatchers.js | 214 - .../lib/server/dispatchers/pageDispatcher.js | 456 - .../dispatchers/playwrightDispatcher.js | 108 - .../server/dispatchers/streamDispatcher.js | 67 - .../server/dispatchers/tracingDispatcher.js | 68 - .../dispatchers/webSocketRouteDispatcher.js | 164 - .../dispatchers/writableStreamDispatcher.js | 79 - .../playwright-core/lib/server/disposable.js | 41 - .../playwright-core/lib/server/dom.js | 833 - .../playwright-core/lib/server/download.js | 71 - .../lib/server/electron/electron.js | 278 - .../lib/server/electron/loader.js | 29 - .../playwright-core/lib/server/errors.js | 69 - .../playwright-core/lib/server/fetch.js | 621 - .../playwright-core/lib/server/fileChooser.js | 43 - .../lib/server/fileUploadUtils.js | 84 - .../lib/server/firefox/ffBrowser.js | 408 - .../lib/server/firefox/ffConnection.js | 142 - .../lib/server/firefox/ffExecutionContext.js | 150 - .../lib/server/firefox/ffInput.js | 175 - .../lib/server/firefox/ffNetworkManager.js | 256 - .../lib/server/firefox/ffPage.js | 494 - .../lib/server/firefox/firefox.js | 114 - .../lib/server/firefox/protocol.d.js | 16 - .../playwright-core/lib/server/formData.js | 147 - .../lib/server/frameSelectors.js | 160 - .../playwright-core/lib/server/frames.js | 1500 - .../lib/server/har/harRecorder.js | 147 - .../lib/server/har/harTracer.js | 608 - .../playwright-core/lib/server/harBackend.js | 157 - .../playwright-core/lib/server/helper.js | 96 - .../playwright-core/lib/server/index.js | 58 - .../playwright-core/lib/server/input.js | 322 - .../lib/server/instrumentation.js | 77 - .../playwright-core/lib/server/javascript.js | 291 - .../playwright-core/lib/server/launchApp.js | 127 - .../playwright-core/lib/server/localUtils.js | 214 - .../lib/server/macEditingCommands.js | 143 - .../playwright-core/lib/server/network.js | 668 - .../playwright-core/lib/server/overlay.js | 138 - .../playwright-core/lib/server/page.js | 890 - .../lib/server/pipeTransport.js | 89 - .../playwright-core/lib/server/playwright.js | 69 - .../playwright-core/lib/server/progress.js | 138 - .../lib/server/protocolError.js | 52 - .../playwright-core/lib/server/recorder.js | 535 - .../lib/server/recorder/chat.js | 161 - .../lib/server/recorder/recorderApp.js | 367 - .../lib/server/recorder/recorderRunner.js | 138 - .../recorder/recorderSignalProcessor.js | 83 - .../lib/server/recorder/recorderUtils.js | 157 - .../lib/server/recorder/throttledFile.js | 57 - .../lib/server/registry/browserFetcher.js | 177 - .../lib/server/registry/dependencies.js | 371 - .../lib/server/registry/index.js | 1395 - .../lib/server/registry/nativeDeps.js | 1281 - .../server/registry/oopDownloadBrowserMain.js | 127 - .../playwright-core/lib/server/screencast.js | 137 - .../lib/server/screenshotter.js | 333 - .../playwright-core/lib/server/selectors.js | 112 - .../socksClientCertificatesInterceptor.js | 383 - .../lib/server/socksInterceptor.js | 95 - .../lib/server/trace/recorder/snapshotter.js | 147 - .../trace/recorder/snapshotterInjected.js | 561 - .../lib/server/trace/recorder/tracing.js | 655 - .../lib/server/trace/viewer/traceViewer.js | 244 - .../playwright-core/lib/server/transport.js | 181 - .../playwright-core/lib/server/types.js | 28 - .../lib/server/usKeyboardLayout.js | 152 - .../playwright-core/lib/server/utils/ascii.js | 44 - .../lib/server/utils/comparators.js | 139 - .../lib/server/utils/crypto.js | 216 - .../playwright-core/lib/server/utils/debug.js | 42 - .../lib/server/utils/debugLogger.js | 122 - .../lib/server/utils/disposable.js | 32 - .../playwright-core/lib/server/utils/env.js | 73 - .../lib/server/utils/eventsHelper.js | 41 - .../lib/server/utils/expectUtils.js | 123 - .../lib/server/utils/fileUtils.js | 205 - .../lib/server/utils/happyEyeballs.js | 210 - .../lib/server/utils/hostPlatform.js | 123 - .../lib/server/utils/httpServer.js | 205 - .../server/utils/image_tools/colorUtils.js | 89 - .../lib/server/utils/image_tools/compare.js | 109 - .../server/utils/image_tools/imageChannel.js | 78 - .../lib/server/utils/image_tools/stats.js | 102 - .../lib/server/utils/linuxUtils.js | 71 - .../lib/server/utils/network.js | 243 - .../lib/server/utils/nodePlatform.js | 148 - .../lib/server/utils/pipeTransport.js | 84 - .../lib/server/utils/processLauncher.js | 242 - .../lib/server/utils/profiler.js | 65 - .../lib/server/utils/socksProxy.js | 511 - .../lib/server/utils/spawnAsync.js | 41 - .../playwright-core/lib/server/utils/task.js | 51 - .../lib/server/utils/userAgent.js | 98 - .../lib/server/utils/wsServer.js | 121 - .../lib/server/utils/zipFile.js | 74 - .../playwright-core/lib/server/utils/zones.js | 57 - .../lib/server/videoRecorder.js | 194 - .../lib/server/webkit/protocol.d.js | 16 - .../lib/server/webkit/webkit.js | 108 - .../lib/server/webkit/wkBrowser.js | 330 - .../lib/server/webkit/wkConnection.js | 144 - .../lib/server/webkit/wkExecutionContext.js | 154 - .../lib/server/webkit/wkInput.js | 181 - .../server/webkit/wkInterceptableRequest.js | 197 - .../lib/server/webkit/wkPage.js | 1161 - .../lib/server/webkit/wkProvisionalPage.js | 83 - .../lib/server/webkit/wkWorkers.js | 106 - .../playwright-core/lib/serverRegistry.js | 156 - .../lib/third_party/pixelmatch.js | 255 - .../lib/tools/backend/browserBackend.js | 79 - .../lib/tools/backend/common.js | 63 - .../lib/tools/backend/config.js | 41 - .../lib/tools/backend/console.js | 66 - .../lib/tools/backend/context.js | 296 - .../lib/tools/backend/cookies.js | 152 - .../lib/tools/backend/devtools.js | 69 - .../lib/tools/backend/dialogs.js | 59 - .../lib/tools/backend/evaluate.js | 64 - .../lib/tools/backend/files.js | 60 - .../playwright-core/lib/tools/backend/form.js | 64 - .../lib/tools/backend/keyboard.js | 155 - .../lib/tools/backend/logFile.js | 95 - .../lib/tools/backend/mouse.js | 168 - .../lib/tools/backend/navigate.js | 106 - .../lib/tools/backend/network.js | 135 - .../playwright-core/lib/tools/backend/pdf.js | 48 - .../lib/tools/backend/response.js | 305 - .../lib/tools/backend/route.js | 140 - .../lib/tools/backend/runCode.js | 77 - .../lib/tools/backend/screenshot.js | 88 - .../lib/tools/backend/sessionLog.js | 74 - .../lib/tools/backend/snapshot.js | 208 - .../lib/tools/backend/storage.js | 68 - .../playwright-core/lib/tools/backend/tab.js | 445 - .../playwright-core/lib/tools/backend/tabs.js | 67 - .../playwright-core/lib/tools/backend/tool.js | 47 - .../lib/tools/backend/tools.js | 102 - .../lib/tools/backend/tracing.js | 78 - .../lib/tools/backend/utils.js | 83 - .../lib/tools/backend/verify.js | 151 - .../lib/tools/backend/video.js | 98 - .../playwright-core/lib/tools/backend/wait.js | 63 - .../lib/tools/backend/webstorage.js | 223 - .../lib/tools/cli-client/cli.js | 6 - .../lib/tools/cli-client/help.json | 399 - .../lib/tools/cli-client/minimist.js | 128 - .../lib/tools/cli-client/program.js | 350 - .../lib/tools/cli-client/registry.js | 176 - .../lib/tools/cli-client/session.js | 289 - .../lib/tools/cli-client/skill/SKILL.md | 328 - .../skill/references/element-attributes.md | 23 - .../skill/references/playwright-tests.md | 39 - .../skill/references/request-mocking.md | 87 - .../skill/references/running-code.md | 231 - .../skill/references/session-management.md | 169 - .../skill/references/storage-state.md | 275 - .../skill/references/test-generation.md | 88 - .../cli-client/skill/references/tracing.md | 139 - .../skill/references/video-recording.md | 143 - .../lib/tools/cli-daemon/command.js | 73 - .../lib/tools/cli-daemon/commands.js | 956 - .../lib/tools/cli-daemon/daemon.js | 157 - .../lib/tools/cli-daemon/helpGenerator.js | 177 - .../lib/tools/cli-daemon/program.js | 129 - .../lib/tools/dashboard/appIcon.png | Bin 16565 -> 0 bytes .../lib/tools/dashboard/dashboardApp.js | 284 - .../tools/dashboard/dashboardController.js | 296 - .../playwright-core/lib/tools/exports.js | 60 - .../lib/tools/mcp/browserFactory.js | 233 - .../playwright-core/lib/tools/mcp/cdpRelay.js | 352 - .../playwright-core/lib/tools/mcp/cli-stub.js | 7 - .../playwright-core/lib/tools/mcp/config.d.js | 16 - .../playwright-core/lib/tools/mcp/config.js | 446 - .../lib/tools/mcp/configIni.js | 189 - .../lib/tools/mcp/extensionContextFactory.js | 55 - .../playwright-core/lib/tools/mcp/index.js | 62 - .../playwright-core/lib/tools/mcp/log.js | 35 - .../playwright-core/lib/tools/mcp/program.js | 107 - .../playwright-core/lib/tools/mcp/protocol.js | 28 - .../playwright-core/lib/tools/mcp/watchdog.js | 44 - .../playwright-core/lib/tools/trace/SKILL.md | 171 - .../lib/tools/trace/installSkill.js | 48 - .../lib/tools/trace/traceActions.js | 142 - .../lib/tools/trace/traceAttachments.js | 69 - .../lib/tools/trace/traceCli.js | 87 - .../lib/tools/trace/traceConsole.js | 97 - .../lib/tools/trace/traceErrors.js | 55 - .../lib/tools/trace/traceOpen.js | 69 - .../lib/tools/trace/traceParser.js | 96 - .../lib/tools/trace/traceRequests.js | 182 - .../lib/tools/trace/traceScreenshot.js | 68 - .../lib/tools/trace/traceSnapshot.js | 149 - .../lib/tools/trace/traceUtils.js | 153 - .../lib/tools/utils/connect.js | 32 - .../lib/tools/utils/mcp/http.js | 152 - .../lib/tools/utils/mcp/server.js | 230 - .../lib/tools/utils/mcp/tool.js | 47 - .../lib/tools/utils/socketConnection.js | 108 - node_modules/playwright-core/lib/utils.js | 115 - .../lib/utils/isomorphic/ariaSnapshot.js | 455 - .../lib/utils/isomorphic/assert.js | 31 - .../lib/utils/isomorphic/colors.js | 72 - .../lib/utils/isomorphic/cssParser.js | 245 - .../lib/utils/isomorphic/cssTokenizer.js | 1051 - .../lib/utils/isomorphic/formatUtils.js | 64 - .../lib/utils/isomorphic/headers.js | 53 - .../lib/utils/isomorphic/imageUtils.js | 141 - .../lib/utils/isomorphic/jsonSchema.js | 89 - .../lib/utils/isomorphic/locatorGenerators.js | 689 - .../lib/utils/isomorphic/locatorParser.js | 176 - .../lib/utils/isomorphic/locatorUtils.js | 81 - .../lib/utils/isomorphic/lruCache.js | 51 - .../lib/utils/isomorphic/manualPromise.js | 114 - .../lib/utils/isomorphic/mimeType.js | 464 - .../lib/utils/isomorphic/multimap.js | 80 - .../lib/utils/isomorphic/protocolFormatter.js | 81 - .../lib/utils/isomorphic/protocolMetainfo.js | 351 - .../lib/utils/isomorphic/rtti.js | 43 - .../lib/utils/isomorphic/selectorParser.js | 386 - .../lib/utils/isomorphic/semaphore.js | 54 - .../lib/utils/isomorphic/stackTrace.js | 158 - .../lib/utils/isomorphic/stringUtils.js | 204 - .../lib/utils/isomorphic/time.js | 49 - .../lib/utils/isomorphic/timeoutRunner.js | 66 - .../lib/utils/isomorphic/trace/entries.js | 16 - .../isomorphic/trace/snapshotRenderer.js | 492 - .../utils/isomorphic/trace/snapshotServer.js | 120 - .../utils/isomorphic/trace/snapshotStorage.js | 89 - .../lib/utils/isomorphic/trace/traceLoader.js | 132 - .../lib/utils/isomorphic/trace/traceModel.js | 366 - .../utils/isomorphic/trace/traceModernizer.js | 401 - .../lib/utils/isomorphic/trace/traceUtils.js | 58 - .../isomorphic/trace/versions/traceV3.js | 16 - .../isomorphic/trace/versions/traceV4.js | 16 - .../isomorphic/trace/versions/traceV5.js | 16 - .../isomorphic/trace/versions/traceV6.js | 16 - .../isomorphic/trace/versions/traceV7.js | 16 - .../isomorphic/trace/versions/traceV8.js | 16 - .../lib/utils/isomorphic/types.js | 16 - .../lib/utils/isomorphic/urlMatch.js | 243 - .../isomorphic/utilityScriptSerializers.js | 262 - .../lib/utils/isomorphic/yaml.js | 84 - .../playwright-core/lib/utilsBundle.js | 91 - .../lib/utilsBundleImpl/index.js | 217 - .../lib/utilsBundleImpl/xdg-open | 1066 - .../vite/dashboard/assets/index-BAOybkp8.js | 50 - .../vite/dashboard/assets/index-CZAYOG76.css | 1 - .../lib/vite/dashboard/index.html | 28 - .../lib/vite/htmlReport/index.html | 16 - .../lib/vite/htmlReport/report.css | 1 - .../lib/vite/htmlReport/report.js | 72 - .../assets/codeMirrorModule-C8KMvO9L.js | 32 - .../assets/codeMirrorModule-DYBRYzYX.css | 1 - .../vite/recorder/assets/codicon-DCmgc-ay.ttf | Bin 80340 -> 0 bytes .../vite/recorder/assets/index-BSjZa4pk.css | 1 - .../vite/recorder/assets/index-CqAYX1I3.js | 193 - .../lib/vite/recorder/index.html | 29 - .../lib/vite/recorder/playwright-logo.svg | 9 - .../assets/codeMirrorModule-DS0FLvoc.js | 32 - .../assets/defaultSettingsView-GTWI-W_B.js | 262 - .../assets/xtermModule-CsJ4vdCR.js | 9 - .../traceViewer/codeMirrorModule.DYBRYzYX.css | 1 - .../lib/vite/traceViewer/codicon.DCmgc-ay.ttf | Bin 80340 -> 0 bytes .../defaultSettingsView.B4dS75f0.css | 1 - .../lib/vite/traceViewer/index.C5466mMT.js | 2 - .../lib/vite/traceViewer/index.CzXZzn5A.css | 1 - .../lib/vite/traceViewer/index.html | 43 - .../lib/vite/traceViewer/manifest.webmanifest | 16 - .../lib/vite/traceViewer/playwright-logo.svg | 9 - .../lib/vite/traceViewer/snapshot.html | 21 - .../lib/vite/traceViewer/sw.bundle.js | 5 - .../lib/vite/traceViewer/uiMode.Btcz36p_.css | 1 - .../lib/vite/traceViewer/uiMode.Vipi55dB.js | 6 - .../lib/vite/traceViewer/uiMode.html | 17 - .../vite/traceViewer/xtermModule.DYP7pi_n.css | 32 - node_modules/playwright-core/lib/zipBundle.js | 34 - .../playwright-core/lib/zipBundleImpl.js | 5 - node_modules/playwright-core/lib/zodBundle.js | 39 - .../playwright-core/lib/zodBundleImpl.js | 40 - node_modules/playwright-core/package.json | 48 - .../playwright-core/types/protocol.d.ts | 24720 -- .../playwright-core/types/structs.d.ts | 45 - node_modules/playwright-core/types/types.d.ts | 23623 -- node_modules/playwright/LICENSE | 202 - node_modules/playwright/NOTICE | 5 - node_modules/playwright/README.md | 170 - node_modules/playwright/ThirdPartyNotices.txt | 3919 - node_modules/playwright/cli.js | 19 - node_modules/playwright/index.d.ts | 17 - node_modules/playwright/index.js | 17 - node_modules/playwright/index.mjs | 18 - node_modules/playwright/jsx-runtime.js | 42 - node_modules/playwright/jsx-runtime.mjs | 21 - .../playwright/lib/agents/agentParser.js | 89 - .../lib/agents/copilot-setup-steps.yml | 34 - .../playwright/lib/agents/generateAgents.js | 346 - .../agents/playwright-test-coverage.prompt.md | 31 - .../agents/playwright-test-generate.prompt.md | 8 - .../agents/playwright-test-generator.agent.md | 88 - .../lib/agents/playwright-test-heal.prompt.md | 6 - .../agents/playwright-test-healer.agent.md | 55 - .../lib/agents/playwright-test-plan.prompt.md | 9 - .../agents/playwright-test-planner.agent.md | 73 - node_modules/playwright/lib/common/config.js | 281 - .../playwright/lib/common/configLoader.js | 344 - .../playwright/lib/common/esmLoaderHost.js | 104 - .../playwright/lib/common/expectBundle.js | 28 - .../playwright/lib/common/expectBundleImpl.js | 407 - .../playwright/lib/common/fixtures.js | 302 - node_modules/playwright/lib/common/globals.js | 58 - node_modules/playwright/lib/common/ipc.js | 60 - .../playwright/lib/common/poolBuilder.js | 85 - node_modules/playwright/lib/common/process.js | 133 - .../playwright/lib/common/suiteUtils.js | 140 - node_modules/playwright/lib/common/test.js | 330 - .../playwright/lib/common/testLoader.js | 101 - .../playwright/lib/common/testType.js | 301 - .../playwright/lib/common/validators.js | 68 - node_modules/playwright/lib/errorContext.js | 121 - node_modules/playwright/lib/fsWatcher.js | 67 - node_modules/playwright/lib/index.js | 764 - .../playwright/lib/internalsForTest.js | 42 - .../playwright/lib/isomorphic/events.js | 77 - .../playwright/lib/isomorphic/folders.js | 30 - .../lib/isomorphic/stringInternPool.js | 69 - .../playwright/lib/isomorphic/teleReceiver.js | 538 - .../lib/isomorphic/teleSuiteUpdater.js | 157 - .../lib/isomorphic/testServerConnection.js | 223 - .../lib/isomorphic/testServerInterface.js | 16 - .../playwright/lib/isomorphic/testTree.js | 329 - .../playwright/lib/isomorphic/types.d.js | 16 - .../playwright/lib/loader/loaderMain.js | 59 - .../playwright/lib/matchers/expect.js | 311 - .../playwright/lib/matchers/matcherHint.js | 44 - .../playwright/lib/matchers/matchers.js | 385 - .../playwright/lib/matchers/toBeTruthy.js | 75 - .../playwright/lib/matchers/toEqual.js | 100 - .../playwright/lib/matchers/toHaveURL.js | 101 - .../lib/matchers/toMatchAriaSnapshot.js | 163 - .../lib/matchers/toMatchSnapshot.js | 349 - .../playwright/lib/matchers/toMatchText.js | 99 - .../playwright/lib/mcp/test/browserBackend.js | 121 - .../playwright/lib/mcp/test/generatorTools.js | 122 - .../playwright/lib/mcp/test/plannerTools.js | 145 - node_modules/playwright/lib/mcp/test/seed.js | 82 - .../playwright/lib/mcp/test/streams.js | 44 - .../playwright/lib/mcp/test/testBackend.js | 99 - .../playwright/lib/mcp/test/testContext.js | 283 - .../playwright/lib/mcp/test/testTool.js | 30 - .../playwright/lib/mcp/test/testTools.js | 108 - .../lib/plugins/gitCommitInfoPlugin.js | 198 - node_modules/playwright/lib/plugins/index.js | 28 - .../playwright/lib/plugins/webServerPlugin.js | 238 - node_modules/playwright/lib/program.js | 239 - node_modules/playwright/lib/reportActions.js | 80 - node_modules/playwright/lib/reporters/base.js | 633 - node_modules/playwright/lib/reporters/blob.js | 138 - node_modules/playwright/lib/reporters/dot.js | 99 - .../playwright/lib/reporters/empty.js | 32 - .../playwright/lib/reporters/github.js | 127 - node_modules/playwright/lib/reporters/html.js | 666 - .../lib/reporters/internalReporter.js | 138 - node_modules/playwright/lib/reporters/json.js | 254 - .../playwright/lib/reporters/junit.js | 321 - node_modules/playwright/lib/reporters/line.js | 131 - node_modules/playwright/lib/reporters/list.js | 252 - .../lib/reporters/listModeReporter.js | 69 - .../playwright/lib/reporters/markdown.js | 144 - .../playwright/lib/reporters/merge.js | 579 - .../playwright/lib/reporters/multiplexer.js | 116 - .../playwright/lib/reporters/reporterV2.js | 102 - .../playwright/lib/reporters/teleEmitter.js | 319 - .../lib/reporters/versions/blobV1.js | 16 - .../playwright/lib/runner/dispatcher.js | 522 - .../playwright/lib/runner/failureTracker.js | 72 - node_modules/playwright/lib/runner/lastRun.js | 77 - .../playwright/lib/runner/loadUtils.js | 340 - .../playwright/lib/runner/loaderHost.js | 89 - .../playwright/lib/runner/processHost.js | 180 - .../playwright/lib/runner/projectUtils.js | 241 - node_modules/playwright/lib/runner/rebase.js | 189 - .../playwright/lib/runner/reporters.js | 143 - .../playwright/lib/runner/sigIntWatcher.js | 96 - .../playwright/lib/runner/taskRunner.js | 127 - node_modules/playwright/lib/runner/tasks.js | 413 - .../playwright/lib/runner/testGroups.js | 125 - .../playwright/lib/runner/testRunner.js | 398 - .../playwright/lib/runner/testServer.js | 269 - .../playwright/lib/runner/uiModeReporter.js | 30 - node_modules/playwright/lib/runner/vcs.js | 72 - .../playwright/lib/runner/watchMode.js | 396 - .../playwright/lib/runner/workerHost.js | 101 - node_modules/playwright/lib/testActions.js | 220 - .../playwright/lib/third_party/pirates.js | 62 - .../lib/third_party/tsconfig-loader.js | 103 - .../playwright/lib/transform/babelBundle.js | 43 - .../lib/transform/babelBundleImpl.js | 461 - .../lib/transform/compilationCache.js | 272 - .../playwright/lib/transform/esmLoader.js | 105 - .../playwright/lib/transform/portTransport.js | 67 - .../playwright/lib/transform/transform.js | 296 - node_modules/playwright/lib/util.js | 400 - node_modules/playwright/lib/utilsBundle.js | 43 - .../playwright/lib/utilsBundleImpl.js | 100 - .../playwright/lib/worker/fixtureRunner.js | 262 - .../playwright/lib/worker/testInfo.js | 532 - .../playwright/lib/worker/testTracing.js | 351 - .../playwright/lib/worker/timeoutManager.js | 185 - node_modules/playwright/lib/worker/util.js | 31 - .../playwright/lib/worker/workerMain.js | 533 - node_modules/playwright/package.json | 68 - node_modules/playwright/test.d.ts | 18 - node_modules/playwright/test.js | 24 - node_modules/playwright/test.mjs | 34 - node_modules/playwright/types/test.d.ts | 10322 - .../playwright/types/testReporter.d.ts | 822 - .../lib/cjs/puppeteer/api/Frame.d.ts.map | 1 - .../lib/cjs/puppeteer/api/Page.d.ts.map | 1 - .../lib/cjs/puppeteer/bidi/Frame.d.ts.map | 1 - .../lib/cjs/puppeteer/cdp/Frame.d.ts.map | 1 - .../lib/cjs/puppeteer/cdp/Frame.js.map | 1 - .../lib/cjs/puppeteer/cdp/Page.d.ts.map | 1 - .../lib/cjs/puppeteer/cdp/Page.js.map | 1 - .../puppeteer/common/BrowserConnector.js.map | 1 - .../puppeteer/common/EventEmitter.d.ts.map | 1 - .../cjs/puppeteer/common/EventEmitter.js.map | 1 - .../cjs/puppeteer/node/BrowserLauncher.js.map | 1 - .../lib/esm/puppeteer/api/Frame.d.ts.map | 1 - .../lib/esm/puppeteer/api/Page.d.ts.map | 1 - .../lib/esm/puppeteer/bidi/Frame.d.ts.map | 1 - .../lib/esm/puppeteer/cdp/Frame.d.ts.map | 1 - .../lib/esm/puppeteer/cdp/Frame.js.map | 1 - .../lib/esm/puppeteer/cdp/Page.d.ts.map | 1 - .../lib/esm/puppeteer/cdp/Page.js.map | 1 - .../puppeteer/common/BrowserConnector.js.map | 1 - .../puppeteer/common/EventEmitter.d.ts.map | 1 - .../esm/puppeteer/common/EventEmitter.js.map | 1 - .../esm/puppeteer/node/BrowserLauncher.js.map | 1 - .../{puppeteer-core => puppeteer}/README.md | 0 node_modules/puppeteer/install.mjs | 43 + .../lib/cjs/puppeteer/getConfiguration.d.ts | 11 + .../cjs/puppeteer/getConfiguration.d.ts.map | 1 + .../lib/cjs/puppeteer/getConfiguration.js | 126 + .../lib/cjs/puppeteer/getConfiguration.js.map | 1 + .../puppeteer/lib/cjs/puppeteer/node/cli.d.ts | 8 + .../lib/cjs/puppeteer/node/cli.d.ts.map | 1 + .../puppeteer/lib/cjs/puppeteer/node/cli.js | 51 + .../lib/cjs/puppeteer/node/cli.js.map | 1 + .../lib/cjs/puppeteer/node/install.d.ts | 10 + .../lib/cjs/puppeteer/node/install.d.ts.map | 1 + .../lib/cjs/puppeteer/node/install.js | 122 + .../lib/cjs/puppeteer/node/install.js.map | 1 + .../lib/cjs/puppeteer/puppeteer.d.ts | 38 + .../lib/cjs/puppeteer/puppeteer.d.ts.map | 1 + .../puppeteer/lib/cjs/puppeteer/puppeteer.js | 56 + .../lib/cjs/puppeteer/puppeteer.js.map | 1 + node_modules/puppeteer/lib/esm/package.json | 1 + .../lib/esm/puppeteer/getConfiguration.d.ts | 11 + .../esm/puppeteer/getConfiguration.d.ts.map | 1 + .../lib/esm/puppeteer/getConfiguration.js | 122 + .../lib/esm/puppeteer/getConfiguration.js.map | 1 + .../puppeteer/lib/esm/puppeteer/node/cli.d.ts | 8 + .../lib/esm/puppeteer/node/cli.d.ts.map | 1 + .../puppeteer/lib/esm/puppeteer/node/cli.js | 46 + .../lib/esm/puppeteer/node/cli.js.map | 1 + .../lib/esm/puppeteer/node/install.d.ts | 10 + .../lib/esm/puppeteer/node/install.d.ts.map | 1 + .../lib/esm/puppeteer/node/install.js | 119 + .../lib/esm/puppeteer/node/install.js.map | 1 + .../lib/esm/puppeteer/puppeteer.d.ts | 38 + .../lib/esm/puppeteer/puppeteer.d.ts.map | 1 + .../puppeteer/lib/esm/puppeteer/puppeteer.js | 40 + .../lib/esm/puppeteer/puppeteer.js.map | 1 + node_modules/puppeteer/lib/types.d.ts | 79 + .../node_modules/puppeteer-core/README.md | 64 + .../cjs/puppeteer/api/BluetoothEmulation.d.ts | 0 .../puppeteer/api/BluetoothEmulation.d.ts.map | 0 .../cjs/puppeteer/api/BluetoothEmulation.js | 0 .../puppeteer/api/BluetoothEmulation.js.map | 0 .../lib/cjs/puppeteer/api/Browser.d.ts | 0 .../lib/cjs}/puppeteer/api/Browser.d.ts.map | 2 +- .../lib/cjs/puppeteer/api/Browser.js | 14 +- .../lib/cjs/puppeteer/api/Browser.js.map | 2 +- .../lib/cjs/puppeteer/api/BrowserContext.d.ts | 0 .../cjs/puppeteer/api/BrowserContext.d.ts.map | 2 +- .../lib/cjs/puppeteer/api/BrowserContext.js | 7 +- .../cjs/puppeteer/api/BrowserContext.js.map | 2 +- .../lib/cjs/puppeteer/api/CDPSession.d.ts | 0 .../lib/cjs/puppeteer/api/CDPSession.d.ts.map | 0 .../lib/cjs/puppeteer/api/CDPSession.js | 0 .../lib/cjs/puppeteer/api/CDPSession.js.map | 0 .../puppeteer/api/DeviceRequestPrompt.d.ts | 0 .../api/DeviceRequestPrompt.d.ts.map | 0 .../cjs/puppeteer/api/DeviceRequestPrompt.js | 0 .../puppeteer/api/DeviceRequestPrompt.js.map | 0 .../lib/cjs/puppeteer/api/Dialog.d.ts | 0 .../lib/cjs/puppeteer/api/Dialog.d.ts.map | 0 .../lib/cjs/puppeteer/api/Dialog.js | 0 .../lib/cjs/puppeteer/api/Dialog.js.map | 0 .../lib/cjs/puppeteer/api/ElementHandle.d.ts | 0 .../cjs/puppeteer/api/ElementHandle.d.ts.map | 0 .../lib/cjs/puppeteer/api/ElementHandle.js | 0 .../cjs/puppeteer/api/ElementHandle.js.map | 0 .../puppeteer/api/ElementHandleSymbol.d.ts | 0 .../api/ElementHandleSymbol.d.ts.map | 0 .../cjs/puppeteer/api/ElementHandleSymbol.js | 0 .../puppeteer/api/ElementHandleSymbol.js.map | 0 .../lib/cjs/puppeteer/api/Environment.d.ts | 0 .../cjs/puppeteer/api/Environment.d.ts.map | 0 .../lib/cjs/puppeteer/api/Environment.js | 0 .../lib/cjs/puppeteer/api/Environment.js.map | 0 .../lib/cjs/puppeteer/api/Extension.d.ts | 0 .../lib/cjs/puppeteer/api/Extension.d.ts.map | 0 .../lib/cjs/puppeteer/api/Extension.js | 0 .../lib/cjs/puppeteer/api/Extension.js.map | 0 .../lib/cjs/puppeteer/api/Frame.d.ts | 16 +- .../lib/cjs/puppeteer/api/Frame.d.ts.map | 1 + .../lib/cjs/puppeteer/api/Frame.js | 0 .../lib/cjs/puppeteer/api/Frame.js.map | 2 +- .../lib/cjs/puppeteer/api/HTTPRequest.d.ts | 0 .../cjs/puppeteer/api/HTTPRequest.d.ts.map | 0 .../lib/cjs/puppeteer/api/HTTPRequest.js | 0 .../lib/cjs/puppeteer/api/HTTPRequest.js.map | 0 .../lib/cjs/puppeteer/api/HTTPResponse.d.ts | 0 .../cjs/puppeteer/api/HTTPResponse.d.ts.map | 0 .../lib/cjs/puppeteer/api/HTTPResponse.js | 0 .../lib/cjs/puppeteer/api/HTTPResponse.js.map | 0 .../lib/cjs/puppeteer/api/Input.d.ts | 0 .../lib/cjs/puppeteer/api/Input.d.ts.map | 0 .../lib/cjs/puppeteer/api/Input.js | 0 .../lib/cjs/puppeteer/api/Input.js.map | 0 .../lib/cjs/puppeteer/api/Issue.d.ts | 0 .../lib/cjs/puppeteer/api/Issue.d.ts.map | 0 .../lib/cjs/puppeteer/api/Issue.js | 0 .../lib/cjs/puppeteer/api/Issue.js.map | 0 .../lib/cjs/puppeteer/api/JSHandle.d.ts | 0 .../lib/cjs/puppeteer/api/JSHandle.d.ts.map | 0 .../lib/cjs/puppeteer/api/JSHandle.js | 2 +- .../lib/cjs/puppeteer/api/JSHandle.js.map | 2 +- .../lib/cjs/puppeteer/api/Page.d.ts | 4 +- .../lib/cjs/puppeteer/api/Page.d.ts.map | 1 + .../lib/cjs/puppeteer/api/Page.js | 7 +- .../lib/cjs/puppeteer/api/Page.js.map | 2 +- .../lib/cjs/puppeteer/api/Realm.d.ts | 0 .../lib/cjs/puppeteer/api/Realm.d.ts.map | 0 .../lib/cjs/puppeteer/api/Realm.js | 0 .../lib/cjs/puppeteer/api/Realm.js.map | 0 .../lib/cjs/puppeteer/api/Target.d.ts | 0 .../lib/cjs/puppeteer/api/Target.d.ts.map | 0 .../lib/cjs/puppeteer/api/Target.js | 0 .../lib/cjs/puppeteer/api/Target.js.map | 0 .../lib/cjs/puppeteer/api/WebWorker.d.ts | 0 .../lib/cjs/puppeteer/api/WebWorker.d.ts.map | 0 .../lib/cjs/puppeteer/api/WebWorker.js | 0 .../lib/cjs/puppeteer/api/WebWorker.js.map | 0 .../lib/cjs/puppeteer/api/api.d.ts | 0 .../lib/cjs/puppeteer/api/api.d.ts.map | 0 .../lib/cjs/puppeteer/api/api.js | 0 .../lib/cjs/puppeteer/api/api.js.map | 0 .../cjs/puppeteer/api/locators/locators.d.ts | 0 .../puppeteer/api/locators/locators.d.ts.map | 0 .../cjs/puppeteer/api/locators/locators.js | 0 .../puppeteer/api/locators/locators.js.map | 0 .../lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts | 0 .../cjs/puppeteer/bidi/BidiOverCdp.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/BidiOverCdp.js | 0 .../lib/cjs/puppeteer/bidi/BidiOverCdp.js.map | 0 .../puppeteer/bidi/BluetoothEmulation.d.ts | 0 .../bidi/BluetoothEmulation.d.ts.map | 0 .../cjs/puppeteer/bidi/BluetoothEmulation.js | 0 .../puppeteer/bidi/BluetoothEmulation.js.map | 0 .../lib/cjs/puppeteer/bidi/Browser.d.ts | 0 .../lib/cjs/puppeteer/bidi/Browser.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Browser.js | 0 .../lib/cjs/puppeteer/bidi/Browser.js.map | 0 .../cjs/puppeteer/bidi/BrowserConnector.d.ts | 0 .../puppeteer/bidi/BrowserConnector.d.ts.map | 0 .../cjs/puppeteer/bidi/BrowserConnector.js | 0 .../puppeteer/bidi/BrowserConnector.js.map | 0 .../cjs/puppeteer/bidi/BrowserContext.d.ts | 0 .../puppeteer/bidi/BrowserContext.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/BrowserContext.js | 0 .../cjs/puppeteer/bidi/BrowserContext.js.map | 0 .../lib/cjs/puppeteer/bidi/CDPSession.d.ts | 0 .../cjs/puppeteer/bidi/CDPSession.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/CDPSession.js | 0 .../lib/cjs/puppeteer/bidi/CDPSession.js.map | 0 .../lib/cjs/puppeteer/bidi/Connection.d.ts | 0 .../cjs/puppeteer/bidi/Connection.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Connection.js | 0 .../lib/cjs/puppeteer/bidi/Connection.js.map | 0 .../lib/cjs/puppeteer/bidi/Deserializer.d.ts | 0 .../cjs/puppeteer/bidi/Deserializer.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Deserializer.js | 0 .../cjs/puppeteer/bidi/Deserializer.js.map | 0 .../puppeteer/bidi/DeviceRequestPrompt.d.ts | 0 .../bidi/DeviceRequestPrompt.d.ts.map | 0 .../cjs/puppeteer/bidi/DeviceRequestPrompt.js | 0 .../puppeteer/bidi/DeviceRequestPrompt.js.map | 0 .../lib/cjs/puppeteer/bidi/Dialog.d.ts | 0 .../lib/cjs/puppeteer/bidi/Dialog.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Dialog.js | 0 .../lib/cjs/puppeteer/bidi/Dialog.js.map | 0 .../lib/cjs/puppeteer/bidi/ElementHandle.d.ts | 0 .../cjs/puppeteer/bidi/ElementHandle.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/ElementHandle.js | 0 .../cjs/puppeteer/bidi/ElementHandle.js.map | 0 .../cjs/puppeteer/bidi/ExposedFunction.d.ts | 0 .../puppeteer/bidi/ExposedFunction.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/ExposedFunction.js | 0 .../cjs/puppeteer/bidi/ExposedFunction.js.map | 0 .../lib/cjs}/puppeteer/bidi/Frame.d.ts | 4 +- .../lib/cjs/puppeteer/bidi/Frame.d.ts.map | 1 + .../lib/cjs/puppeteer/bidi/Frame.js | 0 .../lib/cjs/puppeteer/bidi/Frame.js.map | 2 +- .../lib/cjs/puppeteer/bidi/HTTPRequest.d.ts | 0 .../cjs/puppeteer/bidi/HTTPRequest.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/HTTPRequest.js | 0 .../lib/cjs/puppeteer/bidi/HTTPRequest.js.map | 0 .../lib/cjs/puppeteer/bidi/HTTPResponse.d.ts | 0 .../cjs/puppeteer/bidi/HTTPResponse.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/HTTPResponse.js | 0 .../cjs/puppeteer/bidi/HTTPResponse.js.map | 0 .../lib/cjs/puppeteer/bidi/Input.d.ts | 0 .../lib/cjs/puppeteer/bidi/Input.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Input.js | 0 .../lib/cjs/puppeteer/bidi/Input.js.map | 0 .../lib/cjs/puppeteer/bidi/JSHandle.d.ts | 0 .../lib/cjs/puppeteer/bidi/JSHandle.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/JSHandle.js | 0 .../lib/cjs/puppeteer/bidi/JSHandle.js.map | 0 .../lib/cjs/puppeteer/bidi/Page.d.ts | 0 .../lib/cjs/puppeteer/bidi/Page.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Page.js | 0 .../lib/cjs/puppeteer/bidi/Page.js.map | 0 .../lib/cjs/puppeteer/bidi/Realm.d.ts | 0 .../lib/cjs/puppeteer/bidi/Realm.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Realm.js | 0 .../lib/cjs/puppeteer/bidi/Realm.js.map | 0 .../lib/cjs/puppeteer/bidi/Serializer.d.ts | 0 .../cjs/puppeteer/bidi/Serializer.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Serializer.js | 0 .../lib/cjs/puppeteer/bidi/Serializer.js.map | 0 .../lib/cjs/puppeteer/bidi/Target.d.ts | 0 .../lib/cjs/puppeteer/bidi/Target.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/Target.js | 0 .../lib/cjs/puppeteer/bidi/Target.js.map | 0 .../lib/cjs/puppeteer/bidi/WebWorker.d.ts | 0 .../lib/cjs/puppeteer/bidi/WebWorker.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/WebWorker.js | 0 .../lib/cjs/puppeteer/bidi/WebWorker.js.map | 0 .../lib/cjs/puppeteer/bidi/bidi.d.ts | 0 .../lib/cjs/puppeteer/bidi/bidi.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/bidi.js | 0 .../lib/cjs/puppeteer/bidi/bidi.js.map | 0 .../lib/cjs/puppeteer/bidi/core/Browser.d.ts | 0 .../cjs/puppeteer/bidi/core/Browser.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/Browser.js | 0 .../cjs/puppeteer/bidi/core/Browser.js.map | 0 .../puppeteer/bidi/core/BrowsingContext.d.ts | 0 .../bidi/core/BrowsingContext.d.ts.map | 0 .../puppeteer/bidi/core/BrowsingContext.js | 0 .../bidi/core/BrowsingContext.js.map | 0 .../cjs/puppeteer/bidi/core/Connection.d.ts | 0 .../puppeteer/bidi/core/Connection.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/Connection.js | 0 .../cjs/puppeteer/bidi/core/Connection.js.map | 0 .../cjs/puppeteer/bidi/core/Navigation.d.ts | 0 .../puppeteer/bidi/core/Navigation.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/Navigation.js | 0 .../cjs/puppeteer/bidi/core/Navigation.js.map | 0 .../lib/cjs/puppeteer/bidi/core/Realm.d.ts | 0 .../cjs/puppeteer/bidi/core/Realm.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/Realm.js | 0 .../lib/cjs/puppeteer/bidi/core/Realm.js.map | 0 .../lib/cjs/puppeteer/bidi/core/Request.d.ts | 0 .../cjs/puppeteer/bidi/core/Request.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/Request.js | 0 .../cjs/puppeteer/bidi/core/Request.js.map | 0 .../lib/cjs/puppeteer/bidi/core/Session.d.ts | 0 .../cjs/puppeteer/bidi/core/Session.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/Session.js | 0 .../cjs/puppeteer/bidi/core/Session.js.map | 0 .../cjs/puppeteer/bidi/core/UserContext.d.ts | 0 .../puppeteer/bidi/core/UserContext.d.ts.map | 0 .../cjs/puppeteer/bidi/core/UserContext.js | 0 .../puppeteer/bidi/core/UserContext.js.map | 0 .../cjs/puppeteer/bidi/core/UserPrompt.d.ts | 0 .../puppeteer/bidi/core/UserPrompt.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/UserPrompt.js | 0 .../cjs/puppeteer/bidi/core/UserPrompt.js.map | 0 .../lib/cjs/puppeteer/bidi/core/core.d.ts | 0 .../lib/cjs/puppeteer/bidi/core/core.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/core/core.js | 0 .../lib/cjs/puppeteer/bidi/core/core.js.map | 0 .../lib/cjs/puppeteer/bidi/util.d.ts | 0 .../lib/cjs/puppeteer/bidi/util.d.ts.map | 0 .../lib/cjs/puppeteer/bidi/util.js | 0 .../lib/cjs/puppeteer/bidi/util.js.map | 0 .../lib/cjs/puppeteer/cdp/Accessibility.d.ts | 0 .../cjs/puppeteer/cdp/Accessibility.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Accessibility.js | 0 .../cjs/puppeteer/cdp/Accessibility.js.map | 0 .../lib/cjs/puppeteer/cdp/Binding.d.ts | 0 .../lib/cjs/puppeteer/cdp/Binding.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Binding.js | 0 .../lib/cjs/puppeteer/cdp/Binding.js.map | 0 .../cjs/puppeteer/cdp/BluetoothEmulation.d.ts | 0 .../puppeteer/cdp/BluetoothEmulation.d.ts.map | 0 .../cjs/puppeteer/cdp/BluetoothEmulation.js | 0 .../puppeteer/cdp/BluetoothEmulation.js.map | 0 .../lib/cjs/puppeteer/cdp/Browser.d.ts | 0 .../lib/cjs/puppeteer/cdp/Browser.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Browser.js | 0 .../lib/cjs/puppeteer/cdp/Browser.js.map | 0 .../cjs/puppeteer/cdp/BrowserConnector.d.ts | 0 .../puppeteer/cdp/BrowserConnector.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/BrowserConnector.js | 0 .../cjs/puppeteer/cdp/BrowserConnector.js.map | 0 .../lib/cjs/puppeteer/cdp/BrowserContext.d.ts | 0 .../cjs/puppeteer/cdp/BrowserContext.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/BrowserContext.js | 0 .../cjs/puppeteer/cdp/BrowserContext.js.map | 0 .../lib/cjs/puppeteer/cdp/CdpIssue.d.ts | 0 .../lib/cjs/puppeteer/cdp/CdpIssue.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/CdpIssue.js | 0 .../lib/cjs/puppeteer/cdp/CdpIssue.js.map | 0 .../cjs/puppeteer/cdp/CdpPreloadScript.d.ts | 0 .../puppeteer/cdp/CdpPreloadScript.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/CdpPreloadScript.js | 0 .../cjs/puppeteer/cdp/CdpPreloadScript.js.map | 0 .../lib/cjs/puppeteer/cdp/CdpSession.d.ts | 0 .../lib/cjs/puppeteer/cdp/CdpSession.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/CdpSession.js | 0 .../lib/cjs/puppeteer/cdp/CdpSession.js.map | 0 .../lib/cjs/puppeteer/cdp/Connection.d.ts | 0 .../lib/cjs/puppeteer/cdp/Connection.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Connection.js | 0 .../lib/cjs/puppeteer/cdp/Connection.js.map | 0 .../lib/cjs/puppeteer/cdp/Coverage.d.ts | 0 .../lib/cjs/puppeteer/cdp/Coverage.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Coverage.js | 0 .../lib/cjs/puppeteer/cdp/Coverage.js.map | 0 .../puppeteer/cdp/DeviceRequestPrompt.d.ts | 0 .../cdp/DeviceRequestPrompt.d.ts.map | 0 .../cjs/puppeteer/cdp/DeviceRequestPrompt.js | 0 .../puppeteer/cdp/DeviceRequestPrompt.js.map | 0 .../lib/cjs/puppeteer/cdp/Dialog.d.ts | 0 .../lib/cjs/puppeteer/cdp/Dialog.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Dialog.js | 0 .../lib/cjs/puppeteer/cdp/Dialog.js.map | 0 .../lib/cjs/puppeteer/cdp/ElementHandle.d.ts | 0 .../cjs/puppeteer/cdp/ElementHandle.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/ElementHandle.js | 0 .../cjs/puppeteer/cdp/ElementHandle.js.map | 0 .../cjs/puppeteer/cdp/EmulationManager.d.ts | 0 .../puppeteer/cdp/EmulationManager.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/EmulationManager.js | 0 .../cjs/puppeteer/cdp/EmulationManager.js.map | 0 .../cjs/puppeteer/cdp/ExecutionContext.d.ts | 0 .../puppeteer/cdp/ExecutionContext.d.ts.map | 2 +- .../lib/cjs/puppeteer/cdp/ExecutionContext.js | 1 + .../cjs/puppeteer/cdp/ExecutionContext.js.map | 2 +- .../lib/cjs/puppeteer/cdp/Extension.d.ts | 0 .../lib/cjs/puppeteer/cdp/Extension.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Extension.js | 0 .../lib/cjs/puppeteer/cdp/Extension.js.map | 0 .../cjs/puppeteer/cdp/ExtensionTransport.d.ts | 0 .../puppeteer/cdp/ExtensionTransport.d.ts.map | 0 .../cjs/puppeteer/cdp/ExtensionTransport.js | 0 .../puppeteer/cdp/ExtensionTransport.js.map | 0 .../lib/cjs}/puppeteer/cdp/Frame.d.ts | 7 +- .../lib/cjs/puppeteer/cdp/Frame.d.ts.map | 1 + .../lib/cjs/puppeteer/cdp/Frame.js | 4 + .../lib/cjs/puppeteer/cdp/Frame.js.map | 1 + .../lib/cjs/puppeteer/cdp/FrameManager.d.ts | 0 .../cjs/puppeteer/cdp/FrameManager.d.ts.map | 2 +- .../lib/cjs/puppeteer/cdp/FrameManager.js | 4 +- .../lib/cjs/puppeteer/cdp/FrameManager.js.map | 2 +- .../cjs/puppeteer/cdp/FrameManagerEvents.d.ts | 0 .../puppeteer/cdp/FrameManagerEvents.d.ts.map | 0 .../cjs/puppeteer/cdp/FrameManagerEvents.js | 0 .../puppeteer/cdp/FrameManagerEvents.js.map | 0 .../lib/cjs/puppeteer/cdp/FrameTree.d.ts | 0 .../lib/cjs/puppeteer/cdp/FrameTree.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/FrameTree.js | 0 .../lib/cjs/puppeteer/cdp/FrameTree.js.map | 0 .../lib/cjs/puppeteer/cdp/HTTPRequest.d.ts | 0 .../cjs/puppeteer/cdp/HTTPRequest.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/HTTPRequest.js | 0 .../lib/cjs/puppeteer/cdp/HTTPRequest.js.map | 0 .../lib/cjs/puppeteer/cdp/HTTPResponse.d.ts | 0 .../cjs/puppeteer/cdp/HTTPResponse.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/HTTPResponse.js | 0 .../lib/cjs/puppeteer/cdp/HTTPResponse.js.map | 0 .../lib/cjs/puppeteer/cdp/Input.d.ts | 0 .../lib/cjs/puppeteer/cdp/Input.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Input.js | 0 .../lib/cjs/puppeteer/cdp/Input.js.map | 0 .../lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts | 0 .../cjs/puppeteer/cdp/IsolatedWorld.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/IsolatedWorld.js | 2 +- .../cjs/puppeteer/cdp/IsolatedWorld.js.map | 2 +- .../lib/cjs/puppeteer/cdp/IsolatedWorlds.d.ts | 0 .../cjs/puppeteer/cdp/IsolatedWorlds.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/IsolatedWorlds.js | 0 .../cjs/puppeteer/cdp/IsolatedWorlds.js.map | 0 .../lib/cjs/puppeteer/cdp/JSHandle.d.ts | 0 .../lib/cjs/puppeteer/cdp/JSHandle.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/JSHandle.js | 0 .../lib/cjs/puppeteer/cdp/JSHandle.js.map | 0 .../cjs/puppeteer/cdp/LifecycleWatcher.d.ts | 0 .../puppeteer/cdp/LifecycleWatcher.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/LifecycleWatcher.js | 0 .../cjs/puppeteer/cdp/LifecycleWatcher.js.map | 0 .../puppeteer/cdp/NetworkEventManager.d.ts | 0 .../cdp/NetworkEventManager.d.ts.map | 0 .../cjs/puppeteer/cdp/NetworkEventManager.js | 0 .../puppeteer/cdp/NetworkEventManager.js.map | 0 .../lib/cjs/puppeteer/cdp/NetworkManager.d.ts | 0 .../cjs/puppeteer/cdp/NetworkManager.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/NetworkManager.js | 0 .../cjs/puppeteer/cdp/NetworkManager.js.map | 0 .../lib/cjs}/puppeteer/cdp/Page.d.ts | 1 + .../lib/cjs/puppeteer/cdp/Page.d.ts.map | 1 + .../lib/cjs/puppeteer/cdp/Page.js | 3 + .../lib/cjs/puppeteer/cdp/Page.js.map | 1 + .../cdp/PredefinedNetworkConditions.d.ts | 0 .../cdp/PredefinedNetworkConditions.d.ts.map | 0 .../cdp/PredefinedNetworkConditions.js | 0 .../cdp/PredefinedNetworkConditions.js.map | 0 .../lib/cjs/puppeteer/cdp/Target.d.ts | 0 .../lib/cjs/puppeteer/cdp/Target.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Target.js | 0 .../lib/cjs/puppeteer/cdp/Target.js.map | 0 .../cjs/puppeteer/cdp/TargetManageEvents.d.ts | 0 .../puppeteer/cdp/TargetManageEvents.d.ts.map | 0 .../cjs/puppeteer/cdp/TargetManageEvents.js | 0 .../puppeteer/cdp/TargetManageEvents.js.map | 0 .../lib/cjs/puppeteer/cdp/TargetManager.d.ts | 4 + .../cjs/puppeteer/cdp/TargetManager.d.ts.map | 2 +- .../lib/cjs/puppeteer/cdp/TargetManager.js | 4 +- .../cjs/puppeteer/cdp/TargetManager.js.map | 2 +- .../lib/cjs/puppeteer/cdp/Tracing.d.ts | 0 .../lib/cjs/puppeteer/cdp/Tracing.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/Tracing.js | 0 .../lib/cjs/puppeteer/cdp/Tracing.js.map | 0 .../lib/cjs/puppeteer/cdp/WebMCP.d.ts | 0 .../lib/cjs/puppeteer/cdp/WebMCP.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/WebMCP.js | 0 .../lib/cjs/puppeteer/cdp/WebMCP.js.map | 0 .../lib/cjs/puppeteer/cdp/WebWorker.d.ts | 0 .../lib/cjs/puppeteer/cdp/WebWorker.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/WebWorker.js | 0 .../lib/cjs/puppeteer/cdp/WebWorker.js.map | 0 .../lib/cjs/puppeteer/cdp/cdp.d.ts | 0 .../lib/cjs/puppeteer/cdp/cdp.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/cdp.js | 0 .../lib/cjs/puppeteer/cdp/cdp.js.map | 0 .../lib/cjs/puppeteer/cdp/utils.d.ts | 0 .../lib/cjs/puppeteer/cdp/utils.d.ts.map | 0 .../lib/cjs/puppeteer/cdp/utils.js | 0 .../lib/cjs/puppeteer/cdp/utils.js.map | 0 .../puppeteer/common/AriaQueryHandler.d.ts | 0 .../common/AriaQueryHandler.d.ts.map | 0 .../cjs/puppeteer/common/AriaQueryHandler.js | 0 .../puppeteer/common/AriaQueryHandler.js.map | 0 .../puppeteer/common/BrowserConnector.d.ts | 5 + .../common/BrowserConnector.d.ts.map | 2 +- .../cjs/puppeteer/common/BrowserConnector.js | 10 +- .../puppeteer/common/BrowserConnector.js.map | 1 + .../common/BrowserWebSocketTransport.d.ts | 0 .../common/BrowserWebSocketTransport.d.ts.map | 0 .../common/BrowserWebSocketTransport.js | 0 .../common/BrowserWebSocketTransport.js.map | 0 .../cjs/puppeteer/common/CSSQueryHandler.d.ts | 0 .../puppeteer/common/CSSQueryHandler.d.ts.map | 0 .../cjs/puppeteer/common/CSSQueryHandler.js | 0 .../puppeteer/common/CSSQueryHandler.js.map | 0 .../puppeteer/common/CallbackRegistry.d.ts | 0 .../common/CallbackRegistry.d.ts.map | 0 .../cjs/puppeteer/common/CallbackRegistry.js | 0 .../puppeteer/common/CallbackRegistry.js.map | 0 .../cjs/puppeteer/common/Configuration.d.ts | 0 .../puppeteer/common/Configuration.d.ts.map | 0 .../lib/cjs/puppeteer/common/Configuration.js | 0 .../cjs/puppeteer/common/Configuration.js.map | 0 .../cjs/puppeteer/common/ConnectOptions.d.ts | 0 .../puppeteer/common/ConnectOptions.d.ts.map | 0 .../cjs/puppeteer/common/ConnectOptions.js | 0 .../puppeteer/common/ConnectOptions.js.map | 0 .../puppeteer/common/ConnectionTransport.d.ts | 0 .../common/ConnectionTransport.d.ts.map | 0 .../puppeteer/common/ConnectionTransport.js | 0 .../common/ConnectionTransport.js.map | 0 .../cjs/puppeteer/common/ConsoleMessage.d.ts | 0 .../puppeteer/common/ConsoleMessage.d.ts.map | 0 .../cjs/puppeteer/common/ConsoleMessage.js | 0 .../puppeteer/common/ConsoleMessage.js.map | 0 .../lib/cjs/puppeteer/common/Cookie.d.ts | 0 .../lib/cjs/puppeteer/common/Cookie.d.ts.map | 0 .../lib/cjs/puppeteer/common/Cookie.js | 0 .../lib/cjs/puppeteer/common/Cookie.js.map | 0 .../puppeteer/common/CustomQueryHandler.d.ts | 0 .../common/CustomQueryHandler.d.ts.map | 0 .../puppeteer/common/CustomQueryHandler.js | 0 .../common/CustomQueryHandler.js.map | 0 .../lib/cjs/puppeteer/common/Debug.d.ts | 0 .../lib/cjs/puppeteer/common/Debug.d.ts.map | 0 .../lib/cjs/puppeteer/common/Debug.js | 0 .../lib/cjs/puppeteer/common/Debug.js.map | 0 .../lib/cjs/puppeteer/common/Device.d.ts | 0 .../lib/cjs/puppeteer/common/Device.d.ts.map | 0 .../lib/cjs/puppeteer/common/Device.js | 0 .../lib/cjs/puppeteer/common/Device.js.map | 0 .../puppeteer/common/DownloadBehavior.d.ts | 0 .../common/DownloadBehavior.d.ts.map | 0 .../cjs/puppeteer/common/DownloadBehavior.js | 0 .../puppeteer/common/DownloadBehavior.js.map | 0 .../lib/cjs/puppeteer/common/Errors.d.ts | 0 .../lib/cjs/puppeteer/common/Errors.d.ts.map | 0 .../lib/cjs/puppeteer/common/Errors.js | 0 .../lib/cjs/puppeteer/common/Errors.js.map | 0 .../cjs}/puppeteer/common/EventEmitter.d.ts | 6 +- .../puppeteer/common/EventEmitter.d.ts.map | 1 + .../lib/cjs/puppeteer/common/EventEmitter.js | 7 + .../cjs/puppeteer/common/EventEmitter.js.map | 1 + .../lib/cjs/puppeteer/common/FileChooser.d.ts | 0 .../cjs/puppeteer/common/FileChooser.d.ts.map | 0 .../lib/cjs/puppeteer/common/FileChooser.js | 0 .../cjs/puppeteer/common/FileChooser.js.map | 0 .../cjs/puppeteer/common/GetQueryHandler.d.ts | 0 .../puppeteer/common/GetQueryHandler.d.ts.map | 0 .../cjs/puppeteer/common/GetQueryHandler.js | 0 .../puppeteer/common/GetQueryHandler.js.map | 0 .../cjs/puppeteer/common/HandleIterator.d.ts | 0 .../puppeteer/common/HandleIterator.d.ts.map | 0 .../cjs/puppeteer/common/HandleIterator.js | 0 .../puppeteer/common/HandleIterator.js.map | 0 .../lib/cjs/puppeteer/common/LazyArg.d.ts | 0 .../lib/cjs/puppeteer/common/LazyArg.d.ts.map | 0 .../lib/cjs/puppeteer/common/LazyArg.js | 0 .../lib/cjs/puppeteer/common/LazyArg.js.map | 0 .../common/NetworkManagerEvents.d.ts | 0 .../common/NetworkManagerEvents.d.ts.map | 0 .../puppeteer/common/NetworkManagerEvents.js | 0 .../common/NetworkManagerEvents.js.map | 0 .../lib/cjs/puppeteer/common/PDFOptions.d.ts | 0 .../cjs/puppeteer/common/PDFOptions.d.ts.map | 0 .../lib/cjs/puppeteer/common/PDFOptions.js | 0 .../cjs/puppeteer/common/PDFOptions.js.map | 0 .../cjs/puppeteer/common/PQueryHandler.d.ts | 0 .../puppeteer/common/PQueryHandler.d.ts.map | 0 .../lib/cjs/puppeteer/common/PQueryHandler.js | 0 .../cjs/puppeteer/common/PQueryHandler.js.map | 0 .../cjs/puppeteer/common/PSelectorParser.d.ts | 0 .../puppeteer/common/PSelectorParser.d.ts.map | 0 .../cjs/puppeteer/common/PSelectorParser.js | 0 .../puppeteer/common/PSelectorParser.js.map | 0 .../puppeteer/common/PierceQueryHandler.d.ts | 0 .../common/PierceQueryHandler.d.ts.map | 0 .../puppeteer/common/PierceQueryHandler.js | 0 .../common/PierceQueryHandler.js.map | 0 .../lib/cjs/puppeteer/common/Puppeteer.d.ts | 0 .../cjs/puppeteer/common/Puppeteer.d.ts.map | 0 .../lib/cjs/puppeteer/common/Puppeteer.js | 0 .../lib/cjs/puppeteer/common/Puppeteer.js.map | 0 .../cjs/puppeteer/common/QueryHandler.d.ts | 0 .../puppeteer/common/QueryHandler.d.ts.map | 0 .../lib/cjs/puppeteer/common/QueryHandler.js | 0 .../cjs/puppeteer/common/QueryHandler.js.map | 0 .../cjs/puppeteer/common/ScriptInjector.d.ts | 0 .../puppeteer/common/ScriptInjector.d.ts.map | 0 .../cjs/puppeteer/common/ScriptInjector.js | 0 .../puppeteer/common/ScriptInjector.js.map | 0 .../cjs/puppeteer/common/SecurityDetails.d.ts | 0 .../puppeteer/common/SecurityDetails.d.ts.map | 0 .../cjs/puppeteer/common/SecurityDetails.js | 0 .../puppeteer/common/SecurityDetails.js.map | 0 .../puppeteer/common/SupportedBrowser.d.ts | 0 .../common/SupportedBrowser.d.ts.map | 0 .../cjs/puppeteer/common/SupportedBrowser.js | 0 .../puppeteer/common/SupportedBrowser.js.map | 0 .../lib/cjs/puppeteer/common/TaskQueue.d.ts | 0 .../cjs/puppeteer/common/TaskQueue.d.ts.map | 0 .../lib/cjs/puppeteer/common/TaskQueue.js | 0 .../lib/cjs/puppeteer/common/TaskQueue.js.map | 0 .../puppeteer/common/TextQueryHandler.d.ts | 0 .../common/TextQueryHandler.d.ts.map | 0 .../cjs/puppeteer/common/TextQueryHandler.js | 0 .../puppeteer/common/TextQueryHandler.js.map | 0 .../cjs/puppeteer/common/TimeoutSettings.d.ts | 0 .../puppeteer/common/TimeoutSettings.d.ts.map | 0 .../cjs/puppeteer/common/TimeoutSettings.js | 0 .../puppeteer/common/TimeoutSettings.js.map | 0 .../puppeteer/common/USKeyboardLayout.d.ts | 0 .../common/USKeyboardLayout.d.ts.map | 0 .../cjs/puppeteer/common/USKeyboardLayout.js | 0 .../puppeteer/common/USKeyboardLayout.js.map | 0 .../lib/cjs/puppeteer/common/Viewport.d.ts | 0 .../cjs/puppeteer/common/Viewport.d.ts.map | 0 .../lib/cjs/puppeteer/common/Viewport.js | 0 .../lib/cjs/puppeteer/common/Viewport.js.map | 0 .../lib/cjs/puppeteer/common/WaitTask.d.ts | 0 .../cjs/puppeteer/common/WaitTask.d.ts.map | 0 .../lib/cjs/puppeteer/common/WaitTask.js | 0 .../lib/cjs/puppeteer/common/WaitTask.js.map | 0 .../puppeteer/common/XPathQueryHandler.d.ts | 0 .../common/XPathQueryHandler.d.ts.map | 0 .../cjs/puppeteer/common/XPathQueryHandler.js | 0 .../puppeteer/common/XPathQueryHandler.js.map | 0 .../lib/cjs/puppeteer/common/common.d.ts | 0 .../lib/cjs/puppeteer/common/common.d.ts.map | 0 .../lib/cjs/puppeteer/common/common.js | 0 .../lib/cjs/puppeteer/common/common.js.map | 0 .../lib/cjs/puppeteer/common/types.d.ts | 0 .../lib/cjs/puppeteer/common/types.d.ts.map | 0 .../lib/cjs/puppeteer/common/types.js | 0 .../lib/cjs/puppeteer/common/types.js.map | 0 .../lib/cjs/puppeteer/common/util.d.ts | 0 .../lib/cjs/puppeteer/common/util.d.ts.map | 0 .../lib/cjs/puppeteer/common/util.js | 0 .../lib/cjs/puppeteer/common/util.js.map | 0 .../lib/cjs/puppeteer/environment.d.ts | 0 .../lib/cjs/puppeteer/environment.d.ts.map | 0 .../lib/cjs/puppeteer/environment.js | 0 .../lib/cjs/puppeteer/environment.js.map | 0 .../lib/cjs/puppeteer/generated/injected.d.ts | 0 .../cjs/puppeteer/generated/injected.d.ts.map | 0 .../lib/cjs/puppeteer/generated/injected.js | 0 .../cjs/puppeteer/generated/injected.js.map | 0 .../lib/cjs/puppeteer/index-browser.d.ts | 0 .../lib/cjs/puppeteer/index-browser.d.ts.map | 0 .../lib/cjs/puppeteer/index-browser.js | 0 .../lib/cjs/puppeteer/index-browser.js.map | 0 .../lib/cjs/puppeteer/index.d.ts | 0 .../lib/cjs/puppeteer/index.d.ts.map | 0 .../puppeteer-core/lib/cjs/puppeteer/index.js | 0 .../lib/cjs/puppeteer/index.js.map | 0 .../puppeteer/injected/ARIAQuerySelector.d.ts | 0 .../injected/ARIAQuerySelector.d.ts.map | 0 .../puppeteer/injected/ARIAQuerySelector.js | 0 .../injected/ARIAQuerySelector.js.map | 0 .../cjs/puppeteer/injected/CSSSelector.d.ts | 0 .../puppeteer/injected/CSSSelector.d.ts.map | 0 .../lib/cjs/puppeteer/injected/CSSSelector.js | 0 .../cjs/puppeteer/injected/CSSSelector.js.map | 0 .../injected/CustomQuerySelector.d.ts | 0 .../injected/CustomQuerySelector.d.ts.map | 0 .../puppeteer/injected/CustomQuerySelector.js | 0 .../injected/CustomQuerySelector.js.map | 0 .../puppeteer/injected/PQuerySelector.d.ts | 0 .../injected/PQuerySelector.d.ts.map | 0 .../cjs/puppeteer/injected/PQuerySelector.js | 0 .../puppeteer/injected/PQuerySelector.js.map | 0 .../injected/PierceQuerySelector.d.ts | 0 .../injected/PierceQuerySelector.d.ts.map | 0 .../puppeteer/injected/PierceQuerySelector.js | 0 .../injected/PierceQuerySelector.js.map | 0 .../lib/cjs/puppeteer/injected/Poller.d.ts | 0 .../cjs/puppeteer/injected/Poller.d.ts.map | 0 .../lib/cjs/puppeteer/injected/Poller.js | 0 .../lib/cjs/puppeteer/injected/Poller.js.map | 0 .../cjs/puppeteer/injected/TextContent.d.ts | 0 .../puppeteer/injected/TextContent.d.ts.map | 0 .../lib/cjs/puppeteer/injected/TextContent.js | 0 .../cjs/puppeteer/injected/TextContent.js.map | 0 .../puppeteer/injected/TextQuerySelector.d.ts | 0 .../injected/TextQuerySelector.d.ts.map | 0 .../puppeteer/injected/TextQuerySelector.js | 0 .../injected/TextQuerySelector.js.map | 0 .../injected/XPathQuerySelector.d.ts | 0 .../injected/XPathQuerySelector.d.ts.map | 0 .../puppeteer/injected/XPathQuerySelector.js | 0 .../injected/XPathQuerySelector.js.map | 0 .../lib/cjs/puppeteer/injected/injected.d.ts | 2 +- .../cjs/puppeteer/injected/injected.d.ts.map | 0 .../lib/cjs/puppeteer/injected/injected.js | 0 .../cjs/puppeteer/injected/injected.js.map | 0 .../lib/cjs/puppeteer/injected/util.d.ts | 0 .../lib/cjs/puppeteer/injected/util.d.ts.map | 0 .../lib/cjs/puppeteer/injected/util.js | 0 .../lib/cjs/puppeteer/injected/util.js.map | 0 .../cjs/puppeteer/node/BrowserLauncher.d.ts | 0 .../puppeteer/node/BrowserLauncher.d.ts.map | 2 +- .../lib/cjs/puppeteer/node/BrowserLauncher.js | 9 +- .../cjs/puppeteer/node/BrowserLauncher.js.map | 1 + .../cjs/puppeteer/node/ChromeLauncher.d.ts | 0 .../puppeteer/node/ChromeLauncher.d.ts.map | 0 .../lib/cjs/puppeteer/node/ChromeLauncher.js | 0 .../cjs/puppeteer/node/ChromeLauncher.js.map | 0 .../cjs/puppeteer/node/FirefoxLauncher.d.ts | 0 .../puppeteer/node/FirefoxLauncher.d.ts.map | 0 .../lib/cjs/puppeteer/node/FirefoxLauncher.js | 0 .../cjs/puppeteer/node/FirefoxLauncher.js.map | 0 .../lib/cjs/puppeteer/node/LaunchOptions.d.ts | 0 .../cjs/puppeteer/node/LaunchOptions.d.ts.map | 0 .../lib/cjs/puppeteer/node/LaunchOptions.js | 0 .../cjs/puppeteer/node/LaunchOptions.js.map | 0 .../node/NodeWebSocketTransport.d.ts | 0 .../node/NodeWebSocketTransport.d.ts.map | 0 .../puppeteer/node/NodeWebSocketTransport.js | 0 .../node/NodeWebSocketTransport.js.map | 0 .../lib/cjs/puppeteer/node/PipeTransport.d.ts | 0 .../cjs/puppeteer/node/PipeTransport.d.ts.map | 0 .../lib/cjs/puppeteer/node/PipeTransport.js | 0 .../cjs/puppeteer/node/PipeTransport.js.map | 0 .../lib/cjs/puppeteer/node/PuppeteerNode.d.ts | 0 .../cjs/puppeteer/node/PuppeteerNode.d.ts.map | 0 .../lib/cjs/puppeteer/node/PuppeteerNode.js | 0 .../cjs/puppeteer/node/PuppeteerNode.js.map | 0 .../cjs/puppeteer/node/ScreenRecorder.d.ts | 0 .../puppeteer/node/ScreenRecorder.d.ts.map | 2 +- .../lib/cjs/puppeteer/node/ScreenRecorder.js | 1 + .../cjs/puppeteer/node/ScreenRecorder.js.map | 2 +- .../lib/cjs/puppeteer/node/node.d.ts | 0 .../lib/cjs/puppeteer/node/node.d.ts.map | 0 .../lib/cjs/puppeteer/node/node.js | 0 .../lib/cjs/puppeteer/node/node.js.map | 0 .../lib/cjs/puppeteer/node/util/fs.d.ts | 0 .../lib/cjs/puppeteer/node/util/fs.d.ts.map | 0 .../lib/cjs/puppeteer/node/util/fs.js | 0 .../lib/cjs/puppeteer/node/util/fs.js.map | 0 .../cjs/puppeteer/puppeteer-core-browser.d.ts | 0 .../puppeteer/puppeteer-core-browser.d.ts.map | 0 .../cjs/puppeteer/puppeteer-core-browser.js | 0 .../puppeteer/puppeteer-core-browser.js.map | 0 .../lib/cjs/puppeteer/puppeteer-core.d.ts | 0 .../lib/cjs/puppeteer/puppeteer-core.d.ts.map | 0 .../lib/cjs/puppeteer/puppeteer-core.js | 0 .../lib/cjs/puppeteer/puppeteer-core.js.map | 0 .../lib/cjs}/puppeteer/revisions.d.ts | 2 +- .../lib/cjs/puppeteer/revisions.d.ts.map | 0 .../lib/cjs/puppeteer/revisions.js | 2 +- .../lib/cjs/puppeteer/revisions.js.map | 0 .../cjs/puppeteer/util/AsyncIterableUtil.d.ts | 0 .../puppeteer/util/AsyncIterableUtil.d.ts.map | 0 .../cjs/puppeteer/util/AsyncIterableUtil.js | 0 .../puppeteer/util/AsyncIterableUtil.js.map | 0 .../lib/cjs/puppeteer/util/Deferred.d.ts | 0 .../lib/cjs/puppeteer/util/Deferred.d.ts.map | 0 .../lib/cjs/puppeteer/util/Deferred.js | 0 .../lib/cjs/puppeteer/util/Deferred.js.map | 0 .../lib/cjs/puppeteer/util/ErrorLike.d.ts | 0 .../lib/cjs/puppeteer/util/ErrorLike.d.ts.map | 0 .../lib/cjs/puppeteer/util/ErrorLike.js | 0 .../lib/cjs/puppeteer/util/ErrorLike.js.map | 0 .../lib/cjs/puppeteer/util/Function.d.ts | 0 .../lib/cjs/puppeteer/util/Function.d.ts.map | 0 .../lib/cjs/puppeteer/util/Function.js | 0 .../lib/cjs/puppeteer/util/Function.js.map | 0 .../lib/cjs/puppeteer/util/Mutex.d.ts | 4 +- .../lib/cjs/puppeteer/util/Mutex.d.ts.map | 0 .../lib/cjs/puppeteer/util/Mutex.js | 0 .../lib/cjs/puppeteer/util/Mutex.js.map | 0 .../lib/cjs/puppeteer/util/assert.d.ts | 0 .../lib/cjs/puppeteer/util/assert.d.ts.map | 0 .../lib/cjs/puppeteer/util/assert.js | 0 .../lib/cjs/puppeteer/util/assert.js.map | 0 .../lib/cjs/puppeteer/util/decorators.d.ts | 0 .../cjs/puppeteer/util/decorators.d.ts.map | 0 .../lib/cjs/puppeteer/util/decorators.js | 0 .../lib/cjs/puppeteer/util/decorators.js.map | 0 .../lib/cjs/puppeteer/util/disposable.d.ts | 0 .../cjs/puppeteer/util/disposable.d.ts.map | 0 .../lib/cjs/puppeteer/util/disposable.js | 0 .../lib/cjs/puppeteer/util/disposable.js.map | 0 .../lib/cjs/puppeteer/util/encoding.d.ts | 0 .../lib/cjs/puppeteer/util/encoding.d.ts.map | 0 .../lib/cjs/puppeteer/util/encoding.js | 0 .../lib/cjs/puppeteer/util/encoding.js.map | 0 .../util/incremental-id-generator.d.ts | 0 .../util/incremental-id-generator.d.ts.map | 0 .../util/incremental-id-generator.js | 0 .../util/incremental-id-generator.js.map | 0 .../lib/cjs/puppeteer/util/util.d.ts | 0 .../lib/cjs/puppeteer/util/util.d.ts.map | 0 .../lib/cjs/puppeteer/util/util.js | 0 .../lib/cjs/puppeteer/util/util.js.map | 0 .../lib/cjs/puppeteer/util/version.d.ts | 2 +- .../lib/cjs/puppeteer/util/version.d.ts.map | 0 .../lib/cjs/puppeteer/util/version.js | 2 +- .../lib/cjs/puppeteer/util/version.js.map | 0 .../lib/cjs/third_party/mitt/mitt.d.ts | 0 .../lib/cjs/third_party/mitt/mitt.js | 0 .../cjs/third_party/parsel-js/parsel-js.d.ts | 0 .../cjs/third_party/parsel-js/parsel-js.js | 0 .../lib/cjs/third_party/rxjs/rxjs.d.ts | 0 .../lib/cjs/third_party/rxjs/rxjs.js | 0 .../urlpattern-polyfill.d.ts | 0 .../urlpattern-polyfill.js | 0 .../lib/es5-iife/puppeteer-core-browser.d.ts | 25 +- .../lib/es5-iife/puppeteer-core-browser.js | 320 +- .../puppeteer-core/lib/esm/package.json | 0 .../esm/puppeteer/api/BluetoothEmulation.d.ts | 0 .../puppeteer/api/BluetoothEmulation.d.ts.map | 0 .../esm/puppeteer/api/BluetoothEmulation.js | 0 .../puppeteer/api/BluetoothEmulation.js.map | 0 .../lib/esm/puppeteer/api/Browser.d.ts | 0 .../lib/esm}/puppeteer/api/Browser.d.ts.map | 2 +- .../lib/esm/puppeteer/api/Browser.js | 14 +- .../lib/esm/puppeteer/api/Browser.js.map | 2 +- .../lib/esm/puppeteer/api/BrowserContext.d.ts | 0 .../esm/puppeteer/api/BrowserContext.d.ts.map | 2 +- .../lib/esm/puppeteer/api/BrowserContext.js | 7 +- .../esm/puppeteer/api/BrowserContext.js.map | 2 +- .../lib/esm/puppeteer/api/CDPSession.d.ts | 0 .../lib/esm/puppeteer/api/CDPSession.d.ts.map | 0 .../lib/esm/puppeteer/api/CDPSession.js | 0 .../lib/esm/puppeteer/api/CDPSession.js.map | 0 .../puppeteer/api/DeviceRequestPrompt.d.ts | 0 .../api/DeviceRequestPrompt.d.ts.map | 0 .../esm/puppeteer/api/DeviceRequestPrompt.js | 0 .../puppeteer/api/DeviceRequestPrompt.js.map | 0 .../lib/esm/puppeteer/api/Dialog.d.ts | 0 .../lib/esm/puppeteer/api/Dialog.d.ts.map | 0 .../lib/esm/puppeteer/api/Dialog.js | 0 .../lib/esm/puppeteer/api/Dialog.js.map | 0 .../lib/esm/puppeteer/api/ElementHandle.d.ts | 0 .../esm/puppeteer/api/ElementHandle.d.ts.map | 0 .../lib/esm/puppeteer/api/ElementHandle.js | 0 .../esm/puppeteer/api/ElementHandle.js.map | 0 .../puppeteer/api/ElementHandleSymbol.d.ts | 0 .../api/ElementHandleSymbol.d.ts.map | 0 .../esm/puppeteer/api/ElementHandleSymbol.js | 0 .../puppeteer/api/ElementHandleSymbol.js.map | 0 .../lib/esm/puppeteer/api/Environment.d.ts | 0 .../esm/puppeteer/api/Environment.d.ts.map | 0 .../lib/esm/puppeteer/api/Environment.js | 0 .../lib/esm/puppeteer/api/Environment.js.map | 0 .../lib/esm/puppeteer/api/Extension.d.ts | 0 .../lib/esm/puppeteer/api/Extension.d.ts.map | 0 .../lib/esm/puppeteer/api/Extension.js | 0 .../lib/esm/puppeteer/api/Extension.js.map | 0 .../lib/esm/puppeteer/api/Frame.d.ts | 16 +- .../lib/esm/puppeteer/api/Frame.d.ts.map | 1 + .../lib/esm/puppeteer/api/Frame.js | 0 .../lib/esm/puppeteer/api/Frame.js.map | 2 +- .../lib/esm/puppeteer/api/HTTPRequest.d.ts | 0 .../esm/puppeteer/api/HTTPRequest.d.ts.map | 0 .../lib/esm/puppeteer/api/HTTPRequest.js | 0 .../lib/esm/puppeteer/api/HTTPRequest.js.map | 0 .../lib/esm/puppeteer/api/HTTPResponse.d.ts | 0 .../esm/puppeteer/api/HTTPResponse.d.ts.map | 0 .../lib/esm/puppeteer/api/HTTPResponse.js | 0 .../lib/esm/puppeteer/api/HTTPResponse.js.map | 0 .../lib/esm/puppeteer/api/Input.d.ts | 0 .../lib/esm/puppeteer/api/Input.d.ts.map | 0 .../lib/esm/puppeteer/api/Input.js | 0 .../lib/esm/puppeteer/api/Input.js.map | 0 .../lib/esm/puppeteer/api/Issue.d.ts | 0 .../lib/esm/puppeteer/api/Issue.d.ts.map | 0 .../lib/esm/puppeteer/api/Issue.js | 0 .../lib/esm/puppeteer/api/Issue.js.map | 0 .../lib/esm/puppeteer/api/JSHandle.d.ts | 0 .../lib/esm/puppeteer/api/JSHandle.d.ts.map | 0 .../lib/esm/puppeteer/api/JSHandle.js | 2 +- .../lib/esm/puppeteer/api/JSHandle.js.map | 2 +- .../lib/esm/puppeteer/api/Page.d.ts | 4 +- .../lib/esm/puppeteer/api/Page.d.ts.map | 1 + .../lib/esm/puppeteer/api/Page.js | 7 +- .../lib/esm/puppeteer/api/Page.js.map | 2 +- .../lib/esm/puppeteer/api/Realm.d.ts | 0 .../lib/esm/puppeteer/api/Realm.d.ts.map | 0 .../lib/esm/puppeteer/api/Realm.js | 0 .../lib/esm/puppeteer/api/Realm.js.map | 0 .../lib/esm/puppeteer/api/Target.d.ts | 0 .../lib/esm/puppeteer/api/Target.d.ts.map | 0 .../lib/esm/puppeteer/api/Target.js | 0 .../lib/esm/puppeteer/api/Target.js.map | 0 .../lib/esm/puppeteer/api/WebWorker.d.ts | 0 .../lib/esm/puppeteer/api/WebWorker.d.ts.map | 0 .../lib/esm/puppeteer/api/WebWorker.js | 0 .../lib/esm/puppeteer/api/WebWorker.js.map | 0 .../lib/esm/puppeteer/api/api.d.ts | 0 .../lib/esm/puppeteer/api/api.d.ts.map | 0 .../lib/esm/puppeteer/api/api.js | 0 .../lib/esm/puppeteer/api/api.js.map | 0 .../esm/puppeteer/api/locators/locators.d.ts | 0 .../puppeteer/api/locators/locators.d.ts.map | 0 .../esm/puppeteer/api/locators/locators.js | 0 .../puppeteer/api/locators/locators.js.map | 0 .../lib/esm/puppeteer/bidi/BidiOverCdp.d.ts | 0 .../esm/puppeteer/bidi/BidiOverCdp.d.ts.map | 0 .../lib/esm/puppeteer/bidi/BidiOverCdp.js | 0 .../lib/esm/puppeteer/bidi/BidiOverCdp.js.map | 0 .../puppeteer/bidi/BluetoothEmulation.d.ts | 0 .../bidi/BluetoothEmulation.d.ts.map | 0 .../esm/puppeteer/bidi/BluetoothEmulation.js | 0 .../puppeteer/bidi/BluetoothEmulation.js.map | 0 .../lib/esm/puppeteer/bidi/Browser.d.ts | 0 .../lib/esm/puppeteer/bidi/Browser.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Browser.js | 0 .../lib/esm/puppeteer/bidi/Browser.js.map | 0 .../esm/puppeteer/bidi/BrowserConnector.d.ts | 0 .../puppeteer/bidi/BrowserConnector.d.ts.map | 0 .../esm/puppeteer/bidi/BrowserConnector.js | 0 .../puppeteer/bidi/BrowserConnector.js.map | 0 .../esm/puppeteer/bidi/BrowserContext.d.ts | 0 .../puppeteer/bidi/BrowserContext.d.ts.map | 0 .../lib/esm/puppeteer/bidi/BrowserContext.js | 0 .../esm/puppeteer/bidi/BrowserContext.js.map | 0 .../lib/esm/puppeteer/bidi/CDPSession.d.ts | 0 .../esm/puppeteer/bidi/CDPSession.d.ts.map | 0 .../lib/esm/puppeteer/bidi/CDPSession.js | 0 .../lib/esm/puppeteer/bidi/CDPSession.js.map | 0 .../lib/esm/puppeteer/bidi/Connection.d.ts | 0 .../esm/puppeteer/bidi/Connection.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Connection.js | 0 .../lib/esm/puppeteer/bidi/Connection.js.map | 0 .../lib/esm/puppeteer/bidi/Deserializer.d.ts | 0 .../esm/puppeteer/bidi/Deserializer.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Deserializer.js | 0 .../esm/puppeteer/bidi/Deserializer.js.map | 0 .../puppeteer/bidi/DeviceRequestPrompt.d.ts | 0 .../bidi/DeviceRequestPrompt.d.ts.map | 0 .../esm/puppeteer/bidi/DeviceRequestPrompt.js | 0 .../puppeteer/bidi/DeviceRequestPrompt.js.map | 0 .../lib/esm/puppeteer/bidi/Dialog.d.ts | 0 .../lib/esm/puppeteer/bidi/Dialog.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Dialog.js | 0 .../lib/esm/puppeteer/bidi/Dialog.js.map | 0 .../lib/esm/puppeteer/bidi/ElementHandle.d.ts | 0 .../esm/puppeteer/bidi/ElementHandle.d.ts.map | 0 .../lib/esm/puppeteer/bidi/ElementHandle.js | 0 .../esm/puppeteer/bidi/ElementHandle.js.map | 0 .../esm/puppeteer/bidi/ExposedFunction.d.ts | 0 .../puppeteer/bidi/ExposedFunction.d.ts.map | 0 .../lib/esm/puppeteer/bidi/ExposedFunction.js | 0 .../esm/puppeteer/bidi/ExposedFunction.js.map | 0 .../lib/esm}/puppeteer/bidi/Frame.d.ts | 4 +- .../lib/esm/puppeteer/bidi/Frame.d.ts.map | 1 + .../lib/esm/puppeteer/bidi/Frame.js | 0 .../lib/esm/puppeteer/bidi/Frame.js.map | 2 +- .../lib/esm/puppeteer/bidi/HTTPRequest.d.ts | 0 .../esm/puppeteer/bidi/HTTPRequest.d.ts.map | 0 .../lib/esm/puppeteer/bidi/HTTPRequest.js | 0 .../lib/esm/puppeteer/bidi/HTTPRequest.js.map | 0 .../lib/esm/puppeteer/bidi/HTTPResponse.d.ts | 0 .../esm/puppeteer/bidi/HTTPResponse.d.ts.map | 0 .../lib/esm/puppeteer/bidi/HTTPResponse.js | 0 .../esm/puppeteer/bidi/HTTPResponse.js.map | 0 .../lib/esm/puppeteer/bidi/Input.d.ts | 0 .../lib/esm/puppeteer/bidi/Input.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Input.js | 0 .../lib/esm/puppeteer/bidi/Input.js.map | 0 .../lib/esm/puppeteer/bidi/JSHandle.d.ts | 0 .../lib/esm/puppeteer/bidi/JSHandle.d.ts.map | 0 .../lib/esm/puppeteer/bidi/JSHandle.js | 0 .../lib/esm/puppeteer/bidi/JSHandle.js.map | 0 .../lib/esm/puppeteer/bidi/Page.d.ts | 0 .../lib/esm/puppeteer/bidi/Page.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Page.js | 0 .../lib/esm/puppeteer/bidi/Page.js.map | 0 .../lib/esm/puppeteer/bidi/Realm.d.ts | 0 .../lib/esm/puppeteer/bidi/Realm.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Realm.js | 0 .../lib/esm/puppeteer/bidi/Realm.js.map | 0 .../lib/esm/puppeteer/bidi/Serializer.d.ts | 0 .../esm/puppeteer/bidi/Serializer.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Serializer.js | 0 .../lib/esm/puppeteer/bidi/Serializer.js.map | 0 .../lib/esm/puppeteer/bidi/Target.d.ts | 0 .../lib/esm/puppeteer/bidi/Target.d.ts.map | 0 .../lib/esm/puppeteer/bidi/Target.js | 0 .../lib/esm/puppeteer/bidi/Target.js.map | 0 .../lib/esm/puppeteer/bidi/WebWorker.d.ts | 0 .../lib/esm/puppeteer/bidi/WebWorker.d.ts.map | 0 .../lib/esm/puppeteer/bidi/WebWorker.js | 0 .../lib/esm/puppeteer/bidi/WebWorker.js.map | 0 .../lib/esm/puppeteer/bidi/bidi.d.ts | 0 .../lib/esm/puppeteer/bidi/bidi.d.ts.map | 0 .../lib/esm/puppeteer/bidi/bidi.js | 0 .../lib/esm/puppeteer/bidi/bidi.js.map | 0 .../lib/esm/puppeteer/bidi/core/Browser.d.ts | 0 .../esm/puppeteer/bidi/core/Browser.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/Browser.js | 0 .../esm/puppeteer/bidi/core/Browser.js.map | 0 .../puppeteer/bidi/core/BrowsingContext.d.ts | 0 .../bidi/core/BrowsingContext.d.ts.map | 0 .../puppeteer/bidi/core/BrowsingContext.js | 0 .../bidi/core/BrowsingContext.js.map | 0 .../esm/puppeteer/bidi/core/Connection.d.ts | 0 .../puppeteer/bidi/core/Connection.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/Connection.js | 0 .../esm/puppeteer/bidi/core/Connection.js.map | 0 .../esm/puppeteer/bidi/core/Navigation.d.ts | 0 .../puppeteer/bidi/core/Navigation.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/Navigation.js | 0 .../esm/puppeteer/bidi/core/Navigation.js.map | 0 .../lib/esm/puppeteer/bidi/core/Realm.d.ts | 0 .../esm/puppeteer/bidi/core/Realm.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/Realm.js | 0 .../lib/esm/puppeteer/bidi/core/Realm.js.map | 0 .../lib/esm/puppeteer/bidi/core/Request.d.ts | 0 .../esm/puppeteer/bidi/core/Request.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/Request.js | 0 .../esm/puppeteer/bidi/core/Request.js.map | 0 .../lib/esm/puppeteer/bidi/core/Session.d.ts | 0 .../esm/puppeteer/bidi/core/Session.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/Session.js | 0 .../esm/puppeteer/bidi/core/Session.js.map | 0 .../esm/puppeteer/bidi/core/UserContext.d.ts | 0 .../puppeteer/bidi/core/UserContext.d.ts.map | 0 .../esm/puppeteer/bidi/core/UserContext.js | 0 .../puppeteer/bidi/core/UserContext.js.map | 0 .../esm/puppeteer/bidi/core/UserPrompt.d.ts | 0 .../puppeteer/bidi/core/UserPrompt.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/UserPrompt.js | 0 .../esm/puppeteer/bidi/core/UserPrompt.js.map | 0 .../lib/esm/puppeteer/bidi/core/core.d.ts | 0 .../lib/esm/puppeteer/bidi/core/core.d.ts.map | 0 .../lib/esm/puppeteer/bidi/core/core.js | 0 .../lib/esm/puppeteer/bidi/core/core.js.map | 0 .../lib/esm/puppeteer/bidi/util.d.ts | 0 .../lib/esm/puppeteer/bidi/util.d.ts.map | 0 .../lib/esm/puppeteer/bidi/util.js | 0 .../lib/esm/puppeteer/bidi/util.js.map | 0 .../lib/esm/puppeteer/cdp/Accessibility.d.ts | 0 .../esm/puppeteer/cdp/Accessibility.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Accessibility.js | 0 .../esm/puppeteer/cdp/Accessibility.js.map | 0 .../lib/esm/puppeteer/cdp/Binding.d.ts | 0 .../lib/esm/puppeteer/cdp/Binding.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Binding.js | 0 .../lib/esm/puppeteer/cdp/Binding.js.map | 0 .../esm/puppeteer/cdp/BluetoothEmulation.d.ts | 0 .../puppeteer/cdp/BluetoothEmulation.d.ts.map | 0 .../esm/puppeteer/cdp/BluetoothEmulation.js | 0 .../puppeteer/cdp/BluetoothEmulation.js.map | 0 .../lib/esm/puppeteer/cdp/Browser.d.ts | 0 .../lib/esm/puppeteer/cdp/Browser.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Browser.js | 0 .../lib/esm/puppeteer/cdp/Browser.js.map | 0 .../esm/puppeteer/cdp/BrowserConnector.d.ts | 0 .../puppeteer/cdp/BrowserConnector.d.ts.map | 0 .../lib/esm/puppeteer/cdp/BrowserConnector.js | 0 .../esm/puppeteer/cdp/BrowserConnector.js.map | 0 .../lib/esm/puppeteer/cdp/BrowserContext.d.ts | 0 .../esm/puppeteer/cdp/BrowserContext.d.ts.map | 0 .../lib/esm/puppeteer/cdp/BrowserContext.js | 0 .../esm/puppeteer/cdp/BrowserContext.js.map | 0 .../lib/esm/puppeteer/cdp/CdpIssue.d.ts | 0 .../lib/esm/puppeteer/cdp/CdpIssue.d.ts.map | 0 .../lib/esm/puppeteer/cdp/CdpIssue.js | 0 .../lib/esm/puppeteer/cdp/CdpIssue.js.map | 0 .../esm/puppeteer/cdp/CdpPreloadScript.d.ts | 0 .../puppeteer/cdp/CdpPreloadScript.d.ts.map | 0 .../lib/esm/puppeteer/cdp/CdpPreloadScript.js | 0 .../esm/puppeteer/cdp/CdpPreloadScript.js.map | 0 .../lib/esm/puppeteer/cdp/CdpSession.d.ts | 0 .../lib/esm/puppeteer/cdp/CdpSession.d.ts.map | 0 .../lib/esm/puppeteer/cdp/CdpSession.js | 0 .../lib/esm/puppeteer/cdp/CdpSession.js.map | 0 .../lib/esm/puppeteer/cdp/Connection.d.ts | 0 .../lib/esm/puppeteer/cdp/Connection.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Connection.js | 0 .../lib/esm/puppeteer/cdp/Connection.js.map | 0 .../lib/esm/puppeteer/cdp/Coverage.d.ts | 0 .../lib/esm/puppeteer/cdp/Coverage.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Coverage.js | 0 .../lib/esm/puppeteer/cdp/Coverage.js.map | 0 .../puppeteer/cdp/DeviceRequestPrompt.d.ts | 0 .../cdp/DeviceRequestPrompt.d.ts.map | 0 .../esm/puppeteer/cdp/DeviceRequestPrompt.js | 0 .../puppeteer/cdp/DeviceRequestPrompt.js.map | 0 .../lib/esm/puppeteer/cdp/Dialog.d.ts | 0 .../lib/esm/puppeteer/cdp/Dialog.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Dialog.js | 0 .../lib/esm/puppeteer/cdp/Dialog.js.map | 0 .../lib/esm/puppeteer/cdp/ElementHandle.d.ts | 0 .../esm/puppeteer/cdp/ElementHandle.d.ts.map | 0 .../lib/esm/puppeteer/cdp/ElementHandle.js | 0 .../esm/puppeteer/cdp/ElementHandle.js.map | 0 .../esm/puppeteer/cdp/EmulationManager.d.ts | 0 .../puppeteer/cdp/EmulationManager.d.ts.map | 0 .../lib/esm/puppeteer/cdp/EmulationManager.js | 0 .../esm/puppeteer/cdp/EmulationManager.js.map | 0 .../esm/puppeteer/cdp/ExecutionContext.d.ts | 0 .../puppeteer/cdp/ExecutionContext.d.ts.map | 2 +- .../lib/esm/puppeteer/cdp/ExecutionContext.js | 1 + .../esm/puppeteer/cdp/ExecutionContext.js.map | 2 +- .../lib/esm/puppeteer/cdp/Extension.d.ts | 0 .../lib/esm/puppeteer/cdp/Extension.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Extension.js | 0 .../lib/esm/puppeteer/cdp/Extension.js.map | 0 .../esm/puppeteer/cdp/ExtensionTransport.d.ts | 0 .../puppeteer/cdp/ExtensionTransport.d.ts.map | 0 .../esm/puppeteer/cdp/ExtensionTransport.js | 0 .../puppeteer/cdp/ExtensionTransport.js.map | 0 .../lib/esm}/puppeteer/cdp/Frame.d.ts | 7 +- .../lib/esm/puppeteer/cdp/Frame.d.ts.map | 1 + .../lib/esm/puppeteer/cdp/Frame.js | 4 + .../lib/esm/puppeteer/cdp/Frame.js.map | 1 + .../lib/esm/puppeteer/cdp/FrameManager.d.ts | 0 .../esm/puppeteer/cdp/FrameManager.d.ts.map | 2 +- .../lib/esm/puppeteer/cdp/FrameManager.js | 4 +- .../lib/esm/puppeteer/cdp/FrameManager.js.map | 2 +- .../esm/puppeteer/cdp/FrameManagerEvents.d.ts | 0 .../puppeteer/cdp/FrameManagerEvents.d.ts.map | 0 .../esm/puppeteer/cdp/FrameManagerEvents.js | 0 .../puppeteer/cdp/FrameManagerEvents.js.map | 0 .../lib/esm/puppeteer/cdp/FrameTree.d.ts | 0 .../lib/esm/puppeteer/cdp/FrameTree.d.ts.map | 0 .../lib/esm/puppeteer/cdp/FrameTree.js | 0 .../lib/esm/puppeteer/cdp/FrameTree.js.map | 0 .../lib/esm/puppeteer/cdp/HTTPRequest.d.ts | 0 .../esm/puppeteer/cdp/HTTPRequest.d.ts.map | 0 .../lib/esm/puppeteer/cdp/HTTPRequest.js | 0 .../lib/esm/puppeteer/cdp/HTTPRequest.js.map | 0 .../lib/esm/puppeteer/cdp/HTTPResponse.d.ts | 0 .../esm/puppeteer/cdp/HTTPResponse.d.ts.map | 0 .../lib/esm/puppeteer/cdp/HTTPResponse.js | 0 .../lib/esm/puppeteer/cdp/HTTPResponse.js.map | 0 .../lib/esm/puppeteer/cdp/Input.d.ts | 0 .../lib/esm/puppeteer/cdp/Input.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Input.js | 0 .../lib/esm/puppeteer/cdp/Input.js.map | 0 .../lib/esm/puppeteer/cdp/IsolatedWorld.d.ts | 0 .../esm/puppeteer/cdp/IsolatedWorld.d.ts.map | 0 .../lib/esm/puppeteer/cdp/IsolatedWorld.js | 2 +- .../esm/puppeteer/cdp/IsolatedWorld.js.map | 2 +- .../lib/esm/puppeteer/cdp/IsolatedWorlds.d.ts | 0 .../esm/puppeteer/cdp/IsolatedWorlds.d.ts.map | 0 .../lib/esm/puppeteer/cdp/IsolatedWorlds.js | 0 .../esm/puppeteer/cdp/IsolatedWorlds.js.map | 0 .../lib/esm/puppeteer/cdp/JSHandle.d.ts | 0 .../lib/esm/puppeteer/cdp/JSHandle.d.ts.map | 0 .../lib/esm/puppeteer/cdp/JSHandle.js | 0 .../lib/esm/puppeteer/cdp/JSHandle.js.map | 0 .../esm/puppeteer/cdp/LifecycleWatcher.d.ts | 0 .../puppeteer/cdp/LifecycleWatcher.d.ts.map | 0 .../lib/esm/puppeteer/cdp/LifecycleWatcher.js | 0 .../esm/puppeteer/cdp/LifecycleWatcher.js.map | 0 .../puppeteer/cdp/NetworkEventManager.d.ts | 0 .../cdp/NetworkEventManager.d.ts.map | 0 .../esm/puppeteer/cdp/NetworkEventManager.js | 0 .../puppeteer/cdp/NetworkEventManager.js.map | 0 .../lib/esm/puppeteer/cdp/NetworkManager.d.ts | 0 .../esm/puppeteer/cdp/NetworkManager.d.ts.map | 0 .../lib/esm/puppeteer/cdp/NetworkManager.js | 0 .../esm/puppeteer/cdp/NetworkManager.js.map | 0 .../lib/esm}/puppeteer/cdp/Page.d.ts | 1 + .../lib/esm/puppeteer/cdp/Page.d.ts.map | 1 + .../lib/esm/puppeteer/cdp/Page.js | 3 + .../lib/esm/puppeteer/cdp/Page.js.map | 1 + .../cdp/PredefinedNetworkConditions.d.ts | 0 .../cdp/PredefinedNetworkConditions.d.ts.map | 0 .../cdp/PredefinedNetworkConditions.js | 0 .../cdp/PredefinedNetworkConditions.js.map | 0 .../lib/esm/puppeteer/cdp/Target.d.ts | 0 .../lib/esm/puppeteer/cdp/Target.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Target.js | 0 .../lib/esm/puppeteer/cdp/Target.js.map | 0 .../esm/puppeteer/cdp/TargetManageEvents.d.ts | 0 .../puppeteer/cdp/TargetManageEvents.d.ts.map | 0 .../esm/puppeteer/cdp/TargetManageEvents.js | 0 .../puppeteer/cdp/TargetManageEvents.js.map | 0 .../lib/esm/puppeteer/cdp/TargetManager.d.ts | 4 + .../esm/puppeteer/cdp/TargetManager.d.ts.map | 2 +- .../lib/esm/puppeteer/cdp/TargetManager.js | 4 +- .../esm/puppeteer/cdp/TargetManager.js.map | 2 +- .../lib/esm/puppeteer/cdp/Tracing.d.ts | 0 .../lib/esm/puppeteer/cdp/Tracing.d.ts.map | 0 .../lib/esm/puppeteer/cdp/Tracing.js | 0 .../lib/esm/puppeteer/cdp/Tracing.js.map | 0 .../lib/esm/puppeteer/cdp/WebMCP.d.ts | 0 .../lib/esm/puppeteer/cdp/WebMCP.d.ts.map | 0 .../lib/esm/puppeteer/cdp/WebMCP.js | 0 .../lib/esm/puppeteer/cdp/WebMCP.js.map | 0 .../lib/esm/puppeteer/cdp/WebWorker.d.ts | 0 .../lib/esm/puppeteer/cdp/WebWorker.d.ts.map | 0 .../lib/esm/puppeteer/cdp/WebWorker.js | 0 .../lib/esm/puppeteer/cdp/WebWorker.js.map | 0 .../lib/esm/puppeteer/cdp/cdp.d.ts | 0 .../lib/esm/puppeteer/cdp/cdp.d.ts.map | 0 .../lib/esm/puppeteer/cdp/cdp.js | 0 .../lib/esm/puppeteer/cdp/cdp.js.map | 0 .../lib/esm/puppeteer/cdp/utils.d.ts | 0 .../lib/esm/puppeteer/cdp/utils.d.ts.map | 0 .../lib/esm/puppeteer/cdp/utils.js | 0 .../lib/esm/puppeteer/cdp/utils.js.map | 0 .../puppeteer/common/AriaQueryHandler.d.ts | 0 .../common/AriaQueryHandler.d.ts.map | 0 .../esm/puppeteer/common/AriaQueryHandler.js | 0 .../puppeteer/common/AriaQueryHandler.js.map | 0 .../puppeteer/common/BrowserConnector.d.ts | 5 + .../common/BrowserConnector.d.ts.map | 2 +- .../esm/puppeteer/common/BrowserConnector.js | 9 +- .../puppeteer/common/BrowserConnector.js.map | 1 + .../common/BrowserWebSocketTransport.d.ts | 0 .../common/BrowserWebSocketTransport.d.ts.map | 0 .../common/BrowserWebSocketTransport.js | 0 .../common/BrowserWebSocketTransport.js.map | 0 .../esm/puppeteer/common/CSSQueryHandler.d.ts | 0 .../puppeteer/common/CSSQueryHandler.d.ts.map | 0 .../esm/puppeteer/common/CSSQueryHandler.js | 0 .../puppeteer/common/CSSQueryHandler.js.map | 0 .../puppeteer/common/CallbackRegistry.d.ts | 0 .../common/CallbackRegistry.d.ts.map | 0 .../esm/puppeteer/common/CallbackRegistry.js | 0 .../puppeteer/common/CallbackRegistry.js.map | 0 .../esm/puppeteer/common/Configuration.d.ts | 0 .../puppeteer/common/Configuration.d.ts.map | 0 .../lib/esm/puppeteer/common/Configuration.js | 0 .../esm/puppeteer/common/Configuration.js.map | 0 .../esm/puppeteer/common/ConnectOptions.d.ts | 0 .../puppeteer/common/ConnectOptions.d.ts.map | 0 .../esm/puppeteer/common/ConnectOptions.js | 0 .../puppeteer/common/ConnectOptions.js.map | 0 .../puppeteer/common/ConnectionTransport.d.ts | 0 .../common/ConnectionTransport.d.ts.map | 0 .../puppeteer/common/ConnectionTransport.js | 0 .../common/ConnectionTransport.js.map | 0 .../esm/puppeteer/common/ConsoleMessage.d.ts | 0 .../puppeteer/common/ConsoleMessage.d.ts.map | 0 .../esm/puppeteer/common/ConsoleMessage.js | 0 .../puppeteer/common/ConsoleMessage.js.map | 0 .../lib/esm/puppeteer/common/Cookie.d.ts | 0 .../lib/esm/puppeteer/common/Cookie.d.ts.map | 0 .../lib/esm/puppeteer/common/Cookie.js | 0 .../lib/esm/puppeteer/common/Cookie.js.map | 0 .../puppeteer/common/CustomQueryHandler.d.ts | 0 .../common/CustomQueryHandler.d.ts.map | 0 .../puppeteer/common/CustomQueryHandler.js | 0 .../common/CustomQueryHandler.js.map | 0 .../lib/esm/puppeteer/common/Debug.d.ts | 0 .../lib/esm/puppeteer/common/Debug.d.ts.map | 0 .../lib/esm/puppeteer/common/Debug.js | 0 .../lib/esm/puppeteer/common/Debug.js.map | 0 .../lib/esm/puppeteer/common/Device.d.ts | 0 .../lib/esm/puppeteer/common/Device.d.ts.map | 0 .../lib/esm/puppeteer/common/Device.js | 0 .../lib/esm/puppeteer/common/Device.js.map | 0 .../puppeteer/common/DownloadBehavior.d.ts | 0 .../common/DownloadBehavior.d.ts.map | 0 .../esm/puppeteer/common/DownloadBehavior.js | 0 .../puppeteer/common/DownloadBehavior.js.map | 0 .../lib/esm/puppeteer/common/Errors.d.ts | 0 .../lib/esm/puppeteer/common/Errors.d.ts.map | 0 .../lib/esm/puppeteer/common/Errors.js | 0 .../lib/esm/puppeteer/common/Errors.js.map | 0 .../esm}/puppeteer/common/EventEmitter.d.ts | 6 +- .../puppeteer/common/EventEmitter.d.ts.map | 1 + .../lib/esm/puppeteer/common/EventEmitter.js | 9 +- .../esm/puppeteer/common/EventEmitter.js.map | 1 + .../lib/esm/puppeteer/common/FileChooser.d.ts | 0 .../esm/puppeteer/common/FileChooser.d.ts.map | 0 .../lib/esm/puppeteer/common/FileChooser.js | 0 .../esm/puppeteer/common/FileChooser.js.map | 0 .../esm/puppeteer/common/GetQueryHandler.d.ts | 0 .../puppeteer/common/GetQueryHandler.d.ts.map | 0 .../esm/puppeteer/common/GetQueryHandler.js | 0 .../puppeteer/common/GetQueryHandler.js.map | 0 .../esm/puppeteer/common/HandleIterator.d.ts | 0 .../puppeteer/common/HandleIterator.d.ts.map | 0 .../esm/puppeteer/common/HandleIterator.js | 0 .../puppeteer/common/HandleIterator.js.map | 0 .../lib/esm/puppeteer/common/LazyArg.d.ts | 0 .../lib/esm/puppeteer/common/LazyArg.d.ts.map | 0 .../lib/esm/puppeteer/common/LazyArg.js | 0 .../lib/esm/puppeteer/common/LazyArg.js.map | 0 .../common/NetworkManagerEvents.d.ts | 0 .../common/NetworkManagerEvents.d.ts.map | 0 .../puppeteer/common/NetworkManagerEvents.js | 0 .../common/NetworkManagerEvents.js.map | 0 .../lib/esm/puppeteer/common/PDFOptions.d.ts | 0 .../esm/puppeteer/common/PDFOptions.d.ts.map | 0 .../lib/esm/puppeteer/common/PDFOptions.js | 0 .../esm/puppeteer/common/PDFOptions.js.map | 0 .../esm/puppeteer/common/PQueryHandler.d.ts | 0 .../puppeteer/common/PQueryHandler.d.ts.map | 0 .../lib/esm/puppeteer/common/PQueryHandler.js | 0 .../esm/puppeteer/common/PQueryHandler.js.map | 0 .../esm/puppeteer/common/PSelectorParser.d.ts | 0 .../puppeteer/common/PSelectorParser.d.ts.map | 0 .../esm/puppeteer/common/PSelectorParser.js | 0 .../puppeteer/common/PSelectorParser.js.map | 0 .../puppeteer/common/PierceQueryHandler.d.ts | 0 .../common/PierceQueryHandler.d.ts.map | 0 .../puppeteer/common/PierceQueryHandler.js | 0 .../common/PierceQueryHandler.js.map | 0 .../lib/esm/puppeteer/common/Puppeteer.d.ts | 0 .../esm/puppeteer/common/Puppeteer.d.ts.map | 0 .../lib/esm/puppeteer/common/Puppeteer.js | 0 .../lib/esm/puppeteer/common/Puppeteer.js.map | 0 .../esm/puppeteer/common/QueryHandler.d.ts | 0 .../puppeteer/common/QueryHandler.d.ts.map | 0 .../lib/esm/puppeteer/common/QueryHandler.js | 0 .../esm/puppeteer/common/QueryHandler.js.map | 0 .../esm/puppeteer/common/ScriptInjector.d.ts | 0 .../puppeteer/common/ScriptInjector.d.ts.map | 0 .../esm/puppeteer/common/ScriptInjector.js | 0 .../puppeteer/common/ScriptInjector.js.map | 0 .../esm/puppeteer/common/SecurityDetails.d.ts | 0 .../puppeteer/common/SecurityDetails.d.ts.map | 0 .../esm/puppeteer/common/SecurityDetails.js | 0 .../puppeteer/common/SecurityDetails.js.map | 0 .../puppeteer/common/SupportedBrowser.d.ts | 0 .../common/SupportedBrowser.d.ts.map | 0 .../esm/puppeteer/common/SupportedBrowser.js | 0 .../puppeteer/common/SupportedBrowser.js.map | 0 .../lib/esm/puppeteer/common/TaskQueue.d.ts | 0 .../esm/puppeteer/common/TaskQueue.d.ts.map | 0 .../lib/esm/puppeteer/common/TaskQueue.js | 0 .../lib/esm/puppeteer/common/TaskQueue.js.map | 0 .../puppeteer/common/TextQueryHandler.d.ts | 0 .../common/TextQueryHandler.d.ts.map | 0 .../esm/puppeteer/common/TextQueryHandler.js | 0 .../puppeteer/common/TextQueryHandler.js.map | 0 .../esm/puppeteer/common/TimeoutSettings.d.ts | 0 .../puppeteer/common/TimeoutSettings.d.ts.map | 0 .../esm/puppeteer/common/TimeoutSettings.js | 0 .../puppeteer/common/TimeoutSettings.js.map | 0 .../puppeteer/common/USKeyboardLayout.d.ts | 0 .../common/USKeyboardLayout.d.ts.map | 0 .../esm/puppeteer/common/USKeyboardLayout.js | 0 .../puppeteer/common/USKeyboardLayout.js.map | 0 .../lib/esm/puppeteer/common/Viewport.d.ts | 0 .../esm/puppeteer/common/Viewport.d.ts.map | 0 .../lib/esm/puppeteer/common/Viewport.js | 0 .../lib/esm/puppeteer/common/Viewport.js.map | 0 .../lib/esm/puppeteer/common/WaitTask.d.ts | 0 .../esm/puppeteer/common/WaitTask.d.ts.map | 0 .../lib/esm/puppeteer/common/WaitTask.js | 0 .../lib/esm/puppeteer/common/WaitTask.js.map | 0 .../puppeteer/common/XPathQueryHandler.d.ts | 0 .../common/XPathQueryHandler.d.ts.map | 0 .../esm/puppeteer/common/XPathQueryHandler.js | 0 .../puppeteer/common/XPathQueryHandler.js.map | 0 .../lib/esm/puppeteer/common/common.d.ts | 0 .../lib/esm/puppeteer/common/common.d.ts.map | 0 .../lib/esm/puppeteer/common/common.js | 0 .../lib/esm/puppeteer/common/common.js.map | 0 .../lib/esm/puppeteer/common/types.d.ts | 0 .../lib/esm/puppeteer/common/types.d.ts.map | 0 .../lib/esm/puppeteer/common/types.js | 0 .../lib/esm/puppeteer/common/types.js.map | 0 .../lib/esm/puppeteer/common/util.d.ts | 0 .../lib/esm/puppeteer/common/util.d.ts.map | 0 .../lib/esm/puppeteer/common/util.js | 0 .../lib/esm/puppeteer/common/util.js.map | 0 .../lib/esm/puppeteer/environment.d.ts | 0 .../lib/esm/puppeteer/environment.d.ts.map | 0 .../lib/esm/puppeteer/environment.js | 0 .../lib/esm/puppeteer/environment.js.map | 0 .../lib/esm/puppeteer/generated/injected.d.ts | 0 .../esm/puppeteer/generated/injected.d.ts.map | 0 .../lib/esm/puppeteer/generated/injected.js | 0 .../esm/puppeteer/generated/injected.js.map | 0 .../lib/esm/puppeteer/index-browser.d.ts | 0 .../lib/esm/puppeteer/index-browser.d.ts.map | 0 .../lib/esm/puppeteer/index-browser.js | 0 .../lib/esm/puppeteer/index-browser.js.map | 0 .../lib/esm/puppeteer/index.d.ts | 0 .../lib/esm/puppeteer/index.d.ts.map | 0 .../puppeteer-core/lib/esm/puppeteer/index.js | 0 .../lib/esm/puppeteer/index.js.map | 0 .../puppeteer/injected/ARIAQuerySelector.d.ts | 0 .../injected/ARIAQuerySelector.d.ts.map | 0 .../puppeteer/injected/ARIAQuerySelector.js | 0 .../injected/ARIAQuerySelector.js.map | 0 .../esm/puppeteer/injected/CSSSelector.d.ts | 0 .../puppeteer/injected/CSSSelector.d.ts.map | 0 .../lib/esm/puppeteer/injected/CSSSelector.js | 0 .../esm/puppeteer/injected/CSSSelector.js.map | 0 .../injected/CustomQuerySelector.d.ts | 0 .../injected/CustomQuerySelector.d.ts.map | 0 .../puppeteer/injected/CustomQuerySelector.js | 0 .../injected/CustomQuerySelector.js.map | 0 .../puppeteer/injected/PQuerySelector.d.ts | 0 .../injected/PQuerySelector.d.ts.map | 0 .../esm/puppeteer/injected/PQuerySelector.js | 0 .../puppeteer/injected/PQuerySelector.js.map | 0 .../injected/PierceQuerySelector.d.ts | 0 .../injected/PierceQuerySelector.d.ts.map | 0 .../puppeteer/injected/PierceQuerySelector.js | 0 .../injected/PierceQuerySelector.js.map | 0 .../lib/esm/puppeteer/injected/Poller.d.ts | 0 .../esm/puppeteer/injected/Poller.d.ts.map | 0 .../lib/esm/puppeteer/injected/Poller.js | 0 .../lib/esm/puppeteer/injected/Poller.js.map | 0 .../esm/puppeteer/injected/TextContent.d.ts | 0 .../puppeteer/injected/TextContent.d.ts.map | 0 .../lib/esm/puppeteer/injected/TextContent.js | 0 .../esm/puppeteer/injected/TextContent.js.map | 0 .../puppeteer/injected/TextQuerySelector.d.ts | 0 .../injected/TextQuerySelector.d.ts.map | 0 .../puppeteer/injected/TextQuerySelector.js | 0 .../injected/TextQuerySelector.js.map | 0 .../injected/XPathQuerySelector.d.ts | 0 .../injected/XPathQuerySelector.d.ts.map | 0 .../puppeteer/injected/XPathQuerySelector.js | 0 .../injected/XPathQuerySelector.js.map | 0 .../lib/esm/puppeteer/injected/injected.d.ts | 0 .../esm/puppeteer/injected/injected.d.ts.map | 0 .../lib/esm/puppeteer/injected/injected.js | 0 .../esm/puppeteer/injected/injected.js.map | 0 .../lib/esm/puppeteer/injected/util.d.ts | 0 .../lib/esm/puppeteer/injected/util.d.ts.map | 0 .../lib/esm/puppeteer/injected/util.js | 0 .../lib/esm/puppeteer/injected/util.js.map | 0 .../esm/puppeteer/node/BrowserLauncher.d.ts | 0 .../puppeteer/node/BrowserLauncher.d.ts.map | 2 +- .../lib/esm/puppeteer/node/BrowserLauncher.js | 9 +- .../esm/puppeteer/node/BrowserLauncher.js.map | 1 + .../esm/puppeteer/node/ChromeLauncher.d.ts | 0 .../puppeteer/node/ChromeLauncher.d.ts.map | 0 .../lib/esm/puppeteer/node/ChromeLauncher.js | 0 .../esm/puppeteer/node/ChromeLauncher.js.map | 0 .../esm/puppeteer/node/FirefoxLauncher.d.ts | 0 .../puppeteer/node/FirefoxLauncher.d.ts.map | 0 .../lib/esm/puppeteer/node/FirefoxLauncher.js | 0 .../esm/puppeteer/node/FirefoxLauncher.js.map | 0 .../lib/esm/puppeteer/node/LaunchOptions.d.ts | 0 .../esm/puppeteer/node/LaunchOptions.d.ts.map | 0 .../lib/esm/puppeteer/node/LaunchOptions.js | 0 .../esm/puppeteer/node/LaunchOptions.js.map | 0 .../node/NodeWebSocketTransport.d.ts | 0 .../node/NodeWebSocketTransport.d.ts.map | 0 .../puppeteer/node/NodeWebSocketTransport.js | 0 .../node/NodeWebSocketTransport.js.map | 0 .../lib/esm/puppeteer/node/PipeTransport.d.ts | 0 .../esm/puppeteer/node/PipeTransport.d.ts.map | 0 .../lib/esm/puppeteer/node/PipeTransport.js | 0 .../esm/puppeteer/node/PipeTransport.js.map | 0 .../lib/esm/puppeteer/node/PuppeteerNode.d.ts | 0 .../esm/puppeteer/node/PuppeteerNode.d.ts.map | 0 .../lib/esm/puppeteer/node/PuppeteerNode.js | 0 .../esm/puppeteer/node/PuppeteerNode.js.map | 0 .../esm/puppeteer/node/ScreenRecorder.d.ts | 0 .../puppeteer/node/ScreenRecorder.d.ts.map | 2 +- .../lib/esm/puppeteer/node/ScreenRecorder.js | 1 + .../esm/puppeteer/node/ScreenRecorder.js.map | 2 +- .../lib/esm/puppeteer/node/node.d.ts | 0 .../lib/esm/puppeteer/node/node.d.ts.map | 0 .../lib/esm/puppeteer/node/node.js | 0 .../lib/esm/puppeteer/node/node.js.map | 0 .../lib/esm/puppeteer/node/util/fs.d.ts | 0 .../lib/esm/puppeteer/node/util/fs.d.ts.map | 0 .../lib/esm/puppeteer/node/util/fs.js | 0 .../lib/esm/puppeteer/node/util/fs.js.map | 0 .../esm/puppeteer/puppeteer-core-browser.d.ts | 0 .../puppeteer/puppeteer-core-browser.d.ts.map | 0 .../esm/puppeteer/puppeteer-core-browser.js | 0 .../puppeteer/puppeteer-core-browser.js.map | 0 .../lib/esm/puppeteer/puppeteer-core.d.ts | 0 .../lib/esm/puppeteer/puppeteer-core.d.ts.map | 0 .../lib/esm/puppeteer/puppeteer-core.js | 0 .../lib/esm/puppeteer/puppeteer-core.js.map | 0 .../lib/esm}/puppeteer/revisions.d.ts | 2 +- .../lib/esm/puppeteer/revisions.d.ts.map | 0 .../lib/esm/puppeteer/revisions.js | 2 +- .../lib/esm/puppeteer/revisions.js.map | 0 .../esm/puppeteer/util/AsyncIterableUtil.d.ts | 0 .../puppeteer/util/AsyncIterableUtil.d.ts.map | 0 .../esm/puppeteer/util/AsyncIterableUtil.js | 0 .../puppeteer/util/AsyncIterableUtil.js.map | 0 .../lib/esm/puppeteer/util/Deferred.d.ts | 0 .../lib/esm/puppeteer/util/Deferred.d.ts.map | 0 .../lib/esm/puppeteer/util/Deferred.js | 0 .../lib/esm/puppeteer/util/Deferred.js.map | 0 .../lib/esm/puppeteer/util/ErrorLike.d.ts | 0 .../lib/esm/puppeteer/util/ErrorLike.d.ts.map | 0 .../lib/esm/puppeteer/util/ErrorLike.js | 0 .../lib/esm/puppeteer/util/ErrorLike.js.map | 0 .../lib/esm/puppeteer/util/Function.d.ts | 0 .../lib/esm/puppeteer/util/Function.d.ts.map | 0 .../lib/esm/puppeteer/util/Function.js | 0 .../lib/esm/puppeteer/util/Function.js.map | 0 .../lib/esm/puppeteer/util/Mutex.d.ts | 0 .../lib/esm/puppeteer/util/Mutex.d.ts.map | 0 .../lib/esm/puppeteer/util/Mutex.js | 0 .../lib/esm/puppeteer/util/Mutex.js.map | 0 .../lib/esm/puppeteer/util/assert.d.ts | 0 .../lib/esm/puppeteer/util/assert.d.ts.map | 0 .../lib/esm/puppeteer/util/assert.js | 0 .../lib/esm/puppeteer/util/assert.js.map | 0 .../lib/esm/puppeteer/util/decorators.d.ts | 0 .../esm/puppeteer/util/decorators.d.ts.map | 0 .../lib/esm/puppeteer/util/decorators.js | 0 .../lib/esm/puppeteer/util/decorators.js.map | 0 .../lib/esm/puppeteer/util/disposable.d.ts | 0 .../esm/puppeteer/util/disposable.d.ts.map | 0 .../lib/esm/puppeteer/util/disposable.js | 0 .../lib/esm/puppeteer/util/disposable.js.map | 0 .../lib/esm/puppeteer/util/encoding.d.ts | 0 .../lib/esm/puppeteer/util/encoding.d.ts.map | 0 .../lib/esm/puppeteer/util/encoding.js | 0 .../lib/esm/puppeteer/util/encoding.js.map | 0 .../util/incremental-id-generator.d.ts | 0 .../util/incremental-id-generator.d.ts.map | 0 .../util/incremental-id-generator.js | 0 .../util/incremental-id-generator.js.map | 0 .../lib/esm/puppeteer/util/util.d.ts | 0 .../lib/esm/puppeteer/util/util.d.ts.map | 0 .../lib/esm/puppeteer/util/util.js | 0 .../lib/esm/puppeteer/util/util.js.map | 0 .../lib/esm/puppeteer/util/version.d.ts | 2 +- .../lib/esm/puppeteer/util/version.d.ts.map | 0 .../lib/esm/puppeteer/util/version.js | 2 +- .../lib/esm/puppeteer/util/version.js.map | 0 .../lib/esm/third_party/mitt/mitt.d.ts | 0 .../lib/esm/third_party/mitt/mitt.js | 0 .../esm/third_party/parsel-js/parsel-js.d.ts | 0 .../esm/third_party/parsel-js/parsel-js.js | 0 .../lib/esm/third_party/rxjs/rxjs.d.ts | 0 .../lib/esm/third_party/rxjs/rxjs.js | 0 .../urlpattern-polyfill.d.ts | 0 .../urlpattern-polyfill.js | 0 .../puppeteer-core/lib/types.d.ts | 25 +- .../node_modules}/puppeteer-core/package.json | 4 +- .../src/api/BluetoothEmulation.ts | 0 .../puppeteer-core/src/api/Browser.ts | 13 +- .../puppeteer-core/src/api/BrowserContext.ts | 7 +- .../puppeteer-core/src/api/CDPSession.ts | 0 .../src/api/DeviceRequestPrompt.ts | 0 .../puppeteer-core/src/api/Dialog.ts | 0 .../puppeteer-core/src/api/ElementHandle.ts | 0 .../src/api/ElementHandleSymbol.ts | 0 .../puppeteer-core/src/api/Environment.ts | 0 .../puppeteer-core/src/api/Extension.ts | 0 .../puppeteer-core/src/api/Frame.ts | 22 +- .../puppeteer-core/src/api/HTTPRequest.ts | 0 .../puppeteer-core/src/api/HTTPResponse.ts | 0 .../puppeteer-core/src/api/Input.ts | 0 .../puppeteer-core/src/api/Issue.ts | 0 .../puppeteer-core/src/api/JSHandle.ts | 2 +- .../puppeteer-core/src/api/Page.ts | 13 +- .../puppeteer-core/src/api/Realm.ts | 0 .../puppeteer-core/src/api/Target.ts | 0 .../puppeteer-core/src/api/WebWorker.ts | 0 .../puppeteer-core/src/api/api.ts | 0 .../src/api/locators/locators.ts | 0 .../puppeteer-core/src/bidi/BidiOverCdp.ts | 0 .../src/bidi/BluetoothEmulation.ts | 0 .../puppeteer-core/src/bidi/Browser.ts | 0 .../src/bidi/BrowserConnector.ts | 0 .../puppeteer-core/src/bidi/BrowserContext.ts | 0 .../puppeteer-core/src/bidi/CDPSession.ts | 0 .../puppeteer-core/src/bidi/Connection.ts | 0 .../puppeteer-core/src/bidi/Deserializer.ts | 0 .../src/bidi/DeviceRequestPrompt.ts | 0 .../puppeteer-core/src/bidi/Dialog.ts | 0 .../puppeteer-core/src/bidi/ElementHandle.ts | 0 .../src/bidi/ExposedFunction.ts | 0 .../puppeteer-core/src/bidi/Frame.ts | 3 +- .../puppeteer-core/src/bidi/HTTPRequest.ts | 0 .../puppeteer-core/src/bidi/HTTPResponse.ts | 0 .../puppeteer-core/src/bidi/Input.ts | 0 .../puppeteer-core/src/bidi/JSHandle.ts | 0 .../puppeteer-core/src/bidi/Page.ts | 0 .../puppeteer-core/src/bidi/Realm.ts | 0 .../puppeteer-core/src/bidi/Serializer.ts | 0 .../puppeteer-core/src/bidi/Target.ts | 0 .../puppeteer-core/src/bidi/WebWorker.ts | 0 .../puppeteer-core/src/bidi/bidi.ts | 0 .../puppeteer-core/src/bidi/core/Browser.ts | 0 .../src/bidi/core/BrowsingContext.ts | 0 .../src/bidi/core/Connection.ts | 0 .../src/bidi/core/Navigation.ts | 0 .../puppeteer-core/src/bidi/core/README.md | 0 .../puppeteer-core/src/bidi/core/Realm.ts | 0 .../puppeteer-core/src/bidi/core/Request.ts | 0 .../puppeteer-core/src/bidi/core/Session.ts | 0 .../src/bidi/core/UserContext.ts | 0 .../src/bidi/core/UserPrompt.ts | 0 .../puppeteer-core/src/bidi/core/core.ts | 0 .../puppeteer-core/src/bidi/util.ts | 0 .../puppeteer-core/src/cdp/Accessibility.ts | 0 .../puppeteer-core/src/cdp/Binding.ts | 0 .../src/cdp/BluetoothEmulation.ts | 0 .../puppeteer-core/src/cdp/Browser.ts | 0 .../src/cdp/BrowserConnector.ts | 0 .../puppeteer-core/src/cdp/BrowserContext.ts | 0 .../puppeteer-core/src/cdp/CdpIssue.ts | 0 .../src/cdp/CdpPreloadScript.ts | 0 .../puppeteer-core/src/cdp/CdpSession.ts | 0 .../puppeteer-core/src/cdp/Connection.ts | 0 .../puppeteer-core/src/cdp/Coverage.ts | 0 .../src/cdp/DeviceRequestPrompt.ts | 0 .../puppeteer-core/src/cdp/Dialog.ts | 0 .../puppeteer-core/src/cdp/ElementHandle.ts | 0 .../src/cdp/EmulationManager.ts | 0 .../src/cdp/ExecutionContext.ts | 1 + .../puppeteer-core/src/cdp/Extension.ts | 0 .../src/cdp/ExtensionTransport.ts | 0 .../puppeteer-core/src/cdp/Frame.ts | 14 +- .../puppeteer-core/src/cdp/FrameManager.ts | 4 +- .../src/cdp/FrameManagerEvents.ts | 0 .../puppeteer-core/src/cdp/FrameTree.ts | 0 .../puppeteer-core/src/cdp/HTTPRequest.ts | 0 .../puppeteer-core/src/cdp/HTTPResponse.ts | 0 .../puppeteer-core/src/cdp/Input.ts | 0 .../puppeteer-core/src/cdp/IsolatedWorld.ts | 2 +- .../puppeteer-core/src/cdp/IsolatedWorlds.ts | 0 .../puppeteer-core/src/cdp/JSHandle.ts | 0 .../src/cdp/LifecycleWatcher.ts | 0 .../src/cdp/NetworkEventManager.ts | 0 .../puppeteer-core/src/cdp/NetworkManager.ts | 0 .../puppeteer-core/src/cdp/Page.ts | 4 + .../src/cdp/PredefinedNetworkConditions.ts | 0 .../puppeteer-core/src/cdp/Target.ts | 0 .../src/cdp/TargetManageEvents.ts | 0 .../puppeteer-core/src/cdp/TargetManager.ts | 4 +- .../puppeteer-core/src/cdp/Tracing.ts | 0 .../puppeteer-core/src/cdp/WebMCP.ts | 0 .../puppeteer-core/src/cdp/WebWorker.ts | 0 .../puppeteer-core/src/cdp/cdp.ts | 0 .../puppeteer-core/src/cdp/utils.ts | 0 .../src/common/AriaQueryHandler.ts | 0 .../src/common/BrowserConnector.ts | 22 +- .../src/common/BrowserWebSocketTransport.ts | 0 .../src/common/CSSQueryHandler.ts | 0 .../src/common/CallbackRegistry.ts | 0 .../src/common/Configuration.ts | 0 .../src/common/ConnectOptions.ts | 0 .../src/common/ConnectionTransport.ts | 0 .../src/common/ConsoleMessage.ts | 0 .../puppeteer-core/src/common/Cookie.ts | 0 .../src/common/CustomQueryHandler.ts | 0 .../puppeteer-core/src/common/Debug.ts | 0 .../puppeteer-core/src/common/Device.ts | 0 .../src/common/DownloadBehavior.ts | 0 .../puppeteer-core/src/common/Errors.ts | 0 .../puppeteer-core/src/common/EventEmitter.ts | 11 +- .../puppeteer-core/src/common/FileChooser.ts | 0 .../src/common/GetQueryHandler.ts | 0 .../src/common/HandleIterator.ts | 0 .../puppeteer-core/src/common/LazyArg.ts | 0 .../src/common/NetworkManagerEvents.ts | 0 .../puppeteer-core/src/common/PDFOptions.ts | 0 .../src/common/PQueryHandler.ts | 0 .../src/common/PSelectorParser.ts | 0 .../src/common/PierceQueryHandler.ts | 0 .../puppeteer-core/src/common/Puppeteer.ts | 0 .../puppeteer-core/src/common/QueryHandler.ts | 0 .../src/common/ScriptInjector.ts | 0 .../src/common/SecurityDetails.ts | 0 .../src/common/SupportedBrowser.ts | 0 .../puppeteer-core/src/common/TaskQueue.ts | 0 .../src/common/TextQueryHandler.ts | 0 .../src/common/TimeoutSettings.ts | 0 .../src/common/USKeyboardLayout.ts | 0 .../puppeteer-core/src/common/Viewport.ts | 0 .../puppeteer-core/src/common/WaitTask.ts | 0 .../src/common/XPathQueryHandler.ts | 0 .../puppeteer-core/src/common/common.ts | 0 .../puppeteer-core/src/common/types.ts | 0 .../puppeteer-core/src/common/util.ts | 0 .../puppeteer-core/src/environment.ts | 0 .../puppeteer-core/src/generated/injected.ts | 0 .../puppeteer-core/src/index-browser.ts | 0 .../node_modules}/puppeteer-core/src/index.ts | 0 .../src/injected/ARIAQuerySelector.ts | 0 .../src/injected/CSSSelector.ts | 0 .../src/injected/CustomQuerySelector.ts | 0 .../src/injected/PQuerySelector.ts | 0 .../src/injected/PierceQuerySelector.ts | 0 .../puppeteer-core/src/injected/Poller.ts | 0 .../puppeteer-core/src/injected/README.md | 0 .../src/injected/TextContent.ts | 0 .../src/injected/TextQuerySelector.ts | 0 .../src/injected/XPathQuerySelector.ts | 0 .../puppeteer-core/src/injected/injected.ts | 0 .../puppeteer-core/src/injected/util.ts | 0 .../src/node/BrowserLauncher.ts | 10 +- .../puppeteer-core/src/node/ChromeLauncher.ts | 0 .../src/node/FirefoxLauncher.ts | 0 .../puppeteer-core/src/node/LaunchOptions.ts | 0 .../src/node/NodeWebSocketTransport.ts | 0 .../puppeteer-core/src/node/PipeTransport.ts | 0 .../puppeteer-core/src/node/PuppeteerNode.ts | 0 .../puppeteer-core/src/node/ScreenRecorder.ts | 1 + .../puppeteer-core/src/node/node.ts | 0 .../puppeteer-core/src/node/util/fs.ts | 0 .../src/puppeteer-core-browser.ts | 0 .../puppeteer-core/src/puppeteer-core.ts | 0 .../puppeteer-core/src/revisions.ts | 2 +- .../puppeteer-core/src/templates/README.md | 0 .../src/templates/injected.ts.tmpl | 0 .../puppeteer-core/src/tsconfig.cjs.json | 0 .../puppeteer-core/src/tsconfig.esm.json | 0 .../src/util/AsyncIterableUtil.ts | 0 .../puppeteer-core/src/util/Deferred.ts | 0 .../puppeteer-core/src/util/ErrorLike.ts | 0 .../puppeteer-core/src/util/Function.ts | 0 .../puppeteer-core/src/util/Mutex.ts | 0 .../puppeteer-core/src/util/assert.ts | 0 .../puppeteer-core/src/util/decorators.ts | 0 .../puppeteer-core/src/util/disposable.ts | 0 .../puppeteer-core/src/util/encoding.ts | 0 .../src/util/incremental-id-generator.ts | 0 .../puppeteer-core/src/util/util.ts | 0 .../puppeteer-core/src/util/version.ts | 2 +- node_modules/puppeteer/package.json | 144 + .../puppeteer/src/getConfiguration.ts | 166 + node_modules/puppeteer/src/node/cli.ts | 61 + node_modules/puppeteer/src/node/install.ts | 167 + node_modules/puppeteer/src/puppeteer.ts | 47 + node_modules/puppeteer/src/tsconfig.cjs.json | 8 + node_modules/puppeteer/src/tsconfig.esm.json | 6 + node_modules/resolve-from/index.js | 47 + node_modules/resolve-from/license | 9 + node_modules/resolve-from/package.json | 34 + node_modules/resolve-from/readme.md | 72 + node_modules/semver/classes/range.js | 7 + node_modules/semver/package.json | 2 +- node_modules/semver/ranges/subset.js | 4 +- node_modules/undici-types/client.d.ts | 5 + node_modules/undici-types/connector.d.ts | 2 + node_modules/undici-types/dispatcher.d.ts | 13 +- node_modules/undici-types/errors.d.ts | 18 +- node_modules/undici-types/index.d.ts | 5 +- node_modules/undici-types/interceptors.d.ts | 7 + node_modules/undici-types/package.json | 2 +- .../undici-types/socks5-proxy-agent.d.ts | 25 + node_modules/undici-types/webidl.d.ts | 6 + node_modules/undici-types/websocket.d.ts | 2 + node_modules/ws/lib/receiver.js | 54 + node_modules/ws/lib/sender.js | 7 +- node_modules/ws/lib/websocket-server.js | 8 + node_modules/ws/lib/websocket.js | 14 + node_modules/ws/package.json | 2 +- 2774 files changed, 26453 insertions(+), 442377 deletions(-) delete mode 100644 node_modules/.bin/chrome-devtools delete mode 100644 node_modules/.bin/chrome-devtools-mcp delete mode 100644 node_modules/.bin/chrome-devtools-mcp.cmd delete mode 100644 node_modules/.bin/chrome-devtools-mcp.ps1 delete mode 100644 node_modules/.bin/chrome-devtools.cmd delete mode 100644 node_modules/.bin/chrome-devtools.ps1 delete mode 100644 node_modules/.bin/playwright delete mode 100644 node_modules/.bin/playwright-core delete mode 100644 node_modules/.bin/playwright-core.cmd delete mode 100644 node_modules/.bin/playwright-core.ps1 delete mode 100644 node_modules/.bin/playwright.cmd delete mode 100644 node_modules/.bin/playwright.ps1 create mode 100644 node_modules/@babel/code-frame/LICENSE create mode 100644 node_modules/@babel/code-frame/README.md create mode 100644 node_modules/@babel/code-frame/lib/index.js create mode 100644 node_modules/@babel/code-frame/lib/index.js.map create mode 100644 node_modules/@babel/code-frame/package.json create mode 100644 node_modules/@babel/helper-validator-identifier/LICENSE create mode 100644 node_modules/@babel/helper-validator-identifier/README.md create mode 100644 node_modules/@babel/helper-validator-identifier/lib/identifier.js create mode 100644 node_modules/@babel/helper-validator-identifier/lib/identifier.js.map create mode 100644 node_modules/@babel/helper-validator-identifier/lib/index.js create mode 100644 node_modules/@babel/helper-validator-identifier/lib/index.js.map create mode 100644 node_modules/@babel/helper-validator-identifier/lib/keyword.js create mode 100644 node_modules/@babel/helper-validator-identifier/lib/keyword.js.map create mode 100644 node_modules/@babel/helper-validator-identifier/package.json create mode 100644 node_modules/@types/node/stream/iter.d.ts create mode 100644 node_modules/@types/node/zlib/iter.d.ts create mode 100644 node_modules/argparse/CHANGELOG.md create mode 100644 node_modules/argparse/LICENSE create mode 100644 node_modules/argparse/README.md create mode 100644 node_modules/argparse/argparse.js create mode 100644 node_modules/argparse/lib/sub.js create mode 100644 node_modules/argparse/lib/textwrap.js create mode 100644 node_modules/argparse/package.json create mode 100644 node_modules/callsites/index.d.ts create mode 100644 node_modules/callsites/index.js create mode 100644 node_modules/callsites/license create mode 100644 node_modules/callsites/package.json create mode 100644 node_modules/callsites/readme.md delete mode 100644 node_modules/chrome-devtools-mcp/LICENSE delete mode 100644 node_modules/chrome-devtools-mcp/README.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/DevtoolsUtils.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/McpContext.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/McpPage.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/McpResponse.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/Mutex.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/PageCollector.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/SlimMcpResponse.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/WaitForHelper.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-cli-options.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp-cli-options.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp-main.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/bin/cliDefinitions.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/browser.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/daemon/client.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/daemon/daemon.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/daemon/types.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/daemon/utils.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/formatters/IssueFormatter.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/index.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/issue-descriptions.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/logger.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/polyfill.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/flagUtils.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/metricUtils.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/persistence.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/types.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/ClearcutSender.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/main.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/THIRD_PARTY_NOTICES delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/bundled-packages.json delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/devtools-formatter-worker.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/index.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/LowTextContrast.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arInsecureContext.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arOsSourceIgnored.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arSourceIgnored.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arTriggerIgnored.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsDisabledScheme.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsDisallowedByMode.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsOriginMismatch.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cspEvalViolation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cspInlineViolation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/cspURLViolation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/deprecation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/heavyAd.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/mixedContent.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementInvalidType.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementLowContrast.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/propertyRuleIssue.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/selectivePermissionsIntervention.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedArrayBuffer.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/stylesheetLateImport.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md delete mode 100644 node_modules/chrome-devtools-mcp/build/src/third_party/lighthouse-devtools-mcp-bundle.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/ToolDefinition.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/categories.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/console.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/emulation.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/extensions.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/inPage.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/input.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/lighthouse.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/memory.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/network.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/pages.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/performance.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/screencast.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/screenshot.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/script.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/slim/tools.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/snapshot.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/tools/tools.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/trace-processing/parse.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/types.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/utils/ExtensionRegistry.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/utils/files.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/utils/keyboard.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/utils/pagination.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/utils/string.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/utils/types.js delete mode 100644 node_modules/chrome-devtools-mcp/build/src/version.js delete mode 100644 node_modules/chrome-devtools-mcp/package.json create mode 100644 node_modules/cosmiconfig/LICENSE create mode 100644 node_modules/cosmiconfig/README.md create mode 100644 node_modules/cosmiconfig/dist/Explorer.d.ts create mode 100644 node_modules/cosmiconfig/dist/Explorer.js create mode 100644 node_modules/cosmiconfig/dist/ExplorerBase.d.ts create mode 100644 node_modules/cosmiconfig/dist/ExplorerBase.js create mode 100644 node_modules/cosmiconfig/dist/ExplorerSync.d.ts create mode 100644 node_modules/cosmiconfig/dist/ExplorerSync.js create mode 100644 node_modules/cosmiconfig/dist/cacheWrapper.d.ts create mode 100644 node_modules/cosmiconfig/dist/cacheWrapper.js create mode 100644 node_modules/cosmiconfig/dist/canUseDynamicImport.d.ts create mode 100644 node_modules/cosmiconfig/dist/canUseDynamicImport.js create mode 100644 node_modules/cosmiconfig/dist/defaults.d.ts create mode 100644 node_modules/cosmiconfig/dist/defaults.js create mode 100644 node_modules/cosmiconfig/dist/getDirectory.d.ts create mode 100644 node_modules/cosmiconfig/dist/getDirectory.js create mode 100644 node_modules/cosmiconfig/dist/getPropertyByPath.d.ts create mode 100644 node_modules/cosmiconfig/dist/getPropertyByPath.js create mode 100644 node_modules/cosmiconfig/dist/index.d.ts create mode 100644 node_modules/cosmiconfig/dist/index.js create mode 100644 node_modules/cosmiconfig/dist/loaders.d.ts create mode 100644 node_modules/cosmiconfig/dist/loaders.js create mode 100644 node_modules/cosmiconfig/dist/merge.d.ts create mode 100644 node_modules/cosmiconfig/dist/merge.js create mode 100644 node_modules/cosmiconfig/dist/readFile.d.ts create mode 100644 node_modules/cosmiconfig/dist/readFile.js create mode 100644 node_modules/cosmiconfig/dist/types.d.ts create mode 100644 node_modules/cosmiconfig/dist/types.js create mode 100644 node_modules/cosmiconfig/dist/util.d.ts create mode 100644 node_modules/cosmiconfig/dist/util.js create mode 100644 node_modules/cosmiconfig/package.json create mode 100644 node_modules/env-paths/index.d.ts create mode 100644 node_modules/env-paths/index.js create mode 100644 node_modules/env-paths/license create mode 100644 node_modules/env-paths/package.json create mode 100644 node_modules/env-paths/readme.md create mode 100644 node_modules/error-ex/LICENSE create mode 100644 node_modules/error-ex/README.md create mode 100644 node_modules/error-ex/index.js create mode 100644 node_modules/error-ex/package.json create mode 100644 node_modules/import-fresh/index.d.ts create mode 100644 node_modules/import-fresh/index.js create mode 100644 node_modules/import-fresh/license create mode 100644 node_modules/import-fresh/package.json create mode 100644 node_modules/import-fresh/readme.md create mode 100644 node_modules/is-arrayish/.editorconfig create mode 100644 node_modules/is-arrayish/.istanbul.yml create mode 100644 node_modules/is-arrayish/.npmignore create mode 100644 node_modules/is-arrayish/.travis.yml create mode 100644 node_modules/is-arrayish/LICENSE create mode 100644 node_modules/is-arrayish/README.md create mode 100644 node_modules/is-arrayish/index.js create mode 100644 node_modules/is-arrayish/package.json create mode 100644 node_modules/js-tokens/CHANGELOG.md create mode 100644 node_modules/js-tokens/LICENSE create mode 100644 node_modules/js-tokens/README.md create mode 100644 node_modules/js-tokens/index.js create mode 100644 node_modules/js-tokens/package.json create mode 100644 node_modules/js-yaml/LICENSE create mode 100644 node_modules/js-yaml/README.md create mode 100644 node_modules/js-yaml/bin/js-yaml.js create mode 100644 node_modules/js-yaml/dist/js-yaml.js create mode 100644 node_modules/js-yaml/dist/js-yaml.min.js create mode 100644 node_modules/js-yaml/dist/js-yaml.mjs create mode 100644 node_modules/js-yaml/index.js create mode 100644 node_modules/js-yaml/lib/common.js create mode 100644 node_modules/js-yaml/lib/dumper.js create mode 100644 node_modules/js-yaml/lib/exception.js create mode 100644 node_modules/js-yaml/lib/loader.js create mode 100644 node_modules/js-yaml/lib/schema.js create mode 100644 node_modules/js-yaml/lib/schema/core.js create mode 100644 node_modules/js-yaml/lib/schema/default.js create mode 100644 node_modules/js-yaml/lib/schema/failsafe.js create mode 100644 node_modules/js-yaml/lib/schema/json.js create mode 100644 node_modules/js-yaml/lib/snippet.js create mode 100644 node_modules/js-yaml/lib/type.js create mode 100644 node_modules/js-yaml/lib/type/binary.js create mode 100644 node_modules/js-yaml/lib/type/bool.js create mode 100644 node_modules/js-yaml/lib/type/float.js create mode 100644 node_modules/js-yaml/lib/type/int.js create mode 100644 node_modules/js-yaml/lib/type/map.js create mode 100644 node_modules/js-yaml/lib/type/merge.js create mode 100644 node_modules/js-yaml/lib/type/null.js create mode 100644 node_modules/js-yaml/lib/type/omap.js create mode 100644 node_modules/js-yaml/lib/type/pairs.js create mode 100644 node_modules/js-yaml/lib/type/seq.js create mode 100644 node_modules/js-yaml/lib/type/set.js create mode 100644 node_modules/js-yaml/lib/type/str.js create mode 100644 node_modules/js-yaml/lib/type/timestamp.js create mode 100644 node_modules/js-yaml/package.json create mode 100644 node_modules/json-parse-even-better-errors/CHANGELOG.md create mode 100644 node_modules/json-parse-even-better-errors/LICENSE.md create mode 100644 node_modules/json-parse-even-better-errors/README.md create mode 100644 node_modules/json-parse-even-better-errors/index.js create mode 100644 node_modules/json-parse-even-better-errors/package.json create mode 100644 node_modules/lines-and-columns/LICENSE create mode 100644 node_modules/lines-and-columns/README.md create mode 100644 node_modules/lines-and-columns/build/index.d.ts create mode 100644 node_modules/lines-and-columns/build/index.js create mode 100644 node_modules/lines-and-columns/package.json create mode 100644 node_modules/parent-module/index.js create mode 100644 node_modules/parent-module/license create mode 100644 node_modules/parent-module/package.json create mode 100644 node_modules/parent-module/readme.md create mode 100644 node_modules/parse-json/index.js create mode 100644 node_modules/parse-json/license create mode 100644 node_modules/parse-json/package.json create mode 100644 node_modules/parse-json/readme.md create mode 100644 node_modules/picocolors/LICENSE create mode 100644 node_modules/picocolors/README.md create mode 100644 node_modules/picocolors/package.json create mode 100644 node_modules/picocolors/picocolors.browser.js create mode 100644 node_modules/picocolors/picocolors.d.ts create mode 100644 node_modules/picocolors/picocolors.js create mode 100644 node_modules/picocolors/types.d.ts delete mode 100644 node_modules/playwright-core/LICENSE delete mode 100644 node_modules/playwright-core/NOTICE delete mode 100644 node_modules/playwright-core/README.md delete mode 100644 node_modules/playwright-core/ThirdPartyNotices.txt delete mode 100644 node_modules/playwright-core/bin/install_media_pack.ps1 delete mode 100644 node_modules/playwright-core/bin/install_webkit_wsl.ps1 delete mode 100644 node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 delete mode 100644 node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh delete mode 100644 node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 delete mode 100644 node_modules/playwright-core/browsers.json delete mode 100644 node_modules/playwright-core/cli.js delete mode 100644 node_modules/playwright-core/index.d.ts delete mode 100644 node_modules/playwright-core/index.js delete mode 100644 node_modules/playwright-core/index.mjs delete mode 100644 node_modules/playwright-core/lib/androidServerImpl.js delete mode 100644 node_modules/playwright-core/lib/bootstrap.js delete mode 100644 node_modules/playwright-core/lib/browserServerImpl.js delete mode 100644 node_modules/playwright-core/lib/cli/browserActions.js delete mode 100644 node_modules/playwright-core/lib/cli/driver.js delete mode 100644 node_modules/playwright-core/lib/cli/installActions.js delete mode 100644 node_modules/playwright-core/lib/cli/program.js delete mode 100644 node_modules/playwright-core/lib/cli/programWithTestStub.js delete mode 100644 node_modules/playwright-core/lib/client/android.js delete mode 100644 node_modules/playwright-core/lib/client/api.js delete mode 100644 node_modules/playwright-core/lib/client/artifact.js delete mode 100644 node_modules/playwright-core/lib/client/browser.js delete mode 100644 node_modules/playwright-core/lib/client/browserContext.js delete mode 100644 node_modules/playwright-core/lib/client/browserType.js delete mode 100644 node_modules/playwright-core/lib/client/cdpSession.js delete mode 100644 node_modules/playwright-core/lib/client/channelOwner.js delete mode 100644 node_modules/playwright-core/lib/client/clientHelper.js delete mode 100644 node_modules/playwright-core/lib/client/clientInstrumentation.js delete mode 100644 node_modules/playwright-core/lib/client/clientStackTrace.js delete mode 100644 node_modules/playwright-core/lib/client/clock.js delete mode 100644 node_modules/playwright-core/lib/client/connect.js delete mode 100644 node_modules/playwright-core/lib/client/connection.js delete mode 100644 node_modules/playwright-core/lib/client/consoleMessage.js delete mode 100644 node_modules/playwright-core/lib/client/coverage.js delete mode 100644 node_modules/playwright-core/lib/client/debugger.js delete mode 100644 node_modules/playwright-core/lib/client/dialog.js delete mode 100644 node_modules/playwright-core/lib/client/disposable.js delete mode 100644 node_modules/playwright-core/lib/client/download.js delete mode 100644 node_modules/playwright-core/lib/client/electron.js delete mode 100644 node_modules/playwright-core/lib/client/elementHandle.js delete mode 100644 node_modules/playwright-core/lib/client/errors.js delete mode 100644 node_modules/playwright-core/lib/client/eventEmitter.js delete mode 100644 node_modules/playwright-core/lib/client/events.js delete mode 100644 node_modules/playwright-core/lib/client/fetch.js delete mode 100644 node_modules/playwright-core/lib/client/fileChooser.js delete mode 100644 node_modules/playwright-core/lib/client/fileUtils.js delete mode 100644 node_modules/playwright-core/lib/client/frame.js delete mode 100644 node_modules/playwright-core/lib/client/harRouter.js delete mode 100644 node_modules/playwright-core/lib/client/input.js delete mode 100644 node_modules/playwright-core/lib/client/jsHandle.js delete mode 100644 node_modules/playwright-core/lib/client/jsonPipe.js delete mode 100644 node_modules/playwright-core/lib/client/localUtils.js delete mode 100644 node_modules/playwright-core/lib/client/locator.js delete mode 100644 node_modules/playwright-core/lib/client/network.js delete mode 100644 node_modules/playwright-core/lib/client/page.js delete mode 100644 node_modules/playwright-core/lib/client/platform.js delete mode 100644 node_modules/playwright-core/lib/client/playwright.js delete mode 100644 node_modules/playwright-core/lib/client/screencast.js delete mode 100644 node_modules/playwright-core/lib/client/selectors.js delete mode 100644 node_modules/playwright-core/lib/client/stream.js delete mode 100644 node_modules/playwright-core/lib/client/timeoutSettings.js delete mode 100644 node_modules/playwright-core/lib/client/tracing.js delete mode 100644 node_modules/playwright-core/lib/client/types.js delete mode 100644 node_modules/playwright-core/lib/client/video.js delete mode 100644 node_modules/playwright-core/lib/client/waiter.js delete mode 100644 node_modules/playwright-core/lib/client/webError.js delete mode 100644 node_modules/playwright-core/lib/client/worker.js delete mode 100644 node_modules/playwright-core/lib/client/writableStream.js delete mode 100644 node_modules/playwright-core/lib/generated/bindingsControllerSource.js delete mode 100644 node_modules/playwright-core/lib/generated/clockSource.js delete mode 100644 node_modules/playwright-core/lib/generated/injectedScriptSource.js delete mode 100644 node_modules/playwright-core/lib/generated/pollingRecorderSource.js delete mode 100644 node_modules/playwright-core/lib/generated/storageScriptSource.js delete mode 100644 node_modules/playwright-core/lib/generated/utilityScriptSource.js delete mode 100644 node_modules/playwright-core/lib/generated/webSocketMockSource.js delete mode 100644 node_modules/playwright-core/lib/inProcessFactory.js delete mode 100644 node_modules/playwright-core/lib/inprocess.js delete mode 100644 node_modules/playwright-core/lib/mcpBundle.js delete mode 100644 node_modules/playwright-core/lib/mcpBundleImpl.js delete mode 100644 node_modules/playwright-core/lib/outofprocess.js delete mode 100644 node_modules/playwright-core/lib/protocol/serializers.js delete mode 100644 node_modules/playwright-core/lib/protocol/validator.js delete mode 100644 node_modules/playwright-core/lib/protocol/validatorPrimitives.js delete mode 100644 node_modules/playwright-core/lib/remote/playwrightConnection.js delete mode 100644 node_modules/playwright-core/lib/remote/playwrightPipeServer.js delete mode 100644 node_modules/playwright-core/lib/remote/playwrightServer.js delete mode 100644 node_modules/playwright-core/lib/remote/playwrightWebSocketServer.js delete mode 100644 node_modules/playwright-core/lib/remote/serverTransport.js delete mode 100644 node_modules/playwright-core/lib/server/android/android.js delete mode 100644 node_modules/playwright-core/lib/server/android/backendAdb.js delete mode 100644 node_modules/playwright-core/lib/server/artifact.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiBrowser.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiChromium.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiConnection.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiFirefox.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiInput.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiPage.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/bidiPdf.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js delete mode 100644 node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js delete mode 100644 node_modules/playwright-core/lib/server/browser.js delete mode 100644 node_modules/playwright-core/lib/server/browserContext.js delete mode 100644 node_modules/playwright-core/lib/server/browserType.js delete mode 100644 node_modules/playwright-core/lib/server/callLog.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/appIcon.png delete mode 100644 node_modules/playwright-core/lib/server/chromium/chromium.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crBrowser.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crConnection.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crCoverage.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crDevTools.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crDragDrop.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crExecutionContext.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crInput.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crNetworkManager.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crPage.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crPdf.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/crServiceWorker.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js delete mode 100644 node_modules/playwright-core/lib/server/chromium/protocol.d.js delete mode 100644 node_modules/playwright-core/lib/server/clock.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/csharp.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/java.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/javascript.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/jsonl.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/language.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/languages.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/python.js delete mode 100644 node_modules/playwright-core/lib/server/codegen/types.js delete mode 100644 node_modules/playwright-core/lib/server/console.js delete mode 100644 node_modules/playwright-core/lib/server/cookieStore.js delete mode 100644 node_modules/playwright-core/lib/server/debugController.js delete mode 100644 node_modules/playwright-core/lib/server/debugger.js delete mode 100644 node_modules/playwright-core/lib/server/deviceDescriptors.js delete mode 100644 node_modules/playwright-core/lib/server/deviceDescriptorsSource.json delete mode 100644 node_modules/playwright-core/lib/server/dialog.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/debuggerDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/dispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/disposableDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js delete mode 100644 node_modules/playwright-core/lib/server/disposable.js delete mode 100644 node_modules/playwright-core/lib/server/dom.js delete mode 100644 node_modules/playwright-core/lib/server/download.js delete mode 100644 node_modules/playwright-core/lib/server/electron/electron.js delete mode 100644 node_modules/playwright-core/lib/server/electron/loader.js delete mode 100644 node_modules/playwright-core/lib/server/errors.js delete mode 100644 node_modules/playwright-core/lib/server/fetch.js delete mode 100644 node_modules/playwright-core/lib/server/fileChooser.js delete mode 100644 node_modules/playwright-core/lib/server/fileUploadUtils.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/ffBrowser.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/ffConnection.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/ffInput.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/ffPage.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/firefox.js delete mode 100644 node_modules/playwright-core/lib/server/firefox/protocol.d.js delete mode 100644 node_modules/playwright-core/lib/server/formData.js delete mode 100644 node_modules/playwright-core/lib/server/frameSelectors.js delete mode 100644 node_modules/playwright-core/lib/server/frames.js delete mode 100644 node_modules/playwright-core/lib/server/har/harRecorder.js delete mode 100644 node_modules/playwright-core/lib/server/har/harTracer.js delete mode 100644 node_modules/playwright-core/lib/server/harBackend.js delete mode 100644 node_modules/playwright-core/lib/server/helper.js delete mode 100644 node_modules/playwright-core/lib/server/index.js delete mode 100644 node_modules/playwright-core/lib/server/input.js delete mode 100644 node_modules/playwright-core/lib/server/instrumentation.js delete mode 100644 node_modules/playwright-core/lib/server/javascript.js delete mode 100644 node_modules/playwright-core/lib/server/launchApp.js delete mode 100644 node_modules/playwright-core/lib/server/localUtils.js delete mode 100644 node_modules/playwright-core/lib/server/macEditingCommands.js delete mode 100644 node_modules/playwright-core/lib/server/network.js delete mode 100644 node_modules/playwright-core/lib/server/overlay.js delete mode 100644 node_modules/playwright-core/lib/server/page.js delete mode 100644 node_modules/playwright-core/lib/server/pipeTransport.js delete mode 100644 node_modules/playwright-core/lib/server/playwright.js delete mode 100644 node_modules/playwright-core/lib/server/progress.js delete mode 100644 node_modules/playwright-core/lib/server/protocolError.js delete mode 100644 node_modules/playwright-core/lib/server/recorder.js delete mode 100644 node_modules/playwright-core/lib/server/recorder/chat.js delete mode 100644 node_modules/playwright-core/lib/server/recorder/recorderApp.js delete mode 100644 node_modules/playwright-core/lib/server/recorder/recorderRunner.js delete mode 100644 node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js delete mode 100644 node_modules/playwright-core/lib/server/recorder/recorderUtils.js delete mode 100644 node_modules/playwright-core/lib/server/recorder/throttledFile.js delete mode 100644 node_modules/playwright-core/lib/server/registry/browserFetcher.js delete mode 100644 node_modules/playwright-core/lib/server/registry/dependencies.js delete mode 100644 node_modules/playwright-core/lib/server/registry/index.js delete mode 100644 node_modules/playwright-core/lib/server/registry/nativeDeps.js delete mode 100644 node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js delete mode 100644 node_modules/playwright-core/lib/server/screencast.js delete mode 100644 node_modules/playwright-core/lib/server/screenshotter.js delete mode 100644 node_modules/playwright-core/lib/server/selectors.js delete mode 100644 node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js delete mode 100644 node_modules/playwright-core/lib/server/socksInterceptor.js delete mode 100644 node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js delete mode 100644 node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js delete mode 100644 node_modules/playwright-core/lib/server/trace/recorder/tracing.js delete mode 100644 node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js delete mode 100644 node_modules/playwright-core/lib/server/transport.js delete mode 100644 node_modules/playwright-core/lib/server/types.js delete mode 100644 node_modules/playwright-core/lib/server/usKeyboardLayout.js delete mode 100644 node_modules/playwright-core/lib/server/utils/ascii.js delete mode 100644 node_modules/playwright-core/lib/server/utils/comparators.js delete mode 100644 node_modules/playwright-core/lib/server/utils/crypto.js delete mode 100644 node_modules/playwright-core/lib/server/utils/debug.js delete mode 100644 node_modules/playwright-core/lib/server/utils/debugLogger.js delete mode 100644 node_modules/playwright-core/lib/server/utils/disposable.js delete mode 100644 node_modules/playwright-core/lib/server/utils/env.js delete mode 100644 node_modules/playwright-core/lib/server/utils/eventsHelper.js delete mode 100644 node_modules/playwright-core/lib/server/utils/expectUtils.js delete mode 100644 node_modules/playwright-core/lib/server/utils/fileUtils.js delete mode 100644 node_modules/playwright-core/lib/server/utils/happyEyeballs.js delete mode 100644 node_modules/playwright-core/lib/server/utils/hostPlatform.js delete mode 100644 node_modules/playwright-core/lib/server/utils/httpServer.js delete mode 100644 node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js delete mode 100644 node_modules/playwright-core/lib/server/utils/image_tools/compare.js delete mode 100644 node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js delete mode 100644 node_modules/playwright-core/lib/server/utils/image_tools/stats.js delete mode 100644 node_modules/playwright-core/lib/server/utils/linuxUtils.js delete mode 100644 node_modules/playwright-core/lib/server/utils/network.js delete mode 100644 node_modules/playwright-core/lib/server/utils/nodePlatform.js delete mode 100644 node_modules/playwright-core/lib/server/utils/pipeTransport.js delete mode 100644 node_modules/playwright-core/lib/server/utils/processLauncher.js delete mode 100644 node_modules/playwright-core/lib/server/utils/profiler.js delete mode 100644 node_modules/playwright-core/lib/server/utils/socksProxy.js delete mode 100644 node_modules/playwright-core/lib/server/utils/spawnAsync.js delete mode 100644 node_modules/playwright-core/lib/server/utils/task.js delete mode 100644 node_modules/playwright-core/lib/server/utils/userAgent.js delete mode 100644 node_modules/playwright-core/lib/server/utils/wsServer.js delete mode 100644 node_modules/playwright-core/lib/server/utils/zipFile.js delete mode 100644 node_modules/playwright-core/lib/server/utils/zones.js delete mode 100644 node_modules/playwright-core/lib/server/videoRecorder.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/protocol.d.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/webkit.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkBrowser.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkConnection.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkInput.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkPage.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js delete mode 100644 node_modules/playwright-core/lib/server/webkit/wkWorkers.js delete mode 100644 node_modules/playwright-core/lib/serverRegistry.js delete mode 100644 node_modules/playwright-core/lib/third_party/pixelmatch.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/browserBackend.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/common.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/config.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/console.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/context.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/cookies.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/devtools.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/dialogs.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/evaluate.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/files.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/form.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/keyboard.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/logFile.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/mouse.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/navigate.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/network.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/pdf.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/response.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/route.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/runCode.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/screenshot.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/sessionLog.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/snapshot.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/storage.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/tab.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/tabs.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/tool.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/tools.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/tracing.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/utils.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/verify.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/video.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/wait.js delete mode 100644 node_modules/playwright-core/lib/tools/backend/webstorage.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/cli.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/help.json delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/minimist.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/program.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/registry.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/session.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/SKILL.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/element-attributes.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/playwright-tests.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/request-mocking.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/running-code.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/session-management.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/storage-state.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/test-generation.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/tracing.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-client/skill/references/video-recording.md delete mode 100644 node_modules/playwright-core/lib/tools/cli-daemon/command.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-daemon/commands.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-daemon/daemon.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-daemon/helpGenerator.js delete mode 100644 node_modules/playwright-core/lib/tools/cli-daemon/program.js delete mode 100644 node_modules/playwright-core/lib/tools/dashboard/appIcon.png delete mode 100644 node_modules/playwright-core/lib/tools/dashboard/dashboardApp.js delete mode 100644 node_modules/playwright-core/lib/tools/dashboard/dashboardController.js delete mode 100644 node_modules/playwright-core/lib/tools/exports.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/browserFactory.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/cdpRelay.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/cli-stub.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/config.d.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/config.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/configIni.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/extensionContextFactory.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/index.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/log.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/program.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/protocol.js delete mode 100644 node_modules/playwright-core/lib/tools/mcp/watchdog.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/SKILL.md delete mode 100644 node_modules/playwright-core/lib/tools/trace/installSkill.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceActions.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceAttachments.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceCli.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceConsole.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceErrors.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceOpen.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceParser.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceRequests.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceScreenshot.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceSnapshot.js delete mode 100644 node_modules/playwright-core/lib/tools/trace/traceUtils.js delete mode 100644 node_modules/playwright-core/lib/tools/utils/connect.js delete mode 100644 node_modules/playwright-core/lib/tools/utils/mcp/http.js delete mode 100644 node_modules/playwright-core/lib/tools/utils/mcp/server.js delete mode 100644 node_modules/playwright-core/lib/tools/utils/mcp/tool.js delete mode 100644 node_modules/playwright-core/lib/tools/utils/socketConnection.js delete mode 100644 node_modules/playwright-core/lib/utils.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/assert.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/colors.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/cssParser.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/formatUtils.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/headers.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/imageUtils.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/jsonSchema.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/lruCache.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/mimeType.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/multimap.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/rtti.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/semaphore.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/time.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/traceUtils.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/types.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js delete mode 100644 node_modules/playwright-core/lib/utils/isomorphic/yaml.js delete mode 100644 node_modules/playwright-core/lib/utilsBundle.js delete mode 100644 node_modules/playwright-core/lib/utilsBundleImpl/index.js delete mode 100644 node_modules/playwright-core/lib/utilsBundleImpl/xdg-open delete mode 100644 node_modules/playwright-core/lib/vite/dashboard/assets/index-BAOybkp8.js delete mode 100644 node_modules/playwright-core/lib/vite/dashboard/assets/index-CZAYOG76.css delete mode 100644 node_modules/playwright-core/lib/vite/dashboard/index.html delete mode 100644 node_modules/playwright-core/lib/vite/htmlReport/index.html delete mode 100644 node_modules/playwright-core/lib/vite/htmlReport/report.css delete mode 100644 node_modules/playwright-core/lib/vite/htmlReport/report.js delete mode 100644 node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-C8KMvO9L.js delete mode 100644 node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css delete mode 100644 node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf delete mode 100644 node_modules/playwright-core/lib/vite/recorder/assets/index-BSjZa4pk.css delete mode 100644 node_modules/playwright-core/lib/vite/recorder/assets/index-CqAYX1I3.js delete mode 100644 node_modules/playwright-core/lib/vite/recorder/index.html delete mode 100644 node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-DS0FLvoc.js delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-GTWI-W_B.js delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.B4dS75f0.css delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/index.C5466mMT.js delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/index.CzXZzn5A.css delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/index.html delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/snapshot.html delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/uiMode.Vipi55dB.js delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/uiMode.html delete mode 100644 node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css delete mode 100644 node_modules/playwright-core/lib/zipBundle.js delete mode 100644 node_modules/playwright-core/lib/zipBundleImpl.js delete mode 100644 node_modules/playwright-core/lib/zodBundle.js delete mode 100644 node_modules/playwright-core/lib/zodBundleImpl.js delete mode 100644 node_modules/playwright-core/package.json delete mode 100644 node_modules/playwright-core/types/protocol.d.ts delete mode 100644 node_modules/playwright-core/types/structs.d.ts delete mode 100644 node_modules/playwright-core/types/types.d.ts delete mode 100644 node_modules/playwright/LICENSE delete mode 100644 node_modules/playwright/NOTICE delete mode 100644 node_modules/playwright/README.md delete mode 100644 node_modules/playwright/ThirdPartyNotices.txt delete mode 100644 node_modules/playwright/cli.js delete mode 100644 node_modules/playwright/index.d.ts delete mode 100644 node_modules/playwright/index.js delete mode 100644 node_modules/playwright/index.mjs delete mode 100644 node_modules/playwright/jsx-runtime.js delete mode 100644 node_modules/playwright/jsx-runtime.mjs delete mode 100644 node_modules/playwright/lib/agents/agentParser.js delete mode 100644 node_modules/playwright/lib/agents/copilot-setup-steps.yml delete mode 100644 node_modules/playwright/lib/agents/generateAgents.js delete mode 100644 node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md delete mode 100644 node_modules/playwright/lib/agents/playwright-test-generate.prompt.md delete mode 100644 node_modules/playwright/lib/agents/playwright-test-generator.agent.md delete mode 100644 node_modules/playwright/lib/agents/playwright-test-heal.prompt.md delete mode 100644 node_modules/playwright/lib/agents/playwright-test-healer.agent.md delete mode 100644 node_modules/playwright/lib/agents/playwright-test-plan.prompt.md delete mode 100644 node_modules/playwright/lib/agents/playwright-test-planner.agent.md delete mode 100644 node_modules/playwright/lib/common/config.js delete mode 100644 node_modules/playwright/lib/common/configLoader.js delete mode 100644 node_modules/playwright/lib/common/esmLoaderHost.js delete mode 100644 node_modules/playwright/lib/common/expectBundle.js delete mode 100644 node_modules/playwright/lib/common/expectBundleImpl.js delete mode 100644 node_modules/playwright/lib/common/fixtures.js delete mode 100644 node_modules/playwright/lib/common/globals.js delete mode 100644 node_modules/playwright/lib/common/ipc.js delete mode 100644 node_modules/playwright/lib/common/poolBuilder.js delete mode 100644 node_modules/playwright/lib/common/process.js delete mode 100644 node_modules/playwright/lib/common/suiteUtils.js delete mode 100644 node_modules/playwright/lib/common/test.js delete mode 100644 node_modules/playwright/lib/common/testLoader.js delete mode 100644 node_modules/playwright/lib/common/testType.js delete mode 100644 node_modules/playwright/lib/common/validators.js delete mode 100644 node_modules/playwright/lib/errorContext.js delete mode 100644 node_modules/playwright/lib/fsWatcher.js delete mode 100644 node_modules/playwright/lib/index.js delete mode 100644 node_modules/playwright/lib/internalsForTest.js delete mode 100644 node_modules/playwright/lib/isomorphic/events.js delete mode 100644 node_modules/playwright/lib/isomorphic/folders.js delete mode 100644 node_modules/playwright/lib/isomorphic/stringInternPool.js delete mode 100644 node_modules/playwright/lib/isomorphic/teleReceiver.js delete mode 100644 node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js delete mode 100644 node_modules/playwright/lib/isomorphic/testServerConnection.js delete mode 100644 node_modules/playwright/lib/isomorphic/testServerInterface.js delete mode 100644 node_modules/playwright/lib/isomorphic/testTree.js delete mode 100644 node_modules/playwright/lib/isomorphic/types.d.js delete mode 100644 node_modules/playwright/lib/loader/loaderMain.js delete mode 100644 node_modules/playwright/lib/matchers/expect.js delete mode 100644 node_modules/playwright/lib/matchers/matcherHint.js delete mode 100644 node_modules/playwright/lib/matchers/matchers.js delete mode 100644 node_modules/playwright/lib/matchers/toBeTruthy.js delete mode 100644 node_modules/playwright/lib/matchers/toEqual.js delete mode 100644 node_modules/playwright/lib/matchers/toHaveURL.js delete mode 100644 node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js delete mode 100644 node_modules/playwright/lib/matchers/toMatchSnapshot.js delete mode 100644 node_modules/playwright/lib/matchers/toMatchText.js delete mode 100644 node_modules/playwright/lib/mcp/test/browserBackend.js delete mode 100644 node_modules/playwright/lib/mcp/test/generatorTools.js delete mode 100644 node_modules/playwright/lib/mcp/test/plannerTools.js delete mode 100644 node_modules/playwright/lib/mcp/test/seed.js delete mode 100644 node_modules/playwright/lib/mcp/test/streams.js delete mode 100644 node_modules/playwright/lib/mcp/test/testBackend.js delete mode 100644 node_modules/playwright/lib/mcp/test/testContext.js delete mode 100644 node_modules/playwright/lib/mcp/test/testTool.js delete mode 100644 node_modules/playwright/lib/mcp/test/testTools.js delete mode 100644 node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js delete mode 100644 node_modules/playwright/lib/plugins/index.js delete mode 100644 node_modules/playwright/lib/plugins/webServerPlugin.js delete mode 100644 node_modules/playwright/lib/program.js delete mode 100644 node_modules/playwright/lib/reportActions.js delete mode 100644 node_modules/playwright/lib/reporters/base.js delete mode 100644 node_modules/playwright/lib/reporters/blob.js delete mode 100644 node_modules/playwright/lib/reporters/dot.js delete mode 100644 node_modules/playwright/lib/reporters/empty.js delete mode 100644 node_modules/playwright/lib/reporters/github.js delete mode 100644 node_modules/playwright/lib/reporters/html.js delete mode 100644 node_modules/playwright/lib/reporters/internalReporter.js delete mode 100644 node_modules/playwright/lib/reporters/json.js delete mode 100644 node_modules/playwright/lib/reporters/junit.js delete mode 100644 node_modules/playwright/lib/reporters/line.js delete mode 100644 node_modules/playwright/lib/reporters/list.js delete mode 100644 node_modules/playwright/lib/reporters/listModeReporter.js delete mode 100644 node_modules/playwright/lib/reporters/markdown.js delete mode 100644 node_modules/playwright/lib/reporters/merge.js delete mode 100644 node_modules/playwright/lib/reporters/multiplexer.js delete mode 100644 node_modules/playwright/lib/reporters/reporterV2.js delete mode 100644 node_modules/playwright/lib/reporters/teleEmitter.js delete mode 100644 node_modules/playwright/lib/reporters/versions/blobV1.js delete mode 100644 node_modules/playwright/lib/runner/dispatcher.js delete mode 100644 node_modules/playwright/lib/runner/failureTracker.js delete mode 100644 node_modules/playwright/lib/runner/lastRun.js delete mode 100644 node_modules/playwright/lib/runner/loadUtils.js delete mode 100644 node_modules/playwright/lib/runner/loaderHost.js delete mode 100644 node_modules/playwright/lib/runner/processHost.js delete mode 100644 node_modules/playwright/lib/runner/projectUtils.js delete mode 100644 node_modules/playwright/lib/runner/rebase.js delete mode 100644 node_modules/playwright/lib/runner/reporters.js delete mode 100644 node_modules/playwright/lib/runner/sigIntWatcher.js delete mode 100644 node_modules/playwright/lib/runner/taskRunner.js delete mode 100644 node_modules/playwright/lib/runner/tasks.js delete mode 100644 node_modules/playwright/lib/runner/testGroups.js delete mode 100644 node_modules/playwright/lib/runner/testRunner.js delete mode 100644 node_modules/playwright/lib/runner/testServer.js delete mode 100644 node_modules/playwright/lib/runner/uiModeReporter.js delete mode 100644 node_modules/playwright/lib/runner/vcs.js delete mode 100644 node_modules/playwright/lib/runner/watchMode.js delete mode 100644 node_modules/playwright/lib/runner/workerHost.js delete mode 100644 node_modules/playwright/lib/testActions.js delete mode 100644 node_modules/playwright/lib/third_party/pirates.js delete mode 100644 node_modules/playwright/lib/third_party/tsconfig-loader.js delete mode 100644 node_modules/playwright/lib/transform/babelBundle.js delete mode 100644 node_modules/playwright/lib/transform/babelBundleImpl.js delete mode 100644 node_modules/playwright/lib/transform/compilationCache.js delete mode 100644 node_modules/playwright/lib/transform/esmLoader.js delete mode 100644 node_modules/playwright/lib/transform/portTransport.js delete mode 100644 node_modules/playwright/lib/transform/transform.js delete mode 100644 node_modules/playwright/lib/util.js delete mode 100644 node_modules/playwright/lib/utilsBundle.js delete mode 100644 node_modules/playwright/lib/utilsBundleImpl.js delete mode 100644 node_modules/playwright/lib/worker/fixtureRunner.js delete mode 100644 node_modules/playwright/lib/worker/testInfo.js delete mode 100644 node_modules/playwright/lib/worker/testTracing.js delete mode 100644 node_modules/playwright/lib/worker/timeoutManager.js delete mode 100644 node_modules/playwright/lib/worker/util.js delete mode 100644 node_modules/playwright/lib/worker/workerMain.js delete mode 100644 node_modules/playwright/package.json delete mode 100644 node_modules/playwright/test.d.ts delete mode 100644 node_modules/playwright/test.js delete mode 100644 node_modules/playwright/test.mjs delete mode 100644 node_modules/playwright/types/test.d.ts delete mode 100644 node_modules/playwright/types/testReporter.d.ts delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/bidi/Frame.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js.map delete mode 100644 node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Frame.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Page.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Page.js.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.d.ts.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js.map delete mode 100644 node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.js.map rename node_modules/{puppeteer-core => puppeteer}/README.md (100%) create mode 100644 node_modules/puppeteer/install.mjs create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.d.ts create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.d.ts.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/getConfiguration.js.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/cli.d.ts create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/cli.d.ts.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/install.d.ts create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/install.d.ts.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/install.js create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/node/install.js.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.d.ts create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.d.ts.map create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js create mode 100644 node_modules/puppeteer/lib/cjs/puppeteer/puppeteer.js.map create mode 100644 node_modules/puppeteer/lib/esm/package.json create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.d.ts create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.d.ts.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.js create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/getConfiguration.js.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/cli.d.ts create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/cli.d.ts.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/cli.js create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/cli.js.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/install.d.ts create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/install.d.ts.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/install.js create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/node/install.js.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/puppeteer.d.ts create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/puppeteer.d.ts.map create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/puppeteer.js create mode 100644 node_modules/puppeteer/lib/esm/puppeteer/puppeteer.js.map create mode 100644 node_modules/puppeteer/lib/types.d.ts create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/README.md rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BluetoothEmulation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BluetoothEmulation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Browser.d.ts (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/api/Browser.d.ts.map (94%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Browser.js (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Browser.js.map (87%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BrowserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BrowserContext.d.ts.map (96%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BrowserContext.js (96%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/BrowserContext.js.map (92%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/CDPSession.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/CDPSession.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/CDPSession.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/CDPSession.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/DeviceRequestPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Dialog.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Dialog.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Dialog.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Dialog.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandleSymbol.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandleSymbol.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandleSymbol.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/ElementHandleSymbol.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Environment.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Environment.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Environment.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Environment.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Extension.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Extension.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Extension.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Extension.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Frame.d.ts (97%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Frame.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Frame.js.map (94%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPRequest.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPRequest.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPRequest.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPRequest.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPResponse.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPResponse.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPResponse.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/HTTPResponse.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Input.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Input.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Input.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Input.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Issue.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Issue.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Issue.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Issue.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/JSHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/JSHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/JSHandle.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/JSHandle.js.map (91%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Page.d.ts (99%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Page.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Page.js.map (90%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Realm.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Realm.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Realm.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Realm.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Target.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Target.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Target.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/Target.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/WebWorker.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/WebWorker.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/WebWorker.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/WebWorker.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/api.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/api.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/api.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/api.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/locators/locators.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/locators/locators.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/locators/locators.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/api/locators/locators.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BidiOverCdp.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BidiOverCdp.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BidiOverCdp.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BluetoothEmulation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserConnector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserConnector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserConnector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/BrowserContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/CDPSession.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/CDPSession.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/CDPSession.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/CDPSession.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Connection.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Connection.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Connection.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Connection.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Deserializer.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Deserializer.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Deserializer.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Deserializer.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Dialog.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Dialog.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Dialog.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Dialog.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ElementHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ElementHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ElementHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ExposedFunction.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ExposedFunction.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ExposedFunction.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/ExposedFunction.js.map (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/bidi/Frame.d.ts (92%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/bidi/Frame.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Frame.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Frame.js.map (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPRequest.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPRequest.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPResponse.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPResponse.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPResponse.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/HTTPResponse.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Input.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Input.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Input.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Input.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/JSHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/JSHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/JSHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/JSHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Page.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Page.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Page.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Page.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Realm.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Realm.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Realm.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Realm.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Serializer.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Serializer.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Serializer.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Serializer.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Target.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Target.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Target.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/Target.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/WebWorker.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/WebWorker.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/WebWorker.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/WebWorker.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/bidi.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/bidi.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/bidi.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/bidi.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/BrowsingContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Connection.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Connection.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Connection.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Connection.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Navigation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Navigation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Navigation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Navigation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Realm.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Realm.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Realm.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Request.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Request.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Request.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Request.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Session.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Session.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Session.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/Session.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/UserPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/core.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/core.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/core.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/core/core.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/bidi/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Accessibility.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Accessibility.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Accessibility.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Binding.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Binding.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Binding.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Binding.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BluetoothEmulation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserConnector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserConnector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/BrowserContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpIssue.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpIssue.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpIssue.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpIssue.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpPreloadScript.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpPreloadScript.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpPreloadScript.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpPreloadScript.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpSession.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpSession.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/CdpSession.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Coverage.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Coverage.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Coverage.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Coverage.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Dialog.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Dialog.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Dialog.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Dialog.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ElementHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ElementHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ElementHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/EmulationManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/EmulationManager.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/EmulationManager.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/EmulationManager.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/cdp/ExecutionContext.d.ts.map (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js.map (94%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Extension.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Extension.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Extension.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Extension.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExtensionTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/cdp/Frame.d.ts (93%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js (98%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Frame.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManager.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManager.js.map (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManagerEvents.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManagerEvents.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManagerEvents.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameManagerEvents.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameTree.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameTree.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameTree.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/FrameTree.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPRequest.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPRequest.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPRequest.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPResponse.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPResponse.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPResponse.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/HTTPResponse.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Input.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Input.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Input.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Input.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorlds.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorlds.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorlds.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorlds.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/JSHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/JSHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/JSHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/JSHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/LifecycleWatcher.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/LifecycleWatcher.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/LifecycleWatcher.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/LifecycleWatcher.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkEventManager.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkEventManager.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkEventManager.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkManager.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/NetworkManager.js.map (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/cdp/Page.d.ts (99%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js (99%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Page.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/PredefinedNetworkConditions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Target.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Target.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Target.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Target.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManageEvents.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManageEvents.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManageEvents.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManageEvents.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManager.d.ts (93%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map (92%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManager.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/TargetManager.js.map (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Tracing.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Tracing.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Tracing.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/Tracing.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebMCP.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebMCP.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebMCP.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebWorker.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebWorker.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/WebWorker.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/cdp.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/cdp.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/cdp.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/cdp.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/utils.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/utils.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/utils.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/cdp/utils.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.d.ts (77%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map (51%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js (95%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/common/BrowserConnector.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/BrowserWebSocketTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CSSQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CSSQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CSSQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CSSQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Configuration.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Configuration.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Configuration.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Configuration.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectOptions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectOptions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectOptions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConnectionTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Cookie.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Cookie.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Cookie.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Cookie.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CustomQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CustomQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CustomQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/CustomQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Debug.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Debug.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Debug.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Debug.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Device.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Device.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Device.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Device.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/DownloadBehavior.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/DownloadBehavior.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/DownloadBehavior.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/DownloadBehavior.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Errors.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Errors.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Errors.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Errors.js.map (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/common/EventEmitter.d.ts (96%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js (95%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/GetQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/GetQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/GetQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/GetQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/HandleIterator.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/HandleIterator.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/HandleIterator.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/HandleIterator.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/LazyArg.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/LazyArg.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/LazyArg.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/LazyArg.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/NetworkManagerEvents.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/NetworkManagerEvents.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/NetworkManagerEvents.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/NetworkManagerEvents.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PDFOptions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PSelectorParser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PSelectorParser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PSelectorParser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PSelectorParser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PierceQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PierceQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PierceQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/PierceQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Puppeteer.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ScriptInjector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ScriptInjector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ScriptInjector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/ScriptInjector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SupportedBrowser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SupportedBrowser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SupportedBrowser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/SupportedBrowser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TaskQueue.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TextQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TextQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TextQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TextQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/TimeoutSettings.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/USKeyboardLayout.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Viewport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Viewport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Viewport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/Viewport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/XPathQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/XPathQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/XPathQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/XPathQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/common.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/common.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/common.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/common.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/types.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/types.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/types.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/types.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/common/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/environment.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/environment.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/environment.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/environment.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/generated/injected.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/generated/injected.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/generated/injected.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/generated/injected.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index-browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index-browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index-browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index-browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/index.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/ARIAQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/ARIAQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/ARIAQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/ARIAQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CSSSelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CSSSelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CSSSelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CSSSelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CustomQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CustomQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CustomQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/CustomQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PierceQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PierceQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PierceQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/PierceQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/Poller.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/Poller.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/Poller.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/Poller.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextContent.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextContent.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextContent.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextContent.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/TextQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/XPathQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/XPathQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/XPathQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/XPathQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/injected.d.ts (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/injected.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/injected.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/injected.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/injected/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.d.ts (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/node/BrowserLauncher.d.ts.map (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js (98%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserLauncher.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/FirefoxLauncher.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/FirefoxLauncher.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/FirefoxLauncher.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/LaunchOptions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PipeTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ScreenRecorder.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ScreenRecorder.d.ts.map (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ScreenRecorder.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/ScreenRecorder.js.map (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/node.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/node.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/node.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/node.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/util/fs.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/util/fs.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/util/fs.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/node/util/fs.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core-browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core-browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core-browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core-browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/puppeteer-core.js.map (100%) rename node_modules/{puppeteer-core/lib/esm => puppeteer/node_modules/puppeteer-core/lib/cjs}/puppeteer/revisions.d.ts (90%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/revisions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/revisions.js (92%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/revisions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/AsyncIterableUtil.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/AsyncIterableUtil.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/AsyncIterableUtil.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/AsyncIterableUtil.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Deferred.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Deferred.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Deferred.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/ErrorLike.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/ErrorLike.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/ErrorLike.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/ErrorLike.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Function.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Function.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Function.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Function.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Mutex.d.ts (81%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Mutex.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Mutex.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/Mutex.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/assert.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/assert.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/assert.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/assert.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/decorators.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/decorators.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/decorators.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/decorators.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/disposable.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/disposable.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/disposable.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/disposable.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/encoding.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/encoding.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/encoding.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/encoding.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/incremental-id-generator.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/incremental-id-generator.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/incremental-id-generator.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/incremental-id-generator.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/version.d.ts (72%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/version.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/version.js (90%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/puppeteer/util/version.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/mitt/mitt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/mitt/mitt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/parsel-js/parsel-js.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/parsel-js/parsel-js.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/rxjs/rxjs.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/es5-iife/puppeteer-core-browser.d.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/es5-iife/puppeteer-core-browser.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/package.json (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BluetoothEmulation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BluetoothEmulation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BluetoothEmulation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Browser.d.ts (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/api/Browser.d.ts.map (94%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Browser.js (96%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Browser.js.map (87%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BrowserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BrowserContext.d.ts.map (96%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BrowserContext.js (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/BrowserContext.js.map (93%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/CDPSession.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/CDPSession.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/CDPSession.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/CDPSession.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/DeviceRequestPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Dialog.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Dialog.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Dialog.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Dialog.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandleSymbol.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandleSymbol.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandleSymbol.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/ElementHandleSymbol.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Environment.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Environment.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Environment.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Environment.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Extension.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Extension.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Extension.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Extension.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Frame.d.ts (97%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Frame.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Frame.js.map (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPRequest.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPRequest.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPRequest.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPRequest.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPResponse.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPResponse.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPResponse.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/HTTPResponse.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Input.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Input.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Input.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Input.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Issue.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Issue.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Issue.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Issue.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/JSHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/JSHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/JSHandle.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/JSHandle.js.map (92%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Page.d.ts (99%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Page.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Page.js.map (90%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Realm.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Realm.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Realm.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Realm.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Target.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Target.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Target.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/Target.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/WebWorker.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/WebWorker.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/WebWorker.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/WebWorker.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/api.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/api.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/api.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/api.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/locators/locators.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/locators/locators.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/locators/locators.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/api/locators/locators.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BidiOverCdp.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BidiOverCdp.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BidiOverCdp.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BluetoothEmulation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserConnector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserConnector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserConnector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserConnector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/BrowserContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/CDPSession.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/CDPSession.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/CDPSession.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/CDPSession.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Connection.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Connection.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Connection.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Connection.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Deserializer.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Deserializer.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Deserializer.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Deserializer.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Dialog.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Dialog.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Dialog.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Dialog.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ElementHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ElementHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ElementHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ExposedFunction.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ExposedFunction.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ExposedFunction.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/ExposedFunction.js.map (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/bidi/Frame.d.ts (92%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Frame.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Frame.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Frame.js.map (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPRequest.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPRequest.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPRequest.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPResponse.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPResponse.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPResponse.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/HTTPResponse.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Input.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Input.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Input.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Input.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/JSHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/JSHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/JSHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/JSHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Page.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Page.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Page.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Page.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Realm.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Realm.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Serializer.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Serializer.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Serializer.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Serializer.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Target.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Target.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Target.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/Target.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/WebWorker.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/WebWorker.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/WebWorker.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/WebWorker.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/bidi.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/bidi.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/BrowsingContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Connection.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Connection.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Connection.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Connection.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Navigation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Navigation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Navigation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Navigation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Request.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Request.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Request.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Request.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/UserPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/core.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/core.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/core.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/core/core.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/bidi/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Accessibility.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Accessibility.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Accessibility.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Accessibility.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Binding.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Binding.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Binding.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Binding.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BluetoothEmulation.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserConnector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserConnector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserConnector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserContext.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserContext.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/BrowserContext.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpIssue.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpIssue.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpIssue.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpIssue.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpPreloadScript.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpPreloadScript.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpPreloadScript.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpPreloadScript.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpSession.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpSession.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpSession.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/CdpSession.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Connection.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Connection.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Connection.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Connection.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Coverage.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Coverage.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Coverage.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Coverage.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Dialog.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Dialog.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Dialog.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Dialog.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ElementHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ElementHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ElementHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/EmulationManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/EmulationManager.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/EmulationManager.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/EmulationManager.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.d.ts (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/cdp/ExecutionContext.d.ts.map (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js.map (94%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Extension.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Extension.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Extension.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Extension.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExtensionTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/ExtensionTransport.js.map (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/cdp/Frame.d.ts (93%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js (98%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Frame.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManager.d.ts.map (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManager.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManager.js.map (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManagerEvents.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManagerEvents.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManagerEvents.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameManagerEvents.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameTree.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameTree.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameTree.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/FrameTree.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPRequest.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPRequest.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPRequest.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPRequest.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPResponse.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPResponse.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPResponse.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/HTTPResponse.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Input.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Input.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Input.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Input.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js.map (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorlds.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorlds.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorlds.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorlds.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/JSHandle.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/JSHandle.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/JSHandle.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/JSHandle.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/LifecycleWatcher.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/LifecycleWatcher.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/LifecycleWatcher.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/LifecycleWatcher.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkEventManager.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkEventManager.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkEventManager.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/NetworkManager.js.map (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/cdp/Page.d.ts (99%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Page.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Page.js (99%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Page.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/PredefinedNetworkConditions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Target.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Target.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Target.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Target.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManageEvents.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManageEvents.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManageEvents.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManageEvents.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManager.d.ts (93%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManager.d.ts.map (92%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManager.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/TargetManager.js.map (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Tracing.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Tracing.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Tracing.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/Tracing.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebMCP.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebMCP.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebMCP.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebMCP.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebWorker.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebWorker.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebWorker.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/WebWorker.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/cdp.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/cdp.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/cdp.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/cdp.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/utils.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/utils.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/utils.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/cdp/utils.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/AriaQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.d.ts (77%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.d.ts.map (51%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js (94%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserConnector.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CSSQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CSSQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CSSQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CSSQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Configuration.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Configuration.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Configuration.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Configuration.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectOptions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectOptions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectOptions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectOptions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConnectionTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ConsoleMessage.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Cookie.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Cookie.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Cookie.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Cookie.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CustomQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CustomQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CustomQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/CustomQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Debug.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Debug.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Debug.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Debug.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Device.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Device.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Device.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Device.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/DownloadBehavior.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/DownloadBehavior.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/DownloadBehavior.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/DownloadBehavior.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Errors.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Errors.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Errors.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Errors.js.map (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/common/EventEmitter.d.ts (96%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.d.ts.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js (93%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/common/EventEmitter.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/FileChooser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/FileChooser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/FileChooser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/FileChooser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/GetQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/GetQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/GetQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/GetQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/HandleIterator.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/HandleIterator.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/HandleIterator.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/HandleIterator.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/LazyArg.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/LazyArg.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/LazyArg.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/LazyArg.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/NetworkManagerEvents.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/NetworkManagerEvents.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/NetworkManagerEvents.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/NetworkManagerEvents.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PDFOptions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PSelectorParser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PSelectorParser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PSelectorParser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PSelectorParser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PierceQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PierceQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PierceQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/PierceQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Puppeteer.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/QueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ScriptInjector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ScriptInjector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ScriptInjector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/ScriptInjector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SecurityDetails.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SupportedBrowser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SupportedBrowser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SupportedBrowser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/SupportedBrowser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TaskQueue.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TextQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TextQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TextQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TextQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/TimeoutSettings.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/USKeyboardLayout.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Viewport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Viewport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Viewport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/Viewport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/WaitTask.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/WaitTask.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/WaitTask.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/WaitTask.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/XPathQueryHandler.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/XPathQueryHandler.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/XPathQueryHandler.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/XPathQueryHandler.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/common.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/common.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/common.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/common.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/types.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/types.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/types.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/types.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/common/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/environment.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/environment.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/environment.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/environment.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/generated/injected.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/generated/injected.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/generated/injected.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/generated/injected.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index-browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index-browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index-browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index-browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/index.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/ARIAQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/ARIAQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/ARIAQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/ARIAQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CSSSelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CSSSelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CSSSelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CSSSelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CustomQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CustomQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CustomQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/CustomQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PierceQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PierceQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PierceQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/PierceQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/Poller.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/Poller.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/Poller.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/Poller.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextContent.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextContent.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextContent.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextContent.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/TextQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/XPathQuerySelector.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/XPathQuerySelector.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/XPathQuerySelector.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/XPathQuerySelector.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/injected.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/injected.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/injected.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/injected.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/injected/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.d.ts (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/node/BrowserLauncher.d.ts.map (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.js (98%) create mode 100644 node_modules/puppeteer/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.js.map rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/FirefoxLauncher.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/FirefoxLauncher.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/FirefoxLauncher.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/LaunchOptions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PipeTransport.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/PuppeteerNode.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ScreenRecorder.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ScreenRecorder.d.ts.map (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ScreenRecorder.js (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/ScreenRecorder.js.map (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/node.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/node.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/node.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/node.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/util/fs.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/util/fs.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/util/fs.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/node/util/fs.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/puppeteer-core.js.map (100%) rename node_modules/{puppeteer-core/lib/cjs => puppeteer/node_modules/puppeteer-core/lib/esm}/puppeteer/revisions.d.ts (90%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/revisions.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/revisions.js (89%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/revisions.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/AsyncIterableUtil.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/AsyncIterableUtil.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/AsyncIterableUtil.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/AsyncIterableUtil.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Deferred.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Deferred.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Deferred.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Deferred.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/ErrorLike.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Function.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Function.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Function.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Function.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Mutex.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Mutex.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Mutex.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/Mutex.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/assert.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/assert.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/assert.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/assert.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/decorators.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/decorators.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/decorators.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/decorators.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/disposable.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/disposable.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/disposable.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/disposable.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/encoding.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/encoding.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/encoding.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/encoding.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/incremental-id-generator.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/incremental-id-generator.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/incremental-id-generator.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/incremental-id-generator.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/util.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/util.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/util.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/util.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/version.d.ts (72%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/version.d.ts.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/version.js (84%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/puppeteer/util/version.js.map (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/mitt/mitt.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/mitt/mitt.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/parsel-js/parsel-js.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/parsel-js/parsel-js.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/rxjs/rxjs.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/rxjs/rxjs.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/lib/types.d.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/package.json (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/BluetoothEmulation.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Browser.ts (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/BrowserContext.ts (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/CDPSession.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/DeviceRequestPrompt.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Dialog.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/ElementHandle.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/ElementHandleSymbol.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Environment.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Extension.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Frame.ts (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/HTTPRequest.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/HTTPResponse.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Input.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Issue.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/JSHandle.ts (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Page.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Realm.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/Target.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/WebWorker.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/api.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/api/locators/locators.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/BidiOverCdp.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/BluetoothEmulation.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Browser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/BrowserConnector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/BrowserContext.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/CDPSession.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Connection.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Deserializer.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/DeviceRequestPrompt.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Dialog.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/ElementHandle.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/ExposedFunction.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Frame.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/HTTPRequest.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/HTTPResponse.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Input.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/JSHandle.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Page.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Realm.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Serializer.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/Target.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/WebWorker.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/bidi.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/Browser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/BrowsingContext.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/Connection.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/Navigation.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/README.md (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/Realm.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/Request.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/Session.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/UserContext.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/UserPrompt.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/core/core.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/bidi/util.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Accessibility.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Binding.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/BluetoothEmulation.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Browser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/BrowserConnector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/BrowserContext.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/CdpIssue.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/CdpPreloadScript.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/CdpSession.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Connection.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Coverage.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/DeviceRequestPrompt.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Dialog.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/ElementHandle.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/EmulationManager.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/ExecutionContext.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Extension.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/ExtensionTransport.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Frame.ts (97%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/FrameManager.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/FrameManagerEvents.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/FrameTree.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/HTTPRequest.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/HTTPResponse.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Input.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/IsolatedWorld.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/IsolatedWorlds.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/JSHandle.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/LifecycleWatcher.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/NetworkEventManager.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/NetworkManager.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Page.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/PredefinedNetworkConditions.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Target.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/TargetManageEvents.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/TargetManager.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/Tracing.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/WebMCP.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/WebWorker.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/cdp.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/cdp/utils.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/AriaQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/BrowserConnector.ts (93%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/BrowserWebSocketTransport.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/CSSQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/CallbackRegistry.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Configuration.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/ConnectOptions.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/ConnectionTransport.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/ConsoleMessage.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Cookie.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/CustomQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Debug.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Device.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/DownloadBehavior.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Errors.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/EventEmitter.ts (95%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/FileChooser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/GetQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/HandleIterator.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/LazyArg.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/NetworkManagerEvents.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/PDFOptions.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/PQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/PSelectorParser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/PierceQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Puppeteer.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/QueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/ScriptInjector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/SecurityDetails.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/SupportedBrowser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/TaskQueue.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/TextQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/TimeoutSettings.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/USKeyboardLayout.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/Viewport.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/WaitTask.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/XPathQueryHandler.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/common.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/types.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/common/util.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/environment.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/generated/injected.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/index-browser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/index.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/ARIAQuerySelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/CSSSelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/CustomQuerySelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/PQuerySelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/PierceQuerySelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/Poller.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/README.md (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/TextContent.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/TextQuerySelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/XPathQuerySelector.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/injected.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/injected/util.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/BrowserLauncher.ts (98%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/ChromeLauncher.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/FirefoxLauncher.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/LaunchOptions.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/NodeWebSocketTransport.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/PipeTransport.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/PuppeteerNode.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/ScreenRecorder.ts (99%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/node.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/node/util/fs.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/puppeteer-core-browser.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/puppeteer-core.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/revisions.ts (89%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/templates/README.md (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/templates/injected.ts.tmpl (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/tsconfig.cjs.json (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/tsconfig.esm.json (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/AsyncIterableUtil.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/Deferred.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/ErrorLike.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/Function.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/Mutex.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/assert.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/decorators.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/disposable.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/encoding.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/incremental-id-generator.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/util.ts (100%) rename node_modules/{ => puppeteer/node_modules}/puppeteer-core/src/util/version.ts (82%) create mode 100644 node_modules/puppeteer/package.json create mode 100644 node_modules/puppeteer/src/getConfiguration.ts create mode 100644 node_modules/puppeteer/src/node/cli.ts create mode 100644 node_modules/puppeteer/src/node/install.ts create mode 100644 node_modules/puppeteer/src/puppeteer.ts create mode 100644 node_modules/puppeteer/src/tsconfig.cjs.json create mode 100644 node_modules/puppeteer/src/tsconfig.esm.json create mode 100644 node_modules/resolve-from/index.js create mode 100644 node_modules/resolve-from/license create mode 100644 node_modules/resolve-from/package.json create mode 100644 node_modules/resolve-from/readme.md create mode 100644 node_modules/undici-types/socks5-proxy-agent.d.ts diff --git a/node_modules/.bin/chrome-devtools b/node_modules/.bin/chrome-devtools deleted file mode 100644 index d6c7fea..0000000 --- a/node_modules/.bin/chrome-devtools +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools.js" "$@" -else - exec node "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools.js" "$@" -fi diff --git a/node_modules/.bin/chrome-devtools-mcp b/node_modules/.bin/chrome-devtools-mcp deleted file mode 100644 index 012db5e..0000000 --- a/node_modules/.bin/chrome-devtools-mcp +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js" "$@" -else - exec node "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js" "$@" -fi diff --git a/node_modules/.bin/chrome-devtools-mcp.cmd b/node_modules/.bin/chrome-devtools-mcp.cmd deleted file mode 100644 index e11f4ca..0000000 --- a/node_modules/.bin/chrome-devtools-mcp.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\chrome-devtools-mcp\build\src\bin\chrome-devtools-mcp.js" %* diff --git a/node_modules/.bin/chrome-devtools-mcp.ps1 b/node_modules/.bin/chrome-devtools-mcp.ps1 deleted file mode 100644 index 1feebac..0000000 --- a/node_modules/.bin/chrome-devtools-mcp.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js" $args - } else { - & "$basedir/node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js" $args - } else { - & "node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools-mcp.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/chrome-devtools.cmd b/node_modules/.bin/chrome-devtools.cmd deleted file mode 100644 index 57ef43e..0000000 --- a/node_modules/.bin/chrome-devtools.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\chrome-devtools-mcp\build\src\bin\chrome-devtools.js" %* diff --git a/node_modules/.bin/chrome-devtools.ps1 b/node_modules/.bin/chrome-devtools.ps1 deleted file mode 100644 index 5c57e14..0000000 --- a/node_modules/.bin/chrome-devtools.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools.js" $args - } else { - & "$basedir/node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools.js" $args - } else { - & "node$exe" "$basedir/../chrome-devtools-mcp/build/src/bin/chrome-devtools.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/playwright b/node_modules/.bin/playwright deleted file mode 100644 index 98e2503..0000000 --- a/node_modules/.bin/playwright +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../playwright/cli.js" "$@" -else - exec node "$basedir/../playwright/cli.js" "$@" -fi diff --git a/node_modules/.bin/playwright-core b/node_modules/.bin/playwright-core deleted file mode 100644 index bc2c5c8..0000000 --- a/node_modules/.bin/playwright-core +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../playwright-core/cli.js" "$@" -else - exec node "$basedir/../playwright-core/cli.js" "$@" -fi diff --git a/node_modules/.bin/playwright-core.cmd b/node_modules/.bin/playwright-core.cmd deleted file mode 100644 index 1128204..0000000 --- a/node_modules/.bin/playwright-core.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\playwright-core\cli.js" %* diff --git a/node_modules/.bin/playwright-core.ps1 b/node_modules/.bin/playwright-core.ps1 deleted file mode 100644 index e914b99..0000000 --- a/node_modules/.bin/playwright-core.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../playwright-core/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../playwright-core/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../playwright-core/cli.js" $args - } else { - & "node$exe" "$basedir/../playwright-core/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/playwright.cmd b/node_modules/.bin/playwright.cmd deleted file mode 100644 index 88713a4..0000000 --- a/node_modules/.bin/playwright.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\playwright\cli.js" %* diff --git a/node_modules/.bin/playwright.ps1 b/node_modules/.bin/playwright.ps1 deleted file mode 100644 index efa8f92..0000000 --- a/node_modules/.bin/playwright.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../playwright/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../playwright/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../playwright/cli.js" $args - } else { - & "node$exe" "$basedir/../playwright/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 2405c65..038c00e 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,12 +1,38 @@ { "name": "platform-prototype", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@puppeteer/browsers": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.13.1.tgz", - "integrity": "sha512-zmS4RTK9fbrc++WlAJhxYbfz3IjDeOmkK/CwwbLmk7ydfS9e2CiEeRJHEPvjDVElO/bwXbidwGA37Bsm6LzCnQ==", + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.13.2.tgz", + "integrity": "sha512-5EUZSUIc37H6aIXyWO0Z4y8NlF8NnjgmqeQgOGiswAU7pY0HOo16ho4+alIWmSfdZnjqBRawMsP3I5YqLSn6kw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -33,14 +59,14 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.2.tgz", - "integrity": "sha512-sokuT28dxf9JT5Kady1fsXOvI4HVpjZa95NKT5y9PNTIrs2AsobR4GFAA90ZG8M+nxVRLysCXsVj6eGC7Vbrlw==", + "version": "25.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz", + "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "undici-types": "~7.19.0" + "undici-types": ">=7.24.0 <7.24.7" } }, "node_modules/@types/yauzl": { @@ -90,6 +116,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/ast-types": { "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", @@ -119,9 +152,9 @@ } }, "node_modules/bare-events": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz", - "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.3.tgz", + "integrity": "sha512-HdUm8EMQBLaJvGUdidNNbqpA1kYkwNcb+MYxkxCLAPJGQzlv9J0C24h8V65Z4c5GLd/JEALDvpFCQgpLJqc0zw==", "dev": true, "license": "Apache-2.0", "peerDependencies": { @@ -235,17 +268,14 @@ "node": "*" } }, - "node_modules/chrome-devtools-mcp": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/chrome-devtools-mcp/-/chrome-devtools-mcp-0.21.0.tgz", - "integrity": "sha512-d+iqrRmcwpRFV3Q4DRCF2LCoq+WCRU3GhISKQ9v8g+1C2Uh8upj3urkjxNO4QIjhBMIYei/VQ1OQLFceby80Og==", - "license": "Apache-2.0", - "bin": { - "chrome-devtools": "build/src/bin/chrome-devtools.js", - "chrome-devtools-mcp": "build/src/bin/chrome-devtools-mcp.js" - }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" + "node": ">=6" } }, "node_modules/chromium-bidi": { @@ -297,6 +327,33 @@ "dev": true, "license": "MIT" }, + "node_modules/cosmiconfig": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.1.tgz", + "integrity": "sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", @@ -364,6 +421,26 @@ "once": "^1.4.0" } }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -547,6 +624,23 @@ "node": ">= 14" } }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ip-address": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz", @@ -557,6 +651,13 @@ "node": ">= 12" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -567,6 +668,40 @@ "node": ">=8" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -645,6 +780,38 @@ "node": ">= 14" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -652,37 +819,12 @@ "dev": true, "license": "MIT" }, - "node_modules/playwright": { - "version": "1.59.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.1.tgz", - "integrity": "sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==", + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.59.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.59.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.1.tgz", - "integrity": "sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } + "license": "ISC" }, "node_modules/progress": { "version": "2.0.3", @@ -732,14 +874,36 @@ "once": "^1.3.1" } }, - "node_modules/puppeteer-core": { - "version": "24.43.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.43.0.tgz", - "integrity": "sha512-cCRNXsUlhyPoKDz6+TiSpfZpRS3mD6Y1YFKhkdr6ik6TMfuJb7fAtXq9ThUFc4sphxObDk3BuAvdxc1Y6YOnqQ==", + "node_modules/puppeteer": { + "version": "24.43.1", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.43.1.tgz", + "integrity": "sha512-/FSOViCrqRdb1HDocpsM9Z1giA71gTQPUt3SpHGVRALKAy/rJr1fLFYZW9F23qPxqVxTHQnbh/5B5opJST3kAw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "2.13.2", + "chromium-bidi": "14.0.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1608973", + "puppeteer-core": "24.43.1", + "typed-query-selector": "^2.12.2" + }, + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/puppeteer/node_modules/puppeteer-core": { + "version": "24.43.1", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.43.1.tgz", + "integrity": "sha512-T5ScUMAsmhdNbgDR41AGESYeS6V9MSgetkSnVhhW+gXvzC42VesKCn5ld87gAZDJ6vLHL9GkRvY9WtQWSnwFbw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.13.1", + "@puppeteer/browsers": "2.13.2", "chromium-bidi": "14.0.0", "debug": "^4.4.3", "devtools-protocol": "0.0.1608973", @@ -761,10 +925,20 @@ "node": ">=0.10.0" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz", + "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==", "dev": true, "license": "ISC", "bin": { @@ -929,9 +1103,9 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "7.19.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", - "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", "dev": true, "license": "MIT", "optional": true @@ -969,9 +1143,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", - "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", "dev": true, "license": "MIT", "engines": { diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/code-frame/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md new file mode 100644 index 0000000..7160755 --- /dev/null +++ b/node_modules/@babel/code-frame/README.md @@ -0,0 +1,19 @@ +# @babel/code-frame + +> Generate errors that contain a code frame that point to source locations. + +See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/code-frame +``` + +or using yarn: + +```sh +yarn add @babel/code-frame --dev +``` diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js new file mode 100644 index 0000000..9c5db40 --- /dev/null +++ b/node_modules/@babel/code-frame/lib/index.js @@ -0,0 +1,217 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var picocolors = require('picocolors'); +var jsTokens = require('js-tokens'); +var helperValidatorIdentifier = require('@babel/helper-validator-identifier'); + +function isColorSupported() { + return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported + ); +} +const compose = (f, g) => v => f(g(v)); +function buildDefs(colors) { + return { + keyword: colors.cyan, + capitalized: colors.yellow, + jsxIdentifier: colors.yellow, + punctuator: colors.yellow, + number: colors.magenta, + string: colors.green, + regex: colors.magenta, + comment: colors.gray, + invalid: compose(compose(colors.white, colors.bgRed), colors.bold), + gutter: colors.gray, + marker: compose(colors.red, colors.bold), + message: compose(colors.red, colors.bold), + reset: colors.reset + }; +} +const defsOn = buildDefs(picocolors.createColors(true)); +const defsOff = buildDefs(picocolors.createColors(false)); +function getDefs(enabled) { + return enabled ? defsOn : defsOff; +} + +const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); +const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; +const BRACKET = /^[()[\]{}]$/; +let tokenize; +const JSX_TAG = /^[a-z][\w-]*$/i; +const getTokenType = function (token, offset, text) { + if (token.type === "name") { + const tokenValue = token.value; + if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) { + return "keyword"; + } + if (JSX_TAG.test(tokenValue) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === " defs[type](str)).join("\n"); + } else { + highlighted += value; + } + } + return highlighted; +} + +let deprecationWarningShown = false; +const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; +function getMarkerLines(loc, source, opts, startLineBaseZero) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line - startLineBaseZero; + const startColumn = startLoc.column; + const endLine = endLoc.line - startLineBaseZero; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + if (startLine === -1) { + start = 0; + } + if (endLine === -1) { + end = source.length; + } + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + return { + start, + end, + markerLines + }; +} +function codeFrameColumns(rawLines, loc, opts = {}) { + const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; + const startLineBaseZero = (opts.startLine || 1) - 1; + const defs = getDefs(shouldHighlight); + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts, startLineBaseZero); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end + startLineBaseZero).length; + const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; + let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + defs.message(opts.message); + } + } + return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; + } + if (shouldHighlight) { + return defs.reset(frame); + } else { + return frame; + } +} +function index (rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns(rawLines, location, opts); +} + +exports.codeFrameColumns = codeFrameColumns; +exports.default = index; +exports.highlight = highlight; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/code-frame/lib/index.js.map b/node_modules/@babel/code-frame/lib/index.js.map new file mode 100644 index 0000000..6b85ae4 --- /dev/null +++ b/node_modules/@babel/code-frame/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../src/defs.ts","../src/highlight.ts","../src/index.ts"],"sourcesContent":["import picocolors, { createColors } from \"picocolors\";\nimport type { Colors, Formatter } from \"picocolors/types\";\n\nexport function isColorSupported() {\n return (\n // See https://github.com/alexeyraspopov/picocolors/issues/62\n typeof process === \"object\" &&\n (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\")\n ? false\n : picocolors.isColorSupported\n );\n}\n\nexport type InternalTokenType =\n | \"keyword\"\n | \"capitalized\"\n | \"jsxIdentifier\"\n | \"punctuator\"\n | \"number\"\n | \"string\"\n | \"regex\"\n | \"comment\"\n | \"invalid\";\n\ntype UITokens = \"gutter\" | \"marker\" | \"message\";\n\nexport type Defs = Record;\n\nconst compose: (f: (gv: U) => V, g: (v: T) => U) => (v: T) => V =\n (f, g) => v =>\n f(g(v));\n\n/**\n * Styles for token types.\n */\nfunction buildDefs(colors: Colors): Defs {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold),\n\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold),\n\n reset: colors.reset,\n };\n}\n\nconst defsOn = buildDefs(createColors(true));\nconst defsOff = buildDefs(createColors(false));\n\nexport function getDefs(enabled: boolean): Defs {\n return enabled ? defsOn : defsOff;\n}\n","import type { Token as JSToken, JSXToken } from \"js-tokens\";\nimport jsTokens from \"js-tokens\";\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nimport {\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nimport { getDefs, type InternalTokenType } from \"./defs.ts\";\n\n/**\n * Names that are always allowed as identifiers, but also appear as keywords\n * within certain syntactic productions.\n *\n * https://tc39.es/ecma262/#sec-keywords-and-reserved-words\n *\n * `target` has been omitted since it is very likely going to be a false\n * positive.\n */\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\n\ntype Token = {\n type: InternalTokenType | \"uncolored\";\n value: string;\n};\n\n/**\n * RegExp to test for newlines in terminal.\n */\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * RegExp to test for the three types of brackets.\n */\nconst BRACKET = /^[()[\\]{}]$/;\n\nlet tokenize: (\n text: string,\n) => Generator<{ type: InternalTokenType | \"uncolored\"; value: string }>;\n\nif (process.env.BABEL_8_BREAKING) {\n /**\n * Get the type of token, specifying punctuator type.\n */\n const getTokenType = function (\n token: JSToken | JSXToken,\n ): InternalTokenType | \"uncolored\" {\n if (token.type === \"IdentifierName\") {\n const tokenValue = token.value;\n if (\n isKeyword(tokenValue) ||\n isStrictReservedWord(tokenValue, true) ||\n sometimesKeywords.has(tokenValue)\n ) {\n return \"keyword\";\n }\n\n const firstChar = tokenValue.charCodeAt(0);\n if (firstChar < 128) {\n // ASCII characters\n if (\n firstChar >= charCodes.uppercaseA &&\n firstChar <= charCodes.uppercaseZ\n ) {\n return \"capitalized\";\n }\n } else {\n const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));\n if (firstChar !== firstChar.toLowerCase()) {\n return \"capitalized\";\n }\n }\n }\n\n if (token.type === \"Punctuator\" && BRACKET.test(token.value)) {\n return \"uncolored\";\n }\n\n if (token.type === \"Invalid\" && token.value === \"@\") {\n return \"punctuator\";\n }\n\n switch (token.type) {\n case \"NumericLiteral\":\n return \"number\";\n\n case \"StringLiteral\":\n case \"JSXString\":\n case \"NoSubstitutionTemplate\":\n return \"string\";\n\n case \"RegularExpressionLiteral\":\n return \"regex\";\n\n case \"Punctuator\":\n case \"JSXPunctuator\":\n return \"punctuator\";\n\n case \"MultiLineComment\":\n case \"SingleLineComment\":\n return \"comment\";\n\n case \"Invalid\":\n case \"JSXInvalid\":\n return \"invalid\";\n\n case \"JSXIdentifier\":\n return \"jsxIdentifier\";\n\n default:\n return \"uncolored\";\n }\n };\n\n /**\n * Turn a string of JS into an array of objects.\n */\n tokenize = function* (text: string): Generator {\n for (const token of jsTokens(text, { jsx: true })) {\n switch (token.type) {\n case \"TemplateHead\":\n yield { type: \"string\", value: token.value.slice(0, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateMiddle\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateTail\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1) };\n break;\n\n default:\n yield {\n type: getTokenType(token),\n value: token.value,\n };\n }\n }\n };\n} else {\n /**\n * RegExp to test for what seems to be a JSX tag name.\n */\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n\n // The token here is defined in js-tokens@4. However we don't bother\n // typing it since the whole block will be removed in Babel 8\n const getTokenType = function (token: any, offset: number, text: string) {\n if (token.type === \"name\") {\n const tokenValue = token.value;\n if (\n isKeyword(tokenValue) ||\n isStrictReservedWord(tokenValue, true) ||\n sometimesKeywords.has(tokenValue)\n ) {\n return \"keyword\";\n }\n\n if (\n JSX_TAG.test(tokenValue) &&\n (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \" defs[type as InternalTokenType](str))\n .join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n\n return highlighted;\n}\n","import { getDefs, isColorSupported } from \"./defs.ts\";\nimport { highlight } from \"./highlight.ts\";\n\nexport { highlight };\n\nlet deprecationWarningShown = false;\n\ntype Location = {\n column: number;\n line: number;\n};\n\ntype NodeLocation = {\n end?: Location;\n start: Location;\n};\n\nexport interface Options {\n /** Syntax highlight the code as JavaScript for terminals. default: false */\n highlightCode?: boolean;\n /** The number of lines to show above the error. default: 2 */\n linesAbove?: number;\n /** The number of lines to show below the error. default: 3 */\n linesBelow?: number;\n /** The line number corresponding to the first line in `rawLines`. default: 1 */\n startLine?: number;\n /**\n * Forcibly syntax highlight the code as JavaScript (for non-terminals);\n * overrides highlightCode.\n * default: false\n */\n forceColor?: boolean;\n /**\n * Pass in a string to be displayed inline (if possible) next to the\n * highlighted location in the code. If it can't be positioned inline,\n * it will be placed above the code frame.\n * default: nothing\n */\n message?: string;\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * Extract what lines should be marked and highlighted.\n */\n\ntype MarkerLines = Record;\n\nfunction getMarkerLines(\n loc: NodeLocation,\n source: string[],\n opts: Options,\n startLineBaseZero: number,\n): {\n start: number;\n end: number;\n markerLines: MarkerLines;\n} {\n const startLoc: Location = {\n column: 0,\n line: -1,\n ...loc.start,\n };\n const endLoc: Location = {\n ...startLoc,\n ...loc.end,\n };\n const { linesAbove = 2, linesBelow = 3 } = opts || {};\n const startLine = startLoc.line - startLineBaseZero;\n const startColumn = startLoc.column;\n const endLine = endLoc.line - startLineBaseZero;\n const endColumn = endLoc.column;\n\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines: MarkerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return { start, end, markerLines };\n}\n\nexport function codeFrameColumns(\n rawLines: string,\n loc: NodeLocation,\n opts: Options = {},\n): string {\n const shouldHighlight =\n opts.forceColor || (isColorSupported() && opts.highlightCode);\n const startLineBaseZero = (opts.startLine || 1) - 1;\n const defs = getDefs(shouldHighlight);\n\n const lines = rawLines.split(NEWLINE);\n const { start, end, markerLines } = getMarkerLines(\n loc,\n lines,\n opts,\n startLineBaseZero,\n );\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n\n const numberMaxWidth = String(end + startLineBaseZero).length;\n\n const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;\n\n let frame = highlightedLines\n .split(NEWLINE, end)\n .slice(start, end)\n .map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number + startLineBaseZero}`.slice(\n -numberMaxWidth,\n );\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line\n .slice(0, Math.max(hasMarker[0] - 1, 0))\n .replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n\n markerLine = [\n \"\\n \",\n defs.gutter(gutter.replace(/\\d/g, \" \")),\n \" \",\n markerSpacing,\n defs.marker(\"^\").repeat(numberOfMarkers),\n ].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [\n defs.marker(\">\"),\n defs.gutter(gutter),\n line.length > 0 ? ` ${line}` : \"\",\n markerLine,\n ].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n })\n .join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (shouldHighlight) {\n return defs.reset(frame);\n } else {\n return frame;\n }\n}\n\n/**\n * Create a code frame, adding line numbers, code highlighting, and pointing to a given position.\n */\n\nexport default function (\n rawLines: string,\n lineNumber: number,\n colNumber?: number | null,\n opts: Options = {},\n): string {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n\n const message =\n \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n // A string is directly supplied to emitWarning, because when supplying an\n // Error object node throws in the tests because of different contexts\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n\n const location: NodeLocation = {\n start: { column: colNumber, line: lineNumber },\n };\n\n return codeFrameColumns(rawLines, location, opts);\n}\n"],"names":["isColorSupported","process","env","FORCE_COLOR","picocolors","compose","f","g","v","buildDefs","colors","keyword","cyan","capitalized","yellow","jsxIdentifier","punctuator","number","magenta","string","green","regex","comment","gray","invalid","white","bgRed","bold","gutter","marker","red","message","reset","defsOn","createColors","defsOff","getDefs","enabled","sometimesKeywords","Set","NEWLINE","BRACKET","tokenize","JSX_TAG","getTokenType","token","offset","text","type","tokenValue","value","isKeyword","isStrictReservedWord","has","test","slice","firstChar","String","fromCodePoint","codePointAt","toLowerCase","match","jsTokens","default","exec","matchToToken","index","highlight","defs","highlighted","split","map","str","join","deprecationWarningShown","getMarkerLines","loc","source","opts","startLineBaseZero","startLoc","Object","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","i","lineNumber","sourceLength","codeFrameColumns","rawLines","shouldHighlight","forceColor","highlightCode","lines","hasColumns","numberMaxWidth","highlightedLines","frame","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","colNumber","emitWarning","deprecationError","Error","name","console","warn","location"],"mappings":";;;;;;;;AAGO,SAASA,gBAAgBA,GAAG;EACjC,QAEE,OAAOC,OAAO,KAAK,QAAQ,KACxBA,OAAO,CAACC,GAAG,CAACC,WAAW,KAAK,GAAG,IAAIF,OAAO,CAACC,GAAG,CAACC,WAAW,KAAK,OAAO,CAAC,GACtE,KAAK,GACLC,UAAU,CAACJ,gBAAAA;AAAgB,IAAA;AAEnC,CAAA;AAiBA,MAAMK,OAAkE,GACtEA,CAACC,CAAC,EAAEC,CAAC,KAAKC,CAAC,IACTF,CAAC,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAA;AAKX,SAASC,SAASA,CAACC,MAAc,EAAQ;EACvC,OAAO;IACLC,OAAO,EAAED,MAAM,CAACE,IAAI;IACpBC,WAAW,EAAEH,MAAM,CAACI,MAAM;IAC1BC,aAAa,EAAEL,MAAM,CAACI,MAAM;IAC5BE,UAAU,EAAEN,MAAM,CAACI,MAAM;IACzBG,MAAM,EAAEP,MAAM,CAACQ,OAAO;IACtBC,MAAM,EAAET,MAAM,CAACU,KAAK;IACpBC,KAAK,EAAEX,MAAM,CAACQ,OAAO;IACrBI,OAAO,EAAEZ,MAAM,CAACa,IAAI;AACpBC,IAAAA,OAAO,EAAEnB,OAAO,CAACA,OAAO,CAACK,MAAM,CAACe,KAAK,EAAEf,MAAM,CAACgB,KAAK,CAAC,EAAEhB,MAAM,CAACiB,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;AAAW,KAAA;GAC9C,CAAA;AAED,EAAA,OAAOE,gBAAgB,CAACC,QAAQ,EAAE0B,QAAQ,EAAEpD,IAAI,CAAC,CAAA;AACnD;;;;;;"} \ No newline at end of file diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json new file mode 100644 index 0000000..1f21a37 --- /dev/null +++ b/node_modules/@babel/code-frame/package.json @@ -0,0 +1,32 @@ +{ + "name": "@babel/code-frame", + "version": "7.29.7", + "description": "Generate errors that contain a code frame that point to source locations.", + "author": "The Babel Team (https://babel.dev/team)", + "homepage": "https://babel.dev/docs/en/next/babel-code-frame", + "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-code-frame" + }, + "main": "./lib/index.js", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "devDependencies": { + "charcodes": "^0.2.0", + "import-meta-resolve": "^4.1.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE new file mode 100644 index 0000000..f31575e --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md new file mode 100644 index 0000000..05c19e6 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/README.md @@ -0,0 +1,19 @@ +# @babel/helper-validator-identifier + +> Validate identifier/keywords name + +See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-validator-identifier +``` + +or using yarn: + +```sh +yarn add @babel/helper-validator-identifier +``` diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js new file mode 100644 index 0000000..b12e6e4 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js @@ -0,0 +1,70 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isIdentifierChar = isIdentifierChar; +exports.isIdentifierName = isIdentifierName; +exports.isIdentifierStart = isIdentifierStart; +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; +const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; +const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; +function isInAstralSet(code, set) { + let pos = 0x10000; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code) return false; + pos += set[i + 1]; + if (pos >= code) return true; + } + return false; +} +function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); +} +function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code <= 90) return true; + if (code < 97) return code === 95; + if (code <= 122) return true; + if (code <= 0xffff) { + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); +} +function isIdentifierName(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 0xfc00) === 0xdc00) { + cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; + } + } + return !isFirst; +} + +//# sourceMappingURL=identifier.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map new file mode 100644 index 0000000..71d32ff --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088f\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5c\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdc-\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7dc\\ua7f1-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1add\\u1ae0-\\u1aeb\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n"],"mappings":";;;;;;;;AAaA,IAAIA,4BAA4B,GAAG,spIAAspI;AAEzrI,IAAIC,uBAAuB,GAAG,4lFAA4lF;AAE1nF,MAAMC,uBAAuB,GAAG,IAAIC,MAAM,CACxC,GAAG,GAAGH,4BAA4B,GAAG,GACvC,CAAC;AACD,MAAMI,kBAAkB,GAAG,IAAID,MAAM,CACnC,GAAG,GAAGH,4BAA4B,GAAGC,uBAAuB,GAAG,GACjE,CAAC;AA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KAAK,CAAC;MACvD;IACF;IACA,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,IAAI,CAACP,iBAAiB,CAACQ,EAAE,CAAC,EAAE;QAC1B,OAAO,KAAK;MACd;IACF,CAAC,MAAM,IAAI,CAACJ,gBAAgB,CAACI,EAAE,CAAC,EAAE;MAChC,OAAO,KAAK;IACd;EACF;EACA,OAAO,CAACD,OAAO;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js new file mode 100644 index 0000000..76b2282 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/index.js @@ -0,0 +1,57 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "isIdentifierChar", { + enumerable: true, + get: function () { + return _identifier.isIdentifierChar; + } +}); +Object.defineProperty(exports, "isIdentifierName", { + enumerable: true, + get: function () { + return _identifier.isIdentifierName; + } +}); +Object.defineProperty(exports, "isIdentifierStart", { + enumerable: true, + get: function () { + return _identifier.isIdentifierStart; + } +}); +Object.defineProperty(exports, "isKeyword", { + enumerable: true, + get: function () { + return _keyword.isKeyword; + } +}); +Object.defineProperty(exports, "isReservedWord", { + enumerable: true, + get: function () { + return _keyword.isReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindOnlyReservedWord; + } +}); +Object.defineProperty(exports, "isStrictBindReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictBindReservedWord; + } +}); +Object.defineProperty(exports, "isStrictReservedWord", { + enumerable: true, + get: function () { + return _keyword.isStrictReservedWord; + } +}); +var _identifier = require("./identifier.js"); +var _keyword = require("./keyword.js"); + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js.map b/node_modules/@babel/helper-validator-identifier/lib/index.js.map new file mode 100644 index 0000000..d985f3b --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js new file mode 100644 index 0000000..054cf84 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isKeyword = isKeyword; +exports.isReservedWord = isReservedWord; +exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; +exports.isStrictBindReservedWord = isStrictBindReservedWord; +exports.isStrictReservedWord = isStrictReservedWord; +const reservedWords = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] +}; +const keywords = new Set(reservedWords.keyword); +const reservedWordsStrictSet = new Set(reservedWords.strict); +const reservedWordsStrictBindSet = new Set(reservedWords.strictBind); +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); +} +function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); +} +function isKeyword(word) { + return keywords.has(word); +} + +//# sourceMappingURL=keyword.js.map diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map new file mode 100644 index 0000000..3471f78 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map @@ -0,0 +1 @@ +{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json new file mode 100644 index 0000000..9904752 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/package.json @@ -0,0 +1,31 @@ +{ + "name": "@babel/helper-validator-identifier", + "version": "7.29.7", + "description": "Validate identifier/keywords name", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-validator-identifier" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + }, + "./package.json": "./package.json" + }, + "devDependencies": { + "@unicode/unicode-17.0.0": "^1.6.10", + "charcodes": "^0.2.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js index e4503bd..2c15215 100644 --- a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js +++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js @@ -54,7 +54,7 @@ function isValidPlatform(platform) { } // If moved update release-please config // x-release-please-start-version -const packageVersion = '2.13.1'; +const packageVersion = '2.13.2'; // x-release-please-end /** * @public diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.js b/node_modules/@puppeteer/browsers/lib/cjs/install.js index 3e92a4a..c575f4c 100644 --- a/node_modules/@puppeteer/browsers/lib/cjs/install.js +++ b/node_modules/@puppeteer/browsers/lib/cjs/install.js @@ -266,7 +266,7 @@ async function runSetup(installedBrowser) { return; } (0, node_child_process_1.spawnSync)(node_path_1.default.join(browserDir, 'setup.exe'), [`--configure-browser-in-directory=` + browserDir], { - shell: true, + shell: false, }); // TODO: Handle error here. Currently the setup.exe sometimes // errors although it sets the permissions correctly. diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.js.map b/node_modules/@puppeteer/browsers/lib/cjs/install.js.map index 2af8c86..df4f419 100644 --- a/node_modules/@puppeteer/browsers/lib/cjs/install.js.map +++ b/node_modules/@puppeteer/browsers/lib/cjs/install.js.map @@ -1 +1 @@ -{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AA+RH,0BAcC;AAoOD,8BAaC;AAiBD,oDAIC;AAKD,kCAgCC;AASD,wCAOC;AAKD,oDAuBC;AAloBD,8DAAiC;AACjC,2DAA6C;AAC7C,qCAAiD;AACjD,+CAA+C;AAC/C,sDAAyB;AACzB,0DAA6B;AAG7B,wDAAwC;AAExC,oEAIwC;AACxC,yCAAmD;AACnD,yCAAiC;AACjC,6DAAqD;AACrD,2DAA0D;AAC1D,+CAA4C;AAC5C,+CAA4D;AAG5D,MAAM,YAAY,GAAG,IAAA,gBAAK,EAAC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e;IAEf,IAAI,WAAwB,CAAC;IAE7B,IAAI,mBAAmB,GAAG,CAAC,CAAC;IAC5B,OAAO,CAAC,eAAuB,EAAE,UAAkB,EAAE,EAAE;QACrD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,kBAAgB,CAChC,eAAe,OAAO,IAAI,OAAO,MAAM,WAAW,CAAC,UAAU,CAAC,yBAAyB,EACvF;gBACE,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,UAAU;aAClB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,eAAe,GAAG,mBAAmB,CAAC;QACpD,mBAAmB,GAAG,eAAe,CAAC;QACtC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"} \ No newline at end of file +{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AA+RH,0BAcC;AAoOD,8BAaC;AAiBD,oDAIC;AAKD,kCAgCC;AASD,wCAOC;AAKD,oDAuBC;AAloBD,8DAAiC;AACjC,2DAA6C;AAC7C,qCAAiD;AACjD,+CAA+C;AAC/C,sDAAyB;AACzB,0DAA6B;AAG7B,wDAAwC;AAExC,oEAIwC;AACxC,yCAAmD;AACnD,yCAAiC;AACjC,6DAAqD;AACrD,2DAA0D;AAC1D,+CAA4C;AAC5C,+CAA4D;AAG5D,MAAM,YAAY,GAAG,IAAA,gBAAK,EAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAM,KAAK,GAAG,IAAI,GAAG,E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CAAC;IAC5B,OAAO,CAAC,eAAuB,EAAE,UAAkB,EAAE,EAAE;QACrD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,kBAAgB,CAChC,eAAe,OAAO,IAAI,OAAO,MAAM,WAAW,CAAC,UAAU,CAAC,yBAAyB,EACvF;gBACE,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,UAAU;aAClB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,eAAe,GAAG,mBAAmB,CAAC;QACpD,mBAAmB,GAAG,eAAe,CAAC;QACtC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.js b/node_modules/@puppeteer/browsers/lib/esm/CLI.js index cb226b3..1d28bb7 100644 --- a/node_modules/@puppeteer/browsers/lib/esm/CLI.js +++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.js @@ -18,7 +18,7 @@ function isValidPlatform(platform) { } // If moved update release-please config // x-release-please-start-version -const packageVersion = '2.13.1'; +const packageVersion = '2.13.2'; // x-release-please-end /** * @public diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.js b/node_modules/@puppeteer/browsers/lib/esm/install.js index f0cbed8..e260254 100644 --- a/node_modules/@puppeteer/browsers/lib/esm/install.js +++ b/node_modules/@puppeteer/browsers/lib/esm/install.js @@ -255,7 +255,7 @@ async function runSetup(installedBrowser) { return; } spawnSync(path.join(browserDir, 'setup.exe'), [`--configure-browser-in-directory=` + browserDir], { - shell: true, + shell: false, }); // TODO: Handle error here. Currently the setup.exe sometimes // errors although it sets the permissions correctly. diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.js.map b/node_modules/@puppeteer/browsers/lib/esm/install.js.map index 55b03ff..b3841c0 100644 --- a/node_modules/@puppeteer/browsers/lib/esm/install.js.map +++ b/node_modules/@puppeteer/browsers/lib/esm/install.js.map @@ -1 +1 @@ -{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,gBAAgB,MAAM,UAAU,CAAC;AAExC,OAAO,EACL,OAAO,EACP,eAAe,EACf,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAG5D,MAAM,YAAY,GAAG,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAM,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;AAClD,SAAS,SAAS,CAAC,KAAa;IAC9B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,C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E;QACrD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,gBAAgB,CAChC,eAAe,OAAO,IAAI,OAAO,MAAM,WAAW,CAAC,UAAU,CAAC,yBAAyB,EACvF;gBACE,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,UAAU;aAClB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,eAAe,GAAG,mBAAmB,CAAC;QACpD,mBAAmB,GAAG,eAAe,CAAC;QACtC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/@puppeteer/browsers/package.json b/node_modules/@puppeteer/browsers/package.json index 71d3cc8..d67fe6b 100644 --- a/node_modules/@puppeteer/browsers/package.json +++ b/node_modules/@puppeteer/browsers/package.json @@ -1,6 +1,6 @@ { "name": "@puppeteer/browsers", - "version": "2.13.1", + "version": "2.13.2", "description": "Download and launch browsers", "scripts": { "build:docs": "wireit", diff --git a/node_modules/@puppeteer/browsers/src/CLI.ts b/node_modules/@puppeteer/browsers/src/CLI.ts index 0dafaa9..05d3524 100644 --- a/node_modules/@puppeteer/browsers/src/CLI.ts +++ b/node_modules/@puppeteer/browsers/src/CLI.ts @@ -47,7 +47,7 @@ function isValidPlatform(platform: unknown): platform is BrowserPlatform { // If moved update release-please config // x-release-please-start-version -const packageVersion = '2.13.1'; +const packageVersion = '2.13.2'; // x-release-please-end /** diff --git a/node_modules/@puppeteer/browsers/src/install.ts b/node_modules/@puppeteer/browsers/src/install.ts index 8c9240e..f1dba27 100644 --- a/node_modules/@puppeteer/browsers/src/install.ts +++ b/node_modules/@puppeteer/browsers/src/install.ts @@ -492,7 +492,7 @@ async function runSetup(installedBrowser: InstalledBrowser): Promise { path.join(browserDir, 'setup.exe'), [`--configure-browser-in-directory=` + browserDir], { - shell: true, + shell: false, }, ); // TODO: Handle error here. Currently the setup.exe sometimes diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index 1301954..501b8dc 100644 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/). Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. ### Additional Details - * Last updated: Thu, 07 May 2026 22:21:35 GMT + * Last updated: Tue, 19 May 2026 17:48:56 GMT * Dependencies: [undici-types](https://npmjs.com/package/undici-types) # Credits diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts index bb82b8a..ac857ad 100644 --- a/node_modules/@types/node/async_hooks.d.ts +++ b/node_modules/@types/node/async_hooks.d.ts @@ -491,6 +491,75 @@ declare module "node:async_hooks" { * @experimental */ exit(callback: (...args: TArgs) => R, ...args: TArgs): R; + /** + * Creates a disposable scope that enters the given store and automatically + * restores the previous store value when the scope is disposed. This method is + * designed to work with JavaScript's explicit resource management (`using` syntax). + * + * Example: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * ``` + * + * The `withScope()` method is particularly useful for managing context in + * synchronous code where you want to ensure the previous store value is restored + * when exiting a block, even if an error is thrown. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * try { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * throw new Error('test'); + * } catch (e) { + * // Store is automatically restored even after error + * console.log(asyncLocalStorage.getStore()); // Prints: undefined + * } + * ``` + * + * **Important:** When using `withScope()` in async functions before the first + * `await`, be aware that the scope change will affect the caller's context. The + * synchronous portion of an async function (before the first `await`) runs + * immediately when called, and when it reaches the first `await`, it returns the + * promise to the caller. At that point, the scope change becomes visible in the + * caller's context and will persist in subsequent synchronous code until something + * else changes the scope value. For async operations, prefer using `run()` which + * properly isolates context across async boundaries. + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const asyncLocalStorage = new AsyncLocalStorage(); + * + * async function example() { + * using _ = asyncLocalStorage.withScope('my-store'); + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * await someAsyncOperation(); // Function pauses here and returns promise + * console.log(asyncLocalStorage.getStore()); // Prints: my-store + * } + * + * // Calling without await + * example(); // Synchronous portion runs, then pauses at first await + * // After the promise is returned, the scope 'my-store' is now active in caller! + * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!) + * ``` + * @since v25.9.0 + * @experimental + */ + withScope(store: T): RunScope; /** * Transitions into the context for the remainder of the current * synchronous execution and then persists the store through any following @@ -533,6 +602,45 @@ declare module "node:async_hooks" { */ enterWith(store: T): void; } + /** + * A disposable scope returned by `asyncLocalStorage.withScope()` that + * automatically restores the previous store value when disposed. This class + * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work + * with JavaScript's `using` syntax. + * + * The scope automatically restores the previous store value when the `using` block + * exits, whether through normal completion or by throwing an error. + * @since v25.9.0 + * @experimental + */ + interface RunScope extends Disposable { + /** + * Explicitly ends the scope and restores the previous store value. This method + * is idempotent: calling it multiple times has the same effect as calling it once. + * + * The `[Symbol.dispose]()` method defers to `dispose()`. + * + * If `withScope()` is called without the `using` keyword, `dispose()` must be + * called manually to restore the previous store value. Forgetting to call + * `dispose()` will cause the store value to persist for the remainder of the + * current execution context: + * + * ```js + * import { AsyncLocalStorage } from 'node:async_hooks'; + * + * const storage = new AsyncLocalStorage(); + * + * // Without using, the scope must be disposed manually + * const scope = storage.withScope('my-store'); + * // storage.getStore() === 'my-store' here + * + * scope.dispose(); // Restore previous value + * // storage.getStore() === undefined here + * ``` + * @since v25.9.0 + */ + dispose(): void; + } /** * @since v17.2.0, v16.14.0 * @return A map of provider types to the corresponding numeric id. diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts index 3ebfec6..1933d60 100644 --- a/node_modules/@types/node/crypto.d.ts +++ b/node_modules/@types/node/crypto.d.ts @@ -3778,7 +3778,7 @@ declare module "node:crypto" { interface CShakeParams extends Algorithm { customization?: NodeJS.BufferSource; functionName?: NodeJS.BufferSource; - length: number; + outputLength: number; } interface ContextParams extends Algorithm { context?: NodeJS.BufferSource; @@ -3815,6 +3815,10 @@ declare module "node:crypto" { hash: HashAlgorithmIdentifier; length?: number; } + interface KangarooTwelveParams { + customization?: NodeJS.BufferSource; + outputLength: number; + } interface JsonWebKey { alg?: string; crv?: string; @@ -3849,7 +3853,7 @@ declare module "node:crypto" { } interface KmacParams extends Algorithm { customization?: NodeJS.BufferSource; - length: number; + outputLength: number; } interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; @@ -3884,6 +3888,10 @@ declare module "node:crypto" { interface RsaPssParams extends Algorithm { saltLength: number; } + interface TurboShakeParams { + domainSeparation?: number; + outputLength: number; + } interface Crypto { readonly subtle: SubtleCrypto; getRandomValues< @@ -3945,7 +3953,10 @@ declare module "node:crypto" { extractable: boolean, keyUsages: readonly KeyUsage[], ): Promise; - digest(algorithm: AlgorithmIdentifier | CShakeParams, data: NodeJS.BufferSource): Promise; + digest( + algorithm: AlgorithmIdentifier | CShakeParams | TurboShakeParams | KangarooTwelveParams, + data: NodeJS.BufferSource, + ): Promise; encapsulateBits( encapsulationAlgorithm: AlgorithmIdentifier, encapsulationKey: CryptoKey, diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts index b4cd8c3..f481a32 100644 --- a/node_modules/@types/node/events.d.ts +++ b/node_modules/@types/node/events.d.ts @@ -528,15 +528,12 @@ declare module "node:events" { * import { addAbortListener } from 'node:events'; * * function example(signal) { - * let disposable; - * try { - * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - * disposable = addAbortListener(signal, (e) => { - * // Do something when signal is aborted. - * }); - * } finally { - * disposable?.[Symbol.dispose](); - * } + * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); + * // addAbortListener() returns a disposable, so the `using` keyword ensures + * // the abort listener is automatically removed when this scope exits. + * using _ = addAbortListener(signal, (e) => { + * // Do something when signal is aborted. + * }); * } * ``` * @since v20.5.0 diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts index b74033c..1fce8b8 100644 --- a/node_modules/@types/node/fs.d.ts +++ b/node_modules/@types/node/fs.d.ts @@ -380,7 +380,8 @@ declare module "node:fs" { "ready": []; } /** - * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. + * Instances of `fs.ReadStream` cannot be constructed directly. They are created and + * returned using the `fs.createReadStream()` function. * @since v0.1.93 */ class ReadStream extends stream.Readable { @@ -643,7 +644,8 @@ declare module "node:fs" { "ready": []; } /** - * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. + * Instances of `fs.WriteStream` cannot be constructed directly. They are created and + * returned using the `fs.createWriteStream()` function. * @since v0.1.93 */ class WriteStream extends stream.Writable { @@ -1144,6 +1146,7 @@ declare module "node:fs" { options: | (StatOptions & { bigint?: false | undefined; + throwIfNoEntry?: true | undefined; }) | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, @@ -1152,33 +1155,82 @@ declare module "node:fs" { path: PathLike, options: StatOptions & { bigint: true; + throwIfNoEntry?: true | undefined; }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, ): void; function stat( path: PathLike, - options: StatOptions | undefined, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats | undefined) => void, + ): void; + function stat( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, ): void; + function stat( + path: PathLike, + options: StatOptions | undefined, + callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats | undefined) => void, + ): void; namespace stat { + // TODO: aliased promisify signatures /** * Asynchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ + function __promisify__(path: PathLike): Promise; function __promisify__( path: PathLike, options?: StatOptions & { bigint?: false | undefined; + throwIfNoEntry?: true | undefined; }, ): Promise; function __promisify__( path: PathLike, options: StatOptions & { bigint: true; + throwIfNoEntry?: true | undefined; }, ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function __promisify__( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; } + /** @deprecated This orphaned interface will be removed in a future version. */ interface StatSyncFn extends Function { (path: PathLike, options?: undefined): Stats; ( @@ -1220,7 +1272,42 @@ declare module "node:fs" { * Synchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - const statSync: StatSyncFn; + function statSync(path: PathLike): Stats; + function statSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function statSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function statSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; /** * Invokes the callback with the `fs.Stats` for the file descriptor. * @@ -1410,7 +1497,42 @@ declare module "node:fs" { * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - const lstatSync: StatSyncFn; + function lstatSync(path: PathLike): Stats; + function lstatSync( + path: PathLike, + options?: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry?: true | undefined; + }, + ): Stats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry?: true | undefined; + }, + ): BigIntStats; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Stats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): BigIntStats | undefined; + function lstatSync( + path: PathLike, + options: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Stats | BigIntStats; + function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats | undefined; /** * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than * a possible @@ -4461,10 +4583,10 @@ declare module "node:fs" { } interface StatOptions { bigint?: boolean | undefined; - } - interface StatSyncOptions extends StatOptions { throwIfNoEntry?: boolean | undefined; } + /** @deprecated This orphaned interface will be removed in a future version. Use `StatOptions` instead. */ + interface StatSyncOptions extends StatOptions {} interface CopyOptionsBase { /** * Dereference symlinks diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts index 419112a..c9c2421 100644 --- a/node_modules/@types/node/fs/promises.d.ts +++ b/node_modules/@types/node/fs/promises.d.ts @@ -37,6 +37,7 @@ declare module "node:fs/promises" { WriteVResult, } from "node:fs"; import { Stream } from "node:stream"; + import { ByteReadableStream, Transform, Writer } from "node:stream/iter"; import { ReadableStream } from "node:stream/web"; interface FileChangeInfo { eventType: WatchEventType; @@ -85,6 +86,57 @@ declare module "node:fs/promises" { interface ReadableWebStreamOptions { autoClose?: boolean | undefined; } + interface PullOptions extends Abortable { + /** + * Close the file handle when the stream ends. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to begin reading from. When specified, + * reads use explicit positioning (`pread` semantics). + */ + start?: number | undefined; + /** + * Maximum number of bytes to read before ending the + * iterator. Reads stop when `limit` bytes have been delivered or EOF is + * reached, whichever comes first. + */ + limit?: number | undefined; + /** + * Size in bytes of the buffer allocated for each + * read operation. + * @default 131072 + */ + chunkSize?: number | undefined; + } + interface WriterOptions { + /** + * Close the file handle when the writer ends or fails. + * @default false + */ + autoClose?: boolean | undefined; + /** + * Byte offset to start writing at. When specified, + * writes use explicit positioning. + */ + start?: number | undefined; + /** + * Maximum number of bytes the writer will accept. + * Async writes (`write()`, `writev()`) that would exceed the limit reject + * with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`) + * return `false`. + */ + limit?: number | undefined; + /** + * Maximum chunk size in bytes for synchronous write + * operations. Writes larger than this threshold fall back to async I/O. + * Set this to match the reader's `chunkSize` for optimal `pipeTo()` + * performance. + * @default 131072 + */ + chunkSize?: number | undefined; + } // TODO: Add `EventEmitter` close interface FileHandle { /** @@ -202,6 +254,41 @@ declare module "node:fs/promises" { * @return Fulfills with `undefined` upon success. */ datasync(): Promise; + /** + * Return the file contents as an async iterable using the + * [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte + * chunks (default 128 KB). If transforms are provided, they are applied + * via [`stream/iter pull()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pullsource-transforms-options). + * + * The file handle is locked while the iterable is being consumed and unlocked + * when iteration completes, an error occurs, or the consumer breaks. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { text } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * const fh = await open('input.txt', 'r'); + * + * // Read as text + * console.log(await text(fh.pull({ autoClose: true }))); + * + * // Read 1 KB starting at byte 100 + * const fh2 = await open('input.txt', 'r'); + * console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true }))); + * + * // Read with compression + * const fh3 = await open('input.txt', 'r'); + * const compressed = fh3.pull(compressGzip(), { autoClose: true }); + * ``` + * @since v25.9.0 + * @experimental + */ + pull(...transforms: Transform[]): ByteReadableStream; + pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream; /** * Request that all data for the open file descriptor is flushed to the storage * device. The specific implementation is operating system and device specific. @@ -450,6 +537,45 @@ declare module "node:fs/promises" { buffers: TBuffers, position?: number, ): Promise>; + /** + * Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) writer backed by this file handle. + * + * The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`: + * + * * `await using w = fh.writer()` — if the writer is still open (no `end()` + * called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits + * for it to complete. + * * `using w = fh.writer()` — calls `fail()` unconditionally. + * + * The `writeSync()` and `writevSync()` methods enable the try-sync fast path + * used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the + * writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete + * synchronously with zero promise overhead. + * + * This function is only available when the `--experimental-stream-iter` flag is + * enabled. + * + * ```js + * import { open } from 'node:fs/promises'; + * import { from, pipeTo } from 'node:stream/iter'; + * import { compressGzip } from 'node:zlib/iter'; + * + * // Async pipeline + * const fh = await open('output.gz', 'w'); + * await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true })); + * + * // Sync pipeline with limit + * const src = await open('input.txt', 'r'); + * const dst = await open('output.txt', 'w'); + * const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB + * await pipeTo(src.pull({ autoClose: true }), w); + * await w.end(); + * await dst.close(); + * ``` + * @since v25.9.0 + * @experimental + */ + writer(options?: WriterOptions): Writer; /** * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s * @since v13.13.0, v12.17.0 @@ -802,19 +928,42 @@ declare module "node:fs/promises" { * @since v10.0.0 * @return Fulfills with the {fs.Stats} object for the given `path`. */ + function stat(path: PathLike): Promise; function stat( path: PathLike, opts?: StatOptions & { bigint?: false | undefined; + throwIfNoEntry?: true | undefined; }, ): Promise; function stat( path: PathLike, opts: StatOptions & { bigint: true; + throwIfNoEntry?: true | undefined; }, ): Promise; - function stat(path: PathLike, opts?: StatOptions): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint?: false | undefined; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + bigint: true; + throwIfNoEntry: false; + }, + ): Promise; + function stat( + path: PathLike, + opts: StatOptions & { + throwIfNoEntry?: true | undefined; + }, + ): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; /** * @since v19.6.0, v18.15.0 * @return Fulfills with the {fs.StatFs} object for the given `path`. diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index 73c7757..d20753d 100644 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -1242,10 +1242,14 @@ declare module "node:http2" { > extends SessionOptions { streamResetBurst?: number | undefined; streamResetRate?: number | undefined; + /** @deprecated Use `http1Options.IncomingMessage` instead. */ Http1IncomingMessage?: Http1Request | undefined; + /** @deprecated Use `http1Options.ServerResponse` instead. */ Http1ServerResponse?: Http1Response | undefined; + http1Options?: Http1Options | undefined; Http2ServerRequest?: Http2Request | undefined; Http2ServerResponse?: Http2Response | undefined; + strictSingleValueFields?: boolean | undefined; } interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} interface SecureServerSessionOptions< @@ -1269,6 +1273,14 @@ declare module "node:http2" { allowHTTP1?: boolean | undefined; origins?: string[] | undefined; } + interface Http1Options< + Request extends typeof IncomingMessage, + Response extends typeof ServerResponse>, + > { + IncomingMessage?: Request | undefined; + ServerResponse?: Response | undefined; + keepAliveTimeout?: number | undefined; + } interface Http2ServerCommon { setTimeout(msec?: number, callback?: () => void): this; /** diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts index 08ab4f0..14dd60b 100644 --- a/node_modules/@types/node/index.d.ts +++ b/node_modules/@types/node/index.d.ts @@ -95,6 +95,7 @@ /// /// /// +/// /// /// /// @@ -113,3 +114,4 @@ /// /// /// +/// diff --git a/node_modules/@types/node/inspector.generated.d.ts b/node_modules/@types/node/inspector.generated.d.ts index 93ae271..0e2e441 100644 --- a/node_modules/@types/node/inspector.generated.d.ts +++ b/node_modules/@types/node/inspector.generated.d.ts @@ -2035,6 +2035,9 @@ declare module "node:inspector" { autoAttach: boolean; waitForDebuggerOnStart: boolean; } + interface GetTargetsReturnType { + targetInfos: TargetInfo[]; + } interface TargetCreatedEventDataType { targetInfo: TargetInfo; } @@ -2506,6 +2509,7 @@ declare module "node:inspector" { */ post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; + post(method: "Target.getTargets", callback?: (err: Error | null, params: Target.GetTargetsReturnType) => void): void; post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void; post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void; post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void; @@ -3642,6 +3646,7 @@ declare module "node:inspector/promises" { * Detached from the worker with given sessionId. */ post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise; + post(method: "Target.getTargets"): Promise; post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise; post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise; /** diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts index 7f61a67..ae6c329 100644 --- a/node_modules/@types/node/module.d.ts +++ b/node_modules/@types/node/module.d.ts @@ -218,6 +218,7 @@ declare module "node:module" { * This feature requires `--allow-worker` if used with the * [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model). * @since v20.6.0, v18.19.0 + * @deprecated Use `module.registerHooks()` instead. * @param specifier Customization hooks to be registered; this should be * the same string that would be passed to `import()`, except that if it is * relative, it is resolved relative to `parentURL`. diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index 281b7ba..3eff1b7 100644 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,6 +1,6 @@ { "name": "@types/node", - "version": "25.6.2", + "version": "25.9.1", "description": "TypeScript definitions for node", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", "license": "MIT", @@ -147,9 +147,9 @@ }, "scripts": {}, "dependencies": { - "undici-types": "~7.19.0" + "undici-types": ">=7.24.0 <7.24.7" }, "peerDependencies": {}, - "typesPublisherContentHash": "89af6b1f98f4dcf78863724bff751d6099486220dae09983e7b6430b0be61ac2", + "typesPublisherContentHash": "2546f5f588e15fc9aa202a3005dab2859d006fd48a8448107741e5ce184e9098", "typeScriptVersion": "5.3" } \ No newline at end of file diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts index ea50c94..00ab94e 100644 --- a/node_modules/@types/node/process.d.ts +++ b/node_modules/@types/node/process.d.ts @@ -822,6 +822,28 @@ declare module "node:process" { * @since v0.7.0 */ abort(): never; + /** + * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback + * that will be invoked when an uncaught exception occurs, receiving the exception + * value as its first argument. + * + * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows + * multiple callbacks to be registered and does not conflict with the + * [`domain`](https://nodejs.org/docs/latest-v25.x/api/domain.html) module. Callbacks are called in reverse order of registration + * (most recent first). If a callback returns `true`, subsequent callbacks + * and the default uncaught exception handling are skipped. + * + * ```js + * import process from 'node:process'; + * + * process.addUncaughtExceptionCaptureCallback((err) => { + * console.error('Caught exception:', err.message); + * return true; // Indicates exception was handled + * }); + * ``` + * @since v25.9.0 + */ + addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void; /** * The `process.chdir()` method changes the current working directory of the * Node.js process or throws an exception if doing so fails (for instance, if @@ -1418,9 +1440,11 @@ declare module "node:process" { * method with a non-`null` argument while another capture function is set will * throw an error. * - * Using this function is mutually exclusive with using the deprecated `domain` built-in module. + * To register multiple callbacks that can coexist, use + * `process.addUncaughtExceptionCaptureCallback()` instead. * @since v9.3.0 */ + // TODO: callback parameter should be `unknown` setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; /** * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. @@ -1474,30 +1498,35 @@ declare module "node:process" { * Will generate an object similar to: * * ```console - * { node: '20.2.0', - * acorn: '8.8.2', - * ada: '2.4.0', - * ares: '1.19.0', - * base64: '0.5.0', - * brotli: '1.0.9', - * cjs_module_lexer: '1.2.2', - * cldr: '43.0', - * icu: '73.1', - * llhttp: '8.1.0', - * modules: '115', - * napi: '8', - * nghttp2: '1.52.0', - * nghttp3: '0.7.0', - * ngtcp2: '0.8.1', - * openssl: '3.0.8+quic', - * simdutf: '3.2.9', - * tz: '2023c', - * undici: '5.22.0', - * unicode: '15.0', - * uv: '1.44.2', - * uvwasi: '0.0.16', - * v8: '11.3.244.8-node.9', - * zlib: '1.2.13' } + * { node: '26.0.0-pre', + * acorn: '8.15.0', + * ada: '3.4.1', + * amaro: '1.1.5', + * ares: '1.34.6', + * brotli: '1.2.0', + * merve: '1.0.0', + * cldr: '48.0', + * icu: '78.2', + * llhttp: '9.3.0', + * modules: '144', + * napi: '10', + * nbytes: '0.1.1', + * ncrypto: '0.0.1', + * nghttp2: '1.68.0', + * nghttp3: '', + * ngtcp2: '', + * openssl: '3.5.4', + * simdjson: '4.2.4', + * simdutf: '7.3.3', + * sqlite: '3.51.2', + * tz: '2025c', + * undici: '7.18.2', + * unicode: '17.0', + * uv: '1.51.0', + * uvwasi: '0.0.23', + * v8: '14.3.127.18-node.10', + * zlib: '1.3.1-e00f703', + * zstd: '1.5.7' } * ``` * @since v0.2.0 */ diff --git a/node_modules/@types/node/quic.d.ts b/node_modules/@types/node/quic.d.ts index 7fe6188..7143708 100644 --- a/node_modules/@types/node/quic.d.ts +++ b/node_modules/@types/node/quic.d.ts @@ -179,7 +179,7 @@ declare module "node:quic" { * The TLS crypto keys to use for sessions. * @since v23.8.0 */ - keys?: KeyObject | webcrypto.CryptoKey | ReadonlyArray | undefined; + keys?: KeyObject | readonly KeyObject[] | undefined; /** * Specifies the maximum UDP packet payload size. * @since v23.8.0 @@ -653,7 +653,7 @@ declare module "node:quic" { /** * Sends an unreliable datagram to the remote peer, returning the datagram ID. * If the datagram payload is specified as an `ArrayBufferView`, then ownership of - * that view will be transfered to the underlying stream. + * that view will be transferred to the underlying stream. * @since v23.8.0 */ sendDatagram(datagram: string | NodeJS.ArrayBufferView): bigint; diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts index 7481bea..4bb74ec 100644 --- a/node_modules/@types/node/repl.d.ts +++ b/node_modules/@types/node/repl.d.ts @@ -86,6 +86,21 @@ declare module "node:repl" { * @default false */ breakEvalOnSigint?: boolean | undefined; + /** + * This function customizes error handling in the REPL. + * It receives the thrown exception as its first argument and must return one + * of the following values synchronously: + * * `'print'` to print the error to the output stream (default behavior). + * * `'ignore'` to skip all remaining error handling. + * * `'unhandled'` to treat the exception as fully unhandled. In this case, + * the error will be passed to process-wide exception handlers, such as + * the `'uncaughtException'` event. + * The `'unhandled'` value may or may not be desirable in situations + * where the `REPLServer` instance has been closed, depending on the particular + * use case. + * @since v25.9.0 + */ + handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined; } type REPLEval = ( this: REPLServer, diff --git a/node_modules/@types/node/sqlite.d.ts b/node_modules/@types/node/sqlite.d.ts index d2111bb..a1fa358 100644 --- a/node_modules/@types/node/sqlite.d.ts +++ b/node_modules/@types/node/sqlite.d.ts @@ -87,6 +87,29 @@ declare module "node:sqlite" { * @default true */ defensive?: boolean | undefined; + /** + * Configuration for various SQLite limits. These limits + * can be used to prevent excessive resource consumption when handling + * potentially malicious input. See [Run-Time Limits](https://www.sqlite.org/c3ref/c_limit_attached.html) and [Limit Constants](https://www.sqlite.org/c3ref/limit.html) + * in the SQLite documentation for details. Default values are determined by + * SQLite's compile-time defaults and may vary depending on how SQLite was + * built. The following properties are supported: + * @since v25.8.0 + */ + limits?: NodeJS.PartialOptions | undefined; + } + interface DatabaseLimits { + length: number; + sqlLength: number; + column: number; + exprDepth: number; + compoundSelect: number; + vdbeOp: number; + functionArg: number; + attach: number; + likePatternLength: number; + variableNumber: number; + triggerDepth: number; } interface CreateSessionOptions { /** @@ -311,18 +334,17 @@ declare module "node:sqlite" { * @since v22.13.0 * @param name The name of the SQLite function to create. * @param options Optional configuration settings for the function. - * @param func The JavaScript function to call when the SQLite - * function is invoked. The return value of this function should be a valid - * SQLite data type: see - * [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). - * The result defaults to `NULL` if the return value is `undefined`. + * @param fn The JavaScript function to call when the SQLite function is + * invoked. The return value of this function should be a valid SQLite data type: + * see [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite). The result defaults to + * `NULL` if the return value is `undefined`. */ function( name: string, options: FunctionOptions, - func: (...args: SQLOutputValue[]) => SQLInputValue, + fn: (...args: SQLOutputValue[]) => SQLInputValue, ): void; - function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void; + function(name: string, fn: (...args: SQLOutputValue[]) => SQLInputValue): void; /** * Sets an authorizer callback that SQLite will invoke whenever it attempts to * access data or modify the database schema through prepared statements. @@ -392,6 +414,31 @@ declare module "node:sqlite" { * @since v24.0.0 */ readonly isTransaction: boolean; + /** + * An object for getting and setting SQLite database limits at runtime. + * Each property corresponds to an SQLite limit and can be read or written. + * + * ```js + * const db = new DatabaseSync(':memory:'); + * + * // Read current limit + * console.log(db.limits.length); + * + * // Set a new limit + * db.limits.sqlLength = 100000; + * + * // Reset a limit to its compile-time maximum + * db.limits.sqlLength = Infinity; + * ``` + * + * Available properties: `length`, `sqlLength`, `column`, `exprDepth`, + * `compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`, + * `variableNumber`, `triggerDepth`. + * + * Setting a property to `Infinity` resets the limit to its compile-time maximum value. + * @since v25.8.0 + */ + readonly limits: DatabaseLimits; /** * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via * the constructor. An exception is thrown if the database is already open. diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index 1591667..887b6d4 100644 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -1067,7 +1067,7 @@ declare module "node:stream" { writableCorked?: number | undefined; } interface DuplexToWebOptions { - type?: web.ReadableStreamType | undefined; + readableType?: web.ReadableStreamType | undefined; } interface DuplexEventMap extends ReadableEventMap, WritableEventMap {} /** diff --git a/node_modules/@types/node/stream/iter.d.ts b/node_modules/@types/node/stream/iter.d.ts new file mode 100644 index 0000000..121f782 --- /dev/null +++ b/node_modules/@types/node/stream/iter.d.ts @@ -0,0 +1,301 @@ +declare module "node:stream/iter" { + // Symbols and custom typedefs + const broadcastProtocol: unique symbol; + const drainableProtocol: unique symbol; + const shareProtocol: unique symbol; + const shareSyncProtocol: unique symbol; + const toAsyncStreamable: unique symbol; + const toStreamable: unique symbol; + type Source = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable + | Streamable + | AsyncStreamable; + type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable | Streamable; + type Transform = StatelessTransformFn | StatefulTransform; + type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform; + type TransformResult = + | string + | ArrayBufferLike + | ArrayBufferView + | Iterable + | AsyncIterable; + type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable; + interface AsyncStreamable { + [toAsyncStreamable](): Source; + } + interface Broadcastable { + [broadcastProtocol](options: BroadcastOptions): Broadcast; + } + interface Drainable { + [drainableProtocol](): Promise | null; + } + interface Shareable { + [shareProtocol](options: ShareOptions): Share; + } + interface Streamable { + [toStreamable](): SyncSource; + } + interface SyncShareable { + [shareSyncProtocol](options: ShareSyncOptions): SyncShare; + } + // IDL dictionaries, enums, typedefs + type BackpressurePolicy = "strict" | "block" | "drop-oldest" | "drop-newest"; + type ByteReadableStream = AsyncIterable; + type SyncByteReadableStream = Iterable; + interface WriteOptions { + signal?: AbortSignal; + } + interface PushStreamOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface PullOptions { + signal?: AbortSignal; + } + interface PipeToOptions { + signal?: AbortSignal; + preventClose?: boolean; + preventFail?: boolean; + } + interface PipeToSyncOptions { + preventClose?: boolean; + preventFail?: boolean; + } + interface ConsumeOptions { + signal?: AbortSignal; + limit?: number; + } + interface ConsumeSyncOptions { + limit?: number; + } + interface TextConsumeOptions extends ConsumeOptions { + encoding?: string; + } + interface TextConsumeSyncOptions extends ConsumeSyncOptions { + encoding?: string; + } + interface MergeOptions { + signal?: AbortSignal; + } + interface BroadcastOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + signal?: AbortSignal; + } + interface ShareSyncOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexDirectionOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + } + interface DuplexOptions { + highWaterMark?: number; + backpressure?: BackpressurePolicy; + a?: DuplexDirectionOptions; + b?: DuplexDirectionOptions; + signal?: AbortSignal; + } + interface TransformCallbackOptions { + signal: AbortSignal; + } + interface StatelessTransformFn { + ( + chunks: Uint8Array[] | null, + options: TransformCallbackOptions, + ): Promise | TransformResult | null; + } + interface SyncStatelessTransformFn { + (chunks: Uint8Array[] | null): SyncTransformResult | null; + } + interface StatefulTransform { + transform( + source: AsyncIterable, + options: TransformCallbackOptions, + ): AsyncIterable; + } + interface SyncStatefulTransform { + transform(source: Iterable): Iterable; + } + // IDL interfaces + interface PushWriter extends Writer, Drainable {} + interface PushStreamResult { + writer: PushWriter; + readable: ByteReadableStream; + } + interface BroadcastWriter extends Writer, Drainable {} + interface BroadcastResult { + writer: BroadcastWriter; + broadcast: Broadcast; + } + interface Writer extends Disposable, AsyncDisposable { + readonly desiredSize: number | null; + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + writev(chunks: Array, options?: WriteOptions): Promise; + writeSync(chunk: Uint8Array | string): boolean; + writevSync(chunks: Array): boolean; + end(options?: WriteOptions): Promise; + endSync(): number; + fail(reason?: any): void; + } + interface PartialWriter extends Partial { + write(chunk: Uint8Array | string, options?: WriteOptions): Promise; + } + interface SyncWriter extends Disposable { + readonly desiredSize: number | null; + writeSync(chunk: Uint8Array | string): number; + writevSync(chunks: Array): number; + endSync(): number; + fail(reason?: any): void; + } + interface PartialSyncWriter extends Partial { + writeSync(chunk: Uint8Array | string): number; + } + interface Broadcast extends Disposable { + readonly consumerCount: number; + readonly bufferSize: number; + push(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface Share extends Disposable { + readonly consumerCount: number; + readonly bufferSize: number; + pull(...args: any[]): ByteReadableStream; + cancel(reason?: any): void; + } + interface SyncShare extends Disposable { + readonly consumerCount: number; + readonly bufferSize: number; + pull(...args: any): SyncByteReadableStream; + cancel(reason?: any): void; + } + interface DuplexChannel extends AsyncDisposable { + readonly writer: Writer; + readonly readable: ByteReadableStream; + close(): Promise; + } + // Push stream creation + function push(...transforms: Transform[]): PushStreamResult; + function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult; + // Stream factories + function from(input: Source): ByteReadableStream; + function fromSync(input: SyncSource): SyncByteReadableStream; + // Pull pipelines + function pull(source: Source, ...transforms: Transform[]): ByteReadableStream; + function pull( + source: Source, + ...args: [...transforms: Transform[], options: PullOptions] + ): ByteReadableStream; + function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream; + // Pipe operations + function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise; + function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise; + function pipeTo( + source: Source, + ...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions] + ): Promise; + function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter] + ): number; + function pipeToSync( + source: SyncSource, + ...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions] + ): number; + // Consumers + function bytes(source: Source, options?: ConsumeOptions): Promise; + function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array; + function text(source: Source, options?: TextConsumeOptions): Promise; + function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string; + function arrayBuffer(source: Source, options?: ConsumeOptions): Promise; + function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer; + function array(source: Source, options?: ConsumeOptions): Promise; + function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[]; + // Utilities + function tap(callback: StatelessTransformFn): StatelessTransformFn; + function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn; + function merge(...sources: Source[]): ByteReadableStream; + function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream; + function ondrain(drainable: any): Promise | null; + // Multi-consumer + function broadcast(options?: BroadcastOptions): BroadcastResult; + function share(source: Source, options?: ShareOptions): Share; + function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare; + // Duplex + function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel]; + // Node.js-specific extensions + namespace Broadcast { + /** + * Create a `Broadcast` from an existing source. The source is consumed + * automatically and pushed to all subscribers. + * @since v25.9.0 + * @param options Same as `broadcast()`. + */ + function from( + input: ByteReadableStream | SyncByteReadableStream | Broadcastable, + options?: BroadcastOptions, + ): BroadcastResult; + } + namespace Share { + /** + * Create a `Share` from an existing source. + * @since v25.9.0 + * @param options Same as `share()`. + */ + function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share; + } + namespace SyncShare { + /** + * @since v25.9.0 + */ + function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare; + } + namespace Stream { + export { + array, + arrayBuffer, + arrayBufferSync, + arraySync, + broadcast, + broadcastProtocol, + bytes, + bytesSync, + drainableProtocol, + duplex, + from, + fromSync, + merge, + ondrain, + pipeTo, + pipeToSync, + pull, + pullSync, + push, + share, + shareProtocol, + shareSync, + shareSyncProtocol, + tap, + tapSync, + text, + textSync, + toAsyncStreamable, + toStreamable, + }; + } +} +declare module "stream/iter" { + export * from "node:stream/iter"; +} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts index a3ec5e2..0ad8b60 100644 --- a/node_modules/@types/node/test.d.ts +++ b/node_modules/@types/node/test.d.ts @@ -1,5 +1,5 @@ declare module "node:test" { - import { AssertMethodNames } from "node:assert"; + import { AssertMethodNames, AssertPredicate } from "node:assert"; import { Readable, ReadableEventMap } from "node:stream"; import { TestEvent } from "node:test/reporters"; import { URL } from "node:url"; @@ -111,7 +111,12 @@ declare module "node:test" { function only(name?: string, fn?: SuiteFn): Promise; function only(options?: TestOptions, fn?: SuiteFn): Promise; function only(fn?: SuiteFn): Promise; - // added in v25.5.0, undocumented + /** + * This flips the pass/fail reporting for a specific test or suite: a flagged test + * case must throw in order to pass, and a flagged test case that does not throw + * fails. + * @since v25.5.0 + */ function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; function expectFailure(name?: string, fn?: SuiteFn): Promise; function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise; @@ -334,6 +339,7 @@ declare module "node:test" { * This options is not compatible with `isolation='none'`. These variables will override * those from the main process, and are not merged with `process.env`. * @since v25.6.0 + * @default process.env */ env?: NodeJS.ProcessEnv | undefined; } @@ -345,6 +351,7 @@ declare module "node:test" { "test:diagnostic": [data: EventData.TestDiagnostic]; "test:enqueue": [data: EventData.TestEnqueue]; "test:fail": [data: EventData.TestFail]; + "test:interrupted": [data: EventData.TestInterrupted]; "test:pass": [data: EventData.TestPass]; "test:plan": [data: EventData.TestPlan]; "test:start": [data: EventData.TestStart]; @@ -736,6 +743,13 @@ declare module "node:test" { */ skip?: string | boolean; } + interface TestInterrupted { + /** + * An array of objects containing information about the + * interrupted tests. + */ + tests: TestStart[]; + } interface TestPass extends LocationInfo { /** * Additional execution metadata. @@ -983,6 +997,34 @@ declare module "node:test" { * @since v21.7.0, v20.12.0 */ readonly attempt: number; + /** + * The unique identifier of the worker running the current test file. This value is + * derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests + * with `--test-isolation=process` (the default), each test file runs in a separate + * child process and is assigned a worker ID from 1 to N, where N is the number of + * concurrent workers. When running with `--test-isolation=none`, all tests run in + * the same process and the worker ID is always 1. This value is `undefined` when + * not running in a test context. + * + * This property is useful for splitting resources (like database connections or + * server ports) across concurrent test files: + * + * ```js + * import { test } from 'node:test'; + * import { process } from 'node:process'; + * + * test('database operations', async (t) => { + * // Worker ID is available via context + * console.log(`Running in worker ${t.workerId}`); + * + * // Or via environment variable (available at import time) + * const workerId = process.env.NODE_TEST_WORKER_ID; + * // Use workerId to allocate separate resources per worker + * }); + * ``` + * @since v25.8.0 + */ + readonly workerId: number | undefined; /** * This function is used to set the number of assertions and subtests that are expected to run * within the test. If the number of assertions and subtests that run does not match the @@ -1263,6 +1305,17 @@ declare module "node:test" { * @default false */ concurrency?: number | boolean | undefined; + /** + * If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed + * in the test results as the reason why the test is expected to fail. If a + * `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes + * only if the thrown error matches, following the behavior of + * `assert.throws`. To provide both a reason and validation, pass an object + * with `label` (string) and `match` (RegExp, Function, Object, or Error). + * @since v25.5.0 + * @default false + */ + expectFailure?: boolean | string | AssertPredicate | undefined; /** * If truthy, and the test context is configured to run `only` tests, then this test will be * run. Otherwise, the test is skipped. @@ -1301,8 +1354,6 @@ declare module "node:test" { * @since v22.2.0 */ plan?: number | undefined; - // added in v25.5.0, undocumented - expectFailure?: boolean | undefined; } /** * This function creates a hook that runs before executing a suite. @@ -1428,19 +1479,40 @@ declare module "node:test" { */ cache?: boolean | undefined; /** - * The value to use as the mocked module's default export. - * - * If this value is not provided, ESM mocks do not include a default export. - * If the mock is a CommonJS or builtin module, this setting is used as the value of `module.exports`. - * If this value is not provided, CJS and builtin mocks use an empty object as the value of `module.exports`. + * Optional mocked exports. The `default` property, if + * provided, is used as the mocked module's default export. All other own + * enumerable properties are used as named exports. + * **This option cannot be used with `defaultExport` or `namedExports`.** + * * If the mock is a CommonJS or builtin module, `exports.default` is used as + * the value of `module.exports`. + * * If `exports.default` is not provided for a CommonJS or builtin mock, + * `module.exports` defaults to an empty object. + * * If named exports are provided with a non-object default export, the mock + * throws an exception when used as a CommonJS or builtin module. + */ + exports?: object | undefined; + /** + * An optional value used as the mocked module's default + * export. If this value is not provided, ESM mocks do not include a default + * export. If the mock is a CommonJS or builtin module, this setting is used as + * the value of `module.exports`. If this value is not provided, CJS and builtin + * mocks use an empty object as the value of `module.exports`. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports.default`. + * @deprecated */ defaultExport?: any; /** - * An object whose keys and values are used to create the named exports of the mock module. - * - * If the mock is a CommonJS or builtin module, these values are copied onto `module.exports`. - * Therefore, if a mock is created with both named exports and a non-object default export, - * the mock will throw an exception when used as a CJS or builtin module. + * An optional object whose keys and values are used to + * create the named exports of the mock module. If the mock is a CommonJS or + * builtin module, these values are copied onto `module.exports`. Therefore, if a + * mock is created with both named exports and a non-object default export, the + * mock will throw an exception when used as a CJS or builtin module. + * **This option cannot be used with `options.exports`.** + * This option is deprecated and will be removed in a later version. + * Prefer `options.exports`. + * @deprecated */ namedExports?: object | undefined; } @@ -1615,14 +1687,19 @@ declare module "node:test" { * [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--experimental-test-module-mocks) * command-line flag. * + * **Note**: [module customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks) registered via the **synchronous** API effect resolution of + * the `specifier` provided to `mock.module`. Customization hooks registered via the **asynchronous** + * API are currently ignored (because the test runner's loader is synchronous, and node does not + * support multi-chain / cross-chain loading). + * * The following example demonstrates how a mock is created for a module. * * ```js * test('mocks a builtin module in both module systems', async (t) => { - * // Create a mock of 'node:readline' with a named export named 'fn', which + * // Create a mock of 'node:readline' with a named export named 'foo', which * // does not exist in the original 'node:readline' module. * const mock = t.mock.module('node:readline', { - * namedExports: { fn() { return 42; } }, + * exports: { foo: () => 42 }, * }); * * let esmImpl = await import('node:readline'); diff --git a/node_modules/@types/node/test/reporters.d.ts b/node_modules/@types/node/test/reporters.d.ts index e04d669..55595f3 100644 --- a/node_modules/@types/node/test/reporters.d.ts +++ b/node_modules/@types/node/test/reporters.d.ts @@ -8,6 +8,7 @@ declare module "node:test/reporters" { | { type: "test:diagnostic"; data: EventData.TestDiagnostic } | { type: "test:enqueue"; data: EventData.TestEnqueue } | { type: "test:fail"; data: EventData.TestFail } + | { type: "test:interrupted"; data: EventData.TestInterrupted } | { type: "test:pass"; data: EventData.TestPass } | { type: "test:plan"; data: EventData.TestPlan } | { type: "test:start"; data: EventData.TestStart } diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts index a157660..c088541 100644 --- a/node_modules/@types/node/ts5.6/index.d.ts +++ b/node_modules/@types/node/ts5.6/index.d.ts @@ -97,6 +97,7 @@ /// /// /// +/// /// /// /// @@ -115,3 +116,4 @@ /// /// /// +/// diff --git a/node_modules/@types/node/ts5.7/index.d.ts b/node_modules/@types/node/ts5.7/index.d.ts index 32c541b..2510b2e 100644 --- a/node_modules/@types/node/ts5.7/index.d.ts +++ b/node_modules/@types/node/ts5.7/index.d.ts @@ -97,6 +97,7 @@ /// /// /// +/// /// /// /// @@ -115,3 +116,4 @@ /// /// /// +/// diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts index 8803a03..a464d82 100644 --- a/node_modules/@types/node/url.d.ts +++ b/node_modules/@types/node/url.d.ts @@ -229,9 +229,31 @@ declare module "node:url" { * * `result` is returned. * @since v0.1.25 * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. + * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). */ - function format(urlObject: UrlObject | string): string; + function format(urlObject: UrlObject): string; + /** + * `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`. + * + * Because it invokes the deprecated `url.parse()` internally, passing a string argument + * to `url.format()` is itself deprecated. + * + * Canonicalizing a URL string can be performed using the WHATWG URL API, by + * constructing a new URL object and calling `url.toString()`. + * + * ```js + * import { URL } from 'node:url'; + * + * const unformatted = 'http://[fe80:0:0:0:0:0:0:1]:/a/b?a=b#abc'; + * const formatted = new URL(unformatted).toString(); + * + * console.log(formatted); // Prints: http://[fe80::1]/a/b?a=b#abc + * ``` + * @since v0.1.25 + * @deprecated Use the WHATWG URL API instead. + * @param urlString A string that will be passed to `url.parse()` and then formatted. + */ + function format(urlString: string): string; /** * The `url.resolve()` method resolves a target URL relative to a base URL in a * manner similar to that of a web browser resolving an anchor tag. @@ -243,6 +265,8 @@ declare module "node:url" { * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' * ``` * + * Because it invokes the deprecated `url.parse()` internally, `url.resolve()` is itself deprecated. + * * To achieve the same result using the WHATWG URL API: * * ```js @@ -261,7 +285,7 @@ declare module "node:url" { * resolve('http://example.com/one', '/two'); // 'http://example.com/two' * ``` * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. + * @deprecated Use the WHATWG URL API instead. * @param from The base URL to use if `to` is a relative URL. * @param to The target URL to resolve. */ diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts index a349741..963078c 100644 --- a/node_modules/@types/node/vm.d.ts +++ b/node_modules/@types/node/vm.d.ts @@ -200,16 +200,16 @@ declare module "node:vm" { * The globals are contained in the `context` object. * * ```js - * import vm from 'node:vm'; + * import { createContext, Script } from 'node:vm'; * * const context = { * animal: 'cat', * count: 2, * }; * - * const script = new vm.Script('count += 1; name = "kitty";'); + * const script = new Script('count += 1; name = "kitty";'); * - * vm.createContext(context); + * createContext(context); * for (let i = 0; i < 10; ++i) { * script.runInContext(context); * } @@ -232,20 +232,21 @@ declare module "node:vm" { * * 1. Creates a new context. * 2. If `contextObject` is an object, contextifies it with the new context. - * If `contextObject` is undefined, creates a new object and contextifies it. + * If `contextObject` is undefined, creates a new object and contextifies it. * If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything. - * 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code - * does not have access to the scope in which this method is called. - * 4. Returns the result. + * 3. Compiles the code as a `vm.Script` + * 4. Runs the compiled code within the created context. The code does not have access to the scope in + * which this method is called. + * 5. Returns the result. * * The following example compiles code that sets a global variable, then executes * the code multiple times in different contexts. The globals are set on and * contained within each individual `context`. * * ```js - * const vm = require('node:vm'); + * import { constants, Script } from 'node:vm'; * - * const script = new vm.Script('globalVar = "set"'); + * const script = new Script('globalVar = "set"'); * * const contexts = [{}, {}, {}]; * contexts.forEach((context) => { @@ -256,10 +257,10 @@ declare module "node:vm" { * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }] * * // This would throw if the context is created from a contextified object. - * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary + * // constants.DONT_CONTEXTIFY allows creating contexts with ordinary * // global objects that can be frozen. - * const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;'); - * const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY); + * const freezeScript = new Script('Object.freeze(globalThis); globalThis;'); + * const frozenContext = freezeScript.runInNewContext(constants.DONT_CONTEXTIFY); * ``` * @since v0.3.1 * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified. @@ -278,11 +279,11 @@ declare module "node:vm" { * executes that code multiple times: * * ```js - * import vm from 'node:vm'; + * import { Script } from 'node:vm'; * * global.globalVar = 0; * - * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' }); + * const script = new Script('globalVar += 1', { filename: 'myfile.vm' }); * * for (let i = 0; i < 1000; ++i) { * script.runInThisContext(); @@ -371,14 +372,14 @@ declare module "node:vm" { * variables will remain unchanged. * * ```js - * const vm = require('node:vm'); + * import { createContext, runInContext } from 'node:vm'; * * global.globalVar = 3; * * const context = { globalVar: 1 }; - * vm.createContext(context); + * createContext(context); * - * vm.runInContext('globalVar *= 2;', context); + * runInContext('globalVar *= 2;', context); * * console.log(context); * // Prints: { globalVar: 2 } @@ -429,13 +430,13 @@ declare module "node:vm" { * The following example compiles and executes different scripts using a single `contextified` object: * * ```js - * import vm from 'node:vm'; + * import { createContext, runInContext } from 'node:vm'; * * const contextObject = { globalVar: 1 }; - * vm.createContext(contextObject); + * createContext(contextObject); * * for (let i = 0; i < 10; ++i) { - * vm.runInContext('globalVar *= 2;', contextObject); + * runInContext('globalVar *= 2;', contextObject); * } * console.log(contextObject); * // Prints: { globalVar: 1024 } @@ -466,21 +467,24 @@ declare module "node:vm" { * variable and sets a new one. These globals are contained in the `contextObject`. * * ```js - * const vm = require('node:vm'); + * import { runInNewContext, constants } from 'node:vm'; * * const contextObject = { * animal: 'cat', * count: 2, * }; * - * vm.runInNewContext('count += 1; name = "kitty"', contextObject); + * runInNewContext('count += 1; name = "kitty"', contextObject); * console.log(contextObject); * // Prints: { animal: 'cat', count: 3, name: 'kitty' } * * // This would throw if the context is created from a contextified object. * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that * // can be frozen. - * const frozenContext = vm.runInNewContext('Object.freeze(globalThis); globalThis;', vm.constants.DONT_CONTEXTIFY); + * const frozenContext = runInNewContext( + * 'Object.freeze(globalThis); globalThis;', + * constants.DONT_CONTEXTIFY, + * ); * ``` * @since v0.3.1 * @param code The JavaScript code to compile and run. @@ -504,10 +508,10 @@ declare module "node:vm" { * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code: * * ```js - * import vm from 'node:vm'; + * import { runInThisContext } from 'node:vm'; * let localVar = 'initial value'; * - * const vmResult = vm.runInThisContext('localVar = "vm";'); + * const vmResult = runInThisContext('localVar = "vm";'); * console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`); * // Prints: vmResult: 'vm', localVar: 'initial value' * @@ -519,38 +523,6 @@ declare module "node:vm" { * Because `vm.runInThisContext()` does not have access to the local scope, `localVar` is unchanged. In contrast, * [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the * local scope, so the value `localVar` is changed. In this way `vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`. - * - * ## Example: Running an HTTP server within a VM - * - * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global - * context. The code passed to this VM context will have its own isolated scope. - * - * In order to run a simple web server using the `node:http` module the code passed - * to the context must either import `node:http` on its own, or have a - * reference to the `node:http` module passed to it. For instance: - * - * ```js - * 'use strict'; - * import vm from 'node:vm'; - * - * const code = ` - * ((require) => { - * const http = require('node:http'); - * - * http.createServer((request, response) => { - * response.writeHead(200, { 'Content-Type': 'text/plain' }); - * response.end('Hello World\\n'); - * }).listen(8124); - * - * console.log('Server running at http://127.0.0.1:8124/'); - * })`; - * - * vm.runInThisContext(code)(require); - * ``` - * - * The `require()` in the above case shares the state with the context it is - * passed from. This may introduce risks when untrusted code is executed, e.g. - * altering objects in the context in unwanted ways. * @since v0.3.1 * @param code The JavaScript code to compile and run. * @return the result of the very last statement executed in the script. @@ -582,44 +554,32 @@ declare module "node:vm" { * the memory occupied by each heap space in the current V8 instance. * * ```js - * import vm from 'node:vm'; + * import { createContext, measureMemory } from 'node:vm'; * // Measure the memory used by the main context. - * vm.measureMemory({ mode: 'summary' }) + * measureMemory({ mode: 'summary' }) * // This is the same as vm.measureMemory() * .then((result) => { * // The current format is: * // { - * // total: { - * // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ] - * // } + * // total: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] }, + * // WebAssembly: { code: 0, metadata: 33962 }, * // } * console.log(result); * }); * - * const context = vm.createContext({ a: 1 }); - * vm.measureMemory({ mode: 'detailed', execution: 'eager' }) - * .then((result) => { - * // Reference the context here so that it won't be GC'ed - * // until the measurement is complete. - * console.log(context.a); - * // { - * // total: { - * // jsMemoryEstimate: 2574732, - * // jsMemoryRange: [ 2574732, 2904372 ] - * // }, - * // current: { - * // jsMemoryEstimate: 2438996, - * // jsMemoryRange: [ 2438996, 2768636 ] - * // }, - * // other: [ - * // { - * // jsMemoryEstimate: 135736, - * // jsMemoryRange: [ 135736, 465376 ] - * // } - * // ] - * // } - * console.log(result); - * }); + * const context = createContext({ a: 1 }); + * measureMemory({ mode: 'detailed', execution: 'eager' }).then((result) => { + * // Reference the context here so that it won't be GC'ed + * // until the measurement is complete. + * console.log('Context:', context.a); + * // { + * // total: { jsMemoryEstimate: 1767100, jsMemoryRange: [1767100, 5440560] }, + * // WebAssembly: { code: 0, metadata: 33962 }, + * // current: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] }, + * // other: [{ jsMemoryEstimate: 165272, jsMemoryRange: [Array] }], + * // } + * console.log(result); + * }); * ``` * @since v13.10.0 * @experimental @@ -1092,15 +1052,21 @@ declare module "node:vm" { * module graphs. * * ```js - * import vm from 'node:vm'; + * import { SyntheticModule } from 'node:vm'; * * const source = '{ "a": 1 }'; - * const module = new vm.SyntheticModule(['default'], function() { + * const syntheticModule = new SyntheticModule(['default'], function() { * const obj = JSON.parse(source); * this.setExport('default', obj); * }); * - * // Use `module` in linking... + * // Use `syntheticModule` in linking + * (async () => { + * await syntheticModule.link(() => {}); + * await syntheticModule.evaluate(); + * + * console.log('Default export:', syntheticModule.namespace.default); + * })(); * ``` * @since v13.0.0, v12.16.0 * @experimental diff --git a/node_modules/@types/node/zlib/iter.d.ts b/node_modules/@types/node/zlib/iter.d.ts new file mode 100644 index 0000000..085bea5 --- /dev/null +++ b/node_modules/@types/node/zlib/iter.d.ts @@ -0,0 +1,131 @@ +declare module "node:zlib/iter" { + import { StatefulTransform, SyncStatefulTransform } from "node:stream/iter"; + interface BrotliOptions { + chunkSize?: number | undefined; + params?: { [key: number]: number | boolean } | undefined; + dictionary?: NodeJS.ArrayBufferView | undefined; + } + interface ZlibOptions { + chunkSize?: number | undefined; + windowBits?: number | undefined; + dictionary?: NodeJS.ArrayBufferView | undefined; + } + interface ZlibCompressionOptions extends ZlibOptions { + level?: number | undefined; + memLevel?: number | undefined; + strategy?: number | undefined; + } + interface ZstdOptions { + chunkSize?: number | undefined; + params?: { [key: number]: number | boolean } | undefined; + dictionary?: NodeJS.ArrayBufferView | undefined; + } + interface ZstdCompressionOptions extends ZstdOptions { + pledgedSrcSize?: number | undefined; + } + /** + * Create a Brotli compression transform. Output is compatible with + * `zlib.brotliDecompress()` and `decompressBrotli()`/`decompressBrotliSync()`. + * @since v25.9.0 + * @returns A stateful transform. + */ + function compressBrotli(options?: BrotliOptions): StatefulTransform; + /** + * Create a Brotli compression transform. Output is compatible with + * `zlib.brotliDecompress()` and `decompressBrotli()`/`decompressBrotliSync()`. + * @since v25.9.0 + * @returns A stateful transform. + */ + function compressBrotliSync(options?: BrotliOptions): SyncStatefulTransform; + /** + * Create a deflate compression transform. Output is compatible with + * `zlib.inflate()` and `decompressDeflate()`/`decompressDeflateSync()`. + * @since v25.9.0 + * @returns A stateful transform. + */ + function compressDeflate(options?: ZlibCompressionOptions): StatefulTransform; + /** + * Create a deflate compression transform. Output is compatible with + * `zlib.inflate()` and `decompressDeflate()`/`decompressDeflateSync()`. + * @since v25.9.0 + * @returns A stateful transform. + */ + function compressDeflateSync(options?: ZlibCompressionOptions): SyncStatefulTransform; + /** + * Create a gzip compression transform. Output is compatible with `zlib.gunzip()` + * and `decompressGzip()`/`decompressGzipSync()`. + * @returns A stateful transform. + */ + function compressGzip(options?: ZlibCompressionOptions): StatefulTransform; + /** + * Create a gzip compression transform. Output is compatible with `zlib.gunzip()` + * and `decompressGzip()`/`decompressGzipSync()`. + * @returns A stateful transform. + */ + function compressGzipSync(options?: ZlibCompressionOptions): SyncStatefulTransform; + /** + * Create a Zstandard compression transform. Output is compatible with + * `zlib.zstdDecompress()` and `decompressZstd()`/`decompressZstdSync()`. + * @since v25.9.0 + * @returns A stateful transform. + */ + function compressZstd(options?: ZstdCompressionOptions): StatefulTransform; + /** + * Create a Zstandard compression transform. Output is compatible with + * `zlib.zstdDecompress()` and `decompressZstd()`/`decompressZstdSync()`. + * @since v25.9.0 + * @returns A stateful transform. + */ + function compressZstdSync(options?: ZstdCompressionOptions): SyncStatefulTransform; + /** + * Create a Brotli decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressBrotli(options?: BrotliOptions): StatefulTransform; + /** + * Create a Brotli decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressBrotliSync(options?: BrotliOptions): SyncStatefulTransform; + /** + * Create a deflate decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressDeflate(options?: ZlibOptions): StatefulTransform; + /** + * Create a deflate decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressDeflateSync(options?: ZlibOptions): SyncStatefulTransform; + /** + * Create a gzip decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressGzip(options?: ZlibOptions): StatefulTransform; + /** + * Create a gzip decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressGzipSync(options?: ZlibOptions): SyncStatefulTransform; + /** + * Create a Zstandard decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressZstd(options?: ZstdOptions): StatefulTransform; + /** + * Create a Zstandard decompression transform. + * @since v25.9.0 + * @returns A stateful transform. + */ + function decompressZstdSync(options?: ZstdOptions): SyncStatefulTransform; +} +declare module "zlib/iter" { + export * from "node:zlib/iter"; +} diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md new file mode 100644 index 0000000..dc39ed6 --- /dev/null +++ b/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,216 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [2.0.1] - 2020-08-29 +### Fixed +- Fix issue with `process.argv` when used with interpreters (`coffee`, `ts-node`, etc.), #150. + + +## [2.0.0] - 2020-08-14 +### Changed +- Full rewrite. Now port from python 3.9.0 & more precise following. + See [doc](./doc) for difference and migration info. +- node.js 10+ required +- Removed most of local docs in favour of original ones. + + +## [1.0.10] - 2018-02-15 +### Fixed +- Use .concat instead of + for arrays, #122. + + +## [1.0.9] - 2016-09-29 +### Changed +- Rerelease after 1.0.8 - deps cleanup. + + +## [1.0.8] - 2016-09-29 +### Changed +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +## [1.0.7] - 2016-03-17 +### Changed +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +## [1.0.6] - 2016-02-06 +### Changed +- Maintenance: moved to eslint & updated CS. + + +## [1.0.5] - 2016-02-05 +### Changed +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +## [1.0.4] - 2016-01-17 +### Changed +- Maintenance: lodash update to 4.0.0. + + +## [1.0.3] - 2015-10-27 +### Fixed +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +## [1.0.2] - 2015-03-22 +### Changed +- Relaxed lodash version dependency. + + +## [1.0.1] - 2015-02-20 +### Changed +- Changed dependencies to be compatible with ancient nodejs. + + +## [1.0.0] - 2015-02-19 +### Changed +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +## [0.1.16] - 2013-12-01 +### Changed +- Maintenance release. Updated dependencies and docs. + + +## [0.1.15] - 2013-05-13 +### Fixed +- Fixed #55, @trebor89 + + +## [0.1.14] - 2013-05-12 +### Fixed +- Fixed #62, @maxtaco + + +## [0.1.13] - 2013-04-08 +### Changed +- Added `.npmignore` to reduce package size + + +## [0.1.12] - 2013-02-10 +### Fixed +- Fixed conflictHandler (#46), @hpaulj + + +## [0.1.11] - 2013-02-07 +### Added +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + +### Fixed +- Multiple bugfixes, @hpaulj + + +## [0.1.10] - 2012-12-30 +### Added +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj + +### Fixed +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +## [0.1.9] - 2012-12-27 +### Fixed +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Improve negative argument parsing, thanks to @hpaulj + + +## [0.1.8] - 2012-12-01 +### Fixed +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +## [0.1.7] - 2012-10-14 +### Fixed +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +## [0.1.6] - 2012-09-09 +### Fixed +- Fixed check for conflict of options (thanks to @tomxtobin) + + +## [0.1.5] - 2012-09-03 +### Fixed +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +## [0.1.4] - 2012-07-30 +### Fixed +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +## [0.1.3] - 2012-06-27 +### Fixed +- Fixed formatter api name: Formatter -> HelpFormatter + + +## [0.1.2] - 2012-05-29 +### Fixed +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + +### Added +- Added basic tests + + +## [0.1.1] - 2012-05-23 +### Fixed +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +## [0.1.0] - 2012-05-16 +### Added +- First release. + + +[2.0.1]: https://github.com/nodeca/argparse/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/argparse/compare/1.0.10...2.0.0 +[1.0.10]: https://github.com/nodeca/argparse/compare/1.0.9...1.0.10 +[1.0.9]: https://github.com/nodeca/argparse/compare/1.0.8...1.0.9 +[1.0.8]: https://github.com/nodeca/argparse/compare/1.0.7...1.0.8 +[1.0.7]: https://github.com/nodeca/argparse/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/nodeca/argparse/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/nodeca/argparse/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/nodeca/argparse/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/nodeca/argparse/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/argparse/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/argparse/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/argparse/compare/0.1.16...1.0.0 +[0.1.16]: https://github.com/nodeca/argparse/compare/0.1.15...0.1.16 +[0.1.15]: https://github.com/nodeca/argparse/compare/0.1.14...0.1.15 +[0.1.14]: https://github.com/nodeca/argparse/compare/0.1.13...0.1.14 +[0.1.13]: https://github.com/nodeca/argparse/compare/0.1.12...0.1.13 +[0.1.12]: https://github.com/nodeca/argparse/compare/0.1.11...0.1.12 +[0.1.11]: https://github.com/nodeca/argparse/compare/0.1.10...0.1.11 +[0.1.10]: https://github.com/nodeca/argparse/compare/0.1.9...0.1.10 +[0.1.9]: https://github.com/nodeca/argparse/compare/0.1.8...0.1.9 +[0.1.8]: https://github.com/nodeca/argparse/compare/0.1.7...0.1.8 +[0.1.7]: https://github.com/nodeca/argparse/compare/0.1.6...0.1.7 +[0.1.6]: https://github.com/nodeca/argparse/compare/0.1.5...0.1.6 +[0.1.5]: https://github.com/nodeca/argparse/compare/0.1.4...0.1.5 +[0.1.4]: https://github.com/nodeca/argparse/compare/0.1.3...0.1.4 +[0.1.3]: https://github.com/nodeca/argparse/compare/0.1.2...0.1.3 +[0.1.2]: https://github.com/nodeca/argparse/compare/0.1.1...0.1.2 +[0.1.1]: https://github.com/nodeca/argparse/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/nodeca/argparse/releases/tag/0.1.0 diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE new file mode 100644 index 0000000..66a3ac8 --- /dev/null +++ b/node_modules/argparse/LICENSE @@ -0,0 +1,254 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/argparse/README.md b/node_modules/argparse/README.md new file mode 100644 index 0000000..550b5c9 --- /dev/null +++ b/node_modules/argparse/README.md @@ -0,0 +1,84 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js, with [sub-commands](https://docs.python.org/3.9/library/argparse.html#sub-commands) support. Port of python's [argparse](http://docs.python.org/dev/library/argparse.html) (version [3.9.0](https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py)). + +**Difference with original.** + +- JS has no keyword arguments support. + - Pass options instead: `new ArgumentParser({ description: 'example', add_help: true })`. +- JS has no python's types `int`, `float`, ... + - Use string-typed names: `.add_argument('-b', { type: 'int', help: 'help' })`. +- `%r` format specifier uses `require('util').inspect()`. + +More details in [doc](./doc). + + +Example +------- + +`test.js` file: + +```javascript +#!/usr/bin/env node +'use strict'; + +const { ArgumentParser } = require('argparse'); +const { version } = require('./package.json'); + +const parser = new ArgumentParser({ + description: 'Argparse example' +}); + +parser.add_argument('-v', '--version', { action: 'version', version }); +parser.add_argument('-f', '--foo', { help: 'foo bar' }); +parser.add_argument('-b', '--bar', { help: 'bar foo' }); +parser.add_argument('--baz', { help: 'baz bar' }); + +console.dir(parser.parse_args()); +``` + +Display help: + +``` +$ ./test.js -h +usage: test.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + + +API docs +-------- + +Since this is a port with minimal divergence, there's no separate documentation. +Use original one instead, with notes about difference. + +1. [Original doc](https://docs.python.org/3.9/library/argparse.html). +2. [Original tutorial](https://docs.python.org/3.9/howto/argparse.html). +3. [Difference with python](./doc). + + +argparse for enterprise +----------------------- + +Available as part of the Tidelift Subscription + +The maintainers of argparse and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-argparse?utm_source=npm-argparse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/argparse/argparse.js b/node_modules/argparse/argparse.js new file mode 100644 index 0000000..2b8c8c6 --- /dev/null +++ b/node_modules/argparse/argparse.js @@ -0,0 +1,3707 @@ +// Port of python's argparse module, version 3.9.0: +// https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py + +'use strict' + +// Copyright (C) 2010-2020 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors + +/* + * Command-line parsing library + * + * This module is an optparse-inspired command-line parsing library that: + * + * - handles both optional and positional arguments + * - produces highly informative usage messages + * - supports parsers that dispatch to sub-parsers + * + * The following is a simple usage example that sums integers from the + * command-line and writes the result to a file:: + * + * parser = argparse.ArgumentParser( + * description='sum the integers at the command line') + * parser.add_argument( + * 'integers', metavar='int', nargs='+', type=int, + * help='an integer to be summed') + * parser.add_argument( + * '--log', default=sys.stdout, type=argparse.FileType('w'), + * help='the file where the sum should be written') + * args = parser.parse_args() + * args.log.write('%s' % sum(args.integers)) + * args.log.close() + * + * The module contains the following public classes: + * + * - ArgumentParser -- The main entry point for command-line parsing. As the + * example above shows, the add_argument() method is used to populate + * the parser with actions for optional and positional arguments. Then + * the parse_args() method is invoked to convert the args at the + * command-line into an object with attributes. + * + * - ArgumentError -- The exception raised by ArgumentParser objects when + * there are errors with the parser's actions. Errors raised while + * parsing the command-line are caught by ArgumentParser and emitted + * as command-line messages. + * + * - FileType -- A factory for defining types of files to be created. As the + * example above shows, instances of FileType are typically passed as + * the type= argument of add_argument() calls. + * + * - Action -- The base class for parser actions. Typically actions are + * selected by passing strings like 'store_true' or 'append_const' to + * the action= argument of add_argument(). However, for greater + * customization of ArgumentParser actions, subclasses of Action may + * be defined and passed as the action= argument. + * + * - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, + * ArgumentDefaultsHelpFormatter -- Formatter classes which + * may be passed as the formatter_class= argument to the + * ArgumentParser constructor. HelpFormatter is the default, + * RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser + * not to change the formatting for help text, and + * ArgumentDefaultsHelpFormatter adds information about argument defaults + * to the help. + * + * All other classes in this module are considered implementation details. + * (Also note that HelpFormatter and RawDescriptionHelpFormatter are only + * considered public as object names -- the API of the formatter objects is + * still considered an implementation detail.) + */ + +const SUPPRESS = '==SUPPRESS==' + +const OPTIONAL = '?' +const ZERO_OR_MORE = '*' +const ONE_OR_MORE = '+' +const PARSER = 'A...' +const REMAINDER = '...' +const _UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args' + + +// ================================== +// Utility functions used for porting +// ================================== +const assert = require('assert') +const util = require('util') +const fs = require('fs') +const sub = require('./lib/sub') +const path = require('path') +const repr = util.inspect + +function get_argv() { + // omit first argument (which is assumed to be interpreter - `node`, `coffee`, `ts-node`, etc.) + return process.argv.slice(1) +} + +function get_terminal_size() { + return { + columns: +process.env.COLUMNS || process.stdout.columns || 80 + } +} + +function hasattr(object, name) { + return Object.prototype.hasOwnProperty.call(object, name) +} + +function getattr(object, name, value) { + return hasattr(object, name) ? object[name] : value +} + +function setattr(object, name, value) { + object[name] = value +} + +function setdefault(object, name, value) { + if (!hasattr(object, name)) object[name] = value + return object[name] +} + +function delattr(object, name) { + delete object[name] +} + +function range(from, to, step=1) { + // range(10) is equivalent to range(0, 10) + if (arguments.length === 1) [ to, from ] = [ from, 0 ] + if (typeof from !== 'number' || typeof to !== 'number' || typeof step !== 'number') { + throw new TypeError('argument cannot be interpreted as an integer') + } + if (step === 0) throw new TypeError('range() arg 3 must not be zero') + + let result = [] + if (step > 0) { + for (let i = from; i < to; i += step) result.push(i) + } else { + for (let i = from; i > to; i += step) result.push(i) + } + return result +} + +function splitlines(str, keepends = false) { + let result + if (!keepends) { + result = str.split(/\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029]/) + } else { + result = [] + let parts = str.split(/(\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029])/) + for (let i = 0; i < parts.length; i += 2) { + result.push(parts[i] + (i + 1 < parts.length ? parts[i + 1] : '')) + } + } + if (!result[result.length - 1]) result.pop() + return result +} + +function _string_lstrip(string, prefix_chars) { + let idx = 0 + while (idx < string.length && prefix_chars.includes(string[idx])) idx++ + return idx ? string.slice(idx) : string +} + +function _string_split(string, sep, maxsplit) { + let result = string.split(sep) + if (result.length > maxsplit) { + result = result.slice(0, maxsplit).concat([ result.slice(maxsplit).join(sep) ]) + } + return result +} + +function _array_equal(array1, array2) { + if (array1.length !== array2.length) return false + for (let i = 0; i < array1.length; i++) { + if (array1[i] !== array2[i]) return false + } + return true +} + +function _array_remove(array, item) { + let idx = array.indexOf(item) + if (idx === -1) throw new TypeError(sub('%r not in list', item)) + array.splice(idx, 1) +} + +// normalize choices to array; +// this isn't required in python because `in` and `map` operators work with anything, +// but in js dealing with multiple types here is too clunky +function _choices_to_array(choices) { + if (choices === undefined) { + return [] + } else if (Array.isArray(choices)) { + return choices + } else if (choices !== null && typeof choices[Symbol.iterator] === 'function') { + return Array.from(choices) + } else if (typeof choices === 'object' && choices !== null) { + return Object.keys(choices) + } else { + throw new Error(sub('invalid choices value: %r', choices)) + } +} + +// decorator that allows a class to be called without new +function _callable(cls) { + let result = { // object is needed for inferred class name + [cls.name]: function (...args) { + let this_class = new.target === result || !new.target + return Reflect.construct(cls, args, this_class ? cls : new.target) + } + } + result[cls.name].prototype = cls.prototype + // fix default tag for toString, e.g. [object Action] instead of [object Object] + cls.prototype[Symbol.toStringTag] = cls.name + return result[cls.name] +} + +function _alias(object, from, to) { + try { + let name = object.constructor.name + Object.defineProperty(object, from, { + value: util.deprecate(object[to], sub('%s.%s() is renamed to %s.%s()', + name, from, name, to)), + enumerable: false + }) + } catch {} +} + +// decorator that allows snake_case class methods to be called with camelCase and vice versa +function _camelcase_alias(_class) { + for (let name of Object.getOwnPropertyNames(_class.prototype)) { + let camelcase = name.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (camelcase !== name) _alias(_class.prototype, camelcase, name) + } + return _class +} + +function _to_legacy_name(key) { + key = key.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (key === 'default') key = 'defaultValue' + if (key === 'const') key = 'constant' + return key +} + +function _to_new_name(key) { + if (key === 'defaultValue') key = 'default' + if (key === 'constant') key = 'const' + key = key.replace(/[A-Z]/g, c => '_' + c.toLowerCase()) + return key +} + +// parse options +let no_default = Symbol('no_default_value') +function _parse_opts(args, descriptor) { + function get_name() { + let stack = new Error().stack.split('\n') + .map(x => x.match(/^ at (.*) \(.*\)$/)) + .filter(Boolean) + .map(m => m[1]) + .map(fn => fn.match(/[^ .]*$/)[0]) + + if (stack.length && stack[0] === get_name.name) stack.shift() + if (stack.length && stack[0] === _parse_opts.name) stack.shift() + return stack.length ? stack[0] : '' + } + + args = Array.from(args) + let kwargs = {} + let result = [] + let last_opt = args.length && args[args.length - 1] + + if (typeof last_opt === 'object' && last_opt !== null && !Array.isArray(last_opt) && + (!last_opt.constructor || last_opt.constructor.name === 'Object')) { + kwargs = Object.assign({}, args.pop()) + } + + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(descriptor)) { + let old_name = _to_legacy_name(key) + if (old_name !== key && (old_name in kwargs)) { + if (key in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else { + kwargs[key] = kwargs[old_name] + } + renames.push([ old_name, key ]) + delete kwargs[old_name] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + + let missing_positionals = [] + let positional_count = args.length + + for (let [ key, def ] of Object.entries(descriptor)) { + if (key[0] === '*') { + if (key.length > 0 && key[1] === '*') { + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(kwargs)) { + let new_name = _to_new_name(key) + if (new_name !== key && (key in kwargs)) { + if (new_name in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), new_name)) + } else { + kwargs[new_name] = kwargs[key] + } + renames.push([ key, new_name ]) + delete kwargs[key] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + result.push(kwargs) + kwargs = {} + } else { + result.push(args) + args = [] + } + } else if (key in kwargs && args.length > 0) { + throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else if (key in kwargs) { + result.push(kwargs[key]) + delete kwargs[key] + } else if (args.length > 0) { + result.push(args.shift()) + } else if (def !== no_default) { + result.push(def) + } else { + missing_positionals.push(key) + } + } + + if (Object.keys(kwargs).length) { + throw new TypeError(sub('%s() got an unexpected keyword argument %r', + get_name(), Object.keys(kwargs)[0])) + } + + if (args.length) { + let from = Object.entries(descriptor).filter(([ k, v ]) => k[0] !== '*' && v !== no_default).length + let to = Object.entries(descriptor).filter(([ k ]) => k[0] !== '*').length + throw new TypeError(sub('%s() takes %s positional argument%s but %s %s given', + get_name(), + from === to ? sub('from %s to %s', from, to) : to, + from === to && to === 1 ? '' : 's', + positional_count, + positional_count === 1 ? 'was' : 'were')) + } + + if (missing_positionals.length) { + let strs = missing_positionals.map(repr) + if (strs.length > 1) strs[strs.length - 1] = 'and ' + strs[strs.length - 1] + let str_joined = strs.join(strs.length === 2 ? '' : ', ') + throw new TypeError(sub('%s() missing %i required positional argument%s: %s', + get_name(), strs.length, strs.length === 1 ? '' : 's', str_joined)) + } + + return result +} + +let _deprecations = {} +function deprecate(id, string) { + _deprecations[id] = _deprecations[id] || util.deprecate(() => {}, string) + _deprecations[id]() +} + + +// ============================= +// Utility functions and classes +// ============================= +function _AttributeHolder(cls = Object) { + /* + * Abstract base class that provides __repr__. + * + * The __repr__ method returns a string in the format:: + * ClassName(attr=name, attr=name, ...) + * The attributes are determined either by a class-level attribute, + * '_kwarg_names', or by inspecting the instance __dict__. + */ + + return class _AttributeHolder extends cls { + [util.inspect.custom]() { + let type_name = this.constructor.name + let arg_strings = [] + let star_args = {} + for (let arg of this._get_args()) { + arg_strings.push(repr(arg)) + } + for (let [ name, value ] of this._get_kwargs()) { + if (/^[a-z_][a-z0-9_$]*$/i.test(name)) { + arg_strings.push(sub('%s=%r', name, value)) + } else { + star_args[name] = value + } + } + if (Object.keys(star_args).length) { + arg_strings.push(sub('**%s', repr(star_args))) + } + return sub('%s(%s)', type_name, arg_strings.join(', ')) + } + + toString() { + return this[util.inspect.custom]() + } + + _get_kwargs() { + return Object.entries(this) + } + + _get_args() { + return [] + } + } +} + + +function _copy_items(items) { + if (items === undefined) { + return [] + } + return items.slice(0) +} + + +// =============== +// Formatting Help +// =============== +const HelpFormatter = _camelcase_alias(_callable(class HelpFormatter { + /* + * Formatter for generating usage messages and argument help strings. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + constructor() { + let [ + prog, + indent_increment, + max_help_position, + width + ] = _parse_opts(arguments, { + prog: no_default, + indent_increment: 2, + max_help_position: 24, + width: undefined + }) + + // default setting for width + if (width === undefined) { + width = get_terminal_size().columns + width -= 2 + } + + this._prog = prog + this._indent_increment = indent_increment + this._max_help_position = Math.min(max_help_position, + Math.max(width - 20, indent_increment * 2)) + this._width = width + + this._current_indent = 0 + this._level = 0 + this._action_max_length = 0 + + this._root_section = this._Section(this, undefined) + this._current_section = this._root_section + + this._whitespace_matcher = /[ \t\n\r\f\v]+/g // equivalent to python /\s+/ with ASCII flag + this._long_break_matcher = /\n\n\n+/g + } + + // =============================== + // Section and indentation methods + // =============================== + _indent() { + this._current_indent += this._indent_increment + this._level += 1 + } + + _dedent() { + this._current_indent -= this._indent_increment + assert(this._current_indent >= 0, 'Indent decreased below 0.') + this._level -= 1 + } + + _add_item(func, args) { + this._current_section.items.push([ func, args ]) + } + + // ======================== + // Message building methods + // ======================== + start_section(heading) { + this._indent() + let section = this._Section(this, this._current_section, heading) + this._add_item(section.format_help.bind(section), []) + this._current_section = section + } + + end_section() { + this._current_section = this._current_section.parent + this._dedent() + } + + add_text(text) { + if (text !== SUPPRESS && text !== undefined) { + this._add_item(this._format_text.bind(this), [text]) + } + } + + add_usage(usage, actions, groups, prefix = undefined) { + if (usage !== SUPPRESS) { + let args = [ usage, actions, groups, prefix ] + this._add_item(this._format_usage.bind(this), args) + } + } + + add_argument(action) { + if (action.help !== SUPPRESS) { + + // find all invocations + let invocations = [this._format_action_invocation(action)] + for (let subaction of this._iter_indented_subactions(action)) { + invocations.push(this._format_action_invocation(subaction)) + } + + // update the maximum item length + let invocation_length = Math.max(...invocations.map(invocation => invocation.length)) + let action_length = invocation_length + this._current_indent + this._action_max_length = Math.max(this._action_max_length, + action_length) + + // add the item to the list + this._add_item(this._format_action.bind(this), [action]) + } + } + + add_arguments(actions) { + for (let action of actions) { + this.add_argument(action) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_help() { + let help = this._root_section.format_help() + if (help) { + help = help.replace(this._long_break_matcher, '\n\n') + help = help.replace(/^\n+|\n+$/g, '') + '\n' + } + return help + } + + _join_parts(part_strings) { + return part_strings.filter(part => part && part !== SUPPRESS).join('') + } + + _format_usage(usage, actions, groups, prefix) { + if (prefix === undefined) { + prefix = 'usage: ' + } + + // if usage is specified, use that + if (usage !== undefined) { + usage = sub(usage, { prog: this._prog }) + + // if no optionals or positionals are available, usage is just prog + } else if (usage === undefined && !actions.length) { + usage = sub('%(prog)s', { prog: this._prog }) + + // if optionals and positionals are available, calculate usage + } else if (usage === undefined) { + let prog = sub('%(prog)s', { prog: this._prog }) + + // split optionals from positionals + let optionals = [] + let positionals = [] + for (let action of actions) { + if (action.option_strings.length) { + optionals.push(action) + } else { + positionals.push(action) + } + } + + // build full usage string + let action_usage = this._format_actions_usage([].concat(optionals).concat(positionals), groups) + usage = [ prog, action_usage ].map(String).join(' ') + + // wrap the usage parts if it's too long + let text_width = this._width - this._current_indent + if (prefix.length + usage.length > text_width) { + + // break usage into wrappable parts + let part_regexp = /\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+/g + let opt_usage = this._format_actions_usage(optionals, groups) + let pos_usage = this._format_actions_usage(positionals, groups) + let opt_parts = opt_usage.match(part_regexp) || [] + let pos_parts = pos_usage.match(part_regexp) || [] + assert(opt_parts.join(' ') === opt_usage) + assert(pos_parts.join(' ') === pos_usage) + + // helper for wrapping lines + let get_lines = (parts, indent, prefix = undefined) => { + let lines = [] + let line = [] + let line_len + if (prefix !== undefined) { + line_len = prefix.length - 1 + } else { + line_len = indent.length - 1 + } + for (let part of parts) { + if (line_len + 1 + part.length > text_width && line) { + lines.push(indent + line.join(' ')) + line = [] + line_len = indent.length - 1 + } + line.push(part) + line_len += part.length + 1 + } + if (line.length) { + lines.push(indent + line.join(' ')) + } + if (prefix !== undefined) { + lines[0] = lines[0].slice(indent.length) + } + return lines + } + + let lines + + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * text_width) { + let indent = ' '.repeat(prefix.length + prog.length + 1) + if (opt_parts.length) { + lines = get_lines([prog].concat(opt_parts), indent, prefix) + lines = lines.concat(get_lines(pos_parts, indent)) + } else if (pos_parts.length) { + lines = get_lines([prog].concat(pos_parts), indent, prefix) + } else { + lines = [prog] + } + + // if prog is long, put it on its own line + } else { + let indent = ' '.repeat(prefix.length) + let parts = [].concat(opt_parts).concat(pos_parts) + lines = get_lines(parts, indent) + if (lines.length > 1) { + lines = [] + lines = lines.concat(get_lines(opt_parts, indent)) + lines = lines.concat(get_lines(pos_parts, indent)) + } + lines = [prog].concat(lines) + } + + // join lines into usage + usage = lines.join('\n') + } + } + + // prefix with 'usage:' + return sub('%s%s\n\n', prefix, usage) + } + + _format_actions_usage(actions, groups) { + // find group indices and identify actions in groups + let group_actions = new Set() + let inserts = {} + for (let group of groups) { + let start = actions.indexOf(group._group_actions[0]) + if (start === -1) { + continue + } else { + let end = start + group._group_actions.length + if (_array_equal(actions.slice(start, end), group._group_actions)) { + for (let action of group._group_actions) { + group_actions.add(action) + } + if (!group.required) { + if (start in inserts) { + inserts[start] += ' [' + } else { + inserts[start] = '[' + } + if (end in inserts) { + inserts[end] += ']' + } else { + inserts[end] = ']' + } + } else { + if (start in inserts) { + inserts[start] += ' (' + } else { + inserts[start] = '(' + } + if (end in inserts) { + inserts[end] += ')' + } else { + inserts[end] = ')' + } + } + for (let i of range(start + 1, end)) { + inserts[i] = '|' + } + } + } + } + + // collect all actions format strings + let parts = [] + for (let [ i, action ] of Object.entries(actions)) { + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === SUPPRESS) { + parts.push(undefined) + if (inserts[+i] === '|') { + delete inserts[+i] + } else if (inserts[+i + 1] === '|') { + delete inserts[+i + 1] + } + + // produce all arg strings + } else if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let part = this._format_args(action, default_value) + + // if it's in a group, strip the outer [] + if (group_actions.has(action)) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1) + } + } + + // add the action string to the list + parts.push(part) + + // produce the first way to invoke the option in brackets + } else { + let option_string = action.option_strings[0] + let part + + // if the Optional doesn't take a value, format is: + // -s or --long + if (action.nargs === 0) { + part = action.format_usage() + + // if the Optional takes a value, format is: + // -s ARGS or --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + part = sub('%s %s', option_string, args_string) + } + + // make it look optional if it's not required or in a group + if (!action.required && !group_actions.has(action)) { + part = sub('[%s]', part) + } + + // add the action string to the list + parts.push(part) + } + } + + // insert things at the necessary indices + for (let i of Object.keys(inserts).map(Number).sort((a, b) => b - a)) { + parts.splice(+i, 0, inserts[+i]) + } + + // join all the action items with spaces + let text = parts.filter(Boolean).join(' ') + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1') + text = text.replace(/ ([\])])/g, '$1') + text = text.replace(/[\[(] *[\])]/g, '') + text = text.replace(/\(([^|]*)\)/g, '$1', text) + text = text.trim() + + // return the text + return text + } + + _format_text(text) { + if (text.includes('%(prog)')) { + text = sub(text, { prog: this._prog }) + } + let text_width = Math.max(this._width - this._current_indent, 11) + let indent = ' '.repeat(this._current_indent) + return this._fill_text(text, text_width, indent) + '\n\n' + } + + _format_action(action) { + // determine the required width and the entry label + let help_position = Math.min(this._action_max_length + 2, + this._max_help_position) + let help_width = Math.max(this._width - help_position, 11) + let action_width = help_position - this._current_indent - 2 + let action_header = this._format_action_invocation(action) + let indent_first + + // no help; start on same line and add a final newline + if (!action.help) { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + + // short action name; start on the same line and pad two spaces + } else if (action_header.length <= action_width) { + let tup = [ this._current_indent, '', action_width, action_header ] + action_header = sub('%*s%-*s ', ...tup) + indent_first = 0 + + // long action name; start on the next line + } else { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + indent_first = help_position + } + + // collect the pieces of the action help + let parts = [action_header] + + // if there was help for the action, add lines of help text + if (action.help) { + let help_text = this._expand_help(action) + let help_lines = this._split_lines(help_text, help_width) + parts.push(sub('%*s%s\n', indent_first, '', help_lines[0])) + for (let line of help_lines.slice(1)) { + parts.push(sub('%*s%s\n', help_position, '', line)) + } + + // or add a newline if the description doesn't end with one + } else if (!action_header.endsWith('\n')) { + parts.push('\n') + } + + // if there are any sub-actions, add their help as well + for (let subaction of this._iter_indented_subactions(action)) { + parts.push(this._format_action(subaction)) + } + + // return a single string + return this._join_parts(parts) + } + + _format_action_invocation(action) { + if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let metavar = this._metavar_formatter(action, default_value)(1)[0] + return metavar + + } else { + let parts = [] + + // if the Optional doesn't take a value, format is: + // -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.option_strings) + + // if the Optional takes a value, format is: + // -s ARGS, --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + for (let option_string of action.option_strings) { + parts.push(sub('%s %s', option_string, args_string)) + } + } + + return parts.join(', ') + } + } + + _metavar_formatter(action, default_metavar) { + let result + if (action.metavar !== undefined) { + result = action.metavar + } else if (action.choices !== undefined) { + let choice_strs = _choices_to_array(action.choices).map(String) + result = sub('{%s}', choice_strs.join(',')) + } else { + result = default_metavar + } + + function format(tuple_size) { + if (Array.isArray(result)) { + return result + } else { + return Array(tuple_size).fill(result) + } + } + return format + } + + _format_args(action, default_metavar) { + let get_metavar = this._metavar_formatter(action, default_metavar) + let result + if (action.nargs === undefined) { + result = sub('%s', ...get_metavar(1)) + } else if (action.nargs === OPTIONAL) { + result = sub('[%s]', ...get_metavar(1)) + } else if (action.nargs === ZERO_OR_MORE) { + let metavar = get_metavar(1) + if (metavar.length === 2) { + result = sub('[%s [%s ...]]', ...metavar) + } else { + result = sub('[%s ...]', ...metavar) + } + } else if (action.nargs === ONE_OR_MORE) { + result = sub('%s [%s ...]', ...get_metavar(2)) + } else if (action.nargs === REMAINDER) { + result = '...' + } else if (action.nargs === PARSER) { + result = sub('%s ...', ...get_metavar(1)) + } else if (action.nargs === SUPPRESS) { + result = '' + } else { + let formats + try { + formats = range(action.nargs).map(() => '%s') + } catch (err) { + throw new TypeError('invalid nargs value') + } + result = sub(formats.join(' '), ...get_metavar(action.nargs)) + } + return result + } + + _expand_help(action) { + let params = Object.assign({ prog: this._prog }, action) + for (let name of Object.keys(params)) { + if (params[name] === SUPPRESS) { + delete params[name] + } + } + for (let name of Object.keys(params)) { + if (params[name] && params[name].name) { + params[name] = params[name].name + } + } + if (params.choices !== undefined) { + let choices_str = _choices_to_array(params.choices).map(String).join(', ') + params.choices = choices_str + } + // LEGACY (v1 compatibility): camelcase + for (let key of Object.keys(params)) { + let old_name = _to_legacy_name(key) + if (old_name !== key) { + params[old_name] = params[key] + } + } + // end + return sub(this._get_help_string(action), params) + } + + * _iter_indented_subactions(action) { + if (typeof action._get_subactions === 'function') { + this._indent() + yield* action._get_subactions() + this._dedent() + } + } + + _split_lines(text, width) { + text = text.replace(this._whitespace_matcher, ' ').trim() + // The textwrap module is used only for formatting help. + // Delay its import for speeding up the common usage of argparse. + let textwrap = require('./lib/textwrap') + return textwrap.wrap(text, { width }) + } + + _fill_text(text, width, indent) { + text = text.replace(this._whitespace_matcher, ' ').trim() + let textwrap = require('./lib/textwrap') + return textwrap.fill(text, { width, + initial_indent: indent, + subsequent_indent: indent }) + } + + _get_help_string(action) { + return action.help + } + + _get_default_metavar_for_optional(action) { + return action.dest.toUpperCase() + } + + _get_default_metavar_for_positional(action) { + return action.dest + } +})) + +HelpFormatter.prototype._Section = _callable(class _Section { + + constructor(formatter, parent, heading = undefined) { + this.formatter = formatter + this.parent = parent + this.heading = heading + this.items = [] + } + + format_help() { + // format the indented section + if (this.parent !== undefined) { + this.formatter._indent() + } + let item_help = this.formatter._join_parts(this.items.map(([ func, args ]) => func.apply(null, args))) + if (this.parent !== undefined) { + this.formatter._dedent() + } + + // return nothing if the section was empty + if (!item_help) { + return '' + } + + // add the heading if the section was non-empty + let heading + if (this.heading !== SUPPRESS && this.heading !== undefined) { + let current_indent = this.formatter._current_indent + heading = sub('%*s%s:\n', current_indent, '', this.heading) + } else { + heading = '' + } + + // join the section-initial newline, the heading and the help + return this.formatter._join_parts(['\n', heading, item_help, '\n']) + } +}) + + +const RawDescriptionHelpFormatter = _camelcase_alias(_callable(class RawDescriptionHelpFormatter extends HelpFormatter { + /* + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _fill_text(text, width, indent) { + return splitlines(text, true).map(line => indent + line).join('') + } +})) + + +const RawTextHelpFormatter = _camelcase_alias(_callable(class RawTextHelpFormatter extends RawDescriptionHelpFormatter { + /* + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _split_lines(text/*, width*/) { + return splitlines(text) + } +})) + + +const ArgumentDefaultsHelpFormatter = _camelcase_alias(_callable(class ArgumentDefaultsHelpFormatter extends HelpFormatter { + /* + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_help_string(action) { + let help = action.help + // LEGACY (v1 compatibility): additional check for defaultValue needed + if (!action.help.includes('%(default)') && !action.help.includes('%(defaultValue)')) { + if (action.default !== SUPPRESS) { + let defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] + if (action.option_strings.length || defaulting_nargs.includes(action.nargs)) { + help += ' (default: %(default)s)' + } + } + } + return help + } +})) + + +const MetavarTypeHelpFormatter = _camelcase_alias(_callable(class MetavarTypeHelpFormatter extends HelpFormatter { + /* + * Help message formatter which uses the argument 'type' as the default + * metavar value (instead of the argument 'dest') + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_default_metavar_for_optional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } + + _get_default_metavar_for_positional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } +})) + + +// ===================== +// Options and Arguments +// ===================== +function _get_action_name(argument) { + if (argument === undefined) { + return undefined + } else if (argument.option_strings.length) { + return argument.option_strings.join('/') + } else if (![ undefined, SUPPRESS ].includes(argument.metavar)) { + return argument.metavar + } else if (![ undefined, SUPPRESS ].includes(argument.dest)) { + return argument.dest + } else { + return undefined + } +} + + +const ArgumentError = _callable(class ArgumentError extends Error { + /* + * An error from creating or using an argument (optional or positional). + * + * The string value of this exception is the message, augmented with + * information about the argument that caused it. + */ + + constructor(argument, message) { + super() + this.name = 'ArgumentError' + this._argument_name = _get_action_name(argument) + this._message = message + this.message = this.str() + } + + str() { + let format + if (this._argument_name === undefined) { + format = '%(message)s' + } else { + format = 'argument %(argument_name)s: %(message)s' + } + return sub(format, { message: this._message, + argument_name: this._argument_name }) + } +}) + + +const ArgumentTypeError = _callable(class ArgumentTypeError extends Error { + /* + * An error from trying to convert a command line string to a type. + */ + + constructor(message) { + super(message) + this.name = 'ArgumentTypeError' + } +}) + + +// ============== +// Action classes +// ============== +const Action = _camelcase_alias(_callable(class Action extends _AttributeHolder(Function) { + /* + * Information about how to convert command line strings to Python objects. + * + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the + * command line. The keyword arguments to the Action constructor are also + * all attributes of Action instances. + * + * Keyword Arguments: + * + * - option_strings -- A list of command-line option strings which + * should be associated with this action. + * + * - dest -- The name of the attribute to hold the created object(s) + * + * - nargs -- The number of command-line arguments that should be + * consumed. By default, one argument will be consumed and a single + * value will be produced. Other values include: + * - N (an integer) consumes N arguments (and produces a list) + * - '?' consumes zero or one arguments + * - '*' consumes zero or more arguments (and produces a list) + * - '+' consumes one or more arguments (and produces a list) + * Note that the difference between the default and nargs=1 is that + * with the default, a single value will be produced, while with + * nargs=1, a list containing a single value will be produced. + * + * - const -- The value to be produced if the option is specified and the + * option uses an action that takes no values. + * + * - default -- The value to be produced if the option is not specified. + * + * - type -- A callable that accepts a single string argument, and + * returns the converted value. The standard Python types str, int, + * float, and complex are useful examples of such callables. If None, + * str is used. + * + * - choices -- A container of values that should be allowed. If not None, + * after a command-line argument has been converted to the appropriate + * type, an exception will be raised if it is not a member of this + * collection. + * + * - required -- True if the action must always be specified at the + * command line. This is only meaningful for optional command-line + * arguments. + * + * - help -- The help string describing the argument. + * + * - metavar -- The name to be used for the option's argument with the + * help string. If None, the 'dest' value will be used as the name. + */ + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + this.option_strings = option_strings + this.dest = dest + this.nargs = nargs + this.const = const_value + this.default = default_value + this.type = type + this.choices = choices + this.required = required + this.help = help + this.metavar = metavar + } + + _get_kwargs() { + let names = [ + 'option_strings', + 'dest', + 'nargs', + 'const', + 'default', + 'type', + 'choices', + 'help', + 'metavar' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + format_usage() { + return this.option_strings[0] + } + + call(/*parser, namespace, values, option_string = undefined*/) { + throw new Error('.call() not defined') + } +})) + + +const BooleanOptionalAction = _camelcase_alias(_callable(class BooleanOptionalAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + let _option_strings = [] + for (let option_string of option_strings) { + _option_strings.push(option_string) + + if (option_string.startsWith('--')) { + option_string = '--no-' + option_string.slice(2) + _option_strings.push(option_string) + } + } + + if (help !== undefined && default_value !== undefined) { + help += ` (default: ${default_value})` + } + + super({ + option_strings: _option_strings, + dest, + nargs: 0, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values, option_string = undefined) { + if (this.option_strings.includes(option_string)) { + setattr(namespace, this.dest, !option_string.startsWith('--no-')) + } + } + + format_usage() { + return this.option_strings.join(' | ') + } +})) + + +const _StoreAction = _callable(class _StoreAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for store actions must be != 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + setattr(namespace, this.dest, values) + } +}) + + +const _StoreConstAction = _callable(class _StoreConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help + //, metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + setattr(namespace, this.dest, this.const) + } +}) + + +const _StoreTrueAction = _callable(class _StoreTrueAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: false, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: true, + default: default_value, + required, + help + }) + } +}) + + +const _StoreFalseAction = _callable(class _StoreFalseAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: true, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: false, + default: default_value, + required, + help + }) + } +}) + + +const _AppendAction = _callable(class _AppendAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for append actions must be != 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(values) + setattr(namespace, this.dest, items) + } +}) + + +const _AppendConstAction = _callable(class _AppendConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help, + metavar + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(this.const) + setattr(namespace, this.dest, items) + } +}) + + +const _CountAction = _callable(class _CountAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let count = getattr(namespace, this.dest, undefined) + if (count === undefined) { + count = 0 + } + setattr(namespace, this.dest, count + 1) + } +}) + + +const _HelpAction = _callable(class _HelpAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: SUPPRESS, + default: SUPPRESS, + help: undefined + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + } + + call(parser/*, namespace, values, option_string = undefined*/) { + parser.print_help() + parser.exit() + } +}) + + +const _VersionAction = _callable(class _VersionAction extends Action { + + constructor() { + let [ + option_strings, + version, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + version: undefined, + dest: SUPPRESS, + default: SUPPRESS, + help: "show program's version number and exit" + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + this.version = version + } + + call(parser/*, namespace, values, option_string = undefined*/) { + let version = this.version + if (version === undefined) { + version = parser.version + } + let formatter = parser._get_formatter() + formatter.add_text(version) + parser._print_message(formatter.format_help(), process.stdout) + parser.exit() + } +}) + + +const _SubParsersAction = _camelcase_alias(_callable(class _SubParsersAction extends Action { + + constructor() { + let [ + option_strings, + prog, + parser_class, + dest, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + prog: no_default, + parser_class: no_default, + dest: SUPPRESS, + required: false, + help: undefined, + metavar: undefined + }) + + let name_parser_map = {} + + super({ + option_strings, + dest, + nargs: PARSER, + choices: name_parser_map, + required, + help, + metavar + }) + + this._prog_prefix = prog + this._parser_class = parser_class + this._name_parser_map = name_parser_map + this._choices_actions = [] + } + + add_parser() { + let [ + name, + kwargs + ] = _parse_opts(arguments, { + name: no_default, + '**kwargs': no_default + }) + + // set prog from the existing prefix + if (kwargs.prog === undefined) { + kwargs.prog = sub('%s %s', this._prog_prefix, name) + } + + let aliases = getattr(kwargs, 'aliases', []) + delete kwargs.aliases + + // create a pseudo-action to hold the choice help + if ('help' in kwargs) { + let help = kwargs.help + delete kwargs.help + let choice_action = this._ChoicesPseudoAction(name, aliases, help) + this._choices_actions.push(choice_action) + } + + // create the parser and add it to the map + let parser = new this._parser_class(kwargs) + this._name_parser_map[name] = parser + + // make parser available under aliases also + for (let alias of aliases) { + this._name_parser_map[alias] = parser + } + + return parser + } + + _get_subactions() { + return this._choices_actions + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let parser_name = values[0] + let arg_strings = values.slice(1) + + // set the parser name if requested + if (this.dest !== SUPPRESS) { + setattr(namespace, this.dest, parser_name) + } + + // select the parser + if (hasattr(this._name_parser_map, parser_name)) { + parser = this._name_parser_map[parser_name] + } else { + let args = {parser_name, + choices: this._name_parser_map.join(', ')} + let msg = sub('unknown parser %(parser_name)r (choices: %(choices)s)', args) + throw new ArgumentError(this, msg) + } + + // parse all the remaining options into the namespace + // store any unrecognized options on the object, so that the top + // level parser can decide what to do with them + + // In case this subparser defines new defaults, we parse them + // in a new namespace object and then update the original + // namespace for the relevant parts. + let subnamespace + [ subnamespace, arg_strings ] = parser.parse_known_args(arg_strings, undefined) + for (let [ key, value ] of Object.entries(subnamespace)) { + setattr(namespace, key, value) + } + + if (arg_strings.length) { + setdefault(namespace, _UNRECOGNIZED_ARGS_ATTR, []) + getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).push(...arg_strings) + } + } +})) + + +_SubParsersAction.prototype._ChoicesPseudoAction = _callable(class _ChoicesPseudoAction extends Action { + constructor(name, aliases, help) { + let metavar = name, dest = name + if (aliases.length) { + metavar += sub(' (%s)', aliases.join(', ')) + } + super({ option_strings: [], dest, help, metavar }) + } +}) + + +const _ExtendAction = _callable(class _ExtendAction extends _AppendAction { + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items = items.concat(values) + setattr(namespace, this.dest, items) + } +}) + + +// ============== +// Type classes +// ============== +const FileType = _callable(class FileType extends Function { + /* + * Factory for creating file object types + * + * Instances of FileType are typically passed as type= arguments to the + * ArgumentParser add_argument() method. + * + * Keyword Arguments: + * - mode -- A string indicating how the file is to be opened. Accepts the + * same values as the builtin open() function. + * - bufsize -- The file's desired buffer size. Accepts the same values as + * the builtin open() function. + * - encoding -- The file's encoding. Accepts the same values as the + * builtin open() function. + * - errors -- A string indicating how encoding and decoding errors are to + * be handled. Accepts the same value as the builtin open() function. + */ + + constructor() { + let [ + flags, + encoding, + mode, + autoClose, + emitClose, + start, + end, + highWaterMark, + fs + ] = _parse_opts(arguments, { + flags: 'r', + encoding: undefined, + mode: undefined, // 0o666 + autoClose: undefined, // true + emitClose: undefined, // false + start: undefined, // 0 + end: undefined, // Infinity + highWaterMark: undefined, // 64 * 1024 + fs: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + Object.defineProperty(this, 'name', { + get() { + return sub('FileType(%r)', flags) + } + }) + this._flags = flags + this._options = {} + if (encoding !== undefined) this._options.encoding = encoding + if (mode !== undefined) this._options.mode = mode + if (autoClose !== undefined) this._options.autoClose = autoClose + if (emitClose !== undefined) this._options.emitClose = emitClose + if (start !== undefined) this._options.start = start + if (end !== undefined) this._options.end = end + if (highWaterMark !== undefined) this._options.highWaterMark = highWaterMark + if (fs !== undefined) this._options.fs = fs + } + + call(string) { + // the special argument "-" means sys.std{in,out} + if (string === '-') { + if (this._flags.includes('r')) { + return process.stdin + } else if (this._flags.includes('w')) { + return process.stdout + } else { + let msg = sub('argument "-" with mode %r', this._flags) + throw new TypeError(msg) + } + } + + // all other arguments are used as file names + let fd + try { + fd = fs.openSync(string, this._flags, this._options.mode) + } catch (e) { + let args = { filename: string, error: e.message } + let message = "can't open '%(filename)s': %(error)s" + throw new ArgumentTypeError(sub(message, args)) + } + + let options = Object.assign({ fd, flags: this._flags }, this._options) + if (this._flags.includes('r')) { + return fs.createReadStream(undefined, options) + } else if (this._flags.includes('w')) { + return fs.createWriteStream(undefined, options) + } else { + let msg = sub('argument "%s" with mode %r', string, this._flags) + throw new TypeError(msg) + } + } + + [util.inspect.custom]() { + let args = [ this._flags ] + let kwargs = Object.entries(this._options).map(([ k, v ]) => { + if (k === 'mode') v = { value: v, [util.inspect.custom]() { return '0o' + this.value.toString(8) } } + return [ k, v ] + }) + let args_str = [] + .concat(args.filter(arg => arg !== -1).map(repr)) + .concat(kwargs.filter(([/*kw*/, arg]) => arg !== undefined) + .map(([kw, arg]) => sub('%s=%r', kw, arg))) + .join(', ') + return sub('%s(%s)', this.constructor.name, args_str) + } + + toString() { + return this[util.inspect.custom]() + } +}) + +// =========================== +// Optional and Positional Parsing +// =========================== +const Namespace = _callable(class Namespace extends _AttributeHolder() { + /* + * Simple object for storing attributes. + * + * Implements equality by attribute names and values, and provides a simple + * string representation. + */ + + constructor(options = {}) { + super() + Object.assign(this, options) + } +}) + +// unset string tag to mimic plain object +Namespace.prototype[Symbol.toStringTag] = undefined + + +const _ActionsContainer = _camelcase_alias(_callable(class _ActionsContainer { + + constructor() { + let [ + description, + prefix_chars, + argument_default, + conflict_handler + ] = _parse_opts(arguments, { + description: no_default, + prefix_chars: no_default, + argument_default: no_default, + conflict_handler: no_default + }) + + this.description = description + this.argument_default = argument_default + this.prefix_chars = prefix_chars + this.conflict_handler = conflict_handler + + // set up registries + this._registries = {} + + // register actions + this.register('action', undefined, _StoreAction) + this.register('action', 'store', _StoreAction) + this.register('action', 'store_const', _StoreConstAction) + this.register('action', 'store_true', _StoreTrueAction) + this.register('action', 'store_false', _StoreFalseAction) + this.register('action', 'append', _AppendAction) + this.register('action', 'append_const', _AppendConstAction) + this.register('action', 'count', _CountAction) + this.register('action', 'help', _HelpAction) + this.register('action', 'version', _VersionAction) + this.register('action', 'parsers', _SubParsersAction) + this.register('action', 'extend', _ExtendAction) + // LEGACY (v1 compatibility): camelcase variants + ;[ 'storeConst', 'storeTrue', 'storeFalse', 'appendConst' ].forEach(old_name => { + let new_name = _to_new_name(old_name) + this.register('action', old_name, util.deprecate(this._registry_get('action', new_name), + sub('{action: "%s"} is renamed to {action: "%s"}', old_name, new_name))) + }) + // end + + // raise an exception if the conflict handler is invalid + this._get_handler() + + // action storage + this._actions = [] + this._option_string_actions = {} + + // groups + this._action_groups = [] + this._mutually_exclusive_groups = [] + + // defaults storage + this._defaults = {} + + // determines whether an "option" looks like a negative number + this._negative_number_matcher = /^-\d+$|^-\d*\.\d+$/ + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._has_negative_number_optionals = [] + } + + // ==================== + // Registration methods + // ==================== + register(registry_name, value, object) { + let registry = setdefault(this._registries, registry_name, {}) + registry[value] = object + } + + _registry_get(registry_name, value, default_value = undefined) { + return getattr(this._registries[registry_name], value, default_value) + } + + // ================================== + // Namespace default accessor methods + // ================================== + set_defaults(kwargs) { + Object.assign(this._defaults, kwargs) + + // if these defaults match any existing arguments, replace + // the previous default on the object with the new one + for (let action of this._actions) { + if (action.dest in kwargs) { + action.default = kwargs[action.dest] + } + } + } + + get_default(dest) { + for (let action of this._actions) { + if (action.dest === dest && action.default !== undefined) { + return action.default + } + } + return this._defaults[dest] + } + + + // ======================= + // Adding argument actions + // ======================= + add_argument() { + /* + * add_argument(dest, ..., name=value, ...) + * add_argument(option_string, option_string, ..., name=value, ...) + */ + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + // LEGACY (v1 compatibility), old-style add_argument([ args ], { options }) + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + deprecate('argument-array', + sub('use add_argument(%(args)s, {...}) instead of add_argument([ %(args)s ], { ... })', { + args: args.map(repr).join(', ') + })) + } + // end + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional + // argument + let chars = this.prefix_chars + if (!args.length || args.length === 1 && !chars.includes(args[0][0])) { + if (args.length && 'dest' in kwargs) { + throw new TypeError('dest supplied twice for positional argument') + } + kwargs = this._get_positional_kwargs(...args, kwargs) + + // otherwise, we're adding an optional argument + } else { + kwargs = this._get_optional_kwargs(...args, kwargs) + } + + // if no default was supplied, use the parser-level default + if (!('default' in kwargs)) { + let dest = kwargs.dest + if (dest in this._defaults) { + kwargs.default = this._defaults[dest] + } else if (this.argument_default !== undefined) { + kwargs.default = this.argument_default + } + } + + // create the action object, and add it to the parser + let action_class = this._pop_action_class(kwargs) + if (typeof action_class !== 'function') { + throw new TypeError(sub('unknown action "%s"', action_class)) + } + // eslint-disable-next-line new-cap + let action = new action_class(kwargs) + + // raise an error if the action type is not callable + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + throw new TypeError(sub('%r is not callable', type_func)) + } + + if (type_func === FileType) { + throw new TypeError(sub('%r is a FileType class object, instance of it' + + ' must be passed', type_func)) + } + + // raise an error if the metavar does not match the type + if ('_get_formatter' in this) { + try { + this._get_formatter()._format_args(action, undefined) + } catch (err) { + // check for 'invalid nargs value' is an artifact of TypeError and ValueError in js being the same + if (err instanceof TypeError && err.message !== 'invalid nargs value') { + throw new TypeError('length of metavar tuple does not match nargs') + } else { + throw err + } + } + } + + return this._add_action(action) + } + + add_argument_group() { + let group = _ArgumentGroup(this, ...arguments) + this._action_groups.push(group) + return group + } + + add_mutually_exclusive_group() { + // eslint-disable-next-line no-use-before-define + let group = _MutuallyExclusiveGroup(this, ...arguments) + this._mutually_exclusive_groups.push(group) + return group + } + + _add_action(action) { + // resolve any conflicts + this._check_conflict(action) + + // add to actions list + this._actions.push(action) + action.container = this + + // index the action by any option strings it has + for (let option_string of action.option_strings) { + this._option_string_actions[option_string] = action + } + + // set the flag if any option strings look like negative numbers + for (let option_string of action.option_strings) { + if (this._negative_number_matcher.test(option_string)) { + if (!this._has_negative_number_optionals.length) { + this._has_negative_number_optionals.push(true) + } + } + } + + // return the created action + return action + } + + _remove_action(action) { + _array_remove(this._actions, action) + } + + _add_container_actions(container) { + // collect groups by titles + let title_group_map = {} + for (let group of this._action_groups) { + if (group.title in title_group_map) { + let msg = 'cannot merge actions - two groups are named %r' + throw new TypeError(sub(msg, group.title)) + } + title_group_map[group.title] = group + } + + // map each action to its group + let group_map = new Map() + for (let group of container._action_groups) { + + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!(group.title in title_group_map)) { + title_group_map[group.title] = this.add_argument_group({ + title: group.title, + description: group.description, + conflict_handler: group.conflict_handler + }) + } + + // map the actions to their new group + for (let action of group._group_actions) { + group_map.set(action, title_group_map[group.title]) + } + } + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + for (let group of container._mutually_exclusive_groups) { + let mutex_group = this.add_mutually_exclusive_group({ + required: group.required + }) + + // map the actions to their new mutex group + for (let action of group._group_actions) { + group_map.set(action, mutex_group) + } + } + + // add all actions to this container or their group + for (let action of container._actions) { + group_map.get(action)._add_action(action) + } + } + + _get_positional_kwargs() { + let [ + dest, + kwargs + ] = _parse_opts(arguments, { + dest: no_default, + '**kwargs': no_default + }) + + // make sure required is not specified + if ('required' in kwargs) { + let msg = "'required' is an invalid argument for positionals" + throw new TypeError(msg) + } + + // mark positional arguments as required if at least one is + // always required + if (![OPTIONAL, ZERO_OR_MORE].includes(kwargs.nargs)) { + kwargs.required = true + } + if (kwargs.nargs === ZERO_OR_MORE && !('default' in kwargs)) { + kwargs.required = true + } + + // return the keyword arguments with no option strings + return Object.assign(kwargs, { dest, option_strings: [] }) + } + + _get_optional_kwargs() { + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + + // determine short and long option strings + let option_strings = [] + let long_option_strings = [] + let option_string + for (option_string of args) { + // error on strings that don't start with an appropriate prefix + if (!this.prefix_chars.includes(option_string[0])) { + let args = {option: option_string, + prefix_chars: this.prefix_chars} + let msg = 'invalid option string %(option)r: ' + + 'must start with a character %(prefix_chars)r' + throw new TypeError(sub(msg, args)) + } + + // strings starting with two prefix characters are long options + option_strings.push(option_string) + if (option_string.length > 1 && this.prefix_chars.includes(option_string[1])) { + long_option_strings.push(option_string) + } + } + + // infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + let dest = kwargs.dest + delete kwargs.dest + if (dest === undefined) { + let dest_option_string + if (long_option_strings.length) { + dest_option_string = long_option_strings[0] + } else { + dest_option_string = option_strings[0] + } + dest = _string_lstrip(dest_option_string, this.prefix_chars) + if (!dest) { + let msg = 'dest= is required for options like %r' + throw new TypeError(sub(msg, option_string)) + } + dest = dest.replace(/-/g, '_') + } + + // return the updated keyword arguments + return Object.assign(kwargs, { dest, option_strings }) + } + + _pop_action_class(kwargs, default_value = undefined) { + let action = getattr(kwargs, 'action', default_value) + delete kwargs.action + return this._registry_get('action', action, action) + } + + _get_handler() { + // determine function from conflict handler string + let handler_func_name = sub('_handle_conflict_%s', this.conflict_handler) + if (typeof this[handler_func_name] === 'function') { + return this[handler_func_name] + } else { + let msg = 'invalid conflict_resolution value: %r' + throw new TypeError(sub(msg, this.conflict_handler)) + } + } + + _check_conflict(action) { + + // find all options that conflict with this option + let confl_optionals = [] + for (let option_string of action.option_strings) { + if (hasattr(this._option_string_actions, option_string)) { + let confl_optional = this._option_string_actions[option_string] + confl_optionals.push([ option_string, confl_optional ]) + } + } + + // resolve any conflicts + if (confl_optionals.length) { + let conflict_handler = this._get_handler() + conflict_handler.call(this, action, confl_optionals) + } + } + + _handle_conflict_error(action, conflicting_actions) { + let message = conflicting_actions.length === 1 ? + 'conflicting option string: %s' : + 'conflicting option strings: %s' + let conflict_string = conflicting_actions.map(([ option_string/*, action*/ ]) => option_string).join(', ') + throw new ArgumentError(action, sub(message, conflict_string)) + } + + _handle_conflict_resolve(action, conflicting_actions) { + + // remove all conflicting options + for (let [ option_string, action ] of conflicting_actions) { + + // remove the conflicting option + _array_remove(action.option_strings, option_string) + delete this._option_string_actions[option_string] + + // if the option now has no option string, remove it from the + // container holding it + if (!action.option_strings.length) { + action.container._remove_action(action) + } + } + } +})) + + +const _ArgumentGroup = _callable(class _ArgumentGroup extends _ActionsContainer { + + constructor() { + let [ + container, + title, + description, + kwargs + ] = _parse_opts(arguments, { + container: no_default, + title: undefined, + description: undefined, + '**kwargs': no_default + }) + + // add any missing keyword arguments by checking the container + setdefault(kwargs, 'conflict_handler', container.conflict_handler) + setdefault(kwargs, 'prefix_chars', container.prefix_chars) + setdefault(kwargs, 'argument_default', container.argument_default) + super(Object.assign({ description }, kwargs)) + + // group attributes + this.title = title + this._group_actions = [] + + // share most attributes with the container + this._registries = container._registries + this._actions = container._actions + this._option_string_actions = container._option_string_actions + this._defaults = container._defaults + this._has_negative_number_optionals = + container._has_negative_number_optionals + this._mutually_exclusive_groups = container._mutually_exclusive_groups + } + + _add_action(action) { + action = super._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + super._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const _MutuallyExclusiveGroup = _callable(class _MutuallyExclusiveGroup extends _ArgumentGroup { + + constructor() { + let [ + container, + required + ] = _parse_opts(arguments, { + container: no_default, + required: false + }) + + super(container) + this.required = required + this._container = container + } + + _add_action(action) { + if (action.required) { + let msg = 'mutually exclusive arguments must be optional' + throw new TypeError(msg) + } + action = this._container._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + this._container._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const ArgumentParser = _camelcase_alias(_callable(class ArgumentParser extends _AttributeHolder(_ActionsContainer) { + /* + * Object for parsing command line strings into Python objects. + * + * Keyword Arguments: + * - prog -- The name of the program (default: sys.argv[0]) + * - usage -- A usage message (default: auto-generated from arguments) + * - description -- A description of what the program does + * - epilog -- Text following the argument descriptions + * - parents -- Parsers whose arguments should be copied into this one + * - formatter_class -- HelpFormatter class for printing help messages + * - prefix_chars -- Characters that prefix optional arguments + * - fromfile_prefix_chars -- Characters that prefix files containing + * additional arguments + * - argument_default -- The default value for all arguments + * - conflict_handler -- String indicating how to handle conflicts + * - add_help -- Add a -h/-help option + * - allow_abbrev -- Allow long options to be abbreviated unambiguously + * - exit_on_error -- Determines whether or not ArgumentParser exits with + * error info when an error occurs + */ + + constructor() { + let [ + prog, + usage, + description, + epilog, + parents, + formatter_class, + prefix_chars, + fromfile_prefix_chars, + argument_default, + conflict_handler, + add_help, + allow_abbrev, + exit_on_error, + debug, // LEGACY (v1 compatibility), debug mode + version // LEGACY (v1 compatibility), version + ] = _parse_opts(arguments, { + prog: undefined, + usage: undefined, + description: undefined, + epilog: undefined, + parents: [], + formatter_class: HelpFormatter, + prefix_chars: '-', + fromfile_prefix_chars: undefined, + argument_default: undefined, + conflict_handler: 'error', + add_help: true, + allow_abbrev: true, + exit_on_error: true, + debug: undefined, // LEGACY (v1 compatibility), debug mode + version: undefined // LEGACY (v1 compatibility), version + }) + + // LEGACY (v1 compatibility) + if (debug !== undefined) { + deprecate('debug', + 'The "debug" argument to ArgumentParser is deprecated. Please ' + + 'override ArgumentParser.exit function instead.' + ) + } + + if (version !== undefined) { + deprecate('version', + 'The "version" argument to ArgumentParser is deprecated. Please use ' + + "add_argument(..., { action: 'version', version: 'N', ... }) instead." + ) + } + // end + + super({ + description, + prefix_chars, + argument_default, + conflict_handler + }) + + // default setting for prog + if (prog === undefined) { + prog = path.basename(get_argv()[0] || '') + } + + this.prog = prog + this.usage = usage + this.epilog = epilog + this.formatter_class = formatter_class + this.fromfile_prefix_chars = fromfile_prefix_chars + this.add_help = add_help + this.allow_abbrev = allow_abbrev + this.exit_on_error = exit_on_error + // LEGACY (v1 compatibility), debug mode + this.debug = debug + // end + + this._positionals = this.add_argument_group('positional arguments') + this._optionals = this.add_argument_group('optional arguments') + this._subparsers = undefined + + // register types + function identity(string) { + return string + } + this.register('type', undefined, identity) + this.register('type', null, identity) + this.register('type', 'auto', identity) + this.register('type', 'int', function (x) { + let result = Number(x) + if (!Number.isInteger(result)) { + throw new TypeError(sub('could not convert string to int: %r', x)) + } + return result + }) + this.register('type', 'float', function (x) { + let result = Number(x) + if (isNaN(result)) { + throw new TypeError(sub('could not convert string to float: %r', x)) + } + return result + }) + this.register('type', 'str', String) + // LEGACY (v1 compatibility): custom types + this.register('type', 'string', + util.deprecate(String, 'use {type:"str"} or {type:String} instead of {type:"string"}')) + // end + + // add help argument if necessary + // (using explicit default to override global argument_default) + let default_prefix = prefix_chars.includes('-') ? '-' : prefix_chars[0] + if (this.add_help) { + this.add_argument( + default_prefix + 'h', + default_prefix.repeat(2) + 'help', + { + action: 'help', + default: SUPPRESS, + help: 'show this help message and exit' + } + ) + } + // LEGACY (v1 compatibility), version + if (version) { + this.add_argument( + default_prefix + 'v', + default_prefix.repeat(2) + 'version', + { + action: 'version', + default: SUPPRESS, + version: this.version, + help: "show program's version number and exit" + } + ) + } + // end + + // add parent arguments and defaults + for (let parent of parents) { + this._add_container_actions(parent) + Object.assign(this._defaults, parent._defaults) + } + } + + // ======================= + // Pretty __repr__ methods + // ======================= + _get_kwargs() { + let names = [ + 'prog', + 'usage', + 'description', + 'formatter_class', + 'conflict_handler', + 'add_help' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + // ================================== + // Optional/Positional adding methods + // ================================== + add_subparsers() { + let [ + kwargs + ] = _parse_opts(arguments, { + '**kwargs': no_default + }) + + if (this._subparsers !== undefined) { + this.error('cannot have multiple subparser arguments') + } + + // add the parser class to the arguments if it's not present + setdefault(kwargs, 'parser_class', this.constructor) + + if ('title' in kwargs || 'description' in kwargs) { + let title = getattr(kwargs, 'title', 'subcommands') + let description = getattr(kwargs, 'description', undefined) + delete kwargs.title + delete kwargs.description + this._subparsers = this.add_argument_group(title, description) + } else { + this._subparsers = this._positionals + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (kwargs.prog === undefined) { + let formatter = this._get_formatter() + let positionals = this._get_positional_actions() + let groups = this._mutually_exclusive_groups + formatter.add_usage(this.usage, positionals, groups, '') + kwargs.prog = formatter.format_help().trim() + } + + // create the parsers action and add it to the positionals list + let parsers_class = this._pop_action_class(kwargs, 'parsers') + // eslint-disable-next-line new-cap + let action = new parsers_class(Object.assign({ option_strings: [] }, kwargs)) + this._subparsers._add_action(action) + + // return the created parsers action + return action + } + + _add_action(action) { + if (action.option_strings.length) { + this._optionals._add_action(action) + } else { + this._positionals._add_action(action) + } + return action + } + + _get_optional_actions() { + return this._actions.filter(action => action.option_strings.length) + } + + _get_positional_actions() { + return this._actions.filter(action => !action.option_strings.length) + } + + // ===================================== + // Command line argument parsing methods + // ===================================== + parse_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_args(args, namespace) + if (argv && argv.length > 0) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_args(args = undefined, namespace = undefined) { + if (args === undefined) { + args = get_argv().slice(1) + } + + // default Namespace built from parser defaults + if (namespace === undefined) { + namespace = new Namespace() + } + + // add any action defaults that aren't present + for (let action of this._actions) { + if (action.dest !== SUPPRESS) { + if (!hasattr(namespace, action.dest)) { + if (action.default !== SUPPRESS) { + setattr(namespace, action.dest, action.default) + } + } + } + } + + // add any parser defaults that aren't present + for (let dest of Object.keys(this._defaults)) { + if (!hasattr(namespace, dest)) { + setattr(namespace, dest, this._defaults[dest]) + } + } + + // parse the arguments and exit if there are any errors + if (this.exit_on_error) { + try { + [ namespace, args ] = this._parse_known_args(args, namespace) + } catch (err) { + if (err instanceof ArgumentError) { + this.error(err.message) + } else { + throw err + } + } + } else { + [ namespace, args ] = this._parse_known_args(args, namespace) + } + + if (hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) { + args = args.concat(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) + delattr(namespace, _UNRECOGNIZED_ARGS_ATTR) + } + + return [ namespace, args ] + } + + _parse_known_args(arg_strings, namespace) { + // replace arg strings that are file references + if (this.fromfile_prefix_chars !== undefined) { + arg_strings = this._read_args_from_files(arg_strings) + } + + // map all mutually exclusive arguments to the other arguments + // they can't occur with + let action_conflicts = new Map() + for (let mutex_group of this._mutually_exclusive_groups) { + let group_actions = mutex_group._group_actions + for (let [ i, mutex_action ] of Object.entries(mutex_group._group_actions)) { + let conflicts = action_conflicts.get(mutex_action) || [] + conflicts = conflicts.concat(group_actions.slice(0, +i)) + conflicts = conflicts.concat(group_actions.slice(+i + 1)) + action_conflicts.set(mutex_action, conflicts) + } + } + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + let option_string_indices = {} + let arg_string_pattern_parts = [] + let arg_strings_iter = Object.entries(arg_strings)[Symbol.iterator]() + for (let [ i, arg_string ] of arg_strings_iter) { + + // all args after -- are non-options + if (arg_string === '--') { + arg_string_pattern_parts.push('-') + for ([ i, arg_string ] of arg_strings_iter) { + arg_string_pattern_parts.push('A') + } + + // otherwise, add the arg to the arg strings + // and note the index if it was an option + } else { + let option_tuple = this._parse_optional(arg_string) + let pattern + if (option_tuple === undefined) { + pattern = 'A' + } else { + option_string_indices[i] = option_tuple + pattern = 'O' + } + arg_string_pattern_parts.push(pattern) + } + } + + // join the pieces together to form the pattern + let arg_strings_pattern = arg_string_pattern_parts.join('') + + // converts arg strings to the appropriate and then takes the action + let seen_actions = new Set() + let seen_non_default_actions = new Set() + let extras + + let take_action = (action, argument_strings, option_string = undefined) => { + seen_actions.add(action) + let argument_values = this._get_values(action, argument_strings) + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argument_values !== action.default) { + seen_non_default_actions.add(action) + for (let conflict_action of action_conflicts.get(action) || []) { + if (seen_non_default_actions.has(conflict_action)) { + let msg = 'not allowed with argument %s' + let action_name = _get_action_name(conflict_action) + throw new ArgumentError(action, sub(msg, action_name)) + } + } + } + + // take the action if we didn't receive a SUPPRESS value + // (e.g. from a default) + if (argument_values !== SUPPRESS) { + action(this, namespace, argument_values, option_string) + } + } + + // function to convert arg_strings into an optional action + let consume_optional = start_index => { + + // get the optional identified at this index + let option_tuple = option_string_indices[start_index] + let [ action, option_string, explicit_arg ] = option_tuple + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + let action_tuples = [] + let stop + for (;;) { + + // if we found no optional action, skip it + if (action === undefined) { + extras.push(arg_strings[start_index]) + return start_index + 1 + } + + // if there is an explicit argument, try to match the + // optional's string arguments to only this + if (explicit_arg !== undefined) { + let arg_count = this._match_argument(action, 'A') + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + let chars = this.prefix_chars + if (arg_count === 0 && !chars.includes(option_string[1])) { + action_tuples.push([ action, [], option_string ]) + let char = option_string[0] + option_string = char + explicit_arg[0] + let new_explicit_arg = explicit_arg.slice(1) || undefined + let optionals_map = this._option_string_actions + if (hasattr(optionals_map, option_string)) { + action = optionals_map[option_string] + explicit_arg = new_explicit_arg + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + } else if (arg_count === 1) { + stop = start_index + 1 + let args = [ explicit_arg ] + action_tuples.push([ action, args, option_string ]) + break + + // error if a double-dash option did not use the + // explicit argument + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + } else { + let start = start_index + 1 + let selected_patterns = arg_strings_pattern.slice(start) + let arg_count = this._match_argument(action, selected_patterns) + stop = start + arg_count + let args = arg_strings.slice(start, stop) + action_tuples.push([ action, args, option_string ]) + break + } + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + assert(action_tuples.length) + for (let [ action, args, option_string ] of action_tuples) { + take_action(action, args, option_string) + } + return stop + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + let positionals = this._get_positional_actions() + + // function to convert arg_strings into positional actions + let consume_positionals = start_index => { + // match as many Positionals as possible + let selected_pattern = arg_strings_pattern.slice(start_index) + let arg_counts = this._match_arguments_partial(positionals, selected_pattern) + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (let i = 0; i < positionals.length && i < arg_counts.length; i++) { + let action = positionals[i] + let arg_count = arg_counts[i] + let args = arg_strings.slice(start_index, start_index + arg_count) + start_index += arg_count + take_action(action, args) + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(arg_counts.length) + return start_index + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + extras = [] + let start_index = 0 + let max_option_string_index = Math.max(-1, ...Object.keys(option_string_indices).map(Number)) + while (start_index <= max_option_string_index) { + + // consume any Positionals preceding the next option + let next_option_string_index = Math.min( + // eslint-disable-next-line no-loop-func + ...Object.keys(option_string_indices).map(Number).filter(index => index >= start_index) + ) + if (start_index !== next_option_string_index) { + let positionals_end_index = consume_positionals(start_index) + + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionals_end_index > start_index) { + start_index = positionals_end_index + continue + } else { + start_index = positionals_end_index + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!(start_index in option_string_indices)) { + let strings = arg_strings.slice(start_index, next_option_string_index) + extras = extras.concat(strings) + start_index = next_option_string_index + } + + // consume the next optional and any arguments for it + start_index = consume_optional(start_index) + } + + // consume any positionals following the last Optional + let stop_index = consume_positionals(start_index) + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(arg_strings.slice(stop_index)) + + // make sure all required actions were present and also convert + // action defaults which were not given as arguments + let required_actions = [] + for (let action of this._actions) { + if (!seen_actions.has(action)) { + if (action.required) { + required_actions.push(_get_action_name(action)) + } else { + // Convert action default now instead of doing it before + // parsing arguments to avoid calling convert functions + // twice (which may fail) if the argument was given, but + // only if it was defined already in the namespace + if (action.default !== undefined && + typeof action.default === 'string' && + hasattr(namespace, action.dest) && + action.default === getattr(namespace, action.dest)) { + setattr(namespace, action.dest, + this._get_value(action, action.default)) + } + } + } + } + + if (required_actions.length) { + this.error(sub('the following arguments are required: %s', + required_actions.join(', '))) + } + + // make sure all required groups had one option present + for (let group of this._mutually_exclusive_groups) { + if (group.required) { + let no_actions_used = true + for (let action of group._group_actions) { + if (seen_non_default_actions.has(action)) { + no_actions_used = false + break + } + } + + // if no actions were used, report the error + if (no_actions_used) { + let names = group._group_actions + .filter(action => action.help !== SUPPRESS) + .map(action => _get_action_name(action)) + let msg = 'one of the arguments %s is required' + this.error(sub(msg, names.join(' '))) + } + } + } + + // return the updated namespace and the extra arguments + return [ namespace, extras ] + } + + _read_args_from_files(arg_strings) { + // expand arguments referencing files + let new_arg_strings = [] + for (let arg_string of arg_strings) { + + // for regular arguments, just add them back into the list + if (!arg_string || !this.fromfile_prefix_chars.includes(arg_string[0])) { + new_arg_strings.push(arg_string) + + // replace arguments referencing files with the file content + } else { + try { + let args_file = fs.readFileSync(arg_string.slice(1), 'utf8') + let arg_strings = [] + for (let arg_line of splitlines(args_file)) { + for (let arg of this.convert_arg_line_to_args(arg_line)) { + arg_strings.push(arg) + } + } + arg_strings = this._read_args_from_files(arg_strings) + new_arg_strings = new_arg_strings.concat(arg_strings) + } catch (err) { + this.error(err.message) + } + } + } + + // return the modified argument list + return new_arg_strings + } + + convert_arg_line_to_args(arg_line) { + return [arg_line] + } + + _match_argument(action, arg_strings_pattern) { + // match the pattern for this action to the arg strings + let nargs_pattern = this._get_nargs_pattern(action) + let match = arg_strings_pattern.match(new RegExp('^' + nargs_pattern)) + + // raise an exception if we weren't able to find a match + if (match === null) { + let nargs_errors = { + undefined: 'expected one argument', + [OPTIONAL]: 'expected at most one argument', + [ONE_OR_MORE]: 'expected at least one argument' + } + let msg = nargs_errors[action.nargs] + if (msg === undefined) { + msg = sub(action.nargs === 1 ? 'expected %s argument' : 'expected %s arguments', action.nargs) + } + throw new ArgumentError(action, msg) + } + + // return the number of arguments matched + return match[1].length + } + + _match_arguments_partial(actions, arg_strings_pattern) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + let result = [] + for (let i of range(actions.length, 0, -1)) { + let actions_slice = actions.slice(0, i) + let pattern = actions_slice.map(action => this._get_nargs_pattern(action)).join('') + let match = arg_strings_pattern.match(new RegExp('^' + pattern)) + if (match !== null) { + result = result.concat(match.slice(1).map(string => string.length)) + break + } + } + + // return the list of arg string counts + return result + } + + _parse_optional(arg_string) { + // if it's an empty string, it was meant to be a positional + if (!arg_string) { + return undefined + } + + // if it doesn't start with a prefix, it was meant to be positional + if (!this.prefix_chars.includes(arg_string[0])) { + return undefined + } + + // if the option string is present in the parser, return the action + if (arg_string in this._option_string_actions) { + let action = this._option_string_actions[arg_string] + return [ action, arg_string, undefined ] + } + + // if it's just a single character, it was meant to be positional + if (arg_string.length === 1) { + return undefined + } + + // if the option string before the "=" is present, return the action + if (arg_string.includes('=')) { + let [ option_string, explicit_arg ] = _string_split(arg_string, '=', 1) + if (option_string in this._option_string_actions) { + let action = this._option_string_actions[option_string] + return [ action, option_string, explicit_arg ] + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + let option_tuples = this._get_option_tuples(arg_string) + + // if multiple actions match, the option string was ambiguous + if (option_tuples.length > 1) { + let options = option_tuples.map(([ /*action*/, option_string/*, explicit_arg*/ ]) => option_string).join(', ') + let args = {option: arg_string, matches: options} + let msg = 'ambiguous option: %(option)s could match %(matches)s' + this.error(sub(msg, args)) + + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (option_tuples.length === 1) { + let [ option_tuple ] = option_tuples + return option_tuple + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (this._negative_number_matcher.test(arg_string)) { + if (!this._has_negative_number_optionals.length) { + return undefined + } + } + + // if it contains a space, it was meant to be a positional + if (arg_string.includes(' ')) { + return undefined + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ undefined, arg_string, undefined ] + } + + _get_option_tuples(option_string) { + let result = [] + + // option strings starting with two prefix characters are only + // split at the '=' + let chars = this.prefix_chars + if (chars.includes(option_string[0]) && chars.includes(option_string[1])) { + if (this.allow_abbrev) { + let option_prefix, explicit_arg + if (option_string.includes('=')) { + [ option_prefix, explicit_arg ] = _string_split(option_string, '=', 1) + } else { + option_prefix = option_string + explicit_arg = undefined + } + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.includes(option_string[0]) && !chars.includes(option_string[1])) { + let option_prefix = option_string + let explicit_arg = undefined + let short_option_prefix = option_string.slice(0, 2) + let short_explicit_arg = option_string.slice(2) + + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string === short_option_prefix) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, short_explicit_arg ] + result.push(tup) + } else if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + + // shouldn't ever get here + } else { + this.error(sub('unexpected option string: %s', option_string)) + } + + // return the collected option tuples + return result + } + + _get_nargs_pattern(action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + let nargs = action.nargs + let nargs_pattern + + // the default (None) is assumed to be a single argument + if (nargs === undefined) { + nargs_pattern = '(-*A-*)' + + // allow zero or one arguments + } else if (nargs === OPTIONAL) { + nargs_pattern = '(-*A?-*)' + + // allow zero or more arguments + } else if (nargs === ZERO_OR_MORE) { + nargs_pattern = '(-*[A-]*)' + + // allow one or more arguments + } else if (nargs === ONE_OR_MORE) { + nargs_pattern = '(-*A[A-]*)' + + // allow any number of options or arguments + } else if (nargs === REMAINDER) { + nargs_pattern = '([-AO]*)' + + // allow one argument followed by any number of options or arguments + } else if (nargs === PARSER) { + nargs_pattern = '(-*A[-AO]*)' + + // suppress action, like nargs=0 + } else if (nargs === SUPPRESS) { + nargs_pattern = '(-*-*)' + + // all others should be integers + } else { + nargs_pattern = sub('(-*%s-*)', 'A'.repeat(nargs).split('').join('-*')) + } + + // if this is an optional action, -- is not allowed + if (action.option_strings.length) { + nargs_pattern = nargs_pattern.replace(/-\*/g, '') + nargs_pattern = nargs_pattern.replace(/-/g, '') + } + + // return the pattern + return nargs_pattern + } + + // ======================== + // Alt command line argument parsing, allowing free intermix + // ======================== + + parse_intermixed_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_intermixed_args(args, namespace) + if (argv.length) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_intermixed_args(args = undefined, namespace = undefined) { + // returns a namespace and list of extras + // + // positional can be freely intermixed with optionals. optionals are + // first parsed with all positional arguments deactivated. The 'extras' + // are then parsed. If the parser definition is incompatible with the + // intermixed assumptions (e.g. use of REMAINDER, subparsers) a + // TypeError is raised. + // + // positionals are 'deactivated' by setting nargs and default to + // SUPPRESS. This blocks the addition of that positional to the + // namespace + + let extras + let positionals = this._get_positional_actions() + let a = positionals.filter(action => [ PARSER, REMAINDER ].includes(action.nargs)) + if (a.length) { + throw new TypeError(sub('parse_intermixed_args: positional arg' + + ' with nargs=%s', a[0].nargs)) + } + + for (let group of this._mutually_exclusive_groups) { + for (let action of group._group_actions) { + if (positionals.includes(action)) { + throw new TypeError('parse_intermixed_args: positional in' + + ' mutuallyExclusiveGroup') + } + } + } + + let save_usage + try { + save_usage = this.usage + let remaining_args + try { + if (this.usage === undefined) { + // capture the full usage for use in error messages + this.usage = this.format_usage().slice(7) + } + for (let action of positionals) { + // deactivate positionals + action.save_nargs = action.nargs + // action.nargs = 0 + action.nargs = SUPPRESS + action.save_default = action.default + action.default = SUPPRESS + } + [ namespace, remaining_args ] = this.parse_known_args(args, + namespace) + for (let action of positionals) { + // remove the empty positional values from namespace + let attr = getattr(namespace, action.dest) + if (Array.isArray(attr) && attr.length === 0) { + // eslint-disable-next-line no-console + console.warn(sub('Do not expect %s in %s', action.dest, namespace)) + delattr(namespace, action.dest) + } + } + } finally { + // restore nargs and usage before exiting + for (let action of positionals) { + action.nargs = action.save_nargs + action.default = action.save_default + } + } + let optionals = this._get_optional_actions() + try { + // parse positionals. optionals aren't normally required, but + // they could be, so make sure they aren't. + for (let action of optionals) { + action.save_required = action.required + action.required = false + } + for (let group of this._mutually_exclusive_groups) { + group.save_required = group.required + group.required = false + } + [ namespace, extras ] = this.parse_known_args(remaining_args, + namespace) + } finally { + // restore parser values before exiting + for (let action of optionals) { + action.required = action.save_required + } + for (let group of this._mutually_exclusive_groups) { + group.required = group.save_required + } + } + } finally { + this.usage = save_usage + } + return [ namespace, extras ] + } + + // ======================== + // Value conversion methods + // ======================== + _get_values(action, arg_strings) { + // for everything but PARSER, REMAINDER args, strip out first '--' + if (![PARSER, REMAINDER].includes(action.nargs)) { + try { + _array_remove(arg_strings, '--') + } catch (err) {} + } + + let value + // optional argument produces a default when not present + if (!arg_strings.length && action.nargs === OPTIONAL) { + if (action.option_strings.length) { + value = action.const + } else { + value = action.default + } + if (typeof value === 'string') { + value = this._get_value(action, value) + this._check_value(action, value) + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (!arg_strings.length && action.nargs === ZERO_OR_MORE && + !action.option_strings.length) { + if (action.default !== undefined) { + value = action.default + } else { + value = arg_strings + } + this._check_value(action, value) + + // single argument or optional argument produces a single value + } else if (arg_strings.length === 1 && [undefined, OPTIONAL].includes(action.nargs)) { + let arg_string = arg_strings[0] + value = this._get_value(action, arg_string) + this._check_value(action, value) + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === REMAINDER) { + value = arg_strings.map(v => this._get_value(action, v)) + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === PARSER) { + value = arg_strings.map(v => this._get_value(action, v)) + this._check_value(action, value[0]) + + // SUPPRESS argument does not put anything in the namespace + } else if (action.nargs === SUPPRESS) { + value = SUPPRESS + + // all other types of nargs produce a list + } else { + value = arg_strings.map(v => this._get_value(action, v)) + for (let v of value) { + this._check_value(action, v) + } + } + + // return the converted value + return value + } + + _get_value(action, arg_string) { + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + let msg = '%r is not callable' + throw new ArgumentError(action, sub(msg, type_func)) + } + + // convert the value to the appropriate type + let result + try { + try { + result = type_func(arg_string) + } catch (err) { + // Dear TC39, why would you ever consider making es6 classes not callable? + // We had one universal interface, [[Call]], which worked for anything + // (with familiar this-instanceof guard for classes). Now we have two. + if (err instanceof TypeError && + /Class constructor .* cannot be invoked without 'new'/.test(err.message)) { + // eslint-disable-next-line new-cap + result = new type_func(arg_string) + } else { + throw err + } + } + + } catch (err) { + // ArgumentTypeErrors indicate errors + if (err instanceof ArgumentTypeError) { + //let name = getattr(action.type, 'name', repr(action.type)) + let msg = err.message + throw new ArgumentError(action, msg) + + // TypeErrors or ValueErrors also indicate errors + } else if (err instanceof TypeError) { + let name = getattr(action.type, 'name', repr(action.type)) + let args = {type: name, value: arg_string} + let msg = 'invalid %(type)s value: %(value)r' + throw new ArgumentError(action, sub(msg, args)) + } else { + throw err + } + } + + // return the converted value + return result + } + + _check_value(action, value) { + // converted value must be one of the choices (if specified) + if (action.choices !== undefined && !_choices_to_array(action.choices).includes(value)) { + let args = {value, + choices: _choices_to_array(action.choices).map(repr).join(', ')} + let msg = 'invalid choice: %(value)r (choose from %(choices)s)' + throw new ArgumentError(action, sub(msg, args)) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_usage() { + let formatter = this._get_formatter() + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + return formatter.format_help() + } + + format_help() { + let formatter = this._get_formatter() + + // usage + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + + // description + formatter.add_text(this.description) + + // positionals, optionals and user-defined groups + for (let action_group of this._action_groups) { + formatter.start_section(action_group.title) + formatter.add_text(action_group.description) + formatter.add_arguments(action_group._group_actions) + formatter.end_section() + } + + // epilog + formatter.add_text(this.epilog) + + // determine help from format above + return formatter.format_help() + } + + _get_formatter() { + // eslint-disable-next-line new-cap + return new this.formatter_class({ prog: this.prog }) + } + + // ===================== + // Help-printing methods + // ===================== + print_usage(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_usage(), file) + } + + print_help(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_help(), file) + } + + _print_message(message, file = undefined) { + if (message) { + if (file === undefined) file = process.stderr + file.write(message) + } + } + + // =============== + // Exiting methods + // =============== + exit(status = 0, message = undefined) { + if (message) { + this._print_message(message, process.stderr) + } + process.exit(status) + } + + error(message) { + /* + * error(message: string) + * + * Prints a usage message incorporating the message to stderr and + * exits. + * + * If you override this in a subclass, it should not return -- it + * should either exit or raise an exception. + */ + + // LEGACY (v1 compatibility), debug mode + if (this.debug === true) throw new Error(message) + // end + this.print_usage(process.stderr) + let args = {prog: this.prog, message: message} + this.exit(2, sub('%(prog)s: error: %(message)s\n', args)) + } +})) + + +module.exports = { + ArgumentParser, + ArgumentError, + ArgumentTypeError, + BooleanOptionalAction, + FileType, + HelpFormatter, + ArgumentDefaultsHelpFormatter, + RawDescriptionHelpFormatter, + RawTextHelpFormatter, + MetavarTypeHelpFormatter, + Namespace, + Action, + ONE_OR_MORE, + OPTIONAL, + PARSER, + REMAINDER, + SUPPRESS, + ZERO_OR_MORE +} + +// LEGACY (v1 compatibility), Const alias +Object.defineProperty(module.exports, 'Const', { + get() { + let result = {} + Object.entries({ ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('use argparse.%s instead of argparse.Const.%s', n, n)) + return v + } + }) + }) + Object.entries({ _UNRECOGNIZED_ARGS_ATTR }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('argparse.Const.%s is an internal symbol and will no longer be available', n)) + return v + } + }) + }) + return result + }, + enumerable: false +}) +// end diff --git a/node_modules/argparse/lib/sub.js b/node_modules/argparse/lib/sub.js new file mode 100644 index 0000000..e3eb321 --- /dev/null +++ b/node_modules/argparse/lib/sub.js @@ -0,0 +1,67 @@ +// Limited implementation of python % string operator, supports only %s and %r for now +// (other formats are not used here, but may appear in custom templates) + +'use strict' + +const { inspect } = require('util') + + +module.exports = function sub(pattern, ...values) { + let regex = /%(?:(%)|(-)?(\*)?(?:\((\w+)\))?([A-Za-z]))/g + + let result = pattern.replace(regex, function (_, is_literal, is_left_align, is_padded, name, format) { + if (is_literal) return '%' + + let padded_count = 0 + if (is_padded) { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + padded_count = values.shift() + if (!Number.isInteger(padded_count)) throw new TypeError('* wants int') + } + + let str + if (name !== undefined) { + let dict = values[0] + if (typeof dict !== 'object' || dict === null) throw new TypeError('format requires a mapping') + if (!(name in dict)) throw new TypeError(`no such key: '${name}'`) + str = dict[name] + } else { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + str = values.shift() + } + + switch (format) { + case 's': + str = String(str) + break + case 'r': + str = inspect(str) + break + case 'd': + case 'i': + if (typeof str !== 'number') { + throw new TypeError(`%${format} format: a number is required, not ${typeof str}`) + } + str = String(str.toFixed(0)) + break + default: + throw new TypeError(`unsupported format character '${format}'`) + } + + if (padded_count > 0) { + return is_left_align ? str.padEnd(padded_count) : str.padStart(padded_count) + } else { + return str + } + }) + + if (values.length) { + if (values.length === 1 && typeof values[0] === 'object' && values[0] !== null) { + // mapping + } else { + throw new TypeError('not all arguments converted during string formatting') + } + } + + return result +} diff --git a/node_modules/argparse/lib/textwrap.js b/node_modules/argparse/lib/textwrap.js new file mode 100644 index 0000000..23d51cd --- /dev/null +++ b/node_modules/argparse/lib/textwrap.js @@ -0,0 +1,440 @@ +// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions): +// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py + +'use strict' + +/* + * Text wrapping and filling. + */ + +// Copyright (C) 1999-2001 Gregory P. Ward. +// Copyright (C) 2002, 2003 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors +// Originally written by Greg Ward + +// Hardcode the recognized whitespace characters to the US-ASCII +// whitespace characters. The main reason for doing this is that +// some Unicode spaces (like \u00a0) are non-breaking whitespaces. +// +// This less funky little regex just split on recognized spaces. E.g. +// "Hello there -- you goof-ball, use the -b option!" +// splits into +// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/ +const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/ + +class TextWrapper { + /* + * Object for wrapping/filling text. The public interface consists of + * the wrap() and fill() methods; the other methods are just there for + * subclasses to override in order to tweak the default behaviour. + * If you want to completely replace the main wrapping algorithm, + * you'll probably have to override _wrap_chunks(). + * + * Several instance attributes control various aspects of wrapping: + * width (default: 70) + * the maximum width of wrapped lines (unless break_long_words + * is false) + * initial_indent (default: "") + * string that will be prepended to the first line of wrapped + * output. Counts towards the line's width. + * subsequent_indent (default: "") + * string that will be prepended to all lines save the first + * of wrapped output; also counts towards each line's width. + * expand_tabs (default: true) + * Expand tabs in input text to spaces before further processing. + * Each tab will become 0 .. 'tabsize' spaces, depending on its position + * in its line. If false, each tab is treated as a single character. + * tabsize (default: 8) + * Expand tabs in input text to 0 .. 'tabsize' spaces, unless + * 'expand_tabs' is false. + * replace_whitespace (default: true) + * Replace all whitespace characters in the input text by spaces + * after tab expansion. Note that if expand_tabs is false and + * replace_whitespace is true, every tab will be converted to a + * single space! + * fix_sentence_endings (default: false) + * Ensure that sentence-ending punctuation is always followed + * by two spaces. Off by default because the algorithm is + * (unavoidably) imperfect. + * break_long_words (default: true) + * Break words longer than 'width'. If false, those words will not + * be broken, and some lines might be longer than 'width'. + * break_on_hyphens (default: true) + * Allow breaking hyphenated words. If true, wrapping will occur + * preferably on whitespaces and right after hyphens part of + * compound words. + * drop_whitespace (default: true) + * Drop leading and trailing whitespace from lines. + * max_lines (default: None) + * Truncate wrapped lines. + * placeholder (default: ' [...]') + * Append to the last line of truncated text. + */ + + constructor(options = {}) { + let { + width = 70, + initial_indent = '', + subsequent_indent = '', + expand_tabs = true, + replace_whitespace = true, + fix_sentence_endings = false, + break_long_words = true, + drop_whitespace = true, + break_on_hyphens = true, + tabsize = 8, + max_lines = undefined, + placeholder=' [...]' + } = options + + this.width = width + this.initial_indent = initial_indent + this.subsequent_indent = subsequent_indent + this.expand_tabs = expand_tabs + this.replace_whitespace = replace_whitespace + this.fix_sentence_endings = fix_sentence_endings + this.break_long_words = break_long_words + this.drop_whitespace = drop_whitespace + this.break_on_hyphens = break_on_hyphens + this.tabsize = tabsize + this.max_lines = max_lines + this.placeholder = placeholder + } + + + // -- Private methods ----------------------------------------------- + // (possibly useful for subclasses to override) + + _munge_whitespace(text) { + /* + * _munge_whitespace(text : string) -> string + * + * Munge whitespace in text: expand tabs and convert all other + * whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz" + * becomes " foo bar baz". + */ + if (this.expand_tabs) { + text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js + } + if (this.replace_whitespace) { + text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ') + } + return text + } + + _split(text) { + /* + * _split(text : string) -> [string] + * + * Split the text to wrap into indivisible chunks. Chunks are + * not quite the same as words; see _wrap_chunks() for full + * details. As an example, the text + * Look, goof-ball -- use the -b option! + * breaks into the following chunks: + * 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', 'option!' + * if break_on_hyphens is True, or in: + * 'Look,', ' ', 'goof-ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', option!' + * otherwise. + */ + let chunks = text.split(wordsep_simple_re) + chunks = chunks.filter(Boolean) + return chunks + } + + _handle_long_word(reversed_chunks, cur_line, cur_len, width) { + /* + * _handle_long_word(chunks : [string], + * cur_line : [string], + * cur_len : int, width : int) + * + * Handle a chunk of text (most likely a word, not whitespace) that + * is too long to fit in any line. + */ + // Figure out when indent is larger than the specified width, and make + // sure at least one character is stripped off on every pass + let space_left + if (width < 1) { + space_left = 1 + } else { + space_left = width - cur_len + } + + // If we're allowed to break long words, then do so: put as much + // of the next chunk onto the current line as will fit. + if (this.break_long_words) { + cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left)) + reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left) + + // Otherwise, we have to preserve the long word intact. Only add + // it to the current line if there's nothing already there -- + // that minimizes how much we violate the width constraint. + } else if (!cur_line) { + cur_line.push(...reversed_chunks.pop()) + } + + // If we're not allowed to break long words, and there's already + // text on the current line, do nothing. Next time through the + // main loop of _wrap_chunks(), we'll wind up here again, but + // cur_len will be zero, so the next line will be entirely + // devoted to the long word that we can't handle right now. + } + + _wrap_chunks(chunks) { + /* + * _wrap_chunks(chunks : [string]) -> [string] + * + * Wrap a sequence of text chunks and return a list of lines of + * length 'self.width' or less. (If 'break_long_words' is false, + * some lines may be longer than this.) Chunks correspond roughly + * to words and the whitespace between them: each chunk is + * indivisible (modulo 'break_long_words'), but a line break can + * come between any two chunks. Chunks should not have internal + * whitespace; ie. a chunk is either all whitespace or a "word". + * Whitespace chunks will be removed from the beginning and end of + * lines, but apart from that whitespace is preserved. + */ + let lines = [] + let indent + if (this.width <= 0) { + throw Error(`invalid width ${this.width} (must be > 0)`) + } + if (this.max_lines !== undefined) { + if (this.max_lines > 1) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + if (indent.length + this.placeholder.trimStart().length > this.width) { + throw Error('placeholder too large for max width') + } + } + + // Arrange in reverse order so items can be efficiently popped + // from a stack of chucks. + chunks = chunks.reverse() + + while (chunks.length > 0) { + + // Start the list of chunks that will make up the current line. + // cur_len is just the length of all the chunks in cur_line. + let cur_line = [] + let cur_len = 0 + + // Figure out which static string will prefix this line. + let indent + if (lines) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + + // Maximum width for this line. + let width = this.width - indent.length + + // First chunk on line is whitespace -- drop it, unless this + // is the very beginning of the text (ie. no lines started yet). + if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) { + chunks.pop() + } + + while (chunks.length > 0) { + let l = chunks[chunks.length - 1].length + + // Can at least squeeze this chunk onto the current line. + if (cur_len + l <= width) { + cur_line.push(chunks.pop()) + cur_len += l + + // Nope, this line is full. + } else { + break + } + } + + // The current line is full, and the next chunk is too big to + // fit on *any* line (not just this one). + if (chunks.length && chunks[chunks.length - 1].length > width) { + this._handle_long_word(chunks, cur_line, cur_len, width) + cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0) + } + + // If the last chunk on this line is all whitespace, drop it. + if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') { + cur_len -= cur_line[cur_line.length - 1].length + cur_line.pop() + } + + if (cur_line) { + if (this.max_lines === undefined || + lines.length + 1 < this.max_lines || + (chunks.length === 0 || + this.drop_whitespace && + chunks.length === 1 && + !chunks[0].trim()) && cur_len <= width) { + // Convert current line back to a string and store it in + // list of all lines (return value). + lines.push(indent + cur_line.join('')) + } else { + let had_break = false + while (cur_line) { + if (cur_line[cur_line.length - 1].trim() && + cur_len + this.placeholder.length <= width) { + cur_line.push(this.placeholder) + lines.push(indent + cur_line.join('')) + had_break = true + break + } + cur_len -= cur_line[-1].length + cur_line.pop() + } + if (!had_break) { + if (lines) { + let prev_line = lines[lines.length - 1].trimEnd() + if (prev_line.length + this.placeholder.length <= + this.width) { + lines[lines.length - 1] = prev_line + this.placeholder + break + } + } + lines.push(indent + this.placeholder.lstrip()) + } + break + } + } + } + + return lines + } + + _split_chunks(text) { + text = this._munge_whitespace(text) + return this._split(text) + } + + // -- Public interface ---------------------------------------------- + + wrap(text) { + /* + * wrap(text : string) -> [string] + * + * Reformat the single paragraph in 'text' so it fits in lines of + * no more than 'self.width' columns, and return a list of wrapped + * lines. Tabs in 'text' are expanded with string.expandtabs(), + * and all other whitespace characters (including newline) are + * converted to space. + */ + let chunks = this._split_chunks(text) + // not implemented in js + //if (this.fix_sentence_endings) { + // this._fix_sentence_endings(chunks) + //} + return this._wrap_chunks(chunks) + } + + fill(text) { + /* + * fill(text : string) -> string + * + * Reformat the single paragraph in 'text' to fit in lines of no + * more than 'self.width' columns, and return a new string + * containing the entire wrapped paragraph. + */ + return this.wrap(text).join('\n') + } +} + + +// -- Convenience interface --------------------------------------------- + +function wrap(text, options = {}) { + /* + * Wrap a single paragraph of text, returning a list of wrapped lines. + * + * Reformat the single paragraph in 'text' so it fits in lines of no + * more than 'width' columns, and return a list of wrapped lines. By + * default, tabs in 'text' are expanded with string.expandtabs(), and + * all other whitespace characters (including newline) are converted to + * space. See TextWrapper class for available keyword args to customize + * wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.wrap(text) +} + +function fill(text, options = {}) { + /* + * Fill a single paragraph of text, returning a new string. + * + * Reformat the single paragraph in 'text' to fit in lines of no more + * than 'width' columns, and return a new string containing the entire + * wrapped paragraph. As with wrap(), tabs are expanded and other + * whitespace characters converted to space. See TextWrapper class for + * available keyword args to customize wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.fill(text) +} + +// -- Loosely related functionality ------------------------------------- + +let _whitespace_only_re = /^[ \t]+$/mg +let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg + +function dedent(text) { + /* + * Remove any common leading whitespace from every line in `text`. + * + * This can be used to make triple-quoted strings line up with the left + * edge of the display, while still presenting them in the source code + * in indented form. + * + * Note that tabs and spaces are both treated as whitespace, but they + * are not equal: the lines " hello" and "\\thello" are + * considered to have no common leading whitespace. + * + * Entirely blank lines are normalized to a newline character. + */ + // Look for the longest leading string of spaces and tabs common to + // all lines. + let margin = undefined + text = text.replace(_whitespace_only_re, '') + let indents = text.match(_leading_whitespace_re) || [] + for (let indent of indents) { + indent = indent.slice(0, -1) + + if (margin === undefined) { + margin = indent + + // Current line more deeply indented than previous winner: + // no change (previous winner is still on top). + } else if (indent.startsWith(margin)) { + // pass + + // Current line consistent with and no deeper than previous winner: + // it's the new winner. + } else if (margin.startsWith(indent)) { + margin = indent + + // Find the largest common whitespace between current line and previous + // winner. + } else { + for (let i = 0; i < margin.length && i < indent.length; i++) { + if (margin[i] !== indent[i]) { + margin = margin.slice(0, i) + break + } + } + } + } + + if (margin) { + text = text.replace(new RegExp('^' + margin, 'mg'), '') + } + return text +} + +module.exports = { wrap, fill, dedent } diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json new file mode 100644 index 0000000..647d2af --- /dev/null +++ b/node_modules/argparse/package.json @@ -0,0 +1,31 @@ +{ + "name": "argparse", + "description": "CLI arguments parser. Native port of python's argparse.", + "version": "2.0.1", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "main": "argparse.js", + "files": [ + "argparse.js", + "lib/" + ], + "license": "Python-2.0", + "repository": "nodeca/argparse", + "scripts": { + "lint": "eslint .", + "test": "npm run lint && nyc mocha", + "coverage": "npm run test && nyc report --reporter html" + }, + "devDependencies": { + "@babel/eslint-parser": "^7.11.0", + "@babel/plugin-syntax-class-properties": "^7.10.4", + "eslint": "^7.5.0", + "mocha": "^8.0.1", + "nyc": "^15.1.0" + } +} diff --git a/node_modules/bare-events/package.json b/node_modules/bare-events/package.json index 3ef071c..5358fe2 100644 --- a/node_modules/bare-events/package.json +++ b/node_modules/bare-events/package.json @@ -1,6 +1,6 @@ { "name": "bare-events", - "version": "2.8.2", + "version": "2.8.3", "description": "Event emitters for JavaScript", "exports": { "./package": "./package.json", @@ -28,10 +28,11 @@ "lib" ], "scripts": { - "test": "npm run lint && npm run test:bare && npm run test:node", - "test:bare": "bare test.js", - "test:node": "node test.js", - "lint": "prettier . --check" + "format": "prettier --write . && lunte --fix", + "lint": "prettier --check . && lunte", + "test": "npm run test:bare && npm run test:node", + "test:bare": "brittle-bare --coverage test.js", + "test:node": "brittle-node --coverage test.js" }, "repository": { "type": "git", @@ -46,6 +47,7 @@ "devDependencies": { "bare-abort-controller": "^1.0.0", "brittle": "^3.3.2", + "lunte": "^1.8.0", "prettier": "^3.4.2", "prettier-config-holepunch": "^2.0.0", "uncaughts": "^1.1.1" diff --git a/node_modules/bare-events/web.js b/node_modules/bare-events/web.js index ed25e69..796badd 100644 --- a/node_modules/bare-events/web.js +++ b/node_modules/bare-events/web.js @@ -10,6 +10,7 @@ const STOP = 0x20 const CAPTURE = 0x1 const PASSIVE = 0x2 const ONCE = 0x4 +const REMOVED = 0x8 // https://dom.spec.whatwg.org/#event class Event { @@ -144,8 +145,7 @@ exports.EventTarget = class EventTarget { const listeners = this._listeners.get(type) - if (listeners === undefined) this._listeners.set(type, listener) - else { + if (listeners !== undefined) { for (const existing of listeners) { if (callback === existing.callback && capture === existing.capture) { return // Duplicate listener @@ -153,13 +153,16 @@ exports.EventTarget = class EventTarget { } listener.link(listeners) + } else { + this._listeners.set(type, listener) + } - if (signal !== null) { - signal.addEventListener('abort', onabort) + if (signal !== null) { + const self = this + signal.addEventListener('abort', onabort) - function onabort() { - listener.unlink() - } + function onabort() { + self._unlink(type, listener) } } } @@ -176,10 +179,7 @@ exports.EventTarget = class EventTarget { for (const existing of listeners) { if (callback === existing.callback && capture === existing.capture) { - const next = existing.unlink() - - if (listeners === existing) this._listeners.set(type, next) - + this._unlink(type, existing) return } } @@ -195,10 +195,14 @@ exports.EventTarget = class EventTarget { try { if (listeners === undefined) return true - for (const listener of listeners) { + const snapshot = Array.from(listeners) + + for (const listener of snapshot) { // https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke - if (listener.once) listener.unlink() + if (listener.removed) continue + + if (listener.once) this._unlink(event.type, listener) let callback = listener.callback let context = this @@ -229,6 +233,18 @@ exports.EventTarget = class EventTarget { __proto__: { constructor: EventTarget } } } + + _unlink(type, listener) { + if (listener.removed) return + + const head = this._listeners.get(type) + const next = listener.unlink() + + if (head === listener) { + if (next === listener) this._listeners.delete(type) + else this._listeners.set(type, next) + } + } } // https://dom.spec.whatwg.org/#concept-event-listener @@ -268,7 +284,7 @@ class EventListener { } get removed() { - return this._previous === this && this._next === this + return (this._state & REMOVED) !== 0 } link(listener) { @@ -287,6 +303,8 @@ class EventListener { unlink() { if (this.removed) return this + this._state |= REMOVED + const next = this._next const previous = this._previous diff --git a/node_modules/callsites/index.d.ts b/node_modules/callsites/index.d.ts new file mode 100644 index 0000000..61f597c --- /dev/null +++ b/node_modules/callsites/index.d.ts @@ -0,0 +1,96 @@ +declare namespace callsites { + interface CallSite { + /** + Returns the value of `this`. + */ + getThis(): unknown | undefined; + + /** + Returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. + */ + getTypeName(): string | null; + + /** + Returns the current function. + */ + getFunction(): Function | undefined; + + /** + Returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + Returns the name of the property of `this` or one of its prototypes that holds the current function. + */ + getMethodName(): string | undefined; + + /** + Returns the name of the script if this function was defined in a script. + */ + getFileName(): string | null; + + /** + Returns the current line number if this function was defined in a script. + */ + getLineNumber(): number | null; + + /** + Returns the current column number if this function was defined in a script. + */ + getColumnNumber(): number | null; + + /** + Returns a string representing the location where `eval` was called if this function was created using a call to `eval`. + */ + getEvalOrigin(): string | undefined; + + /** + Returns `true` if this is a top-level invocation, that is, if it's a global object. + */ + isToplevel(): boolean; + + /** + Returns `true` if this call takes place in code defined by a call to `eval`. + */ + isEval(): boolean; + + /** + Returns `true` if this call is in native V8 code. + */ + isNative(): boolean; + + /** + Returns `true` if this is a constructor call. + */ + isConstructor(): boolean; + } +} + +declare const callsites: { + /** + Get callsites from the V8 stack trace API. + + @returns An array of `CallSite` objects. + + @example + ``` + import callsites = require('callsites'); + + function unicorn() { + console.log(callsites()[0].getFileName()); + //=> '/Users/sindresorhus/dev/callsites/test.js' + } + + unicorn(); + ``` + */ + (): callsites.CallSite[]; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function callsites(): callsites.CallSite[]; + // export = callsites; + default: typeof callsites; +}; + +export = callsites; diff --git a/node_modules/callsites/index.js b/node_modules/callsites/index.js new file mode 100644 index 0000000..486c241 --- /dev/null +++ b/node_modules/callsites/index.js @@ -0,0 +1,13 @@ +'use strict'; + +const callsites = () => { + const _prepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = (_, stack) => stack; + const stack = new Error().stack.slice(1); + Error.prepareStackTrace = _prepareStackTrace; + return stack; +}; + +module.exports = callsites; +// TODO: Remove this for the next major release +module.exports.default = callsites; diff --git a/node_modules/callsites/license b/node_modules/callsites/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/callsites/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/callsites/package.json b/node_modules/callsites/package.json new file mode 100644 index 0000000..93463c3 --- /dev/null +++ b/node_modules/callsites/package.json @@ -0,0 +1,39 @@ +{ + "name": "callsites", + "version": "3.1.0", + "description": "Get callsites from the V8 stack trace API", + "license": "MIT", + "repository": "sindresorhus/callsites", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "stacktrace", + "v8", + "callsite", + "callsites", + "stack", + "trace", + "function", + "file", + "line", + "debug" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/callsites/readme.md b/node_modules/callsites/readme.md new file mode 100644 index 0000000..fc84613 --- /dev/null +++ b/node_modules/callsites/readme.md @@ -0,0 +1,48 @@ +# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites) + +> Get callsites from the [V8 stack trace API](https://v8.dev/docs/stack-trace-api) + + +## Install + +``` +$ npm install callsites +``` + + +## Usage + +```js +const callsites = require('callsites'); + +function unicorn() { + console.log(callsites()[0].getFileName()); + //=> '/Users/sindresorhus/dev/callsites/test.js' +} + +unicorn(); +``` + + +## API + +Returns an array of callsite objects with the following methods: + +- `getThis`: returns the value of `this`. +- `getTypeName`: returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. +- `getFunction`: returns the current function. +- `getFunctionName`: returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. +- `getMethodName`: returns the name of the property of `this` or one of its prototypes that holds the current function. +- `getFileName`: if this function was defined in a script returns the name of the script. +- `getLineNumber`: if this function was defined in a script returns the current line number. +- `getColumnNumber`: if this function was defined in a script returns the current column number +- `getEvalOrigin`: if this function was created using a call to `eval` returns a string representing the location where `eval` was called. +- `isToplevel`: is this a top-level invocation, that is, is this the global object? +- `isEval`: does this call take place in code defined by a call to `eval`? +- `isNative`: is this call in native V8 code? +- `isConstructor`: is this a constructor call? + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/chrome-devtools-mcp/LICENSE b/node_modules/chrome-devtools-mcp/LICENSE deleted file mode 100644 index 7a4a3ea..0000000 --- a/node_modules/chrome-devtools-mcp/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/node_modules/chrome-devtools-mcp/README.md b/node_modules/chrome-devtools-mcp/README.md deleted file mode 100644 index 438024c..0000000 --- a/node_modules/chrome-devtools-mcp/README.md +++ /dev/null @@ -1,770 +0,0 @@ -# Chrome DevTools MCP - -[![npm chrome-devtools-mcp package](https://img.shields.io/npm/v/chrome-devtools-mcp.svg)](https://npmjs.org/package/chrome-devtools-mcp) - -`chrome-devtools-mcp` lets your coding agent (such as Gemini, Claude, Cursor or Copilot) -control and inspect a live Chrome browser. It acts as a Model-Context-Protocol -(MCP) server, giving your AI coding assistant access to the full power of -Chrome DevTools for reliable automation, in-depth debugging, and performance analysis. - -## [Tool reference](./docs/tool-reference.md) | [Changelog](./CHANGELOG.md) | [Contributing](./CONTRIBUTING.md) | [Troubleshooting](./docs/troubleshooting.md) | [Design Principles](./docs/design-principles.md) - -## Key features - -- **Get performance insights**: Uses [Chrome - DevTools](https://github.com/ChromeDevTools/devtools-frontend) to record - traces and extract actionable performance insights. -- **Advanced browser debugging**: Analyze network requests, take screenshots and - check browser console messages (with source-mapped stack traces). -- **Reliable automation**. Uses - [puppeteer](https://github.com/puppeteer/puppeteer) to automate actions in - Chrome and automatically wait for action results. - -## Disclaimers - -`chrome-devtools-mcp` exposes content of the browser instance to the MCP clients -allowing them to inspect, debug, and modify any data in the browser or DevTools. -Avoid sharing sensitive or personal information that you don't want to share with -MCP clients. - -`chrome-devtools-mcp` officially supports Google Chrome and [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) only. -Other Chromium-based browser may work, but this is not guaranteed, and you may encounter unexpected behavior. Use at your own discretion. -We are committed to providing fixes and support for the latest version of [Extended Stable Chrome](https://chromiumdash.appspot.com/schedule). - -Performance tools may send trace URLs to the Google CrUX API to fetch real-user -experience data. This helps provide a holistic performance picture by -presenting field data alongside lab data. This data is collected by the [Chrome -User Experience Report (CrUX)](https://developer.chrome.com/docs/crux). To disable -this, run with the `--no-performance-crux` flag. - -## **Usage statistics** - -Google collects usage statistics (such as tool invocation success rates, latency, and environment information) to improve the reliability and performance of Chrome DevTools MCP. - -Data collection is **enabled by default**. You can opt-out by passing the `--no-usage-statistics` flag when starting the server: - -```json -"args": ["-y", "chrome-devtools-mcp@latest", "--no-usage-statistics"] -``` - -Google handles this data in accordance with the [Google Privacy Policy](https://policies.google.com/privacy). - -Google's collection of usage statistics for Chrome DevTools MCP is independent from the Chrome browser's usage statistics. Opting out of Chrome metrics does not automatically opt you out of this tool, and vice-versa. - -Collection is disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set. - -## Requirements - -- [Node.js](https://nodejs.org/) v20.19 or a newer [latest maintenance LTS](https://github.com/nodejs/Release#release-schedule) version. -- [Chrome](https://www.google.com/chrome/) current stable version or newer. -- [npm](https://www.npmjs.com/) - -## Getting started - -Add the following config to your MCP client: - -```json -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": ["-y", "chrome-devtools-mcp@latest"] - } - } -} -``` - -> [!NOTE] -> Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server. - -If you are interested in doing only basic browser tasks, use the `--slim` mode: - -```json -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": ["-y", "chrome-devtools-mcp@latest", "--slim", "--headless"] - } - } -} -``` - -See [Slim tool reference](./docs/slim-tool-reference.md). - -### MCP Client configuration - -
- Amp - Follow https://ampcode.com/manual#mcp and use the config provided above. You can also install the Chrome DevTools MCP server using the CLI: - -```bash -amp mcp add chrome-devtools -- npx chrome-devtools-mcp@latest -``` - -
- -
- Antigravity - -To use the Chrome DevTools MCP server follow the instructions from Antigravity's docs to install a custom MCP server. Add the following config to the MCP servers config: - -```bash -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": [ - "chrome-devtools-mcp@latest", - "--browser-url=http://127.0.0.1:9222", - "-y" - ] - } - } -} -``` - -This will make the Chrome DevTools MCP server automatically connect to the browser that Antigravity is using. If you are not using port 9222, make sure to adjust accordingly. - -Chrome DevTools MCP will not start the browser instance automatically using this approach because the Chrome DevTools MCP server connects to Antigravity's built-in browser. If the browser is not already running, you have to start it first by clicking the Chrome icon at the top right corner. - -
- -
- Claude Code - -**Install via CLI (MCP only)** - -Use the Claude Code CLI to add the Chrome DevTools MCP server (guide): - -```bash -claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest -``` - -**Install as a Plugin (MCP + Skills)** - -> [!NOTE] -> If you already had Chrome DevTools MCP installed previously for Claude Code, make sure to remove it first from your installation and configuration files. - -To install Chrome DevTools MCP with skills, add the marketplace registry in Claude Code: - -```sh -/plugin marketplace add ChromeDevTools/chrome-devtools-mcp -``` - -Then, install the plugin: - -```sh -/plugin install chrome-devtools-mcp -``` - -Restart Claude Code to have the MCP server and skills load (check with `/skills`). - -> [!TIP] -> If the plugin installation fails with a `Failed to clone repository` error (e.g., HTTPS connectivity issues behind a corporate firewall), see the [troubleshooting guide](./docs/troubleshooting.md#claude-code-plugin-installation-fails-with-failed-to-clone-repository) for workarounds, or use the CLI installation method above instead. - -
- -
- Cline - Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above. -
- -
- Codex - Follow the configure MCP guide - using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI: - -```bash -codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest -``` - -**On Windows 11** - -Configure the Chrome install location and increase the startup timeout by updating `.codex/config.toml` and adding the following `env` and `startup_timeout_ms` parameters: - -``` -[mcp_servers.chrome-devtools] -command = "cmd" -args = [ - "/c", - "npx", - "-y", - "chrome-devtools-mcp@latest", -] -env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" } -startup_timeout_ms = 20_000 -``` - -
- -
- Command Code - -Use the Command Code CLI to add the Chrome DevTools MCP server (MCP guide): - -```bash -cmd mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest -``` - -
- -
- Copilot CLI - -Start Copilot CLI: - -``` -copilot -``` - -Start the dialog to add a new MCP server by running: - -``` -/mcp add -``` - -Configure the following fields and press `CTRL+S` to save the configuration: - -- **Server name:** `chrome-devtools` -- **Server Type:** `[1] Local` -- **Command:** `npx -y chrome-devtools-mcp@latest` - -
- -
- Copilot / VS Code - -**Click the button to install:** - -[Install in VS Code](https://vscode.dev/redirect/mcp/install?name=io.github.ChromeDevTools%2Fchrome-devtools-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22chrome-devtools-mcp%22%5D%2C%22env%22%3A%7B%7D%7D) - -[Install in VS Code Insiders](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522io.github.ChromeDevTools%252Fchrome-devtools-mcp%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522chrome-devtools-mcp%2522%255D%252C%2522env%2522%253A%257B%257D%257D%257D) - -**Or install manually:** - -Follow the MCP install guide, -with the standard config from above. You can also install the Chrome DevTools MCP server using the VS Code CLI: - -For macOS and Linux: - -```bash -code --add-mcp '{"name":"io.github.ChromeDevTools/chrome-devtools-mcp","command":"npx","args":["-y","chrome-devtools-mcp"],"env":{}}' -``` - -For Windows (PowerShell): - -```powershell -code --add-mcp '{"""name""":"""io.github.ChromeDevTools/chrome-devtools-mcp""","""command""":"""npx""","""args""":["""-y""","""chrome-devtools-mcp"""]}' -``` - -
- -
- Cursor - -**Click the button to install:** - -[Install in Cursor](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IC15IGNocm9tZS1kZXZ0b29scy1tY3BAbGF0ZXN0In0%3D) - -**Or install manually:** - -Go to `Cursor Settings` -> `MCP` -> `New MCP Server`. Use the config provided above. - -
- -
- Factory CLI -Use the Factory CLI to add the Chrome DevTools MCP server (guide): - -```bash -droid mcp add chrome-devtools "npx -y chrome-devtools-mcp@latest" -``` - -
- -
- Gemini CLI -Install the Chrome DevTools MCP server using the Gemini CLI. - -**Project wide:** - -```bash -# Either MCP only: -gemini mcp add chrome-devtools npx chrome-devtools-mcp@latest -# Or as a Gemini extension (MCP+Skills): -gemini extensions install --auto-update https://github.com/ChromeDevTools/chrome-devtools-mcp -``` - -**Globally:** - -```bash -gemini mcp add -s user chrome-devtools npx chrome-devtools-mcp@latest -``` - -Alternatively, follow the MCP guide and use the standard config from above. - -
- -
- Gemini Code Assist - Follow the configure MCP guide - using the standard config from above. -
- -
- JetBrains AI Assistant & Junie - -Go to `Settings | Tools | AI Assistant | Model Context Protocol (MCP)` -> `Add`. Use the config provided above. -The same way chrome-devtools-mcp can be configured for JetBrains Junie in `Settings | Tools | Junie | MCP Settings` -> `Add`. Use the config provided above. - -
- -
- Kiro - -In **Kiro Settings**, go to `Configure MCP` > `Open Workspace or User MCP Config` > Use the configuration snippet provided above. - -Or, from the IDE **Activity Bar** > `Kiro` > `MCP Servers` > `Click Open MCP Config`. Use the configuration snippet provided above. - -
- -
- Katalon Studio - -The Chrome DevTools MCP server can be used with Katalon StudioAssist via an MCP proxy. - -**Step 1:** Install the MCP proxy by following the MCP proxy setup guide. - -**Step 2:** Start the Chrome DevTools MCP server with the proxy: - -```bash -mcp-proxy --transport streamablehttp --port 8080 -- npx -y chrome-devtools-mcp@latest -``` - -**Note:** You may need to pick another port if 8080 is already in use. - -**Step 3:** In Katalon Studio, add the server to StudioAssist with the following settings: - -- **Connection URL:** `http://127.0.0.1:8080/mcp` -- **Transport type:** `HTTP` - -Once connected, the Chrome DevTools MCP tools will be available in StudioAssist. - -
- -
- OpenCode - -Add the following configuration to your `opencode.json` file. If you don't have one, create it at `~/.config/opencode/opencode.json` (guide): - -```json -{ - "$schema": "https://opencode.ai/config.json", - "mcp": { - "chrome-devtools": { - "type": "local", - "command": ["npx", "-y", "chrome-devtools-mcp@latest"] - } - } -} -``` - -
- -
- Qoder - -In **Qoder Settings**, go to `MCP Server` > `+ Add` > Use the configuration snippet provided above. - -Alternatively, follow the MCP guide and use the standard config from above. - -
- -
- Qoder CLI - -Install the Chrome DevTools MCP server using the Qoder CLI (guide): - -**Project wide:** - -```bash -qodercli mcp add chrome-devtools -- npx chrome-devtools-mcp@latest -``` - -**Globally:** - -```bash -qodercli mcp add -s user chrome-devtools -- npx chrome-devtools-mcp@latest -``` - -
- -
- Visual Studio - - **Click the button to install:** - - [Install in Visual Studio](https://vs-open.link/mcp-install?%7B%22name%22%3A%22chrome-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22chrome-devtools-mcp%40latest%22%5D%7D) -
- -
- Warp - -Go to `Settings | AI | Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the config provided above. - -
- -
- Windsurf - Follow the configure MCP guide - using the standard config from above. -
- -### Your first prompt - -Enter the following prompt in your MCP Client to check if everything is working: - -``` -Check the performance of https://developers.chrome.com -``` - -Your MCP client should open the browser and record a performance trace. - -> [!NOTE] -> The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Chrome DevTools MCP server on its own will not automatically start the browser. - -## Tools - -If you run into any issues, checkout our [troubleshooting guide](./docs/troubleshooting.md). - - - -- **Input automation** (9 tools) - - [`click`](docs/tool-reference.md#click) - - [`drag`](docs/tool-reference.md#drag) - - [`fill`](docs/tool-reference.md#fill) - - [`fill_form`](docs/tool-reference.md#fill_form) - - [`handle_dialog`](docs/tool-reference.md#handle_dialog) - - [`hover`](docs/tool-reference.md#hover) - - [`press_key`](docs/tool-reference.md#press_key) - - [`type_text`](docs/tool-reference.md#type_text) - - [`upload_file`](docs/tool-reference.md#upload_file) -- **Navigation automation** (6 tools) - - [`close_page`](docs/tool-reference.md#close_page) - - [`list_pages`](docs/tool-reference.md#list_pages) - - [`navigate_page`](docs/tool-reference.md#navigate_page) - - [`new_page`](docs/tool-reference.md#new_page) - - [`select_page`](docs/tool-reference.md#select_page) - - [`wait_for`](docs/tool-reference.md#wait_for) -- **Emulation** (2 tools) - - [`emulate`](docs/tool-reference.md#emulate) - - [`resize_page`](docs/tool-reference.md#resize_page) -- **Performance** (4 tools) - - [`performance_analyze_insight`](docs/tool-reference.md#performance_analyze_insight) - - [`performance_start_trace`](docs/tool-reference.md#performance_start_trace) - - [`performance_stop_trace`](docs/tool-reference.md#performance_stop_trace) - - [`take_memory_snapshot`](docs/tool-reference.md#take_memory_snapshot) -- **Network** (2 tools) - - [`get_network_request`](docs/tool-reference.md#get_network_request) - - [`list_network_requests`](docs/tool-reference.md#list_network_requests) -- **Debugging** (6 tools) - - [`evaluate_script`](docs/tool-reference.md#evaluate_script) - - [`get_console_message`](docs/tool-reference.md#get_console_message) - - [`lighthouse_audit`](docs/tool-reference.md#lighthouse_audit) - - [`list_console_messages`](docs/tool-reference.md#list_console_messages) - - [`take_screenshot`](docs/tool-reference.md#take_screenshot) - - [`take_snapshot`](docs/tool-reference.md#take_snapshot) - - - -## Configuration - -The Chrome DevTools MCP server supports the following configuration option: - - - -- **`--autoConnect`/ `--auto-connect`** - If specified, automatically connects to a browser (Chrome 144+) running locally from the user data directory identified by the channel param (default channel is stable). Requires the remoted debugging server to be started in the Chrome instance via chrome://inspect/#remote-debugging. - - **Type:** boolean - - **Default:** `false` - -- **`--browserUrl`/ `--browser-url`, `-u`** - Connect to a running, debuggable Chrome instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance. - - **Type:** string - -- **`--wsEndpoint`/ `--ws-endpoint`, `-w`** - WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/). Alternative to --browserUrl. - - **Type:** string - -- **`--wsHeaders`/ `--ws-headers`** - Custom headers for WebSocket connection in JSON format (e.g., '{"Authorization":"Bearer token"}'). Only works with --wsEndpoint. - - **Type:** string - -- **`--headless`** - Whether to run in headless (no UI) mode. - - **Type:** boolean - - **Default:** `false` - -- **`--executablePath`/ `--executable-path`, `-e`** - Path to custom Chrome executable. - - **Type:** string - -- **`--isolated`** - If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false. - - **Type:** boolean - -- **`--userDataDir`/ `--user-data-dir`** - Path to the user data directory for Chrome. Default is $HOME/.cache/chrome-devtools-mcp/chrome-profile$CHANNEL_SUFFIX_IF_NON_STABLE - - **Type:** string - -- **`--channel`** - Specify a different Chrome channel that should be used. The default is the stable channel version. - - **Type:** string - - **Choices:** `stable`, `canary`, `beta`, `dev` - -- **`--logFile`/ `--log-file`** - Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports. - - **Type:** string - -- **`--viewport`** - Initial viewport size for the Chrome instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px. - - **Type:** string - -- **`--proxyServer`/ `--proxy-server`** - Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details. - - **Type:** string - -- **`--acceptInsecureCerts`/ `--accept-insecure-certs`** - If enabled, ignores errors relative to self-signed and expired certificates. Use with caution. - - **Type:** boolean - -- **`--experimentalScreencast`/ `--experimental-screencast`** - Exposes experimental screencast tools (requires ffmpeg). Install ffmpeg https://www.ffmpeg.org/download.html and ensure it is available in the MCP server PATH. - - **Type:** boolean - -- **`--chromeArg`/ `--chrome-arg`** - Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp. - - **Type:** array - -- **`--ignoreDefaultChromeArg`/ `--ignore-default-chrome-arg`** - Explicitly disable default arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp. - - **Type:** array - -- **`--categoryEmulation`/ `--category-emulation`** - Set to false to exclude tools related to emulation. - - **Type:** boolean - - **Default:** `true` - -- **`--categoryPerformance`/ `--category-performance`** - Set to false to exclude tools related to performance. - - **Type:** boolean - - **Default:** `true` - -- **`--categoryNetwork`/ `--category-network`** - Set to false to exclude tools related to network. - - **Type:** boolean - - **Default:** `true` - -- **`--performanceCrux`/ `--performance-crux`** - Set to false to disable sending URLs from performance traces to CrUX API to get field performance data. - - **Type:** boolean - - **Default:** `true` - -- **`--usageStatistics`/ `--usage-statistics`** - Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set. - - **Type:** boolean - - **Default:** `true` - -- **`--slim`** - Exposes a "slim" set of 3 tools covering navigation, script execution and screenshots only. Useful for basic browser tasks. - - **Type:** boolean - - - -Pass them via the `args` property in the JSON configuration. For example: - -```json -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": [ - "chrome-devtools-mcp@latest", - "--channel=canary", - "--headless=true", - "--isolated=true" - ] - } - } -} -``` - -### Connecting via WebSocket with custom headers - -You can connect directly to a Chrome WebSocket endpoint and include custom headers (e.g., for authentication): - -```json -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": [ - "chrome-devtools-mcp@latest", - "--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/", - "--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}" - ] - } - } -} -``` - -To get the WebSocket endpoint from a running Chrome instance, visit `http://127.0.0.1:9222/json/version` and look for the `webSocketDebuggerUrl` field. - -You can also run `npx chrome-devtools-mcp@latest --help` to see all available configuration options. - -## Concepts - -### User data directory - -`chrome-devtools-mcp` starts a Chrome's stable channel instance using the following user -data directory: - -- Linux / macOS: `$HOME/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL` -- Windows: `%HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL` - -The user data directory is not cleared between runs and shared across -all instances of `chrome-devtools-mcp`. Set the `isolated` option to `true` -to use a temporary user data dir instead which will be cleared automatically after -the browser is closed. - -### Connecting to a running Chrome instance - -By default, the Chrome DevTools MCP server will start a new Chrome instance with a dedicated profile. This might not be ideal in all situations: - -- If you would like to maintain the same application state when alternating between manual site testing and agent-driven testing. -- When the MCP needs to sign into a website. Some accounts may prevent sign-in when the browser is controlled via WebDriver (the default launch mechanism for the Chrome DevTools MCP server). -- If you're running your LLM inside a sandboxed environment, but you would like to connect to a Chrome instance that runs outside the sandbox. - -In these cases, start Chrome first and let the Chrome DevTools MCP server connect to it. There are two ways to do so: - -- **Automatic connection (available in Chrome 144)**: best for sharing state between manual and agent-driven testing. -- **Manual connection via remote debugging port**: best when running inside a sandboxed environment. - -#### Automatically connecting to a running Chrome instance - -**Step 1:** Set up remote debugging in Chrome - -In Chrome (\>= M144), do the following to set up remote debugging: - -1. Navigate to `chrome://inspect/#remote-debugging` to enable remote debugging. -2. Follow the dialog UI to allow or disallow incoming debugging connections. - -**Step 2:** Configure Chrome DevTools MCP server to automatically connect to a running Chrome Instance - -To connect the `chrome-devtools-mcp` server to the running Chrome instance, use -`--autoConnect` command line argument for the MCP server. - -The following code snippet is an example configuration for gemini-cli: - -```json -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": ["chrome-devtools-mcp@latest", "--autoConnect"] - } - } -} -``` - -**Step 3:** Test your setup - -Make sure your browser is running. Open gemini-cli and run the following prompt: - -```none -Check the performance of https://developers.chrome.com -``` - -> [!NOTE] -> The autoConnect option requires the user to start Chrome. If the user has multiple active profiles, the MCP server will connect to the default profile (as determined by Chrome). The MCP server has access to all open windows for the selected profile. - -The Chrome DevTools MCP server will try to connect to your running Chrome -instance. It shows a dialog asking for user permission. - -Clicking **Allow** results in the Chrome DevTools MCP server opening -[developers.chrome.com](http://developers.chrome.com) and taking a performance -trace. - -#### Manual connection using port forwarding - -You can connect to a running Chrome instance by using the `--browser-url` option. This is useful if you are running the MCP server in a sandboxed environment that does not allow starting a new Chrome instance. - -Here is a step-by-step guide on how to connect to a running Chrome instance: - -**Step 1: Configure the MCP client** - -Add the `--browser-url` option to your MCP client configuration. The value of this option should be the URL of the running Chrome instance. `http://127.0.0.1:9222` is a common default. - -```json -{ - "mcpServers": { - "chrome-devtools": { - "command": "npx", - "args": [ - "chrome-devtools-mcp@latest", - "--browser-url=http://127.0.0.1:9222" - ] - } - } -} -``` - -**Step 2: Start the Chrome browser** - -> [!WARNING] -> Enabling the remote debugging port opens up a debugging port on the running browser instance. Any application on your machine can connect to this port and control the browser. Make sure that you are not browsing any sensitive websites while the debugging port is open. - -Start the Chrome browser with the remote debugging port enabled. Make sure to close any running Chrome instances before starting a new one with the debugging port enabled. The port number you choose must be the same as the one you specified in the `--browser-url` option in your MCP client configuration. - -For security reasons, [Chrome requires you to use a non-default user data directory](https://developer.chrome.com/blog/remote-debugging-port) when enabling the remote debugging port. You can specify a custom directory using the `--user-data-dir` flag. This ensures that your regular browsing profile and data are not exposed to the debugging session. - -**macOS** - -```bash -/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile-stable -``` - -**Linux** - -```bash -/usr/bin/google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile-stable -``` - -**Windows** - -```bash -"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\chrome-profile-stable" -``` - -**Step 3: Test your setup** - -After configuring the MCP client and starting the Chrome browser, you can test your setup by running a simple prompt in your MCP client: - -``` -Check the performance of https://developers.chrome.com -``` - -Your MCP client should connect to the running Chrome instance and receive a performance report. - -If you hit VM-to-host port forwarding issues, see the “Remote debugging between virtual machine (VM) and host fails” section in [`docs/troubleshooting.md`](./docs/troubleshooting.md#remote-debugging-between-virtual-machine-vm-and-host-fails). - -For more details on remote debugging, see the [Chrome DevTools documentation](https://developer.chrome.com/docs/devtools/remote-debugging/). - -### Debugging Chrome on Android - -Please consult [these instructions](./docs/debugging-android.md). - -## Known limitations - -See [Troubleshooting](./docs/troubleshooting.md). diff --git a/node_modules/chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js b/node_modules/chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js deleted file mode 100644 index e06f70c..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/DevToolsConnectionAdapter.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { CDPSessionEvent } from './third_party/index.js'; -/** - * This class makes a puppeteer connection look like DevTools CDPConnection. - * - * Since we connect "root" DevTools targets to specific pages, we scope everything to a puppeteer CDP session. - * - * We don't have to recursively listen for 'sessionattached' as the "root" CDP session sees all child session attached - * events, regardless how deeply nested they are. - */ -export class PuppeteerDevToolsConnection { - #connection; - #observers = new Set(); - #sessionEventHandlers = new Map(); - constructor(session) { - this.#connection = session.connection(); - session.on(CDPSessionEvent.SessionAttached, this.#startForwardingCdpEvents.bind(this)); - session.on(CDPSessionEvent.SessionDetached, this.#stopForwardingCdpEvents.bind(this)); - this.#startForwardingCdpEvents(session); - } - send(method, params, sessionId) { - if (sessionId === undefined) { - throw new Error('Attempting to send on the root session. This must not happen'); - } - const session = this.#connection.session(sessionId); - if (!session) { - throw new Error('Unknown session ' + sessionId); - } - // Rolled protocol version between puppeteer and DevTools doesn't necessarily match - /* eslint-disable @typescript-eslint/no-explicit-any */ - return session - .send(method, params) - .then(result => ({ result })) - .catch(error => ({ error })); - /* eslint-enable @typescript-eslint/no-explicit-any */ - } - observe(observer) { - this.#observers.add(observer); - } - unobserve(observer) { - this.#observers.delete(observer); - } - #startForwardingCdpEvents(session) { - const handler = this.#handleEvent.bind(this, session.id()); - this.#sessionEventHandlers.set(session.id(), handler); - session.on('*', handler); - } - #stopForwardingCdpEvents(session) { - const handler = this.#sessionEventHandlers.get(session.id()); - if (handler) { - session.off('*', handler); - } - } - #handleEvent(sessionId, type, event) { - if (typeof type === 'string' && - type !== CDPSessionEvent.SessionAttached && - type !== CDPSessionEvent.SessionDetached) { - this.#observers.forEach(observer => observer.onEvent({ - method: type, - sessionId, - params: event, - })); - } - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/DevtoolsUtils.js b/node_modules/chrome-devtools-mcp/build/src/DevtoolsUtils.js deleted file mode 100644 index e0cf9bc..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/DevtoolsUtils.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { PuppeteerDevToolsConnection } from './DevToolsConnectionAdapter.js'; -import { Mutex } from './Mutex.js'; -import { DevTools } from './third_party/index.js'; -/** - * A mock implementation of an issues manager that only implements the methods - * that are actually used by the IssuesAggregator - */ -export class FakeIssuesManager extends DevTools.Common.ObjectWrapper - .ObjectWrapper { - issues() { - return []; - } -} -// DevTools CDP errors can get noisy. -DevTools.ProtocolClient.InspectorBackend.test.suppressRequestErrors = true; -DevTools.I18n.DevToolsLocale.DevToolsLocale.instance({ - create: true, - data: { - navigatorLanguage: 'en-US', - settingLanguage: 'en-US', - lookupClosestDevToolsLocale: l => l, - }, -}); -DevTools.I18n.i18n.registerLocaleDataForTest('en-US', {}); -DevTools.Formatter.FormatterWorkerPool.FormatterWorkerPool.instance({ - forceNew: true, - entrypointURL: import.meta - .resolve('./third_party/devtools-formatter-worker.js'), -}); -export class UniverseManager { - #browser; - #createUniverseFor; - #universes = new WeakMap(); - /** Guard access to #universes so we don't create unnecessary universes */ - #mutex = new Mutex(); - constructor(browser, factory = DEFAULT_FACTORY) { - this.#browser = browser; - this.#createUniverseFor = factory; - } - async init(pages) { - try { - await this.#mutex.acquire(); - const promises = []; - for (const page of pages) { - promises.push(this.#createUniverseFor(page).then(targetUniverse => this.#universes.set(page, targetUniverse))); - } - this.#browser.on('targetcreated', this.#onTargetCreated); - this.#browser.on('targetdestroyed', this.#onTargetDestroyed); - await Promise.all(promises); - } - finally { - this.#mutex.release(); - } - } - get(page) { - return this.#universes.get(page) ?? null; - } - dispose() { - this.#browser.off('targetcreated', this.#onTargetCreated); - this.#browser.off('targetdestroyed', this.#onTargetDestroyed); - } - #onTargetCreated = async (target) => { - const page = await target.page(); - try { - await this.#mutex.acquire(); - if (!page || this.#universes.has(page)) { - return; - } - this.#universes.set(page, await this.#createUniverseFor(page)); - } - finally { - this.#mutex.release(); - } - }; - #onTargetDestroyed = async (target) => { - const page = await target.page(); - try { - await this.#mutex.acquire(); - if (!page || !this.#universes.has(page)) { - return; - } - this.#universes.delete(page); - } - finally { - this.#mutex.release(); - } - }; -} -const DEFAULT_FACTORY = async (page) => { - const settingStorage = new DevTools.Common.Settings.SettingsStorage({}); - const universe = new DevTools.Foundation.Universe.Universe({ - settingsCreationOptions: { - syncedStorage: settingStorage, - globalStorage: settingStorage, - localStorage: settingStorage, - settingRegistrations: DevTools.Common.SettingRegistration.getRegisteredSettings(), - }, - overrideAutoStartModels: new Set([DevTools.DebuggerModel]), - }); - const session = await page.createCDPSession(); - const connection = new PuppeteerDevToolsConnection(session); - const targetManager = universe.context.get(DevTools.TargetManager); - targetManager.observeModels(DevTools.DebuggerModel, SKIP_ALL_PAUSES); - const target = targetManager.createTarget('main', '', 'frame', // eslint-disable-line @typescript-eslint/no-explicit-any - /* parentTarget */ null, session.id(), undefined, connection); - return { target, universe }; -}; -// We don't want to pause any DevTools universe session ever on the MCP side. -// -// Note that calling `setSkipAllPauses` only affects the session on which it was -// sent. This means DevTools can still pause, step and do whatever. We just won't -// see the `Debugger.paused`/`Debugger.resumed` events on the MCP side. -const SKIP_ALL_PAUSES = { - modelAdded(model) { - void model.agent.invoke_setSkipAllPauses({ skip: true }); - }, - modelRemoved() { - // Do nothing. - }, -}; -/** - * Constructed from Runtime.ExceptionDetails of an uncaught error. - * - * TODO: Also construct from a RemoteObject of subtype 'error'. - * - * Consists of the message, a fully resolved stack trace and a fully resolved 'cause' chain. - */ -export class SymbolizedError { - message; - stackTrace; - cause; - constructor(message, stackTrace, cause) { - this.message = message; - this.stackTrace = stackTrace; - this.cause = cause; - } - static async fromDetails(opts) { - const message = SymbolizedError.#getMessage(opts.details); - if (!opts.includeStackAndCause || !opts.devTools) { - return new SymbolizedError(message, opts.resolvedStackTraceForTesting, opts.resolvedCauseForTesting); - } - let stackTrace; - if (opts.resolvedStackTraceForTesting) { - stackTrace = opts.resolvedStackTraceForTesting; - } - else if (opts.details.stackTrace) { - try { - stackTrace = await createStackTrace(opts.devTools, opts.details.stackTrace, opts.targetId); - } - catch { - // ignore - } - } - // TODO: Turn opts.details.exception into a JSHandle and retrieve the 'cause' property. - // If its an Error, recursively create a SymbolizedError. - let cause; - if (opts.resolvedCauseForTesting) { - cause = opts.resolvedCauseForTesting; - } - else if (opts.details.exception) { - try { - const causeRemoteObj = await SymbolizedError.#lookupCause(opts.devTools, opts.details.exception, opts.targetId); - if (causeRemoteObj) { - cause = await SymbolizedError.fromError({ - devTools: opts.devTools, - error: causeRemoteObj, - targetId: opts.targetId, - }); - } - } - catch { - // Ignore - } - } - return new SymbolizedError(message, stackTrace, cause); - } - static async fromError(opts) { - const details = await SymbolizedError.#getExceptionDetails(opts.devTools, opts.error, opts.targetId); - if (details) { - return SymbolizedError.fromDetails({ - details, - devTools: opts.devTools, - targetId: opts.targetId, - includeStackAndCause: true, - }); - } - return new SymbolizedError(SymbolizedError.#getMessageFromException(opts.error)); - } - static #getMessage(details) { - // For Runtime.exceptionThrown with a present exception object, `details.text` will be "Uncaught" and - // we have to manually parse out the error text from the exception description. - // In the case of Runtime.getExceptionDetails, `details.text` has the Error.message. - if (details.text === 'Uncaught' && details.exception) { - return ('Uncaught ' + - SymbolizedError.#getMessageFromException(details.exception)); - } - return details.text; - } - static #getMessageFromException(error) { - const messageWithRest = error.description?.split('\n at ', 2) ?? []; - return messageWithRest[0] ?? ''; - } - static async #getExceptionDetails(devTools, error, targetId) { - if (!devTools || (error.type !== 'object' && error.subtype !== 'error')) { - return null; - } - const targetManager = devTools.universe.context.get(DevTools.TargetManager); - const target = targetId - ? targetManager.targetById(targetId) || devTools.target - : devTools.target; - const model = target.model(DevTools.RuntimeModel); - return ((await model.getExceptionDetails(error.objectId)) ?? null); - } - static async #lookupCause(devTools, error, targetId) { - if (!devTools || (error.type !== 'object' && error.subtype !== 'error')) { - return null; - } - const targetManager = devTools.universe.context.get(DevTools.TargetManager); - const target = targetId - ? targetManager.targetById(targetId) || devTools.target - : devTools.target; - const properties = await target.runtimeAgent().invoke_getProperties({ - objectId: error.objectId, - }); - if (properties.getError()) { - return null; - } - return properties.result.find(prop => prop.name === 'cause')?.value ?? null; - } - static createForTesting(message, stackTrace, cause) { - return new SymbolizedError(message, stackTrace, cause); - } -} -export async function createStackTraceForConsoleMessage(devTools, consoleMessage) { - const message = consoleMessage; - const rawStackTrace = message._rawStackTrace(); - if (rawStackTrace) { - return createStackTrace(devTools, rawStackTrace, message._targetId()); - } - return undefined; -} -export async function createStackTrace(devTools, rawStackTrace, targetId) { - const targetManager = devTools.universe.context.get(DevTools.TargetManager); - const target = targetId - ? targetManager.targetById(targetId) || devTools.target - : devTools.target; - const model = target.model(DevTools.DebuggerModel); - // DevTools doesn't wait for source maps to attach before building a stack trace, rather it'll send - // an update event once a source map was attached and the stack trace retranslated. This doesn't - // work in the MCP case, so we'll collect all script IDs upfront and wait for any pending source map - // loads before creating the stack trace. We might also have to wait for Debugger.ScriptParsed events if - // the stack trace is created particularly early. - const scriptIds = new Set(); - for (const frame of rawStackTrace.callFrames) { - scriptIds.add(frame.scriptId); - } - for (let asyncStack = rawStackTrace.parent; asyncStack; asyncStack = asyncStack.parent) { - for (const frame of asyncStack.callFrames) { - scriptIds.add(frame.scriptId); - } - } - const signal = AbortSignal.timeout(1_000); - await Promise.all([...scriptIds].map(id => waitForScript(model, id, signal) - .then(script => model.sourceMapManager().sourceMapForClientPromise(script)) - .catch())); - const binding = devTools.universe.context.get(DevTools.DebuggerWorkspaceBinding); - // DevTools uses branded types for ScriptId and others. Casting the puppeteer protocol type to the DevTools protocol type is safe. - return binding.createStackTraceFromProtocolRuntime(rawStackTrace, target); -} -// Waits indefinitely for the script so pair it with Promise.race. -async function waitForScript(model, scriptId, signal) { - while (true) { - if (signal.aborted) { - throw signal.reason; - } - const script = model.scriptForId(scriptId); - if (script) { - return script; - } - await new Promise((resolve, reject) => { - signal.addEventListener('abort', () => reject(signal.reason), { - once: true, - }); - void model - .once('ParsedScriptSource') - .then(resolve); - }); - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/McpContext.js b/node_modules/chrome-devtools-mcp/build/src/McpContext.js deleted file mode 100644 index 2d891a6..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/McpContext.js +++ /dev/null @@ -1,707 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import fs from 'node:fs/promises'; -import path from 'node:path'; -import { UniverseManager } from './DevtoolsUtils.js'; -import { McpPage } from './McpPage.js'; -import { NetworkCollector, ConsoleCollector, } from './PageCollector.js'; -import { Locator } from './third_party/index.js'; -import { PredefinedNetworkConditions } from './third_party/index.js'; -import { listPages } from './tools/pages.js'; -import { CLOSE_PAGE_ERROR } from './tools/ToolDefinition.js'; -import { ExtensionRegistry, } from './utils/ExtensionRegistry.js'; -import { saveTemporaryFile } from './utils/files.js'; -import { WaitForHelper } from './WaitForHelper.js'; -const DEFAULT_TIMEOUT = 5_000; -const NAVIGATION_TIMEOUT = 10_000; -function getNetworkMultiplierFromString(condition) { - const puppeteerCondition = condition; - switch (puppeteerCondition) { - case 'Fast 4G': - return 1; - case 'Slow 4G': - return 2.5; - case 'Fast 3G': - return 5; - case 'Slow 3G': - return 10; - } - return 1; -} -export class McpContext { - browser; - logger; - // Maps LLM-provided isolatedContext name → Puppeteer BrowserContext. - #isolatedContexts = new Map(); - // Auto-generated name counter for when no name is provided. - #nextIsolatedContextId = 1; - #pages = []; - #extensionServiceWorkers = []; - #mcpPages = new Map(); - #selectedPage; - #networkCollector; - #consoleCollector; - #devtoolsUniverseManager; - #extensionRegistry = new ExtensionRegistry(); - #isRunningTrace = false; - #screenRecorderData = null; - #inPageTools; - #nextPageId = 1; - #extensionPages = new WeakMap(); - #extensionServiceWorkerMap = new WeakMap(); - #nextExtensionServiceWorkerId = 1; - #nextSnapshotId = 1; - #traceResults = []; - #locatorClass; - #options; - constructor(browser, logger, options, locatorClass) { - this.browser = browser; - this.logger = logger; - this.#locatorClass = locatorClass; - this.#options = options; - this.#networkCollector = new NetworkCollector(this.browser); - this.#consoleCollector = new ConsoleCollector(this.browser, collect => { - return { - console: event => { - collect(event); - }, - uncaughtError: event => { - collect(event); - }, - issue: event => { - collect(event); - }, - }; - }); - this.#devtoolsUniverseManager = new UniverseManager(this.browser); - } - async #init() { - const pages = await this.createPagesSnapshot(); - await this.createExtensionServiceWorkersSnapshot(); - await this.#networkCollector.init(pages); - await this.#consoleCollector.init(pages); - await this.#devtoolsUniverseManager.init(pages); - } - dispose() { - this.#networkCollector.dispose(); - this.#consoleCollector.dispose(); - this.#devtoolsUniverseManager.dispose(); - for (const mcpPage of this.#mcpPages.values()) { - mcpPage.dispose(); - } - this.#mcpPages.clear(); - // Isolated contexts are intentionally not closed here. - // Either the entire browser will be closed or we disconnect - // without destroying browser state. - this.#isolatedContexts.clear(); - } - static async from(browser, logger, opts, - /* Let tests use unbundled Locator class to avoid overly strict checks within puppeteer that fail when mixing bundled and unbundled class instances */ - locatorClass = Locator) { - const context = new McpContext(browser, logger, opts, locatorClass); - await context.#init(); - return context; - } - resolveCdpRequestId(page, cdpRequestId) { - if (!cdpRequestId) { - this.logger('no network request'); - return; - } - const request = this.#networkCollector.find(page.pptrPage, request => { - // @ts-expect-error id is internal. - return request.id === cdpRequestId; - }); - if (!request) { - this.logger('no network request for ' + cdpRequestId); - return; - } - return this.#networkCollector.getIdForResource(request); - } - resolveCdpElementId(page, cdpBackendNodeId) { - if (!cdpBackendNodeId) { - this.logger('no cdpBackendNodeId'); - return; - } - const snapshot = page.textSnapshot; - if (!snapshot) { - this.logger('no text snapshot'); - return; - } - // TODO: index by backendNodeId instead. - const queue = [snapshot.root]; - while (queue.length) { - const current = queue.pop(); - if (current.backendNodeId === cdpBackendNodeId) { - return current.id; - } - for (const child of current.children) { - queue.push(child); - } - } - return; - } - getNetworkRequests(page, includePreservedRequests) { - return this.#networkCollector.getData(page.pptrPage, includePreservedRequests); - } - getConsoleData(page, includePreservedMessages) { - return this.#consoleCollector.getData(page.pptrPage, includePreservedMessages); - } - getDevToolsUniverse(page) { - return this.#devtoolsUniverseManager.get(page.pptrPage); - } - getConsoleMessageStableId(message) { - return this.#consoleCollector.getIdForResource(message); - } - getConsoleMessageById(page, id) { - return this.#consoleCollector.getById(page.pptrPage, id); - } - async newPage(background, isolatedContextName) { - let page; - if (isolatedContextName !== undefined) { - let ctx = this.#isolatedContexts.get(isolatedContextName); - if (!ctx) { - ctx = await this.browser.createBrowserContext(); - this.#isolatedContexts.set(isolatedContextName, ctx); - } - page = await ctx.newPage(); - } - else { - page = await this.browser.newPage({ background }); - } - await this.createPagesSnapshot(); - this.selectPage(this.#getMcpPage(page)); - this.#networkCollector.addPage(page); - this.#consoleCollector.addPage(page); - return this.#getMcpPage(page); - } - async closePage(pageId) { - if (this.#pages.length === 1) { - throw new Error(CLOSE_PAGE_ERROR); - } - const page = this.getPageById(pageId); - if (page) { - page.dispose(); - this.#mcpPages.delete(page.pptrPage); - } - await page.pptrPage.close({ runBeforeUnload: false }); - } - getNetworkRequestById(page, reqid) { - return this.#networkCollector.getById(page.pptrPage, reqid); - } - async restoreEmulation(page) { - const currentSetting = page.emulationSettings; - await this.emulate(currentSetting, page.pptrPage); - } - async emulate(options, targetPage) { - const page = targetPage ?? this.getSelectedPptrPage(); - const mcpPage = this.#getMcpPage(page); - const newSettings = { ...mcpPage.emulationSettings }; - if (!options.networkConditions) { - await page.emulateNetworkConditions(null); - delete newSettings.networkConditions; - } - else if (options.networkConditions === 'Offline') { - await page.emulateNetworkConditions({ - offline: true, - download: 0, - upload: 0, - latency: 0, - }); - newSettings.networkConditions = 'Offline'; - } - else if (options.networkConditions in PredefinedNetworkConditions) { - const networkCondition = PredefinedNetworkConditions[options.networkConditions]; - await page.emulateNetworkConditions(networkCondition); - newSettings.networkConditions = options.networkConditions; - } - if (!options.cpuThrottlingRate) { - await page.emulateCPUThrottling(1); - delete newSettings.cpuThrottlingRate; - } - else { - await page.emulateCPUThrottling(options.cpuThrottlingRate); - newSettings.cpuThrottlingRate = options.cpuThrottlingRate; - } - if (!options.geolocation) { - await page.setGeolocation({ latitude: 0, longitude: 0 }); - delete newSettings.geolocation; - } - else { - await page.setGeolocation(options.geolocation); - newSettings.geolocation = options.geolocation; - } - if (!options.userAgent) { - await page.setUserAgent({ userAgent: undefined }); - delete newSettings.userAgent; - } - else { - await page.setUserAgent({ userAgent: options.userAgent }); - newSettings.userAgent = options.userAgent; - } - if (!options.colorScheme || options.colorScheme === 'auto') { - await page.emulateMediaFeatures([ - { name: 'prefers-color-scheme', value: '' }, - ]); - delete newSettings.colorScheme; - } - else { - await page.emulateMediaFeatures([ - { name: 'prefers-color-scheme', value: options.colorScheme }, - ]); - newSettings.colorScheme = options.colorScheme; - } - if (!options.viewport) { - await page.setViewport(null); - delete newSettings.viewport; - } - else { - const defaults = { - deviceScaleFactor: 1, - isMobile: false, - hasTouch: false, - isLandscape: false, - }; - const viewport = { ...defaults, ...options.viewport }; - await page.setViewport(viewport); - newSettings.viewport = viewport; - } - mcpPage.emulationSettings = Object.keys(newSettings).length - ? newSettings - : {}; - this.#updateSelectedPageTimeouts(); - } - setIsRunningPerformanceTrace(x) { - this.#isRunningTrace = x; - } - isRunningPerformanceTrace() { - return this.#isRunningTrace; - } - getScreenRecorder() { - return this.#screenRecorderData; - } - setScreenRecorder(data) { - this.#screenRecorderData = data; - } - isCruxEnabled() { - return this.#options.performanceCrux; - } - getSelectedPptrPage() { - const page = this.#selectedPage; - if (!page) { - throw new Error('No page selected'); - } - if (page.pptrPage.isClosed()) { - throw new Error(`The selected page has been closed. Call ${listPages().name} to see open pages.`); - } - return page.pptrPage; - } - getSelectedMcpPage() { - const page = this.getSelectedPptrPage(); - return this.#getMcpPage(page); - } - getPageById(pageId) { - const page = this.#mcpPages.values().find(mcpPage => mcpPage.id === pageId); - if (!page) { - throw new Error('No page found'); - } - return page; - } - getPageId(page) { - return this.#mcpPages.get(page)?.id; - } - #getMcpPage(page) { - const mcpPage = this.#mcpPages.get(page); - if (!mcpPage) { - throw new Error('No McpPage found for the given page.'); - } - return mcpPage; - } - #getSelectedMcpPage() { - return this.#getMcpPage(this.getSelectedPptrPage()); - } - isPageSelected(page) { - return this.#selectedPage?.pptrPage === page; - } - selectPage(newPage) { - this.#selectedPage = newPage; - this.#updateSelectedPageTimeouts(); - } - setInPageTools(toolGroup) { - this.#inPageTools = toolGroup; - } - getInPageTools() { - return this.#inPageTools; - } - #updateSelectedPageTimeouts() { - const page = this.#getSelectedMcpPage(); - // For waiters 5sec timeout should be sufficient. - // Increased in case we throttle the CPU - const cpuMultiplier = page.cpuThrottlingRate; - page.pptrPage.setDefaultTimeout(DEFAULT_TIMEOUT * cpuMultiplier); - // 10sec should be enough for the load event to be emitted during - // navigations. - // Increased in case we throttle the network requests - const networkMultiplier = getNetworkMultiplierFromString(page.networkConditions); - page.pptrPage.setDefaultNavigationTimeout(NAVIGATION_TIMEOUT * networkMultiplier); - } - // Linear scan over per-page snapshots. The page count is small (typically - // 2-10) so a reverse index isn't worthwhile given the uid-reuse lifecycle - // complexity it would introduce. - getAXNodeByUid(uid) { - for (const mcpPage of this.#mcpPages.values()) { - const node = mcpPage.textSnapshot?.idToNode.get(uid); - if (node) { - return node; - } - } - return undefined; - } - /** - * Creates a snapshot of the extension service workers. - */ - async createExtensionServiceWorkersSnapshot() { - const allTargets = await this.browser.targets(); - const serviceWorkers = allTargets.filter(target => { - return (target.type() === 'service_worker' && - target.url().includes('chrome-extension://')); - }); - for (const serviceWorker of serviceWorkers) { - if (!this.#extensionServiceWorkerMap.has(serviceWorker)) { - this.#extensionServiceWorkerMap.set(serviceWorker, 'sw-' + this.#nextExtensionServiceWorkerId++); - } - } - this.#extensionServiceWorkers = serviceWorkers.map(serviceWorker => { - return { - target: serviceWorker, - id: this.#extensionServiceWorkerMap.get(serviceWorker), - url: serviceWorker.url(), - }; - }); - return this.#extensionServiceWorkers; - } - async createPagesSnapshot() { - const { pages: allPages, isolatedContextNames } = await this.#getAllPages(); - for (const page of allPages) { - let mcpPage = this.#mcpPages.get(page); - if (!mcpPage) { - mcpPage = new McpPage(page, this.#nextPageId++); - this.#mcpPages.set(page, mcpPage); - // We emulate a focused page for all pages to support multi-agent workflows. - void page.emulateFocusedPage(true).catch(error => { - this.logger('Error turning on focused page emulation', error); - }); - } - mcpPage.isolatedContextName = isolatedContextNames.get(page); - } - // Prune orphaned #mcpPages entries (pages that no longer exist). - const currentPages = new Set(allPages); - for (const [page, mcpPage] of this.#mcpPages) { - if (!currentPages.has(page)) { - mcpPage.dispose(); - this.#mcpPages.delete(page); - } - } - this.#pages = allPages.filter(page => { - return (this.#options.experimentalDevToolsDebugging || - !page.url().startsWith('devtools://')); - }); - if ((!this.#selectedPage || - this.#pages.indexOf(this.#selectedPage.pptrPage) === -1) && - this.#pages[0]) { - this.selectPage(this.#getMcpPage(this.#pages[0])); - } - await this.detectOpenDevToolsWindows(); - return this.#pages; - } - async #getAllPages() { - const defaultCtx = this.browser.defaultBrowserContext(); - const allPages = await this.browser.pages(this.#options.experimentalIncludeAllPages); - const allTargets = this.browser.targets(); - const extensionTargets = allTargets.filter(target => { - return (target.url().startsWith('chrome-extension://') && - target.type() === 'page'); - }); - for (const target of extensionTargets) { - // Right now target.page() returns null for popup and side panel pages. - let page = await target.page(); - if (!page) { - // We need to cache pages instances for targets because target.asPage() - // returns a new page instance every time. - page = this.#extensionPages.get(target) ?? null; - if (!page) { - try { - page = await target.asPage(); - this.#extensionPages.set(target, page); - } - catch (e) { - this.logger('Failed to get page for extension target', e); - } - } - } - if (page && !allPages.includes(page)) { - allPages.push(page); - } - } - // Build a reverse lookup from BrowserContext instance → name. - const contextToName = new Map(); - for (const [name, ctx] of this.#isolatedContexts) { - contextToName.set(ctx, name); - } - // Auto-discover BrowserContexts not in our mapping (e.g., externally - // created incognito contexts) and assign generated names. - const knownContexts = new Set(this.#isolatedContexts.values()); - for (const ctx of this.browser.browserContexts()) { - if (ctx !== defaultCtx && !ctx.closed && !knownContexts.has(ctx)) { - const name = `isolated-context-${this.#nextIsolatedContextId++}`; - this.#isolatedContexts.set(name, ctx); - contextToName.set(ctx, name); - } - } - // Map each page to its isolated context name (if any). - const isolatedContextNames = new Map(); - for (const page of allPages) { - const ctx = page.browserContext(); - const name = contextToName.get(ctx); - if (name) { - isolatedContextNames.set(page, name); - } - } - return { pages: allPages, isolatedContextNames }; - } - async detectOpenDevToolsWindows() { - this.logger('Detecting open DevTools windows'); - const { pages } = await this.#getAllPages(); - await Promise.all(pages.map(async (page) => { - const mcpPage = this.#mcpPages.get(page); - if (!mcpPage) { - return; - } - // Prior to Chrome 144.0.7559.59, the command fails, - // Some Electron apps still use older version - // Fall back to not exposing DevTools at all. - try { - if (await page.hasDevTools()) { - mcpPage.devToolsPage = await page.openDevTools(); - } - else { - mcpPage.devToolsPage = undefined; - } - } - catch { - mcpPage.devToolsPage = undefined; - } - })); - } - getExtensionServiceWorkers() { - return this.#extensionServiceWorkers; - } - getExtensionServiceWorkerId(extensionServiceWorker) { - return this.#extensionServiceWorkerMap.get(extensionServiceWorker.target); - } - getPages() { - return this.#pages; - } - getIsolatedContextName(page) { - return this.#mcpPages.get(page)?.isolatedContextName; - } - getDevToolsPage(page) { - return this.#mcpPages.get(page)?.devToolsPage; - } - async getDevToolsData(page) { - try { - this.logger('Getting DevTools UI data'); - const devtoolsPage = this.getDevToolsPage(page.pptrPage); - if (!devtoolsPage) { - this.logger('No DevTools page detected'); - return {}; - } - const { cdpRequestId, cdpBackendNodeId } = await devtoolsPage.evaluate(async () => { - // @ts-expect-error no types - const UI = await import('/bundled/ui/legacy/legacy.js'); - // @ts-expect-error no types - const SDK = await import('/bundled/core/sdk/sdk.js'); - const request = UI.Context.Context.instance().flavor(SDK.NetworkRequest.NetworkRequest); - const node = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode); - return { - cdpRequestId: request?.requestId(), - cdpBackendNodeId: node?.backendNodeId(), - }; - }); - return { cdpBackendNodeId, cdpRequestId }; - } - catch (err) { - this.logger('error getting devtools data', err); - } - return {}; - } - /** - * Creates a text snapshot of a page. - */ - async createTextSnapshot(page, verbose = false, devtoolsData = undefined) { - const rootNode = await page.pptrPage.accessibility.snapshot({ - includeIframes: true, - interestingOnly: !verbose, - }); - if (!rootNode) { - return; - } - const { uniqueBackendNodeIdToMcpId } = page; - const snapshotId = this.#nextSnapshotId++; - // Iterate through the whole accessibility node tree and assign node ids that - // will be used for the tree serialization and mapping ids back to nodes. - let idCounter = 0; - const idToNode = new Map(); - const seenUniqueIds = new Set(); - const assignIds = (node) => { - let id = ''; - // @ts-expect-error untyped loaderId & backendNodeId. - const uniqueBackendId = `${node.loaderId}_${node.backendNodeId}`; - if (uniqueBackendNodeIdToMcpId.has(uniqueBackendId)) { - // Re-use MCP exposed ID if the uniqueId is the same. - id = uniqueBackendNodeIdToMcpId.get(uniqueBackendId); - } - else { - // Only generate a new ID if we have not seen the node before. - id = `${snapshotId}_${idCounter++}`; - uniqueBackendNodeIdToMcpId.set(uniqueBackendId, id); - } - seenUniqueIds.add(uniqueBackendId); - const nodeWithId = { - ...node, - id, - children: node.children - ? node.children.map(child => assignIds(child)) - : [], - }; - // The AXNode for an option doesn't contain its `value`. - // Therefore, set text content of the option as value. - if (node.role === 'option') { - const optionText = node.name; - if (optionText) { - nodeWithId.value = optionText.toString(); - } - } - idToNode.set(nodeWithId.id, nodeWithId); - return nodeWithId; - }; - const rootNodeWithId = assignIds(rootNode); - const snapshot = { - root: rootNodeWithId, - snapshotId: String(snapshotId), - idToNode, - hasSelectedElement: false, - verbose, - }; - page.textSnapshot = snapshot; - const data = devtoolsData ?? (await this.getDevToolsData(page)); - if (data?.cdpBackendNodeId) { - snapshot.hasSelectedElement = true; - snapshot.selectedElementUid = this.resolveCdpElementId(page, data?.cdpBackendNodeId); - } - // Clean up unique IDs that we did not see anymore. - for (const key of uniqueBackendNodeIdToMcpId.keys()) { - if (!seenUniqueIds.has(key)) { - uniqueBackendNodeIdToMcpId.delete(key); - } - } - } - async saveTemporaryFile(data, filename) { - return await saveTemporaryFile(data, filename); - } - async saveFile(data, filename) { - try { - const filePath = path.resolve(filename); - await fs.mkdir(path.dirname(filePath), { recursive: true }); - await fs.writeFile(filePath, data); - return { filename: filePath }; - } - catch (err) { - this.logger(err); - throw new Error('Could not save a file', { cause: err }); - } - } - storeTraceRecording(result) { - // Clear the trace results because we only consume the latest trace currently. - this.#traceResults = []; - this.#traceResults.push(result); - } - recordedTraces() { - return this.#traceResults; - } - getWaitForHelper(page, cpuMultiplier, networkMultiplier) { - return new WaitForHelper(page, cpuMultiplier, networkMultiplier); - } - waitForEventsAfterAction(action, options) { - const page = this.#getSelectedMcpPage(); - const cpuMultiplier = page.cpuThrottlingRate; - const networkMultiplier = getNetworkMultiplierFromString(page.networkConditions); - const waitForHelper = this.getWaitForHelper(page.pptrPage, cpuMultiplier, networkMultiplier); - return waitForHelper.waitForEventsAfterAction(action, options); - } - getNetworkRequestStableId(request) { - return this.#networkCollector.getIdForResource(request); - } - waitForTextOnPage(text, timeout, targetPage) { - const page = targetPage ?? this.getSelectedPptrPage(); - const frames = page.frames(); - let locator = this.#locatorClass.race(frames.flatMap(frame => text.flatMap(value => [ - frame.locator(`aria/${value}`), - frame.locator(`text/${value}`), - ]))); - if (timeout) { - locator = locator.setTimeout(timeout); - } - return locator.wait(); - } - /** - * We need to ignore favicon request as they make our test flaky - */ - async setUpNetworkCollectorForTesting() { - this.#networkCollector = new NetworkCollector(this.browser, collect => { - return { - request: req => { - if (req.url().includes('favicon.ico')) { - return; - } - collect(req); - }, - }; - }); - const { pages } = await this.#getAllPages(); - await this.#networkCollector.init(pages); - } - async installExtension(extensionPath) { - const id = await this.browser.installExtension(extensionPath); - await this.#extensionRegistry.registerExtension(id, extensionPath); - return id; - } - async uninstallExtension(id) { - await this.browser.uninstallExtension(id); - this.#extensionRegistry.remove(id); - } - async triggerExtensionAction(id) { - const page = this.getSelectedPptrPage(); - // @ts-expect-error internal puppeteer api is needed since we don't have a way to get - // a tab id at the moment - const theTarget = page._tabId; - const session = await this.browser.target().createCDPSession(); - try { - await session.send('Extensions.triggerAction', { - id, - targetId: theTarget, - }); - } - finally { - await session.detach(); - } - } - listExtensions() { - return this.#extensionRegistry.list(); - } - getExtension(id) { - return this.#extensionRegistry.getById(id); - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/McpPage.js b/node_modules/chrome-devtools-mcp/build/src/McpPage.js deleted file mode 100644 index f7f5b3d..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/McpPage.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { takeSnapshot } from './tools/snapshot.js'; -/** - * Per-page state wrapper. Consolidates dialog, snapshot, emulation, - * and metadata that were previously scattered across Maps in McpContext. - * - * Internal class consumed only by McpContext. Fields are public for direct - * read/write access. The dialog field is private because it requires an - * event listener lifecycle managed by the constructor/dispose pair. - */ -export class McpPage { - pptrPage; - id; - // Snapshot - textSnapshot = null; - uniqueBackendNodeIdToMcpId = new Map(); - // Emulation - emulationSettings = {}; - // Metadata - isolatedContextName; - devToolsPage; - // Dialog - #dialog; - #dialogHandler; - constructor(page, id) { - this.pptrPage = page; - this.id = id; - this.#dialogHandler = (dialog) => { - this.#dialog = dialog; - }; - page.on('dialog', this.#dialogHandler); - } - get dialog() { - return this.#dialog; - } - getDialog() { - return this.dialog; - } - clearDialog() { - this.#dialog = undefined; - } - get networkConditions() { - return this.emulationSettings.networkConditions ?? null; - } - get cpuThrottlingRate() { - return this.emulationSettings.cpuThrottlingRate ?? 1; - } - get geolocation() { - return this.emulationSettings.geolocation ?? null; - } - get viewport() { - return this.emulationSettings.viewport ?? null; - } - get userAgent() { - return this.emulationSettings.userAgent ?? null; - } - get colorScheme() { - return this.emulationSettings.colorScheme ?? null; - } - dispose() { - this.pptrPage.off('dialog', this.#dialogHandler); - } - async getElementByUid(uid) { - if (!this.textSnapshot) { - throw new Error(`No snapshot found for page ${this.id ?? '?'}. Use ${takeSnapshot.name} to capture one.`); - } - const node = this.textSnapshot.idToNode.get(uid); - if (!node) { - throw new Error(`Element uid "${uid}" not found on page ${this.id}.`); - } - return this.#resolveElementHandle(node, uid); - } - async #resolveElementHandle(node, uid) { - const message = `Element with uid ${uid} no longer exists on the page.`; - try { - const handle = await node.elementHandle(); - if (!handle) { - throw new Error(message); - } - return handle; - } - catch (error) { - throw new Error(message, { - cause: error, - }); - } - } - getAXNodeByUid(uid) { - return this.textSnapshot?.idToNode.get(uid); - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/McpResponse.js b/node_modules/chrome-devtools-mcp/build/src/McpResponse.js deleted file mode 100644 index 419e019..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/McpResponse.js +++ /dev/null @@ -1,668 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { ConsoleFormatter } from './formatters/ConsoleFormatter.js'; -import { IssueFormatter } from './formatters/IssueFormatter.js'; -import { NetworkFormatter } from './formatters/NetworkFormatter.js'; -import { SnapshotFormatter } from './formatters/SnapshotFormatter.js'; -import { UncaughtError } from './PageCollector.js'; -import { DevTools } from './third_party/index.js'; -import { handleDialog } from './tools/pages.js'; -import { getInsightOutput, getTraceSummary } from './trace-processing/parse.js'; -import { paginate } from './utils/pagination.js'; -async function getToolGroup(page) { - // Check if there is a `devtoolstooldiscovery` event listener - const windowHandle = await page.pptrPage.evaluateHandle(() => window); - // @ts-expect-error internal API - const client = page.pptrPage._client(); - const { listeners } = await client.send('DOMDebugger.getEventListeners', { - objectId: windowHandle.remoteObject().objectId, - }); - if (listeners.find(l => l.type === 'devtoolstooldiscovery') === undefined) { - return; - } - const toolGroup = await page.pptrPage.evaluate(() => { - return new Promise(resolve => { - const event = new CustomEvent('devtoolstooldiscovery'); - // @ts-expect-error Adding custom property - event.respondWith = (toolGroup) => { - if (!window.__dtmcp) { - window.__dtmcp = {}; - } - window.__dtmcp.toolGroup = toolGroup; - // When receiving a toolGroup for the first time, expose a simple execution helper - if (!window.__dtmcp.executeTool) { - window.__dtmcp.executeTool = async (toolName, args) => { - if (!window.__dtmcp?.toolGroup) { - throw new Error('No tools found on the page'); - } - const tool = window.__dtmcp.toolGroup.tools.find(t => t.name === toolName); - if (!tool) { - throw new Error(`Tool ${toolName} not found`); - } - return await tool.execute(args); - }; - } - resolve(toolGroup); - }; - window.dispatchEvent(event); - // If the page does not synchronously call `event.respondWith`, return instead of timing out - setTimeout(() => { - resolve(undefined); - }, 0); - }); - }); - return toolGroup; -} -export class McpResponse { - #includePages = false; - #includeExtensionServiceWorkers = false; - #includeExtensionPages = false; - #snapshotParams; - #attachedNetworkRequestId; - #attachedNetworkRequestOptions; - #attachedConsoleMessageId; - #attachedTraceSummary; - #attachedTraceInsight; - #attachedLighthouseResult; - #textResponseLines = []; - #images = []; - #networkRequestsOptions; - #consoleDataOptions; - #listExtensions; - #listInPageTools; - #devToolsData; - #tabId; - #args; - #page; - constructor(args) { - this.#args = args; - } - setPage(page) { - this.#page = page; - } - attachDevToolsData(data) { - this.#devToolsData = data; - } - setTabId(tabId) { - this.#tabId = tabId; - } - setIncludePages(value) { - this.#includePages = value; - if (this.#args.categoryExtensions) { - this.#includeExtensionServiceWorkers = value; - this.#includeExtensionPages = value; - } - } - includeSnapshot(params) { - this.#snapshotParams = params ?? { - verbose: false, - }; - } - setListExtensions() { - this.#listExtensions = true; - } - setListInPageTools() { - if (this.#args.categoryInPageTools) { - this.#listInPageTools = true; - } - } - setIncludeNetworkRequests(value, options) { - if (!value) { - this.#networkRequestsOptions = undefined; - return; - } - this.#networkRequestsOptions = { - include: value, - pagination: options?.pageSize || options?.pageIdx - ? { - pageSize: options.pageSize, - pageIdx: options.pageIdx, - } - : undefined, - resourceTypes: options?.resourceTypes, - includePreservedRequests: options?.includePreservedRequests, - networkRequestIdInDevToolsUI: options?.networkRequestIdInDevToolsUI, - }; - } - setIncludeConsoleData(value, options) { - if (!value) { - this.#consoleDataOptions = undefined; - return; - } - this.#consoleDataOptions = { - include: value, - pagination: options?.pageSize || options?.pageIdx - ? { - pageSize: options.pageSize, - pageIdx: options.pageIdx, - } - : undefined, - types: options?.types, - includePreservedMessages: options?.includePreservedMessages, - }; - } - attachNetworkRequest(reqId, options) { - this.#attachedNetworkRequestId = reqId; - this.#attachedNetworkRequestOptions = options; - } - attachConsoleMessage(msgid) { - this.#attachedConsoleMessageId = msgid; - } - attachTraceSummary(result) { - this.#attachedTraceSummary = result; - } - attachTraceInsight(trace, insightSetId, insightName) { - this.#attachedTraceInsight = { - trace, - insightSetId, - insightName, - }; - } - attachLighthouseResult(result) { - this.#attachedLighthouseResult = result; - } - get includePages() { - return this.#includePages; - } - get attachedTraceSummary() { - return this.#attachedTraceSummary; - } - get attachedTracedInsight() { - return this.#attachedTraceInsight; - } - get attachedLighthouseResult() { - return this.#attachedLighthouseResult; - } - get includeNetworkRequests() { - return this.#networkRequestsOptions?.include ?? false; - } - get includeConsoleData() { - return this.#consoleDataOptions?.include ?? false; - } - get attachedNetworkRequestId() { - return this.#attachedNetworkRequestId; - } - get networkRequestsPageIdx() { - return this.#networkRequestsOptions?.pagination?.pageIdx; - } - get consoleMessagesPageIdx() { - return this.#consoleDataOptions?.pagination?.pageIdx; - } - get consoleMessagesTypes() { - return this.#consoleDataOptions?.types; - } - appendResponseLine(value) { - this.#textResponseLines.push(value); - } - attachImage(value) { - this.#images.push(value); - } - get responseLines() { - return this.#textResponseLines; - } - get images() { - return this.#images; - } - get snapshotParams() { - return this.#snapshotParams; - } - async handle(toolName, context) { - if (this.#includePages) { - await context.createPagesSnapshot(); - } - if (this.#includeExtensionServiceWorkers) { - await context.createExtensionServiceWorkersSnapshot(); - } - let snapshot; - if (this.#snapshotParams) { - if (!this.#page) { - throw new Error('Response must have a page'); - } - await context.createTextSnapshot(this.#page, this.#snapshotParams.verbose, this.#devToolsData); - const textSnapshot = this.#page.textSnapshot; - if (textSnapshot) { - const formatter = new SnapshotFormatter(textSnapshot); - if (this.#snapshotParams.filePath) { - await context.saveFile(new TextEncoder().encode(formatter.toString()), this.#snapshotParams.filePath); - snapshot = this.#snapshotParams.filePath; - } - else { - snapshot = formatter; - } - } - } - let detailedNetworkRequest; - if (this.#attachedNetworkRequestId) { - if (!this.#page) { - throw new Error(`Response must have an McpPage`); - } - const request = context.getNetworkRequestById(this.#page, this.#attachedNetworkRequestId); - const formatter = await NetworkFormatter.from(request, { - requestId: this.#attachedNetworkRequestId, - requestIdResolver: req => context.getNetworkRequestStableId(req), - fetchData: true, - requestFilePath: this.#attachedNetworkRequestOptions?.requestFilePath, - responseFilePath: this.#attachedNetworkRequestOptions?.responseFilePath, - saveFile: (data, filename) => context.saveFile(data, filename), - }); - detailedNetworkRequest = formatter; - } - let detailedConsoleMessage; - if (this.#attachedConsoleMessageId) { - if (!this.#page) { - throw new Error(`Response must have an McpPage`); - } - const message = context.getConsoleMessageById(this.#page, this.#attachedConsoleMessageId); - const consoleMessageStableId = this.#attachedConsoleMessageId; - if ('args' in message || message instanceof UncaughtError) { - const consoleMessage = message; - const devTools = context.getDevToolsUniverse(this.#page); - detailedConsoleMessage = await ConsoleFormatter.from(consoleMessage, { - id: consoleMessageStableId, - fetchDetailedData: true, - devTools: devTools ?? undefined, - }); - } - else if (message instanceof DevTools.AggregatedIssue) { - const formatter = new IssueFormatter(message, { - id: consoleMessageStableId, - requestIdResolver: context.resolveCdpRequestId.bind(context, this.#page), - elementIdResolver: context.resolveCdpElementId.bind(context, this.#page), - }); - if (!formatter.isValid()) { - throw new Error("Can't provide details for the msgid " + consoleMessageStableId); - } - detailedConsoleMessage = formatter; - } - } - let extensions; - if (this.#listExtensions) { - extensions = context.listExtensions(); - } - let inPageTools; - if (this.#listInPageTools) { - inPageTools = await getToolGroup(context.getSelectedMcpPage()); - context.setInPageTools(inPageTools); - } - let consoleMessages; - if (this.#consoleDataOptions?.include) { - if (!this.#page) { - throw new Error(`Response must have an McpPage`); - } - const page = this.#page; - let messages = context.getConsoleData(this.#page, this.#consoleDataOptions.includePreservedMessages); - if (this.#consoleDataOptions.types?.length) { - const normalizedTypes = new Set(this.#consoleDataOptions.types); - messages = messages.filter(message => { - if ('type' in message) { - return normalizedTypes.has(message.type()); - } - if (message instanceof DevTools.AggregatedIssue) { - return normalizedTypes.has('issue'); - } - return normalizedTypes.has('error'); - }); - } - consoleMessages = (await Promise.all(messages.map(async (item) => { - const consoleMessageStableId = context.getConsoleMessageStableId(item); - if ('args' in item || item instanceof UncaughtError) { - const consoleMessage = item; - const devTools = context.getDevToolsUniverse(page); - return await ConsoleFormatter.from(consoleMessage, { - id: consoleMessageStableId, - fetchDetailedData: false, - devTools: devTools ?? undefined, - }); - } - if (item instanceof DevTools.AggregatedIssue) { - const formatter = new IssueFormatter(item, { - id: consoleMessageStableId, - }); - if (!formatter.isValid()) { - return null; - } - return formatter; - } - return null; - }))).filter(item => item !== null); - } - let networkRequests; - if (this.#networkRequestsOptions?.include) { - if (!this.#page) { - throw new Error(`Response must have an McpPage`); - } - let requests = context.getNetworkRequests(this.#page, this.#networkRequestsOptions?.includePreservedRequests); - // Apply resource type filtering if specified - if (this.#networkRequestsOptions.resourceTypes?.length) { - const normalizedTypes = new Set(this.#networkRequestsOptions.resourceTypes); - requests = requests.filter(request => { - const type = request.resourceType(); - return normalizedTypes.has(type); - }); - } - if (requests.length) { - networkRequests = await Promise.all(requests.map(request => NetworkFormatter.from(request, { - requestId: context.getNetworkRequestStableId(request), - selectedInDevToolsUI: context.getNetworkRequestStableId(request) === - this.#networkRequestsOptions?.networkRequestIdInDevToolsUI, - fetchData: false, - saveFile: (data, filename) => context.saveFile(data, filename), - }))); - } - } - return this.format(toolName, context, { - detailedConsoleMessage, - consoleMessages, - snapshot, - detailedNetworkRequest, - networkRequests, - traceInsight: this.#attachedTraceInsight, - traceSummary: this.#attachedTraceSummary, - extensions, - lighthouseResult: this.#attachedLighthouseResult, - inPageTools, - }); - } - format(toolName, context, data) { - const structuredContent = {}; - const response = []; - if (this.#textResponseLines.length) { - structuredContent.message = this.#textResponseLines.join('\n'); - response.push(...this.#textResponseLines); - } - const networkConditions = this.#page?.networkConditions; - if (networkConditions) { - const timeout = this.#page.pptrPage.getDefaultNavigationTimeout(); - response.push(`Emulating network conditions: ${networkConditions}`); - response.push(`Default navigation timeout set to ${timeout} ms`); - structuredContent.networkConditions = networkConditions; - structuredContent.navigationTimeout = timeout; - } - const viewport = this.#page?.viewport; - if (viewport) { - response.push(`Emulating viewport: ${JSON.stringify(viewport)}`); - structuredContent.viewport = viewport; - } - const userAgent = this.#page?.userAgent; - if (userAgent) { - response.push(`Emulating user agent: ${userAgent}`); - structuredContent.userAgent = userAgent; - } - const cpuThrottlingRate = this.#page?.cpuThrottlingRate ?? 1; - if (cpuThrottlingRate > 1) { - response.push(`Emulating CPU throttling: ${cpuThrottlingRate}x slowdown`); - structuredContent.cpuThrottlingRate = cpuThrottlingRate; - } - const colorScheme = this.#page?.colorScheme; - if (colorScheme) { - response.push(`Emulating color scheme: ${colorScheme}`); - structuredContent.colorScheme = colorScheme; - } - const dialog = this.#page?.getDialog(); - if (dialog) { - const defaultValueIfNeeded = dialog.type() === 'prompt' - ? ` (default value: "${dialog.defaultValue()}")` - : ''; - response.push(`# Open dialog -${dialog.type()}: ${dialog.message()}${defaultValueIfNeeded}. -Call ${handleDialog.name} to handle it before continuing.`); - structuredContent.dialog = { - type: dialog.type(), - message: dialog.message(), - defaultValue: dialog.defaultValue(), - }; - } - if (this.#includePages) { - const allPages = context.getPages(); - const { regularPages, extensionPages } = allPages.reduce((acc, page) => { - if (page.url().startsWith('chrome-extension://')) { - acc.extensionPages.push(page); - } - else { - acc.regularPages.push(page); - } - return acc; - }, { regularPages: [], extensionPages: [] }); - if (regularPages.length) { - const parts = [`## Pages`]; - const structuredPages = []; - for (const page of regularPages) { - const isolatedContextName = context.getIsolatedContextName(page); - const contextLabel = isolatedContextName - ? ` isolatedContext=${isolatedContextName}` - : ''; - parts.push(`${context.getPageId(page)}: ${page.url()}${context.isPageSelected(page) ? ' [selected]' : ''}${contextLabel}`); - structuredPages.push(createStructuredPage(page, context)); - } - response.push(...parts); - structuredContent.pages = structuredPages; - } - if (this.#includeExtensionPages) { - if (extensionPages.length) { - response.push(`## Extension Pages`); - const structuredExtensionPages = []; - for (const page of extensionPages) { - const isolatedContextName = context.getIsolatedContextName(page); - const contextLabel = isolatedContextName - ? ` isolatedContext=${isolatedContextName}` - : ''; - response.push(`${context.getPageId(page)}: ${page.url()}${context.isPageSelected(page) ? ' [selected]' : ''}${contextLabel}`); - structuredExtensionPages.push(createStructuredPage(page, context)); - } - structuredContent.extensionPages = structuredExtensionPages; - } - } - } - if (this.#includeExtensionServiceWorkers) { - if (context.getExtensionServiceWorkers().length) { - response.push(`## Extension Service Workers`); - } - for (const extensionServiceWorker of context.getExtensionServiceWorkers()) { - response.push(`${extensionServiceWorker.id}: ${extensionServiceWorker.url}`); - } - structuredContent.extensionServiceWorkers = context - .getExtensionServiceWorkers() - .map(extensionServiceWorker => { - return { - id: extensionServiceWorker.id, - url: extensionServiceWorker.url, - }; - }); - } - if (this.#tabId) { - structuredContent.tabId = this.#tabId; - } - if (data.traceSummary) { - const summary = getTraceSummary(data.traceSummary); - response.push(summary); - structuredContent.traceSummary = summary; - structuredContent.traceInsights = []; - for (const insightSet of data.traceSummary.insights?.values() ?? []) { - for (const [insightName, model] of Object.entries(insightSet.model)) { - structuredContent.traceInsights.push({ - insightName, - insightKey: model.insightKey, - }); - } - } - } - if (data.traceInsight) { - const insightOutput = getInsightOutput(data.traceInsight.trace, data.traceInsight.insightSetId, data.traceInsight.insightName); - if ('error' in insightOutput) { - response.push(insightOutput.error); - } - else { - response.push(insightOutput.output); - } - } - if (data.lighthouseResult) { - structuredContent.lighthouseResult = data.lighthouseResult; - const { summary, reports } = data.lighthouseResult; - response.push('## Lighthouse Audit Results'); - response.push(`Mode: ${summary.mode}`); - response.push(`Device: ${summary.device}`); - response.push(`URL: ${summary.url}`); - response.push('### Category Scores'); - for (const score of summary.scores) { - response.push(`- ${score.title}: ${(score.score ?? 0) * 100} (${score.id})`); - } - response.push('### Audit Summary'); - response.push(`Passed: ${summary.audits.passed}`); - response.push(`Failed: ${summary.audits.failed}`); - response.push(`Total Timing: ${summary.timing.total}ms`); - response.push('### Reports'); - for (const report of reports) { - response.push(`- ${report}`); - } - } - if (data.snapshot) { - if (typeof data.snapshot === 'string') { - response.push(`Saved snapshot to ${data.snapshot}.`); - structuredContent.snapshotFilePath = data.snapshot; - } - else { - response.push('## Latest page snapshot'); - response.push(data.snapshot.toString()); - structuredContent.snapshot = data.snapshot.toJSON(); - } - } - if (data.detailedNetworkRequest) { - response.push(data.detailedNetworkRequest.toStringDetailed()); - structuredContent.networkRequest = - data.detailedNetworkRequest.toJSONDetailed(); - } - if (data.detailedConsoleMessage) { - response.push(data.detailedConsoleMessage.toStringDetailed()); - structuredContent.consoleMessage = - data.detailedConsoleMessage.toJSONDetailed(); - } - if (data.extensions) { - structuredContent.extensions = data.extensions; - response.push('## Extensions'); - if (data.extensions.length === 0) { - response.push('No extensions installed.'); - } - else { - const extensionsMessage = data.extensions - .map(extension => { - return `id=${extension.id} "${extension.name}" v${extension.version} ${extension.isEnabled ? 'Enabled' : 'Disabled'}`; - }) - .join('\n'); - response.push(extensionsMessage); - } - } - if (this.#listInPageTools) { - structuredContent.inPageTools = data.inPageTools ?? undefined; - response.push('## In-page tools'); - if (!data.inPageTools || !data.inPageTools.tools) { - response.push('No in-page tools available.'); - } - else { - const toolGroup = data.inPageTools; - response.push(`${toolGroup.name}: ${toolGroup.description}`); - response.push('Available tools:'); - const toolDefinitionsMessage = toolGroup.tools - .map(tool => { - return `name="${tool.name}", description="${tool.description}", inputSchema=${JSON.stringify(tool.inputSchema)}`; - }) - .join('\n'); - response.push(toolDefinitionsMessage); - } - } - if (this.#networkRequestsOptions?.include && data.networkRequests) { - const requests = data.networkRequests; - response.push('## Network requests'); - if (requests.length) { - const paginationData = this.#dataWithPagination(requests, this.#networkRequestsOptions.pagination); - structuredContent.pagination = paginationData.pagination; - response.push(...paginationData.info); - if (data.networkRequests) { - structuredContent.networkRequests = []; - for (const formatter of paginationData.items) { - response.push(formatter.toString()); - structuredContent.networkRequests.push(formatter.toJSON()); - } - } - } - else { - response.push('No requests found.'); - } - } - if (this.#consoleDataOptions?.include) { - const messages = data.consoleMessages ?? []; - response.push('## Console messages'); - if (messages.length) { - const paginationData = this.#dataWithPagination(messages, this.#consoleDataOptions.pagination); - structuredContent.pagination = paginationData.pagination; - response.push(...paginationData.info); - response.push(...paginationData.items.map(message => message.toString())); - structuredContent.consoleMessages = paginationData.items.map(message => message.toJSON()); - } - else { - response.push(''); - } - } - const text = { - type: 'text', - text: response.join('\n'), - }; - const images = this.#images.map(imageData => { - return { - type: 'image', - ...imageData, - }; - }); - return { - content: [text, ...images], - structuredContent, - }; - } - #dataWithPagination(data, pagination) { - const response = []; - const paginationResult = paginate(data, pagination); - if (paginationResult.invalidPage) { - response.push('Invalid page number provided. Showing first page.'); - } - const { startIndex, endIndex, currentPage, totalPages } = paginationResult; - response.push(`Showing ${startIndex + 1}-${endIndex} of ${data.length} (Page ${currentPage + 1} of ${totalPages}).`); - if (pagination) { - if (paginationResult.hasNextPage) { - response.push(`Next page: ${currentPage + 1}`); - } - if (paginationResult.hasPreviousPage) { - response.push(`Previous page: ${currentPage - 1}`); - } - } - return { - info: response, - items: paginationResult.items, - pagination: { - currentPage: paginationResult.currentPage, - totalPages: paginationResult.totalPages, - hasNextPage: paginationResult.hasNextPage, - hasPreviousPage: paginationResult.hasPreviousPage, - startIndex: paginationResult.startIndex, - endIndex: paginationResult.endIndex, - invalidPage: paginationResult.invalidPage, - }, - }; - } - resetResponseLineForTesting() { - this.#textResponseLines = []; - } -} -function createStructuredPage(page, context) { - const isolatedContextName = context.getIsolatedContextName(page); - const entry = { - id: context.getPageId(page), - url: page.url(), - selected: context.isPageSelected(page), - }; - if (isolatedContextName) { - entry.isolatedContext = isolatedContextName; - } - return entry; -} diff --git a/node_modules/chrome-devtools-mcp/build/src/Mutex.js b/node_modules/chrome-devtools-mcp/build/src/Mutex.js deleted file mode 100644 index 535f9f1..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/Mutex.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @license - * Copyright 2025 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -export class Mutex { - static Guard = class Guard { - #mutex; - constructor(mutex) { - this.#mutex = mutex; - } - dispose() { - return this.#mutex.release(); - } - }; - #locked = false; - #acquirers = []; - // This is FIFO. - async acquire() { - if (!this.#locked) { - this.#locked = true; - return new Mutex.Guard(this); - } - const { resolve, promise } = Promise.withResolvers(); - this.#acquirers.push(resolve); - await promise; - return new Mutex.Guard(this); - } - release() { - const resolve = this.#acquirers.shift(); - if (!resolve) { - this.#locked = false; - return; - } - resolve(); - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/PageCollector.js b/node_modules/chrome-devtools-mcp/build/src/PageCollector.js deleted file mode 100644 index caf741a..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/PageCollector.js +++ /dev/null @@ -1,310 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { FakeIssuesManager } from './DevtoolsUtils.js'; -import { logger } from './logger.js'; -import { DevTools } from './third_party/index.js'; -export class UncaughtError { - details; - targetId; - constructor(details, targetId) { - this.details = details; - this.targetId = targetId; - } -} -function createIdGenerator() { - let i = 1; - return () => { - if (i === Number.MAX_SAFE_INTEGER) { - i = 0; - } - return i++; - }; -} -export const stableIdSymbol = Symbol('stableIdSymbol'); -export class PageCollector { - #browser; - #listenersInitializer; - #listeners = new WeakMap(); - maxNavigationSaved = 3; - /** - * This maps a Page to a list of navigations with a sub-list - * of all collected resources. - * The newer navigations come first. - */ - storage = new WeakMap(); - constructor(browser, listeners) { - this.#browser = browser; - this.#listenersInitializer = listeners; - } - async init(pages) { - for (const page of pages) { - this.addPage(page); - } - this.#browser.on('targetcreated', this.#onTargetCreated); - this.#browser.on('targetdestroyed', this.#onTargetDestroyed); - } - dispose() { - this.#browser.off('targetcreated', this.#onTargetCreated); - this.#browser.off('targetdestroyed', this.#onTargetDestroyed); - } - #onTargetCreated = async (target) => { - try { - const page = await target.page(); - if (!page) { - return; - } - this.addPage(page); - } - catch (err) { - logger('Error getting a page for a target onTargetCreated', err); - } - }; - #onTargetDestroyed = async (target) => { - try { - const page = await target.page(); - if (!page) { - return; - } - this.cleanupPageDestroyed(page); - } - catch (err) { - logger('Error getting a page for a target onTargetDestroyed', err); - } - }; - addPage(page) { - this.#initializePage(page); - } - #initializePage(page) { - if (this.storage.has(page)) { - return; - } - const idGenerator = createIdGenerator(); - const storedLists = [[]]; - this.storage.set(page, storedLists); - const listeners = this.#listenersInitializer(value => { - const withId = value; - withId[stableIdSymbol] = idGenerator(); - const navigations = this.storage.get(page) ?? [[]]; - navigations[0].push(withId); - }); - listeners['framenavigated'] = (frame) => { - // Only split the storage on main frame navigation - if (frame !== page.mainFrame()) { - return; - } - this.splitAfterNavigation(page); - }; - for (const [name, listener] of Object.entries(listeners)) { - page.on(name, listener); - } - this.#listeners.set(page, listeners); - } - splitAfterNavigation(page) { - const navigations = this.storage.get(page); - if (!navigations) { - return; - } - // Add the latest navigation first - navigations.unshift([]); - navigations.splice(this.maxNavigationSaved); - } - cleanupPageDestroyed(page) { - const listeners = this.#listeners.get(page); - if (listeners) { - for (const [name, listener] of Object.entries(listeners)) { - page.off(name, listener); - } - } - this.storage.delete(page); - } - getData(page, includePreservedData) { - const navigations = this.storage.get(page); - if (!navigations) { - return []; - } - if (!includePreservedData) { - return navigations[0]; - } - const data = []; - for (let index = this.maxNavigationSaved; index >= 0; index--) { - if (navigations[index]) { - data.push(...navigations[index]); - } - } - return data; - } - getIdForResource(resource) { - return resource[stableIdSymbol] ?? -1; - } - getById(page, stableId) { - const navigations = this.storage.get(page); - if (!navigations) { - throw new Error('No requests found for selected page'); - } - const item = this.find(page, item => item[stableIdSymbol] === stableId); - if (item) { - return item; - } - throw new Error('Request not found for selected page'); - } - find(page, filter) { - const navigations = this.storage.get(page); - if (!navigations) { - return; - } - for (const navigation of navigations) { - const item = navigation.find(filter); - if (item) { - return item; - } - } - return; - } -} -export class ConsoleCollector extends PageCollector { - #subscribedPages = new WeakMap(); - addPage(page) { - super.addPage(page); - if (!this.#subscribedPages.has(page)) { - const subscriber = new PageEventSubscriber(page); - this.#subscribedPages.set(page, subscriber); - void subscriber.subscribe(); - } - } - cleanupPageDestroyed(page) { - super.cleanupPageDestroyed(page); - this.#subscribedPages.get(page)?.unsubscribe(); - this.#subscribedPages.delete(page); - } -} -class PageEventSubscriber { - #issueManager = new FakeIssuesManager(); - #issueAggregator = new DevTools.IssueAggregator(this.#issueManager); - #seenKeys = new Set(); - #seenIssues = new Set(); - #page; - #session; - #targetId; - constructor(page) { - this.#page = page; - // @ts-expect-error use existing CDP client (internal Puppeteer API). - this.#session = this.#page._client(); - // @ts-expect-error use internal Puppeteer API to get target ID - this.#targetId = this.#session.target()._targetId; - } - #resetIssueAggregator() { - this.#issueManager = new FakeIssuesManager(); - if (this.#issueAggregator) { - this.#issueAggregator.removeEventListener("AggregatedIssueUpdated" /* DevTools.IssueAggregatorEvents.AGGREGATED_ISSUE_UPDATED */, this.#onAggregatedIssue); - } - this.#issueAggregator = new DevTools.IssueAggregator(this.#issueManager); - this.#issueAggregator.addEventListener("AggregatedIssueUpdated" /* DevTools.IssueAggregatorEvents.AGGREGATED_ISSUE_UPDATED */, this.#onAggregatedIssue); - } - async subscribe() { - this.#resetIssueAggregator(); - this.#page.on('framenavigated', this.#onFrameNavigated); - this.#session.on('Audits.issueAdded', this.#onIssueAdded); - this.#session.on('Runtime.exceptionThrown', this.#onExceptionThrown); - try { - await this.#session.send('Audits.enable'); - } - catch (error) { - logger('Error subscribing to issues', error); - } - } - unsubscribe() { - this.#seenKeys.clear(); - this.#seenIssues.clear(); - this.#page.off('framenavigated', this.#onFrameNavigated); - this.#session.off('Audits.issueAdded', this.#onIssueAdded); - this.#session.off('Runtime.exceptionThrown', this.#onExceptionThrown); - if (this.#issueAggregator) { - this.#issueAggregator.removeEventListener("AggregatedIssueUpdated" /* DevTools.IssueAggregatorEvents.AGGREGATED_ISSUE_UPDATED */, this.#onAggregatedIssue); - } - void this.#session.send('Audits.disable').catch(() => { - // might fail. - }); - } - #onAggregatedIssue = (event) => { - if (this.#seenIssues.has(event.data)) { - return; - } - this.#seenIssues.add(event.data); - this.#page.emit('issue', event.data); - }; - #onExceptionThrown = (event) => { - this.#page.emit('uncaughtError', new UncaughtError(event.exceptionDetails, this.#targetId)); - }; - // On navigation, we reset issue aggregation. - #onFrameNavigated = (frame) => { - // Only split the storage on main frame navigation - if (frame !== frame.page().mainFrame()) { - return; - } - this.#seenKeys.clear(); - this.#seenIssues.clear(); - this.#resetIssueAggregator(); - }; - #onIssueAdded = (data) => { - try { - const inspectorIssue = data.issue; - const issue = DevTools.createIssuesFromProtocolIssue(null, - // @ts-expect-error Protocol types diverge. - inspectorIssue)[0]; - if (!issue) { - logger('No issue mapping for for the issue: ', inspectorIssue.code); - return; - } - const primaryKey = issue.primaryKey(); - if (this.#seenKeys.has(primaryKey)) { - return; - } - this.#seenKeys.add(primaryKey); - this.#issueManager.dispatchEventToListeners("IssueAdded" /* DevTools.IssuesManagerEvents.ISSUE_ADDED */, { - issue, - // @ts-expect-error We don't care that issues model is null - issuesModel: null, - }); - } - catch (error) { - logger('Error creating a new issue', error); - } - }; -} -export class NetworkCollector extends PageCollector { - constructor(browser, listeners = collect => { - return { - request: req => { - collect(req); - }, - }; - }) { - super(browser, listeners); - } - splitAfterNavigation(page) { - const navigations = this.storage.get(page) ?? []; - if (!navigations) { - return; - } - const requests = navigations[0]; - const lastRequestIdx = requests.findLastIndex(request => { - return request.frame() === page.mainFrame() - ? request.isNavigationRequest() - : false; - }); - // Keep all requests since the last navigation request including that - // navigation request itself. - // Keep the reference - if (lastRequestIdx !== -1) { - const fromCurrentNavigation = requests.splice(lastRequestIdx); - navigations.unshift(fromCurrentNavigation); - } - else { - navigations.unshift([]); - } - navigations.splice(this.maxNavigationSaved); - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/SlimMcpResponse.js b/node_modules/chrome-devtools-mcp/build/src/SlimMcpResponse.js deleted file mode 100644 index 640ba03..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/SlimMcpResponse.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { McpResponse } from './McpResponse.js'; -export class SlimMcpResponse extends McpResponse { - async handle(_toolName, _context) { - const text = { - type: 'text', - text: this.responseLines.join('\n'), - }; - return { - content: [text], - structuredContent: text, - }; - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/WaitForHelper.js b/node_modules/chrome-devtools-mcp/build/src/WaitForHelper.js deleted file mode 100644 index f123a4c..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/WaitForHelper.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { logger } from './logger.js'; -export class WaitForHelper { - #abortController = new AbortController(); - #page; - #stableDomTimeout; - #stableDomFor; - #expectNavigationIn; - #navigationTimeout; - constructor(page, cpuTimeoutMultiplier, networkTimeoutMultiplier) { - this.#stableDomTimeout = 3000 * cpuTimeoutMultiplier; - this.#stableDomFor = 100 * cpuTimeoutMultiplier; - this.#expectNavigationIn = 100 * cpuTimeoutMultiplier; - this.#navigationTimeout = 3000 * networkTimeoutMultiplier; - this.#page = page; - } - /** - * A wrapper that executes a action and waits for - * a potential navigation, after which it waits - * for the DOM to be stable before returning. - */ - async waitForStableDom() { - const stableDomObserver = await this.#page.evaluateHandle(timeout => { - let timeoutId; - function callback() { - clearTimeout(timeoutId); - timeoutId = setTimeout(() => { - domObserver.resolver.resolve(); - domObserver.observer.disconnect(); - }, timeout); - } - const domObserver = { - resolver: Promise.withResolvers(), - observer: new MutationObserver(callback), - }; - // It's possible that the DOM is not gonna change so we - // need to start the timeout initially. - callback(); - domObserver.observer.observe(document.body, { - childList: true, - subtree: true, - attributes: true, - }); - return domObserver; - }, this.#stableDomFor); - this.#abortController.signal.addEventListener('abort', async () => { - try { - await stableDomObserver.evaluate(observer => { - observer.observer.disconnect(); - observer.resolver.resolve(); - }); - await stableDomObserver.dispose(); - } - catch { - // Ignored cleanup errors - } - }); - return Promise.race([ - stableDomObserver.evaluate(async (observer) => { - return await observer.resolver.promise; - }), - this.timeout(this.#stableDomTimeout).then(() => { - throw new Error('Timeout'); - }), - ]); - } - async waitForNavigationStarted() { - // Currently Puppeteer does not have API - // For when a navigation is about to start - const navigationStartedPromise = new Promise(resolve => { - const listener = (event) => { - if ([ - 'historySameDocument', - 'historyDifferentDocument', - 'sameDocument', - ].includes(event.navigationType)) { - resolve(false); - return; - } - resolve(true); - }; - this.#page._client().on('Page.frameStartedNavigating', listener); - this.#abortController.signal.addEventListener('abort', () => { - resolve(false); - this.#page._client().off('Page.frameStartedNavigating', listener); - }); - }); - return await Promise.race([ - navigationStartedPromise, - this.timeout(this.#expectNavigationIn).then(() => false), - ]); - } - timeout(time) { - return new Promise(res => { - const id = setTimeout(res, time); - this.#abortController.signal.addEventListener('abort', () => { - res(); - clearTimeout(id); - }); - }); - } - async waitForEventsAfterAction(action, options) { - const navigationFinished = this.waitForNavigationStarted() - .then(navigationStated => { - if (navigationStated) { - return this.#page.waitForNavigation({ - timeout: options?.timeout ?? this.#navigationTimeout, - signal: this.#abortController.signal, - }); - } - return; - }) - .catch(error => logger(error)); - try { - await action(); - } - catch (error) { - // Clear up pending promises - this.#abortController.abort(); - throw error; - } - try { - await navigationFinished; - // Wait for stable dom after navigation so we execute in - // the correct context - await this.waitForStableDom(); - } - catch (error) { - logger(error); - } - finally { - this.#abortController.abort(); - } - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-cli-options.js b/node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-cli-options.js deleted file mode 100644 index ad147a4..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/bin/chrome-devtools-cli-options.js +++ /dev/null @@ -1,651 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -export const commands = { - click: { - description: 'Clicks on the provided element', - category: 'Input automation', - args: { - uid: { - name: 'uid', - type: 'string', - description: 'The uid of an element on the page from the page content snapshot', - required: true, - }, - dblClick: { - name: 'dblClick', - type: 'boolean', - description: 'Set to true for double clicks. Default is false.', - required: false, - }, - includeSnapshot: { - name: 'includeSnapshot', - type: 'boolean', - description: 'Whether to include a snapshot in the response. Default is false.', - required: false, - }, - }, - }, - close_page: { - description: 'Closes the page by its index. The last open page cannot be closed.', - category: 'Navigation automation', - args: { - pageId: { - name: 'pageId', - type: 'number', - description: 'The ID of the page to close. Call list_pages to list pages.', - required: true, - }, - }, - }, - drag: { - description: 'Drag an element onto another element', - category: 'Input automation', - args: { - from_uid: { - name: 'from_uid', - type: 'string', - description: 'The uid of the element to drag', - required: true, - }, - to_uid: { - name: 'to_uid', - type: 'string', - description: 'The uid of the element to drop into', - required: true, - }, - includeSnapshot: { - name: 'includeSnapshot', - type: 'boolean', - description: 'Whether to include a snapshot in the response. Default is false.', - required: false, - }, - }, - }, - emulate: { - description: 'Emulates various features on the selected page.', - category: 'Emulation', - args: { - networkConditions: { - name: 'networkConditions', - type: 'string', - description: 'Throttle network. Omit to disable throttling.', - required: false, - enum: ['Offline', 'Slow 3G', 'Fast 3G', 'Slow 4G', 'Fast 4G'], - }, - cpuThrottlingRate: { - name: 'cpuThrottlingRate', - type: 'number', - description: 'Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling', - required: false, - }, - geolocation: { - name: 'geolocation', - type: 'string', - description: 'Geolocation (`x`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit clear the geolocation override.', - required: false, - }, - userAgent: { - name: 'userAgent', - type: 'string', - description: 'User agent to emulate. Set to empty string to clear the user agent override.', - required: false, - }, - colorScheme: { - name: 'colorScheme', - type: 'string', - description: 'Emulate the dark or the light mode. Set to "auto" to reset to the default.', - required: false, - enum: ['dark', 'light', 'auto'], - }, - viewport: { - name: 'viewport', - type: 'string', - description: "Emulate device viewports 'xx[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode.", - required: false, - }, - }, - }, - evaluate_script: { - description: 'Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON,\nso returned values have to be JSON-serializable.', - category: 'Debugging', - args: { - function: { - name: 'function', - type: 'string', - description: 'A JavaScript function declaration to be executed by the tool in the currently selected page.\nExample without arguments: `() => {\n return document.title\n}` or `async () => {\n return await fetch("example.com")\n}`.\nExample with arguments: `(el) => {\n return el.innerText;\n}`\n', - required: true, - }, - args: { - name: 'args', - type: 'array', - description: 'An optional list of arguments to pass to the function.', - required: false, - }, - }, - }, - fill: { - description: 'Type text into a input, text area or select an option from a element.', - category: 'Input automation', - args: { - uid: { - name: 'uid', - type: 'string', - description: 'The uid of an element on the page from the page content snapshot', - required: true, - }, - value: { - name: 'value', - type: 'string', - description: 'The value to fill in', - required: true, - }, - includeSnapshot: { - name: 'includeSnapshot', - type: 'boolean', - description: 'Whether to include a snapshot in the response. Default is false.', - required: false, - }, - }, - }, - get_console_message: { - description: 'Gets a console message by its ID. You can get all messages by calling list_console_messages.', - category: 'Debugging', - args: { - msgid: { - name: 'msgid', - type: 'number', - description: 'The msgid of a console message on the page from the listed console messages', - required: true, - }, - }, - }, - get_network_request: { - description: 'Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.', - category: 'Network', - args: { - reqid: { - name: 'reqid', - type: 'number', - description: 'The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel.', - required: false, - }, - requestFilePath: { - name: 'requestFilePath', - type: 'string', - description: 'The absolute or relative path to save the request body to. If omitted, the body is returned inline.', - required: false, - }, - responseFilePath: { - name: 'responseFilePath', - type: 'string', - description: 'The absolute or relative path to save the response body to. If omitted, the body is returned inline.', - required: false, - }, - }, - }, - handle_dialog: { - description: 'If a browser dialog was opened, use this command to handle it', - category: 'Input automation', - args: { - action: { - name: 'action', - type: 'string', - description: 'Whether to dismiss or accept the dialog', - required: true, - enum: ['accept', 'dismiss'], - }, - promptText: { - name: 'promptText', - type: 'string', - description: 'Optional prompt text to enter into the dialog.', - required: false, - }, - }, - }, - hover: { - description: 'Hover over the provided element', - category: 'Input automation', - args: { - uid: { - name: 'uid', - type: 'string', - description: 'The uid of an element on the page from the page content snapshot', - required: true, - }, - includeSnapshot: { - name: 'includeSnapshot', - type: 'boolean', - description: 'Whether to include a snapshot in the response. Default is false.', - required: false, - }, - }, - }, - lighthouse_audit: { - description: 'Get Lighthouse score and reports for accessibility, SEO and best practices. This excludes performance. For performance audits, run performance_start_trace', - category: 'Debugging', - args: { - mode: { - name: 'mode', - type: 'string', - description: '"navigation" reloads & audits. "snapshot" analyzes current state.', - required: false, - default: 'navigation', - enum: ['navigation', 'snapshot'], - }, - device: { - name: 'device', - type: 'string', - description: 'Device to emulate.', - required: false, - default: 'desktop', - enum: ['desktop', 'mobile'], - }, - outputDirPath: { - name: 'outputDirPath', - type: 'string', - description: 'Directory for reports. If omitted, uses temporary files.', - required: false, - }, - }, - }, - list_console_messages: { - description: 'List all console messages for the currently selected page since the last navigation.', - category: 'Debugging', - args: { - pageSize: { - name: 'pageSize', - type: 'integer', - description: 'Maximum number of messages to return. When omitted, returns all requests.', - required: false, - }, - pageIdx: { - name: 'pageIdx', - type: 'integer', - description: 'Page number to return (0-based). When omitted, returns the first page.', - required: false, - }, - types: { - name: 'types', - type: 'array', - description: 'Filter messages to only return messages of the specified resource types. When omitted or empty, returns all messages.', - required: false, - }, - includePreservedMessages: { - name: 'includePreservedMessages', - type: 'boolean', - description: 'Set to true to return the preserved messages over the last 3 navigations.', - required: false, - default: false, - }, - }, - }, - list_network_requests: { - description: 'List all requests for the currently selected page since the last navigation.', - category: 'Network', - args: { - pageSize: { - name: 'pageSize', - type: 'integer', - description: 'Maximum number of requests to return. When omitted, returns all requests.', - required: false, - }, - pageIdx: { - name: 'pageIdx', - type: 'integer', - description: 'Page number to return (0-based). When omitted, returns the first page.', - required: false, - }, - resourceTypes: { - name: 'resourceTypes', - type: 'array', - description: 'Filter requests to only return requests of the specified resource types. When omitted or empty, returns all requests.', - required: false, - }, - includePreservedRequests: { - name: 'includePreservedRequests', - type: 'boolean', - description: 'Set to true to return the preserved requests over the last 3 navigations.', - required: false, - default: false, - }, - }, - }, - list_pages: { - description: 'Get a list of pages open in the browser.', - category: 'Navigation automation', - args: {}, - }, - navigate_page: { - description: 'Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.', - category: 'Navigation automation', - args: { - type: { - name: 'type', - type: 'string', - description: 'Navigate the page by URL, back or forward in history, or reload.', - required: false, - enum: ['url', 'back', 'forward', 'reload'], - }, - url: { - name: 'url', - type: 'string', - description: 'Target URL (only type=url)', - required: false, - }, - ignoreCache: { - name: 'ignoreCache', - type: 'boolean', - description: 'Whether to ignore cache on reload.', - required: false, - }, - handleBeforeUnload: { - name: 'handleBeforeUnload', - type: 'string', - description: 'Whether to auto accept or beforeunload dialogs triggered by this navigation. Default is accept.', - required: false, - enum: ['accept', 'decline'], - }, - initScript: { - name: 'initScript', - type: 'string', - description: 'A JavaScript script to be executed on each new document before any other scripts for the next navigation.', - required: false, - }, - timeout: { - name: 'timeout', - type: 'integer', - description: 'Maximum wait time in milliseconds. If set to 0, the default timeout will be used.', - required: false, - }, - }, - }, - new_page: { - description: 'Open a new tab and load a URL. Use project URL if not specified otherwise.', - category: 'Navigation automation', - args: { - url: { - name: 'url', - type: 'string', - description: 'URL to load in a new page.', - required: true, - }, - background: { - name: 'background', - type: 'boolean', - description: 'Whether to open the page in the background without bringing it to the front. Default is false (foreground).', - required: false, - }, - isolatedContext: { - name: 'isolatedContext', - type: 'string', - description: 'If specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated.', - required: false, - }, - timeout: { - name: 'timeout', - type: 'integer', - description: 'Maximum wait time in milliseconds. If set to 0, the default timeout will be used.', - required: false, - }, - }, - }, - performance_analyze_insight: { - description: 'Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.', - category: 'Performance', - args: { - insightSetId: { - name: 'insightSetId', - type: 'string', - description: 'The id for the specific insight set. Only use the ids given in the "Available insight sets" list.', - required: true, - }, - insightName: { - name: 'insightName', - type: 'string', - description: 'The name of the Insight you want more information on. For example: "DocumentLatency" or "LCPBreakdown"', - required: true, - }, - }, - }, - performance_start_trace: { - description: 'Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.', - category: 'Performance', - args: { - reload: { - name: 'reload', - type: 'boolean', - description: 'Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true.', - required: false, - default: true, - }, - autoStop: { - name: 'autoStop', - type: 'boolean', - description: 'Determines if the trace recording should be automatically stopped.', - required: false, - default: true, - }, - filePath: { - name: 'filePath', - type: 'string', - description: 'The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).', - required: false, - }, - }, - }, - performance_stop_trace: { - description: 'Stop the active performance trace recording on the selected webpage.', - category: 'Performance', - args: { - filePath: { - name: 'filePath', - type: 'string', - description: 'The absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed).', - required: false, - }, - }, - }, - press_key: { - description: 'Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).', - category: 'Input automation', - args: { - key: { - name: 'key', - type: 'string', - description: 'A key or a combination (e.g., "Enter", "Control+A", "Control++", "Control+Shift+R"). Modifiers: Control, Shift, Alt, Meta', - required: true, - }, - includeSnapshot: { - name: 'includeSnapshot', - type: 'boolean', - description: 'Whether to include a snapshot in the response. Default is false.', - required: false, - }, - }, - }, - resize_page: { - description: "Resizes the selected page's window so that the page has specified dimension", - category: 'Emulation', - args: { - width: { - name: 'width', - type: 'number', - description: 'Page width', - required: true, - }, - height: { - name: 'height', - type: 'number', - description: 'Page height', - required: true, - }, - }, - }, - select_page: { - description: 'Select a page as a context for future tool calls.', - category: 'Navigation automation', - args: { - pageId: { - name: 'pageId', - type: 'number', - description: 'The ID of the page to select. Call list_pages to get available pages.', - required: true, - }, - bringToFront: { - name: 'bringToFront', - type: 'boolean', - description: 'Whether to focus the page and bring it to the top.', - required: false, - }, - }, - }, - take_memory_snapshot: { - description: 'Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.', - category: 'Performance', - args: { - filePath: { - name: 'filePath', - type: 'string', - description: 'A path to a .heapsnapshot file to save the heapsnapshot to.', - required: true, - }, - }, - }, - take_screenshot: { - description: 'Take a screenshot of the page or element.', - category: 'Debugging', - args: { - format: { - name: 'format', - type: 'string', - description: 'Type of format to save the screenshot as. Default is "png"', - required: false, - default: 'png', - enum: ['png', 'jpeg', 'webp'], - }, - quality: { - name: 'quality', - type: 'number', - description: 'Compression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format.', - required: false, - }, - uid: { - name: 'uid', - type: 'string', - description: 'The uid of an element on the page from the page content snapshot. If omitted takes a pages screenshot.', - required: false, - }, - fullPage: { - name: 'fullPage', - type: 'boolean', - description: 'If set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid.', - required: false, - }, - filePath: { - name: 'filePath', - type: 'string', - description: 'The absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response.', - required: false, - }, - }, - }, - take_snapshot: { - description: 'Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique\nidentifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected\nin the DevTools Elements panel (if any).', - category: 'Debugging', - args: { - verbose: { - name: 'verbose', - type: 'boolean', - description: 'Whether to include all possible information available in the full a11y tree. Default is false.', - required: false, - }, - filePath: { - name: 'filePath', - type: 'string', - description: 'The absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response.', - required: false, - }, - }, - }, - type_text: { - description: 'Type text using keyboard into a previously focused input', - category: 'Input automation', - args: { - text: { - name: 'text', - type: 'string', - description: 'The text to type', - required: true, - }, - submitKey: { - name: 'submitKey', - type: 'string', - description: 'Optional key to press after typing. E.g., "Enter", "Tab", "Escape"', - required: false, - }, - }, - }, - upload_file: { - description: 'Upload a file through a provided element.', - category: 'Input automation', - args: { - uid: { - name: 'uid', - type: 'string', - description: 'The uid of the file input element or an element that will open file chooser on the page from the page content snapshot', - required: true, - }, - filePath: { - name: 'filePath', - type: 'string', - description: 'The local path of the file to upload', - required: true, - }, - includeSnapshot: { - name: 'includeSnapshot', - type: 'boolean', - description: 'Whether to include a snapshot in the response. Default is false.', - required: false, - }, - }, - }, -}; diff --git a/node_modules/chrome-devtools-mcp/build/src/browser.js b/node_modules/chrome-devtools-mcp/build/src/browser.js deleted file mode 100644 index 5a0aa48..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/browser.js +++ /dev/null @@ -1,203 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { execSync } from 'node:child_process'; -import fs from 'node:fs'; -import os from 'node:os'; -import path from 'node:path'; -import { logger } from './logger.js'; -import { puppeteer } from './third_party/index.js'; -let browser; -function makeTargetFilter(enableExtensions = false) { - const ignoredPrefixes = new Set(['chrome://', 'chrome-untrusted://']); - if (!enableExtensions) { - ignoredPrefixes.add('chrome-extension://'); - } - return function targetFilter(target) { - if (target.url() === 'chrome://newtab/') { - return true; - } - // Could be the only page opened in the browser. - if (target.url().startsWith('chrome://inspect')) { - return true; - } - for (const prefix of ignoredPrefixes) { - if (target.url().startsWith(prefix)) { - return false; - } - } - return true; - }; -} -export async function ensureBrowserConnected(options) { - const { channel, enableExtensions } = options; - if (browser?.connected) { - return browser; - } - const connectOptions = { - targetFilter: makeTargetFilter(enableExtensions), - defaultViewport: null, - handleDevToolsAsPage: true, - }; - let autoConnect = false; - if (options.wsEndpoint) { - connectOptions.browserWSEndpoint = options.wsEndpoint; - if (options.wsHeaders) { - connectOptions.headers = options.wsHeaders; - } - } - else if (options.browserURL) { - connectOptions.browserURL = options.browserURL; - } - else if (channel || options.userDataDir) { - const userDataDir = options.userDataDir; - if (userDataDir) { - autoConnect = true; - // TODO: re-expose this logic via Puppeteer. - const portPath = path.join(userDataDir, 'DevToolsActivePort'); - try { - const fileContent = await fs.promises.readFile(portPath, 'utf8'); - const [rawPort, rawPath] = fileContent - .split('\n') - .map(line => { - return line.trim(); - }) - .filter(line => { - return !!line; - }); - if (!rawPort || !rawPath) { - throw new Error(`Invalid DevToolsActivePort '${fileContent}' found`); - } - const port = parseInt(rawPort, 10); - if (isNaN(port) || port <= 0 || port > 65535) { - throw new Error(`Invalid port '${rawPort}' found`); - } - const browserWSEndpoint = `ws://127.0.0.1:${port}${rawPath}`; - connectOptions.browserWSEndpoint = browserWSEndpoint; - } - catch (error) { - throw new Error(`Could not connect to Chrome in ${userDataDir}. Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging.`, { - cause: error, - }); - } - } - else { - if (!channel) { - throw new Error('Channel must be provided if userDataDir is missing'); - } - connectOptions.channel = (channel === 'stable' ? 'chrome' : `chrome-${channel}`); - } - } - else { - throw new Error('Either browserURL, wsEndpoint, channel or userDataDir must be provided'); - } - logger('Connecting Puppeteer to ', JSON.stringify(connectOptions)); - try { - browser = await puppeteer.connect(connectOptions); - } - catch (err) { - throw new Error(`Could not connect to Chrome. ${autoConnect ? `Check if Chrome is running and remote debugging is enabled by going to chrome://inspect/#remote-debugging.` : `Check if Chrome is running.`}`, { - cause: err, - }); - } - logger('Connected Puppeteer'); - return browser; -} -export function detectDisplay() { - // Only detect display on Linux/UNIX. - if (os.platform() === 'win32' || os.platform() === 'darwin') { - return; - } - if (!process.env['DISPLAY']) { - try { - const result = execSync(`ps -u $(id -u) -o pid= | xargs -I{} cat /proc/{}/environ 2>/dev/null | tr '\\0' '\\n' | grep -m1 '^DISPLAY=' | cut -d= -f2`); - const display = result.toString('utf8').trim(); - process.env['DISPLAY'] = display; - } - catch { - // no-op - } - } -} -export async function launch(options) { - const { channel, executablePath, headless, isolated } = options; - const profileDirName = channel && channel !== 'stable' - ? `chrome-profile-${channel}` - : 'chrome-profile'; - let userDataDir = options.userDataDir; - if (!isolated && !userDataDir) { - userDataDir = path.join(os.homedir(), '.cache', options.viaCli ? 'chrome-devtools-mcp-cli' : 'chrome-devtools-mcp', profileDirName); - await fs.promises.mkdir(userDataDir, { - recursive: true, - }); - } - const args = [ - ...(options.chromeArgs ?? []), - '--hide-crash-restore-bubble', - ]; - const ignoreDefaultArgs = options.ignoreDefaultChromeArgs ?? false; - if (headless) { - args.push('--screen-info={3840x2160}'); - } - let puppeteerChannel; - if (options.devtools) { - args.push('--auto-open-devtools-for-tabs'); - } - if (!executablePath) { - puppeteerChannel = - channel && channel !== 'stable' - ? `chrome-${channel}` - : 'chrome'; - } - if (!headless) { - detectDisplay(); - } - try { - const browser = await puppeteer.launch({ - channel: puppeteerChannel, - targetFilter: makeTargetFilter(options.enableExtensions), - executablePath, - defaultViewport: null, - userDataDir, - pipe: true, - headless, - args, - ignoreDefaultArgs: ignoreDefaultArgs, - acceptInsecureCerts: options.acceptInsecureCerts, - handleDevToolsAsPage: true, - enableExtensions: options.enableExtensions, - }); - if (options.logFile) { - // FIXME: we are probably subscribing too late to catch startup logs. We - // should expose the process earlier or expose the getRecentLogs() getter. - browser.process()?.stderr?.pipe(options.logFile); - browser.process()?.stdout?.pipe(options.logFile); - } - if (options.viewport) { - const [page] = await browser.pages(); - await page?.resize({ - contentWidth: options.viewport.width, - contentHeight: options.viewport.height, - }); - } - return browser; - } - catch (error) { - if (userDataDir && - error.message.includes('The browser is already running')) { - throw new Error(`The browser is already running for ${userDataDir}. Use --isolated to run multiple browser instances.`, { - cause: error, - }); - } - throw error; - } -} -export async function ensureBrowserLaunched(options) { - if (browser?.connected) { - return browser; - } - browser = await launch(options); - return browser; -} diff --git a/node_modules/chrome-devtools-mcp/build/src/daemon/client.js b/node_modules/chrome-devtools-mcp/build/src/daemon/client.js deleted file mode 100644 index ea36179..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/daemon/client.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { spawn } from 'node:child_process'; -import fs from 'node:fs'; -import net from 'node:net'; -import { logger } from '../logger.js'; -import { PipeTransport } from '../third_party/index.js'; -import { saveTemporaryFile } from '../utils/files.js'; -import { DAEMON_SCRIPT_PATH, getSocketPath, getPidFilePath, isDaemonRunning, } from './utils.js'; -const FILE_TIMEOUT = 10_000; -/** - * Waits for a file to be created and populated (removed = false) or removed (removed = true). - */ -function waitForFile(filePath, removed = false) { - return new Promise((resolve, reject) => { - const check = () => { - const exists = fs.existsSync(filePath); - if (removed) { - return !exists; - } - if (!exists) { - return false; - } - try { - return fs.statSync(filePath).size > 0; - } - catch { - return false; - } - }; - if (check()) { - resolve(); - return; - } - const timer = setTimeout(() => { - fs.unwatchFile(filePath); - reject(new Error(`Timeout: file ${filePath} ${removed ? 'not removed' : 'not found'} within ${FILE_TIMEOUT}ms`)); - }, FILE_TIMEOUT); - fs.watchFile(filePath, { interval: 500 }, () => { - if (check()) { - clearTimeout(timer); - fs.unwatchFile(filePath); - resolve(); - } - }); - }); -} -export async function startDaemon(mcpArgs = []) { - if (isDaemonRunning()) { - logger('Daemon is already running'); - return; - } - const pidFilePath = getPidFilePath(); - if (fs.existsSync(pidFilePath)) { - fs.unlinkSync(pidFilePath); - } - logger('Starting daemon...', ...mcpArgs); - const child = spawn(process.execPath, [DAEMON_SCRIPT_PATH, ...mcpArgs], { - detached: true, - stdio: 'ignore', - env: process.env, - cwd: process.cwd(), - windowsHide: true, - }); - child.unref(); - await waitForFile(pidFilePath); -} -const SEND_COMMAND_TIMEOUT = 60_000; // ms -/** - * `sendCommand` opens a socket connection sends a single command and disconnects. - */ -export async function sendCommand(command) { - const socketPath = getSocketPath(); - const socket = net.createConnection({ - path: socketPath, - }); - return new Promise((resolve, reject) => { - const timer = setTimeout(() => { - socket.destroy(); - reject(new Error('Timeout waiting for daemon response')); - }, SEND_COMMAND_TIMEOUT); - const transport = new PipeTransport(socket, socket); - transport.onmessage = async (message) => { - clearTimeout(timer); - logger('onmessage', message); - resolve(JSON.parse(message)); - }; - socket.on('error', error => { - clearTimeout(timer); - logger('Socket error:', error); - reject(error); - }); - socket.on('close', () => { - clearTimeout(timer); - logger('Socket closed:'); - reject(new Error('Socket closed')); - }); - logger('Sending message', command); - transport.send(JSON.stringify(command)); - }); -} -export async function stopDaemon() { - if (!isDaemonRunning()) { - logger('Daemon is not running'); - return; - } - const pidFilePath = getPidFilePath(); - await sendCommand({ method: 'stop' }); - await waitForFile(pidFilePath, /*removed=*/ true); -} -export async function handleResponse(response, format) { - if (response.isError) { - return JSON.stringify(response.content); - } - if (format === 'json') { - if (response.structuredContent) { - return JSON.stringify(response.structuredContent); - } - // Fall-through to text for backward compatibility. - } - const chunks = []; - for (const content of response.content) { - if (content.type === 'text') { - chunks.push(content.text); - } - else if (content.type === 'image') { - const imageData = content.data; - const mimeType = content.mimeType; - let extension = '.png'; - switch (mimeType) { - case 'image/jpg': - case 'image/jpeg': - extension = '.jpeg'; - break; - case 'webp': - extension = '.webp'; - break; - } - const data = Buffer.from(imageData, 'base64'); - const name = crypto.randomUUID(); - const { filepath } = await saveTemporaryFile(data, `${name}${extension}`); - chunks.push(`Saved to ${filepath}.`); - } - else { - throw new Error('Not supported response content type'); - } - } - return format === 'md' ? chunks.join(' ') : JSON.stringify(chunks); -} diff --git a/node_modules/chrome-devtools-mcp/build/src/daemon/daemon.js b/node_modules/chrome-devtools-mcp/build/src/daemon/daemon.js deleted file mode 100644 index e86d043..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/daemon/daemon.js +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/env node -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import fs from 'node:fs'; -import { createServer } from 'node:net'; -import path from 'node:path'; -import process from 'node:process'; -import { logger } from '../logger.js'; -import { Client, PipeTransport, StdioClientTransport, } from '../third_party/index.js'; -import { VERSION } from '../version.js'; -import { DAEMON_CLIENT_NAME, getDaemonPid, getPidFilePath, getSocketPath, INDEX_SCRIPT_PATH, IS_WINDOWS, isDaemonRunning, } from './utils.js'; -const pid = getDaemonPid(); -if (isDaemonRunning(pid)) { - logger('Another daemon process is running.'); - process.exit(1); -} -const pidFilePath = getPidFilePath(); -fs.mkdirSync(path.dirname(pidFilePath), { - recursive: true, -}); -fs.writeFileSync(pidFilePath, process.pid.toString()); -logger(`Writing ${process.pid.toString()} to ${pidFilePath}`); -const socketPath = getSocketPath(); -const startDate = new Date(); -const mcpServerArgs = process.argv.slice(2); -let mcpClient = null; -let mcpTransport = null; -let server = null; -async function setupMCPClient() { - console.log('Setting up MCP client connection...'); - // Create stdio transport for chrome-devtools-mcp - // Workaround for https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.x/src/client/stdio.ts#L128 - // which causes the console window to show on Windows. - // @ts-expect-error no types for type. - process.type = 'mcp-client'; - mcpTransport = new StdioClientTransport({ - command: process.execPath, - args: [INDEX_SCRIPT_PATH, ...mcpServerArgs], - env: process.env, - }); - mcpClient = new Client({ - name: DAEMON_CLIENT_NAME, - version: VERSION, - }, { - capabilities: {}, - }); - await mcpClient.connect(mcpTransport); - console.log('MCP client connected'); -} -async function handleRequest(msg) { - try { - if (msg.method === 'invoke_tool') { - if (!mcpClient) { - throw new Error('MCP client not initialized'); - } - const { tool, args } = msg; - const result = (await mcpClient.callTool({ - name: tool, - arguments: args || {}, - })); - return { - success: true, - result: JSON.stringify(result), - }; - } - else if (msg.method === 'stop') { - // Ensure we are not interrupting in-progress starting. - await started; - // Trigger cleanup asynchronously. - setImmediate(() => { - void cleanup(); - }); - return { - success: true, - message: 'stopping', - }; - } - else if (msg.method === 'status') { - return { - success: true, - result: JSON.stringify({ - pid: process.pid, - socketPath, - startDate: startDate.toISOString(), - version: VERSION, - args: mcpServerArgs, - }), - }; - } - { - return { - success: false, - error: `Unknown method: ${JSON.stringify(msg, null, 2)}`, - }; - } - } - catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error); - return { - success: false, - error: errorMessage, - }; - } -} -async function startSocketServer() { - // Remove existing socket file if it exists (only on non-Windows) - if (!IS_WINDOWS) { - try { - fs.unlinkSync(socketPath); - } - catch { - // ignore errors. - } - } - return await new Promise((resolve, reject) => { - server = createServer(socket => { - const transport = new PipeTransport(socket, socket); - transport.onmessage = async (message) => { - logger('onmessage', message); - const response = await handleRequest(JSON.parse(message)); - transport.send(JSON.stringify(response)); - socket.end(); - }; - socket.on('error', error => { - logger('Socket error:', error); - }); - }); - server.listen({ - path: socketPath, - readableAll: false, - writableAll: false, - }, async () => { - console.log(`Daemon server listening on ${socketPath}`); - try { - // Setup MCP client - await setupMCPClient(); - resolve(); - } - catch (err) { - reject(err); - } - }); - server.on('error', error => { - logger('Server error:', error); - reject(error); - }); - }); -} -async function cleanup() { - console.log('Cleaning up daemon...'); - try { - await mcpClient?.close(); - } - catch (error) { - logger('Error closing MCP client:', error); - } - try { - await mcpTransport?.close(); - } - catch (error) { - logger('Error closing MCP transport:', error); - } - if (server) { - await new Promise(resolve => { - server.close(() => resolve()); - }); - } - if (!IS_WINDOWS) { - try { - fs.unlinkSync(socketPath); - } - catch { - // ignore errors - } - } - logger(`unlinking ${pidFilePath}`); - if (fs.existsSync(pidFilePath)) { - fs.unlinkSync(pidFilePath); - } - process.exit(0); -} -// Handle shutdown signals -process.on('SIGTERM', () => { - void cleanup(); -}); -process.on('SIGINT', () => { - void cleanup(); -}); -process.on('SIGHUP', () => { - void cleanup(); -}); -// Handle uncaught errors -process.on('uncaughtException', error => { - logger('Uncaught exception:', error); -}); -process.on('unhandledRejection', error => { - logger('Unhandled rejection:', error); -}); -// Start the server -const started = startSocketServer().catch(error => { - logger('Failed to start daemon server:', error); - process.exit(1); -}); diff --git a/node_modules/chrome-devtools-mcp/build/src/daemon/types.js b/node_modules/chrome-devtools-mcp/build/src/daemon/types.js deleted file mode 100644 index 2afc345..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/daemon/types.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -export {}; diff --git a/node_modules/chrome-devtools-mcp/build/src/daemon/utils.js b/node_modules/chrome-devtools-mcp/build/src/daemon/utils.js deleted file mode 100644 index c2e029d..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/daemon/utils.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import fs from 'node:fs'; -import os from 'node:os'; -import path from 'node:path'; -import process from 'node:process'; -import { logger } from '../logger.js'; -export const DAEMON_SCRIPT_PATH = path.join(import.meta.dirname, 'daemon.js'); -export const INDEX_SCRIPT_PATH = path.join(import.meta.dirname, '..', 'bin', 'chrome-devtools-mcp.js'); -const APP_NAME = 'chrome-devtools-mcp'; -export const DAEMON_CLIENT_NAME = 'chrome-devtools-cli-daemon'; -// Using these paths due to strict limits on the POSIX socket path length. -export function getSocketPath() { - const uid = os.userInfo().uid; - if (IS_WINDOWS) { - // Windows uses Named Pipes, not file paths. - // This format is required for server.listen() - return path.join('\\\\.\\pipe', APP_NAME, 'server.sock'); - } - // 1. Try XDG_RUNTIME_DIR (Linux standard, sometimes macOS) - if (process.env.XDG_RUNTIME_DIR) { - return path.join(process.env.XDG_RUNTIME_DIR, APP_NAME, 'server.sock'); - } - // 2. macOS/Unix Fallback: Use /tmp/ - // We use /tmp/ because it is much shorter than ~/Library/Application Support/ - // and keeps us well under the 104-character limit. - return path.join('/tmp', `${APP_NAME}-${uid}.sock`); -} -export function getRuntimeHome() { - const platform = os.platform(); - const uid = os.userInfo().uid; - // 1. Check for the modern Unix standard - if (process.env.XDG_RUNTIME_DIR) { - return path.join(process.env.XDG_RUNTIME_DIR, APP_NAME); - } - // 2. Fallback for macOS and older Linux - if (platform === 'darwin' || platform === 'linux') { - // /tmp is cleared on boot, making it perfect for PIDs - return path.join('/tmp', `${APP_NAME}-${uid}`); - } - // 3. Windows Fallback - return path.join(os.tmpdir(), APP_NAME); -} -export const IS_WINDOWS = os.platform() === 'win32'; -export function getPidFilePath() { - const runtimeDir = getRuntimeHome(); - return path.join(runtimeDir, 'daemon.pid'); -} -export function getDaemonPid() { - try { - const pidFile = getPidFilePath(); - logger(`Daemon pid file ${pidFile}`); - if (!fs.existsSync(pidFile)) { - return null; - } - const pidContent = fs.readFileSync(pidFile, 'utf-8'); - const pid = parseInt(pidContent.trim(), 10); - logger(`Daemon pid: ${pid}`); - if (isNaN(pid)) { - return null; - } - return pid; - } - catch { - return null; - } -} -export function isDaemonRunning(pid = getDaemonPid()) { - if (pid) { - try { - process.kill(pid, 0); // Throws if process doesn't exist - return true; - } - catch { - // Process is dead, stale PID file. Proceed with startup. - } - } - return false; -} -export function serializeArgs(options, argv) { - const args = []; - for (const key of Object.keys(options)) { - if (argv[key] === undefined || argv[key] === null) { - continue; - } - const value = argv[key]; - const kebabKey = key.replace(/[A-Z]/g, m => `-${m.toLowerCase()}`); - if (typeof value === 'boolean') { - if (value) { - args.push(`--${kebabKey}`); - } - else { - args.push(`--no-${kebabKey}`); - } - } - else if (Array.isArray(value)) { - for (const item of value) { - args.push(`--${kebabKey}`, String(item)); - } - } - else { - args.push(`--${kebabKey}`, String(value)); - } - } - return args; -} diff --git a/node_modules/chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js b/node_modules/chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js deleted file mode 100644 index 79a136b..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/formatters/ConsoleFormatter.js +++ /dev/null @@ -1,241 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { createStackTraceForConsoleMessage, SymbolizedError, } from '../DevtoolsUtils.js'; -import { UncaughtError } from '../PageCollector.js'; -import * as DevTools from '../third_party/index.js'; -export class ConsoleFormatter { - #id; - #type; - #text; - #argCount; - #resolvedArgs; - #stack; - #cause; - isIgnored; - constructor(params) { - this.#id = params.id; - this.#type = params.type; - this.#text = params.text; - this.#argCount = params.argCount ?? 0; - this.#resolvedArgs = params.resolvedArgs ?? []; - this.#stack = params.stack; - this.#cause = params.cause; - this.isIgnored = params.isIgnored; - } - static async from(msg, options) { - const ignoreListManager = options?.devTools?.universe.context.get(DevTools.DevTools.IgnoreListManager); - const isIgnored = options.isIgnoredForTesting || - (frame => { - if (!ignoreListManager) { - return false; - } - if (frame.uiSourceCode) { - return ignoreListManager.isUserOrSourceMapIgnoreListedUISourceCode(frame.uiSourceCode); - } - if (frame.url) { - return ignoreListManager.isUserIgnoreListedURL(frame.url); - } - return false; - }); - if (msg instanceof UncaughtError) { - const error = await SymbolizedError.fromDetails({ - devTools: options?.devTools, - details: msg.details, - targetId: msg.targetId, - includeStackAndCause: options?.fetchDetailedData, - resolvedStackTraceForTesting: options?.resolvedStackTraceForTesting, - resolvedCauseForTesting: options?.resolvedCauseForTesting, - }); - return new ConsoleFormatter({ - id: options.id, - type: 'error', - text: error.message, - stack: error.stackTrace, - cause: error.cause, - isIgnored, - }); - } - let resolvedArgs = []; - if (options.resolvedArgsForTesting) { - resolvedArgs = options.resolvedArgsForTesting; - } - else if (options.fetchDetailedData) { - resolvedArgs = await Promise.all(msg.args().map(async (arg, i) => { - try { - const remoteObject = arg.remoteObject(); - if (remoteObject.type === 'object' && - remoteObject.subtype === 'error') { - return await SymbolizedError.fromError({ - devTools: options.devTools, - error: remoteObject, - // @ts-expect-error Internal ConsoleMessage API - targetId: msg._targetId(), - }); - } - return await arg.jsonValue(); - } - catch { - return ``; - } - })); - } - let stack; - if (options.resolvedStackTraceForTesting) { - stack = options.resolvedStackTraceForTesting; - } - else if (options.fetchDetailedData && options.devTools) { - try { - stack = await createStackTraceForConsoleMessage(options.devTools, msg); - } - catch { - // ignore - } - } - return new ConsoleFormatter({ - id: options.id, - type: msg.type(), - text: msg.text(), - argCount: resolvedArgs.length || msg.args().length, - resolvedArgs, - stack, - isIgnored, - }); - } - // The short format for a console message. - toString() { - return convertConsoleMessageConciseToString(this.toJSON()); - } - // The verbose format for a console message, including all details. - toStringDetailed() { - return convertConsoleMessageConciseDetailedToString(this.toJSONDetailed()); - } - #getArgs() { - if (this.#resolvedArgs.length > 0) { - const args = [...this.#resolvedArgs]; - // If there is no text, the first argument serves as text (see formatMessage). - if (!this.#text) { - args.shift(); - } - return args; - } - return []; - } - toJSON() { - return { - type: this.#type, - text: this.#text, - argsCount: this.#argCount, - id: this.#id, - }; - } - toJSONDetailed() { - return { - id: this.#id, - type: this.#type, - text: this.#text, - argsCount: this.#argCount, - args: this.#getArgs().map(arg => formatArg(arg, this)), - stackTrace: this.#stack - ? formatStackTrace(this.#stack, this.#cause, this) - : undefined, - }; - } -} -function convertConsoleMessageConciseToString(msg) { - return `msgid=${msg.id} [${msg.type}] ${msg.text} (${msg.argsCount} args)`; -} -function convertConsoleMessageConciseDetailedToString(msg) { - const result = [ - `ID: ${msg.id}`, - `Message: ${msg.type}> ${msg.text}`, - formatArgs(msg), - ...(msg.stackTrace ? ['### Stack trace', msg.stackTrace] : []), - ].filter(line => !!line); - return result.join('\n'); -} -function formatArgs(msg) { - const args = msg.args; - if (!args.length) { - return ''; - } - const result = ['### Arguments']; - for (const [key, arg] of args.entries()) { - result.push(`Arg #${key}: ${arg}`); - } - return result.join('\n'); -} -function formatArg(arg, formatter) { - if (arg instanceof SymbolizedError) { - return [ - arg.message, - arg.stackTrace - ? formatStackTrace(arg.stackTrace, arg.cause, formatter) - : undefined, - ] - .filter(line => !!line) - .join('\n'); - } - return typeof arg === 'object' ? JSON.stringify(arg) : String(arg); -} -const STACK_TRACE_MAX_LINES = 50; -function formatStackTrace(stackTrace, cause, formatter) { - const lines = formatStackTraceInner(stackTrace, cause, formatter); - const includedLines = lines.slice(0, STACK_TRACE_MAX_LINES); - const reminderCount = lines.length - includedLines.length; - return [ - ...includedLines, - reminderCount > 0 ? `... and ${reminderCount} more frames` : '', - 'Note: line and column numbers use 1-based indexing', - ] - .filter(line => !!line) - .join('\n'); -} -function formatStackTraceInner(stackTrace, cause, formatter) { - if (!stackTrace) { - return []; - } - return [ - ...formatFragment(stackTrace.syncFragment, formatter), - ...stackTrace.asyncFragments - .map(item => formatAsyncFragment(item, formatter)) - .flat(), - ...formatCause(cause, formatter), - ]; -} -function formatFragment(fragment, formatter) { - const frames = fragment.frames.filter(frame => !formatter.isIgnored(frame)); - return frames.map(formatFrame); -} -function formatAsyncFragment(fragment, formatter) { - const formattedFrames = formatFragment(fragment, formatter); - if (formattedFrames.length === 0) { - return []; - } - const separatorLineLength = 40; - const prefix = `--- ${fragment.description || 'async'} `; - const separator = prefix + '-'.repeat(separatorLineLength - prefix.length); - return [separator, ...formattedFrames]; -} -function formatFrame(frame) { - let result = `at ${frame.name ?? ''}`; - if (frame.uiSourceCode) { - const location = frame.uiSourceCode.uiLocation(frame.line, frame.column); - result += ` (${location.linkText(/* skipTrim */ false, /* showColumnNumber */ true)})`; - } - else if (frame.url) { - result += ` (${frame.url}:${frame.line}:${frame.column})`; - } - return result; -} -function formatCause(cause, formatter) { - if (!cause) { - return []; - } - return [ - `Caused by: ${cause.message}`, - ...formatStackTraceInner(cause.stackTrace, cause.cause, formatter), - ]; -} diff --git a/node_modules/chrome-devtools-mcp/build/src/formatters/IssueFormatter.js b/node_modules/chrome-devtools-mcp/build/src/formatters/IssueFormatter.js deleted file mode 100644 index 20c298f..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/formatters/IssueFormatter.js +++ /dev/null @@ -1,192 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { ISSUE_UTILS } from '../issue-descriptions.js'; -import { logger } from '../logger.js'; -import { DevTools } from '../third_party/index.js'; -export class IssueFormatter { - #issue; - #options; - constructor(issue, options) { - this.#issue = issue; - this.#options = options; - } - toString() { - return convertIssueConciseToString(this.toJSON()); - } - toStringDetailed() { - return convertIssueDetailedToString(this.toJSONDetailed()); - } - toJSON() { - return { - type: 'issue', - title: this.#getTitle(), - count: this.#issue.getAggregatedIssuesCount(), - id: this.#options.id, - }; - } - toJSONDetailed() { - return { - id: this.#options.id, - type: 'issue', - count: this.#issue.getAggregatedIssuesCount(), - title: this.#getTitle(), - description: this.#getDescription(), - links: this.#issue.getDescription()?.links, - affectedResources: this.#getAffectedResources(), - }; - } - #getAffectedResources() { - const issues = this.#issue.getAllIssues(); - const affectedResources = []; - for (const singleIssue of issues) { - const details = singleIssue.details(); - if (!details) { - continue; - } - // We send the remaining details as untyped JSON because the DevTools - // frontend code is currently not re-usable. - const data = structuredClone(details); - let uid; - let request; - if ('violatingNodeId' in details && - details.violatingNodeId && - this.#options.elementIdResolver) { - uid = this.#options.elementIdResolver(details.violatingNodeId); - delete data.violatingNodeId; - } - if ('nodeId' in details && - details.nodeId && - this.#options.elementIdResolver) { - uid = this.#options.elementIdResolver(details.nodeId); - delete data.nodeId; - } - if ('documentNodeId' in details && - details.documentNodeId && - this.#options.elementIdResolver) { - uid = this.#options.elementIdResolver(details.documentNodeId); - delete data.documentNodeId; - } - if ('request' in details && details.request) { - request = details.request.url; - if (details.request.requestId && this.#options.requestIdResolver) { - const resolvedId = this.#options.requestIdResolver(details.request.requestId); - if (resolvedId) { - request = resolvedId; - const requestData = data.request; - delete requestData.requestId; - } - } - } - // These fields has no use for the MCP client (redundant or irrelevant). - delete data.errorType; - delete data.frameId; - affectedResources.push({ - uid, - data: data, - request, - }); - } - return affectedResources; - } - isValid() { - return this.#getTitle() !== undefined; - } - // Helper to extract title - #getTitle() { - const markdownDescription = this.#issue.getDescription(); - const filename = markdownDescription?.file; - if (!filename) { - logger(`no description found for issue:` + this.#issue.code()); - return undefined; - } - // We already have the description logic in #getDescription, but title extraction is separate - // We can reuse the logic or cache it. - // Ideally we should process markdown once. - const rawMarkdown = ISSUE_UTILS.getIssueDescription(filename); - if (!rawMarkdown) { - logger(`no markdown ${filename} found for issue:` + this.#issue.code()); - return undefined; - } - try { - const processedMarkdown = DevTools.MarkdownIssueDescription.substitutePlaceholders(rawMarkdown, markdownDescription?.substitutions); - const markdownAst = DevTools.Marked.Marked.lexer(processedMarkdown); - const title = DevTools.MarkdownIssueDescription.findTitleFromMarkdownAst(markdownAst); - if (!title) { - logger('cannot read issue title from ' + filename); - return undefined; - } - return title; - } - catch { - logger('error parsing markdown for issue ' + this.#issue.code()); - return undefined; - } - } - #getDescription() { - const markdownDescription = this.#issue.getDescription(); - const filename = markdownDescription?.file; - if (!filename) { - return undefined; - } - const rawMarkdown = ISSUE_UTILS.getIssueDescription(filename); - if (!rawMarkdown) { - return undefined; - } - try { - return DevTools.MarkdownIssueDescription.substitutePlaceholders(rawMarkdown, markdownDescription?.substitutions); - } - catch { - return undefined; - } - } -} -function convertIssueConciseToString(issue) { - return `msgid=${issue.id} [issue] ${issue.title} (count: ${issue.count})`; -} -function convertIssueDetailedToString(issue) { - const result = []; - result.push(`ID: ${issue.id}`); - const bodyParts = []; - const description = issue.description; - let processedMarkdown = description?.trim(); - // Remove heading in order not to conflict with the whole console message response markdown - if (processedMarkdown?.startsWith('# ')) { - processedMarkdown = processedMarkdown.substring(2).trimStart(); - } - if (processedMarkdown) { - bodyParts.push(processedMarkdown); - } - else { - bodyParts.push(issue.title ?? 'Unknown Issue'); - } - const links = issue.links; - if (links && links.length > 0) { - bodyParts.push('Learn more:'); - for (const link of links) { - bodyParts.push(`[${link.linkTitle}](${link.link})`); - } - } - const affectedResources = issue.affectedResources; - if (affectedResources.length) { - bodyParts.push('### Affected resources'); - bodyParts.push(...affectedResources.map(item => { - const details = []; - if (item.uid) { - details.push(`uid=${item.uid}`); - } - if (item.request) { - details.push((typeof item.request === 'number' ? `reqid=` : 'url=') + - item.request); - } - if (item.data) { - details.push(`data=${JSON.stringify(item.data)}`); - } - return details.join(' '); - })); - } - result.push(`Message: issue> ${bodyParts.join('\n')}`); - return result.join('\n'); -} diff --git a/node_modules/chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js b/node_modules/chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js deleted file mode 100644 index 12d8adc..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/formatters/NetworkFormatter.js +++ /dev/null @@ -1,218 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - * */ -import { isUtf8 } from 'node:buffer'; -const BODY_CONTEXT_SIZE_LIMIT = 10000; -export class NetworkFormatter { - #request; - #options; - #requestBody; - #responseBody; - #requestBodyFilePath; - #responseBodyFilePath; - constructor(request, options) { - this.#request = request; - this.#options = options; - } - static async from(request, options) { - const instance = new NetworkFormatter(request, options); - if (options.fetchData) { - await instance.#loadDetailedData(); - } - return instance; - } - async #loadDetailedData() { - // Load Request Body - if (this.#request.hasPostData()) { - let data; - try { - data = - this.#request.postData() ?? (await this.#request.fetchPostData()); - } - catch { - // Ignore parsing errors - } - const requestBodyNotAvailableMessage = ''; - if (this.#options.requestFilePath) { - if (!this.#options.saveFile) { - throw new Error('saveFile is not provided'); - } - if (data) { - await this.#options.saveFile(Buffer.from(data), this.#options.requestFilePath); - this.#requestBodyFilePath = this.#options.requestFilePath; - } - else { - this.#requestBody = requestBodyNotAvailableMessage; - } - } - else { - if (data) { - this.#requestBody = getSizeLimitedString(data, BODY_CONTEXT_SIZE_LIMIT); - } - else { - this.#requestBody = requestBodyNotAvailableMessage; - } - } - } - // Load Response Body - const response = this.#request.response(); - if (response) { - const responseBodyNotAvailableMessage = ''; - if (this.#options.responseFilePath) { - try { - const buffer = await response.buffer(); - if (!this.#options.saveFile) { - throw new Error('saveFile is not provided'); - } - await this.#options.saveFile(buffer, this.#options.responseFilePath); - this.#responseBodyFilePath = this.#options.responseFilePath; - } - catch { - // Flatten error handling for buffer() failure and save failure - } - if (!this.#responseBodyFilePath) { - this.#responseBody = responseBodyNotAvailableMessage; - } - } - else { - this.#responseBody = await this.#getFormattedResponseBody(response, BODY_CONTEXT_SIZE_LIMIT); - } - } - } - toString() { - return convertNetworkRequestConciseToString(this.toJSON()); - } - toStringDetailed() { - return converNetworkRequestDetailedToStringDetailed(this.toJSONDetailed()); - } - toJSON() { - return { - requestId: this.#options.requestId, - method: this.#request.method(), - url: this.#request.url(), - status: this.#getStatusFromRequest(this.#request), - selectedInDevToolsUI: this.#options.selectedInDevToolsUI, - }; - } - toJSONDetailed() { - const redirectChain = this.#request.redirectChain(); - const formattedRedirectChain = redirectChain.reverse().map(request => { - const id = this.#options.requestIdResolver - ? this.#options.requestIdResolver(request) - : undefined; - const formatter = new NetworkFormatter(request, { - requestId: id, - saveFile: this.#options.saveFile, - }); - return formatter.toJSON(); - }); - return { - ...this.toJSON(), - requestHeaders: this.#request.headers(), - requestBody: this.#requestBody, - requestBodyFilePath: this.#requestBodyFilePath, - responseHeaders: this.#request.response()?.headers(), - responseBody: this.#responseBody, - responseBodyFilePath: this.#responseBodyFilePath, - failure: this.#request.failure()?.errorText, - redirectChain: formattedRedirectChain.length - ? formattedRedirectChain - : undefined, - }; - } - #getStatusFromRequest(request) { - const httpResponse = request.response(); - const failure = request.failure(); - let status; - if (httpResponse) { - status = httpResponse.status().toString(); - } - else if (failure) { - status = failure.errorText; - } - else { - status = 'pending'; - } - return status; - } - async #getFormattedResponseBody(httpResponse, sizeLimit = BODY_CONTEXT_SIZE_LIMIT) { - try { - const responseBuffer = await httpResponse.buffer(); - if (isUtf8(responseBuffer)) { - const responseAsTest = responseBuffer.toString('utf-8'); - if (responseAsTest.length === 0) { - return ''; - } - return getSizeLimitedString(responseAsTest, sizeLimit); - } - return ''; - } - catch { - return ''; - } - } -} -function getSizeLimitedString(text, sizeLimit) { - if (text.length > sizeLimit) { - return text.substring(0, sizeLimit) + '... '; - } - return text; -} -function convertNetworkRequestConciseToString(data) { - // TODO truncate the URL - return `reqid=${data.requestId} ${data.method} ${data.url} [${data.status}]${data.selectedInDevToolsUI ? ` [selected in the DevTools Network panel]` : ''}`; -} -function formatHeadlers(headers) { - const response = []; - for (const [name, value] of Object.entries(headers)) { - response.push(`- ${name}:${value}`); - } - return response; -} -function converNetworkRequestDetailedToStringDetailed(data) { - const response = []; - response.push(`## Request ${data.url}`); - response.push(`Status: ${data.status}`); - response.push(`### Request Headers`); - for (const line of formatHeadlers(data.requestHeaders)) { - response.push(line); - } - if (data.requestBody) { - response.push(`### Request Body`); - response.push(data.requestBody); - } - else if (data.requestBodyFilePath) { - response.push(`### Request Body`); - response.push(`Saved to ${data.requestBodyFilePath}.`); - } - if (data.responseHeaders) { - response.push(`### Response Headers`); - for (const line of formatHeadlers(data.responseHeaders)) { - response.push(line); - } - } - if (data.responseBody) { - response.push(`### Response Body`); - response.push(data.responseBody); - } - else if (data.responseBodyFilePath) { - response.push(`### Response Body`); - response.push(`Saved to ${data.responseBodyFilePath}.`); - } - if (data.failure) { - response.push(`### Request failed with`); - response.push(data.failure); - } - const redirectChain = data.redirectChain; - if (redirectChain?.length) { - response.push(`### Redirect chain`); - let indent = 0; - for (const request of redirectChain.reverse()) { - response.push(`${' '.repeat(indent)}${convertNetworkRequestConciseToString(request)})}`); - indent++; - } - } - return response.join('\n'); -} diff --git a/node_modules/chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js b/node_modules/chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js deleted file mode 100644 index cdf64d5..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/formatters/SnapshotFormatter.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -export class SnapshotFormatter { - #snapshot; - constructor(snapshot) { - this.#snapshot = snapshot; - } - toString() { - const chunks = []; - const root = this.#snapshot.root; - // Top-level content of the snapshot. - if (this.#snapshot.verbose && - this.#snapshot.hasSelectedElement && - !this.#snapshot.selectedElementUid) { - chunks.push(`Note: there is a selected element in the DevTools Elements panel but it is not included into the current a11y tree snapshot. -Get a verbose snapshot to include all elements if you are interested in the selected element.\n\n`); - } - chunks.push(this.#formatNode(root, 0)); - return chunks.join(''); - } - toJSON() { - return this.#nodeToJSON(this.#snapshot.root); - } - #formatNode(node, depth = 0) { - const chunks = []; - const attributes = this.#getAttributes(node); - const line = ' '.repeat(depth * 2) + - attributes.join(' ') + - (node.id === this.#snapshot.selectedElementUid - ? ' [selected in the DevTools Elements panel]' - : '') + - '\n'; - chunks.push(line); - for (const child of node.children) { - chunks.push(this.#formatNode(child, depth + 1)); - } - return chunks.join(''); - } - #nodeToJSON(node) { - const rawAttrs = this.#getAttributesMap(node); - const children = node.children.map(child => this.#nodeToJSON(child)); - const result = structuredClone(rawAttrs); - if (children.length > 0) { - result.children = children; - } - return result; - } - #getAttributes(serializedAXNodeRoot) { - const attributes = [`uid=${serializedAXNodeRoot.id}`]; - if (serializedAXNodeRoot.role) { - attributes.push(serializedAXNodeRoot.role === 'none' - ? 'ignored' - : serializedAXNodeRoot.role); - } - if (serializedAXNodeRoot.name) { - attributes.push(`"${serializedAXNodeRoot.name}"`); - } - const simpleAttrs = this.#getAttributesMap(serializedAXNodeRoot, - /* excludeSpecial */ true); - for (const attr of Object.keys(serializedAXNodeRoot).sort()) { - if (excludedAttributes.has(attr)) { - continue; - } - const mapped = booleanPropertyMap[attr]; - if (mapped && simpleAttrs[mapped]) { - attributes.push(mapped); - } - const val = simpleAttrs[attr]; - if (val === true) { - attributes.push(attr); - } - else if (typeof val === 'string' || typeof val === 'number') { - attributes.push(`${attr}="${val}"`); - } - } - return attributes; - } - #getAttributesMap(node, excludeSpecial = false) { - const result = {}; - if (!excludeSpecial) { - result.id = node.id; - if (node.role) { - result.role = node.role; - } - if (node.name) { - result.name = node.name; - } - } - // Re-implementing the exact logic from original function for #getAttributes to be safe: - return { - ...result, - ...this.#extractedAttributes(node), - }; - } - #extractedAttributes(node) { - const result = {}; - for (const attr of Object.keys(node).sort()) { - if (excludedAttributes.has(attr)) { - continue; - } - const value = node[attr]; - if (typeof value === 'boolean') { - if (booleanPropertyMap[attr]) { - result[booleanPropertyMap[attr]] = true; - } - if (value) { - result[attr] = true; - } - } - else if (typeof value === 'string' || typeof value === 'number') { - result[attr] = value; - } - } - return result; - } -} -const booleanPropertyMap = { - disabled: 'disableable', - expanded: 'expandable', - focused: 'focusable', - selected: 'selectable', -}; -const excludedAttributes = new Set([ - 'id', - 'role', - 'name', - 'elementHandle', - 'children', - 'backendNodeId', - 'loaderId', -]); diff --git a/node_modules/chrome-devtools-mcp/build/src/index.js b/node_modules/chrome-devtools-mcp/build/src/index.js deleted file mode 100644 index 0610aab..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/index.js +++ /dev/null @@ -1,219 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { ensureBrowserConnected, ensureBrowserLaunched } from './browser.js'; -import { loadIssueDescriptions } from './issue-descriptions.js'; -import { logger } from './logger.js'; -import { McpContext } from './McpContext.js'; -import { McpResponse } from './McpResponse.js'; -import { Mutex } from './Mutex.js'; -import { SlimMcpResponse } from './SlimMcpResponse.js'; -import { ClearcutLogger } from './telemetry/ClearcutLogger.js'; -import { bucketizeLatency } from './telemetry/metricUtils.js'; -import { McpServer, SetLevelRequestSchema, } from './third_party/index.js'; -import { ToolCategory } from './tools/categories.js'; -import { pageIdSchema } from './tools/ToolDefinition.js'; -import { createTools } from './tools/tools.js'; -import { VERSION } from './version.js'; -export async function createMcpServer(serverArgs, options) { - let clearcutLogger; - if (serverArgs.usageStatistics) { - clearcutLogger = new ClearcutLogger({ - logFile: serverArgs.logFile, - appVersion: VERSION, - clearcutEndpoint: serverArgs.clearcutEndpoint, - clearcutForceFlushIntervalMs: serverArgs.clearcutForceFlushIntervalMs, - clearcutIncludePidHeader: serverArgs.clearcutIncludePidHeader, - }); - } - const server = new McpServer({ - name: 'chrome_devtools', - title: 'Chrome DevTools MCP server', - version: VERSION, - }, { capabilities: { logging: {} } }); - server.server.setRequestHandler(SetLevelRequestSchema, () => { - return {}; - }); - server.server.oninitialized = () => { - const clientName = server.server.getClientVersion()?.name; - if (clientName) { - clearcutLogger?.setClientName(clientName); - } - }; - let context; - async function getContext() { - const chromeArgs = (serverArgs.chromeArg ?? []).map(String); - const ignoreDefaultChromeArgs = (serverArgs.ignoreDefaultChromeArg ?? []).map(String); - if (serverArgs.proxyServer) { - chromeArgs.push(`--proxy-server=${serverArgs.proxyServer}`); - } - const devtools = serverArgs.experimentalDevtools ?? false; - const browser = serverArgs.browserUrl || serverArgs.wsEndpoint || serverArgs.autoConnect - ? await ensureBrowserConnected({ - browserURL: serverArgs.browserUrl, - wsEndpoint: serverArgs.wsEndpoint, - wsHeaders: serverArgs.wsHeaders, - // Important: only pass channel, if autoConnect is true. - channel: serverArgs.autoConnect - ? serverArgs.channel - : undefined, - userDataDir: serverArgs.userDataDir, - devtools, - }) - : await ensureBrowserLaunched({ - headless: serverArgs.headless, - executablePath: serverArgs.executablePath, - channel: serverArgs.channel, - isolated: serverArgs.isolated ?? false, - userDataDir: serverArgs.userDataDir, - logFile: options.logFile, - viewport: serverArgs.viewport, - chromeArgs, - ignoreDefaultChromeArgs, - acceptInsecureCerts: serverArgs.acceptInsecureCerts, - devtools, - enableExtensions: serverArgs.categoryExtensions, - viaCli: serverArgs.viaCli, - }); - if (context?.browser !== browser) { - context = await McpContext.from(browser, logger, { - experimentalDevToolsDebugging: devtools, - experimentalIncludeAllPages: serverArgs.experimentalIncludeAllPages, - performanceCrux: serverArgs.performanceCrux, - }); - } - return context; - } - const toolMutex = new Mutex(); - function registerTool(tool) { - if (tool.annotations.category === ToolCategory.EMULATION && - serverArgs.categoryEmulation === false) { - return; - } - if (tool.annotations.category === ToolCategory.PERFORMANCE && - serverArgs.categoryPerformance === false) { - return; - } - if (tool.annotations.category === ToolCategory.NETWORK && - serverArgs.categoryNetwork === false) { - return; - } - if (tool.annotations.category === ToolCategory.EXTENSIONS && - !serverArgs.categoryExtensions) { - return; - } - if (tool.annotations.category === ToolCategory.IN_PAGE && - !serverArgs.categoryInPageTools) { - return; - } - if (tool.annotations.conditions?.includes('computerVision') && - !serverArgs.experimentalVision) { - return; - } - if (tool.annotations.conditions?.includes('experimentalInteropTools') && - !serverArgs.experimentalInteropTools) { - return; - } - if (tool.annotations.conditions?.includes('screencast') && - !serverArgs.experimentalScreencast) { - return; - } - const schema = 'pageScoped' in tool && - tool.pageScoped && - serverArgs.experimentalPageIdRouting && - !serverArgs.slim - ? { ...tool.schema, ...pageIdSchema } - : tool.schema; - server.registerTool(tool.name, { - description: tool.description, - inputSchema: schema, - annotations: tool.annotations, - }, async (params) => { - const guard = await toolMutex.acquire(); - const startTime = Date.now(); - let success = false; - try { - logger(`${tool.name} request: ${JSON.stringify(params, null, ' ')}`); - const context = await getContext(); - logger(`${tool.name} context: resolved`); - await context.detectOpenDevToolsWindows(); - const response = serverArgs.slim - ? new SlimMcpResponse(serverArgs) - : new McpResponse(serverArgs); - if ('pageScoped' in tool && tool.pageScoped) { - const page = serverArgs.experimentalPageIdRouting && - params.pageId && - !serverArgs.slim - ? context.getPageById(params.pageId) - : context.getSelectedMcpPage(); - response.setPage(page); - await tool.handler({ - params, - page, - }, response, context); - } - else { - await tool.handler( - // @ts-expect-error types do not match. - { - params, - }, response, context); - } - const { content, structuredContent } = await response.handle(tool.name, context); - const result = { - content, - }; - success = true; - if (serverArgs.experimentalStructuredContent) { - result.structuredContent = structuredContent; - } - return result; - } - catch (err) { - logger(`${tool.name} error:`, err, err?.stack); - let errorText = err && 'message' in err ? err.message : String(err); - if ('cause' in err && err.cause) { - errorText += `\nCause: ${err.cause.message}`; - } - return { - content: [ - { - type: 'text', - text: errorText, - }, - ], - isError: true, - }; - } - finally { - void clearcutLogger?.logToolInvocation({ - toolName: tool.name, - success, - latencyMs: bucketizeLatency(Date.now() - startTime), - }); - guard.dispose(); - } - }); - } - const tools = createTools(serverArgs); - for (const tool of tools) { - registerTool(tool); - } - await loadIssueDescriptions(); - return { server, clearcutLogger }; -} -export const logDisclaimers = (args) => { - console.error(`chrome-devtools-mcp exposes content of the browser instance to the MCP clients allowing them to inspect, -debug, and modify any data in the browser or DevTools. -Avoid sharing sensitive or personal information that you do not want to share with MCP clients.`); - if (!args.slim && args.performanceCrux) { - console.error(`Performance tools may send trace URLs to the Google CrUX API to fetch real-user experience data. To disable, run with --no-performance-crux.`); - } - if (!args.slim && args.usageStatistics) { - console.error(` -Google collects usage statistics to improve Chrome DevTools MCP. To opt-out, run with --no-usage-statistics. -For more details, visit: https://github.com/ChromeDevTools/chrome-devtools-mcp#usage-statistics`); - } -}; diff --git a/node_modules/chrome-devtools-mcp/build/src/issue-descriptions.js b/node_modules/chrome-devtools-mcp/build/src/issue-descriptions.js deleted file mode 100644 index eec9af8..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/issue-descriptions.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import * as fs from 'node:fs'; -import * as path from 'node:path'; -const DESCRIPTIONS_PATH = path.join(import.meta.dirname, 'third_party/issue-descriptions'); -let issueDescriptions = {}; -/** - * Reads all issue descriptions from the filesystem into memory. - */ -export async function loadIssueDescriptions() { - if (Object.keys(issueDescriptions).length > 0) { - return; - } - const files = await fs.promises.readdir(DESCRIPTIONS_PATH); - const descriptions = {}; - for (const file of files) { - if (!file.endsWith('.md')) { - continue; - } - const content = await fs.promises.readFile(path.join(DESCRIPTIONS_PATH, file), 'utf-8'); - descriptions[file] = content; - } - issueDescriptions = descriptions; -} -/** - * Gets an issue description from the in-memory cache. - * @param fileName The file name of the issue description. - * @returns The description of the issue, or null if it doesn't exist. - */ -export function getIssueDescription(fileName) { - return issueDescriptions[fileName] ?? null; -} -export const ISSUE_UTILS = { - loadIssueDescriptions, - getIssueDescription, -}; diff --git a/node_modules/chrome-devtools-mcp/build/src/logger.js b/node_modules/chrome-devtools-mcp/build/src/logger.js deleted file mode 100644 index cbc2636..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/logger.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import fs from 'node:fs'; -import { debug } from './third_party/index.js'; -const mcpDebugNamespace = 'mcp:log'; -const namespacesToEnable = [ - mcpDebugNamespace, - ...(process.env['DEBUG'] ? [process.env['DEBUG']] : []), -]; -export function saveLogsToFile(fileName) { - // Enable overrides everything so we need to add them - debug.enable(namespacesToEnable.join(',')); - const logFile = fs.createWriteStream(fileName, { flags: 'a+' }); - debug.log = function (...chunks) { - logFile.write(`${chunks.join(' ')}\n`); - }; - logFile.on('error', function (error) { - console.error(`Error when opening/writing to log file: ${error.message}`); - logFile.end(); - process.exit(1); - }); - return logFile; -} -export function flushLogs(logFile, timeoutMs = 2000) { - return new Promise((resolve, reject) => { - const timeout = setTimeout(reject, timeoutMs); - logFile.end(() => { - clearTimeout(timeout); - resolve(); - }); - }); -} -export const logger = debug(mcpDebugNamespace); diff --git a/node_modules/chrome-devtools-mcp/build/src/polyfill.js b/node_modules/chrome-devtools-mcp/build/src/polyfill.js deleted file mode 100644 index 0eed003..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/polyfill.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @license - * Copyright 2025 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -// polyfills are now bundled with all other dependencies -import './third_party/index.js'; diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js deleted file mode 100644 index 4f329d1..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/ClearcutLogger.js +++ /dev/null @@ -1,219 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import process from 'node:process'; -import { DAEMON_CLIENT_NAME } from '../daemon/utils.js'; -import { logger } from '../logger.js'; -import { FilePersistence } from './persistence.js'; -import { McpClient, WatchdogMessageType, OsType, } from './types.js'; -import { WatchdogClient } from './WatchdogClient.js'; -const MS_PER_DAY = 24 * 60 * 60 * 1000; -const PARAM_BLOCKLIST = new Set(['uid']); -const SUPPORTED_ZOD_TYPES = [ - 'ZodString', - 'ZodNumber', - 'ZodBoolean', - 'ZodArray', - 'ZodEnum', -]; -function isZodType(type) { - return SUPPORTED_ZOD_TYPES.includes(type); -} -function getZodType(zodType) { - const def = zodType._def; - const typeName = def.typeName; - if (typeName === 'ZodOptional' || - typeName === 'ZodDefault' || - typeName === 'ZodNullable') { - return getZodType(def.innerType); - } - if (typeName === 'ZodEffects') { - return getZodType(def.schema); - } - if (isZodType(typeName)) { - return typeName; - } - throw new Error(`Unsupported zod type for tool parameter: ${typeName}`); -} -function transformName(zodType, name) { - if (zodType === 'ZodString') { - return `${name}_length`; - } - else if (zodType === 'ZodArray') { - return `${name}_count`; - } - else { - return name; - } -} -function transformValue(zodType, value) { - if (zodType === 'ZodString') { - return value.length; - } - else if (zodType === 'ZodArray') { - return value.length; - } - else { - return value; - } -} -function hasEquivalentType(zodType, value) { - if (zodType === 'ZodString') { - return typeof value === 'string'; - } - else if (zodType === 'ZodArray') { - return Array.isArray(value); - } - else if (zodType === 'ZodNumber') { - return typeof value === 'number'; - } - else if (zodType === 'ZodBoolean') { - return typeof value === 'boolean'; - } - else if (zodType === 'ZodEnum') { - return (typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean'); - } - else { - return false; - } -} -export function sanitizeParams(params, schema) { - const transformed = {}; - for (const [name, value] of Object.entries(params)) { - if (PARAM_BLOCKLIST.has(name)) { - continue; - } - const zodType = getZodType(schema[name]); - if (!hasEquivalentType(zodType, value)) { - throw new Error(`parameter ${name} has type ${zodType} but value ${value} is not of equivalent type`); - } - const transformedName = transformName(zodType, name); - const transformedValue = transformValue(zodType, value); - transformed[transformedName] = transformedValue; - } - return transformed; -} -function detectOsType() { - switch (process.platform) { - case 'win32': - return OsType.OS_TYPE_WINDOWS; - case 'darwin': - return OsType.OS_TYPE_MACOS; - case 'linux': - return OsType.OS_TYPE_LINUX; - default: - return OsType.OS_TYPE_UNSPECIFIED; - } -} -export class ClearcutLogger { - #persistence; - #watchdog; - #mcpClient; - constructor(options) { - this.#persistence = options.persistence ?? new FilePersistence(); - this.#watchdog = - options.watchdogClient ?? - new WatchdogClient({ - parentPid: process.pid, - appVersion: options.appVersion, - osType: detectOsType(), - logFile: options.logFile, - clearcutEndpoint: options.clearcutEndpoint, - clearcutForceFlushIntervalMs: options.clearcutForceFlushIntervalMs, - clearcutIncludePidHeader: options.clearcutIncludePidHeader, - }); - this.#mcpClient = McpClient.MCP_CLIENT_UNSPECIFIED; - } - setClientName(clientName) { - const lowerName = clientName.toLowerCase(); - if (lowerName.includes('claude')) { - this.#mcpClient = McpClient.MCP_CLIENT_CLAUDE_CODE; - } - else if (lowerName.includes('gemini')) { - this.#mcpClient = McpClient.MCP_CLIENT_GEMINI_CLI; - } - else if (clientName === DAEMON_CLIENT_NAME) { - this.#mcpClient = McpClient.MCP_CLIENT_DT_MCP_CLI; - } - else if (lowerName.includes('openclaw')) { - this.#mcpClient = McpClient.MCP_CLIENT_OPENCLAW; - } - else if (lowerName.includes('codex')) { - this.#mcpClient = McpClient.MCP_CLIENT_CODEX; - } - else if (lowerName.includes('antigravity')) { - this.#mcpClient = McpClient.MCP_CLIENT_ANTIGRAVITY; - } - else { - this.#mcpClient = McpClient.MCP_CLIENT_OTHER; - } - } - async logToolInvocation(args) { - this.#watchdog.send({ - type: WatchdogMessageType.LOG_EVENT, - payload: { - mcp_client: this.#mcpClient, - tool_invocation: { - tool_name: args.toolName, - success: args.success, - latency_ms: args.latencyMs, - }, - }, - }); - } - async logServerStart(flagUsage) { - this.#watchdog.send({ - type: WatchdogMessageType.LOG_EVENT, - payload: { - mcp_client: this.#mcpClient, - server_start: { - flag_usage: flagUsage, - }, - }, - }); - } - async logDailyActiveIfNeeded() { - try { - const state = await this.#persistence.loadState(); - if (this.#shouldLogDailyActive(state)) { - let daysSince = -1; - if (state.lastActive) { - const lastActiveDate = new Date(state.lastActive); - const now = new Date(); - const diffTime = Math.abs(now.getTime() - lastActiveDate.getTime()); - daysSince = Math.ceil(diffTime / MS_PER_DAY); - } - this.#watchdog.send({ - type: WatchdogMessageType.LOG_EVENT, - payload: { - mcp_client: this.#mcpClient, - daily_active: { - days_since_last_active: daysSince, - }, - }, - }); - state.lastActive = new Date().toISOString(); - await this.#persistence.saveState(state); - } - } - catch (err) { - logger('Error in logDailyActiveIfNeeded:', err); - } - } - #shouldLogDailyActive(state) { - if (!state.lastActive) { - return true; - } - const lastActiveDate = new Date(state.lastActive); - const now = new Date(); - // Compare UTC dates - const isSameDay = lastActiveDate.getUTCFullYear() === now.getUTCFullYear() && - lastActiveDate.getUTCMonth() === now.getUTCMonth() && - lastActiveDate.getUTCDate() === now.getUTCDate(); - return !isSameDay; - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js deleted file mode 100644 index 1fa918f..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/WatchdogClient.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { spawn } from 'node:child_process'; -import { fileURLToPath } from 'node:url'; -import { logger } from '../logger.js'; -export class WatchdogClient { - #childProcess; - constructor(config, options) { - const watchdogPath = fileURLToPath(new URL('./watchdog/main.js', import.meta.url)); - const args = [ - watchdogPath, - `--parent-pid=${config.parentPid}`, - `--app-version=${config.appVersion}`, - `--os-type=${config.osType}`, - ]; - if (config.logFile) { - args.push(`--log-file=${config.logFile}`); - } - if (config.clearcutEndpoint) { - args.push(`--clearcut-endpoint=${config.clearcutEndpoint}`); - } - if (config.clearcutForceFlushIntervalMs) { - args.push(`--clearcut-force-flush-interval-ms=${config.clearcutForceFlushIntervalMs}`); - } - if (config.clearcutIncludePidHeader) { - args.push('--clearcut-include-pid-header'); - } - const spawner = options?.spawn ?? spawn; - this.#childProcess = spawner(process.execPath, args, { - stdio: ['pipe', 'ignore', 'ignore'], - detached: true, - }); - this.#childProcess.unref(); - this.#childProcess.on('error', err => { - logger('Watchdog process error:', err); - }); - this.#childProcess.on('exit', (code, signal) => { - logger(`Watchdog exited with code ${code} and signal ${signal}`); - }); - } - send(message) { - if (this.#childProcess.stdin && - !this.#childProcess.stdin.destroyed && - this.#childProcess.pid) { - try { - const line = JSON.stringify(message) + '\n'; - this.#childProcess.stdin.write(line); - } - catch (err) { - logger('Failed to write to watchdog stdin', err); - } - } - else { - logger('Watchdog stdin not available, dropping message'); - } - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/flagUtils.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/flagUtils.js deleted file mode 100644 index 11c6924..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/flagUtils.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import { toSnakeCase } from '../utils/string.js'; -/** - * Computes telemetry flag usage from parsed arguments and CLI options. - * - * Iterates over the defined CLI options to construct a payload: - * - Flag names are converted to snake_case (e.g. `browserUrl` -> `browser_url`). - * - A flag is logged as `{flag_name}_present` if: - * - It has no default value, OR - * - The provided value differs from the default value. - * - Boolean flags are logged with their literal value. - * - String flags with defined `choices` (Enums) are logged as their uppercase value. - */ -export function computeFlagUsage(args, options) { - const usage = {}; - for (const [flagName, config] of Object.entries(options)) { - const value = args[flagName]; - const snakeCaseName = toSnakeCase(flagName); - // If there isn't a default value provided for the flag, - // we're going to log whether it's present on the args user - // provided or not. If there is a default value, we only log presence - // if the value differs from the default, implying explicit user intent. - if (!('default' in config) || value !== config.default) { - usage[`${snakeCaseName}_present`] = value !== undefined && value !== null; - } - if (config.type === 'boolean' && typeof value === 'boolean') { - // For boolean options, we're going to log the value directly. - usage[snakeCaseName] = value; - } - else if (config.type === 'string' && - typeof value === 'string' && - 'choices' in config && - config.choices) { - // For enums, log the value as uppercase - // We're going to have an enum for such flags with choices represented - // as an `enum` where the keys of the enum will map to the uppercase `choice`. - usage[snakeCaseName] = `${snakeCaseName}_${value}`.toUpperCase(); - } - } - return usage; -} diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/metricUtils.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/metricUtils.js deleted file mode 100644 index 6cc5bf8..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/metricUtils.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -const LATENCY_BUCKETS = [50, 100, 250, 500, 1000, 2500, 5000, 10000]; -export function bucketizeLatency(latencyMs) { - for (const bucket of LATENCY_BUCKETS) { - if (latencyMs <= bucket) { - return bucket; - } - } - return LATENCY_BUCKETS[LATENCY_BUCKETS.length - 1]; -} diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/persistence.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/persistence.js deleted file mode 100644 index 3612621..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/persistence.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import fs from 'node:fs/promises'; -import os from 'node:os'; -import path from 'node:path'; -import process from 'node:process'; -import { logger } from '../logger.js'; -const STATE_FILE_NAME = 'telemetry_state.json'; -function getDataFolder() { - const homedir = os.homedir(); - const { env } = process; - const name = 'chrome-devtools-mcp'; - if (process.platform === 'darwin') { - return path.join(homedir, 'Library', 'Application Support', name); - } - if (process.platform === 'win32') { - const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); - return path.join(localAppData, name, 'Data'); - } - return path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name); -} -export class FilePersistence { - #dataFolder; - constructor(dataFolderOverride) { - this.#dataFolder = dataFolderOverride ?? getDataFolder(); - } - async loadState() { - try { - const filePath = path.join(this.#dataFolder, STATE_FILE_NAME); - const content = await fs.readFile(filePath, 'utf-8'); - return JSON.parse(content); - } - catch { - return { - lastActive: '', - }; - } - } - async saveState(state) { - const filePath = path.join(this.#dataFolder, STATE_FILE_NAME); - try { - await fs.mkdir(this.#dataFolder, { recursive: true }); - await fs.writeFile(filePath, JSON.stringify(state, null, 2), 'utf-8'); - } - catch (error) { - // Ignore errors during state saving to avoid crashing the server - logger(`Failed to save telemetry state to ${filePath}:`, error); - } - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/types.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/types.js deleted file mode 100644 index cf630b5..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/types.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -// Enums -export var OsType; -(function (OsType) { - OsType[OsType["OS_TYPE_UNSPECIFIED"] = 0] = "OS_TYPE_UNSPECIFIED"; - OsType[OsType["OS_TYPE_WINDOWS"] = 1] = "OS_TYPE_WINDOWS"; - OsType[OsType["OS_TYPE_MACOS"] = 2] = "OS_TYPE_MACOS"; - OsType[OsType["OS_TYPE_LINUX"] = 3] = "OS_TYPE_LINUX"; -})(OsType || (OsType = {})); -export var ChromeChannel; -(function (ChromeChannel) { - ChromeChannel[ChromeChannel["CHROME_CHANNEL_UNSPECIFIED"] = 0] = "CHROME_CHANNEL_UNSPECIFIED"; - ChromeChannel[ChromeChannel["CHROME_CHANNEL_CANARY"] = 1] = "CHROME_CHANNEL_CANARY"; - ChromeChannel[ChromeChannel["CHROME_CHANNEL_DEV"] = 2] = "CHROME_CHANNEL_DEV"; - ChromeChannel[ChromeChannel["CHROME_CHANNEL_BETA"] = 3] = "CHROME_CHANNEL_BETA"; - ChromeChannel[ChromeChannel["CHROME_CHANNEL_STABLE"] = 4] = "CHROME_CHANNEL_STABLE"; -})(ChromeChannel || (ChromeChannel = {})); -export var McpClient; -(function (McpClient) { - McpClient[McpClient["MCP_CLIENT_UNSPECIFIED"] = 0] = "MCP_CLIENT_UNSPECIFIED"; - McpClient[McpClient["MCP_CLIENT_CLAUDE_CODE"] = 1] = "MCP_CLIENT_CLAUDE_CODE"; - McpClient[McpClient["MCP_CLIENT_GEMINI_CLI"] = 2] = "MCP_CLIENT_GEMINI_CLI"; - McpClient[McpClient["MCP_CLIENT_DT_MCP_CLI"] = 4] = "MCP_CLIENT_DT_MCP_CLI"; - McpClient[McpClient["MCP_CLIENT_OPENCLAW"] = 5] = "MCP_CLIENT_OPENCLAW"; - McpClient[McpClient["MCP_CLIENT_CODEX"] = 6] = "MCP_CLIENT_CODEX"; - McpClient[McpClient["MCP_CLIENT_ANTIGRAVITY"] = 7] = "MCP_CLIENT_ANTIGRAVITY"; - McpClient[McpClient["MCP_CLIENT_OTHER"] = 3] = "MCP_CLIENT_OTHER"; -})(McpClient || (McpClient = {})); -// IPC types for messages between the main process and the -// telemetry watchdog process. -export var WatchdogMessageType; -(function (WatchdogMessageType) { - WatchdogMessageType["LOG_EVENT"] = "log-event"; -})(WatchdogMessageType || (WatchdogMessageType = {})); diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/ClearcutSender.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/ClearcutSender.js deleted file mode 100644 index a351e57..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/ClearcutSender.js +++ /dev/null @@ -1,203 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import crypto from 'node:crypto'; -import { logger } from '../../logger.js'; -const MAX_BUFFER_SIZE = 1000; -const DEFAULT_CLEARCUT_ENDPOINT = 'https://play.googleapis.com/log?format=json_proto'; -const DEFAULT_FLUSH_INTERVAL_MS = 15 * 60 * 1000; -const LOG_SOURCE = 2839; -const CLIENT_TYPE = 47; -const MIN_RATE_LIMIT_WAIT_MS = 30_000; -const REQUEST_TIMEOUT_MS = 30_000; -const SHUTDOWN_TIMEOUT_MS = 5_000; -const SESSION_ROTATION_INTERVAL_MS = 24 * 60 * 60 * 1000; -export class ClearcutSender { - #appVersion; - #osType; - #clearcutEndpoint; - #flushIntervalMs; - #includePidHeader; - #sessionId; - #sessionCreated; - #buffer = []; - #flushTimer = null; - #isFlushing = false; - #timerStarted = false; - constructor(config) { - this.#appVersion = config.appVersion; - this.#osType = config.osType; - this.#clearcutEndpoint = - config.clearcutEndpoint ?? DEFAULT_CLEARCUT_ENDPOINT; - this.#flushIntervalMs = - config.forceFlushIntervalMs ?? DEFAULT_FLUSH_INTERVAL_MS; - this.#includePidHeader = config.includePidHeader ?? false; - this.#sessionId = crypto.randomUUID(); - this.#sessionCreated = Date.now(); - } - enqueueEvent(event) { - if (Date.now() - this.#sessionCreated > SESSION_ROTATION_INTERVAL_MS) { - this.#sessionId = crypto.randomUUID(); - this.#sessionCreated = Date.now(); - } - logger('Enqueing telemetry event', JSON.stringify(event, null, 2)); - this.#addToBuffer({ - ...event, - session_id: this.#sessionId, - app_version: this.#appVersion, - os_type: this.#osType, - }); - if (!this.#timerStarted) { - this.#timerStarted = true; - this.#scheduleFlush(this.#flushIntervalMs); - } - } - async sendShutdownEvent() { - if (this.#flushTimer) { - clearTimeout(this.#flushTimer); - this.#flushTimer = null; - } - const shutdownEvent = { - server_shutdown: {}, - }; - this.enqueueEvent(shutdownEvent); - try { - await Promise.race([ - this.#finalFlush(), - new Promise(resolve => setTimeout(resolve, SHUTDOWN_TIMEOUT_MS)), - ]); - logger('Final flush completed'); - } - catch (error) { - logger('Final flush failed:', error); - } - } - async #flush() { - if (this.#isFlushing) { - return; - } - if (this.#buffer.length === 0) { - this.#scheduleFlush(this.#flushIntervalMs); - return; - } - this.#isFlushing = true; - let nextDelayMs = this.#flushIntervalMs; - // Optimistically remove events from buffer before sending. - // This prevents race conditions where a simultaneous #finalFlush would include these same events. - const eventsToSend = [...this.#buffer]; - this.#buffer = []; - try { - const result = await this.#sendBatch(eventsToSend); - if (result.success) { - if (result.nextRequestWaitMs !== undefined) { - nextDelayMs = Math.max(result.nextRequestWaitMs, MIN_RATE_LIMIT_WAIT_MS); - } - } - else if (result.isPermanentError) { - logger('Permanent error, dropped batch of', eventsToSend.length, 'events'); - } - else { - // Transient error: Requeue events at the front of the buffer - // to maintain order and retry them later. - this.#buffer = [...eventsToSend, ...this.#buffer]; - } - } - catch (error) { - // Safety catch for unexpected errors, requeue events - this.#buffer = [...eventsToSend, ...this.#buffer]; - logger('Flush failed unexpectedly:', error); - } - finally { - this.#isFlushing = false; - this.#scheduleFlush(nextDelayMs); - } - } - #addToBuffer(event) { - if (this.#buffer.length >= MAX_BUFFER_SIZE) { - this.#buffer.shift(); - logger('Telemetry buffer overflow: dropped oldest event'); - } - this.#buffer.push({ - event, - timestamp: Date.now(), - }); - } - #scheduleFlush(delayMs) { - logger(`Scheduling flush in ${delayMs}`); - if (this.#flushTimer) { - clearTimeout(this.#flushTimer); - } - this.#flushTimer = setTimeout(() => { - this.#flush().catch(err => { - logger('Flush error:', err); - }); - }, delayMs); - } - async #sendBatch(events) { - logger(`Sending batch of ${events.length}`); - const requestBody = { - log_source: LOG_SOURCE, - request_time_ms: Date.now().toString(), - client_info: { - client_type: CLIENT_TYPE, - }, - log_event: events.map(({ event, timestamp }) => ({ - event_time_ms: timestamp.toString(), - source_extension_json: JSON.stringify(event), - })), - }; - const controller = new AbortController(); - const timeoutId = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS); - try { - const response = await fetch(this.#clearcutEndpoint, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - // Used in E2E tests to confirm that the watchdog process is killed - ...(this.#includePidHeader - ? { 'X-Watchdog-Pid': process.pid.toString() } - : {}), - }, - body: JSON.stringify(requestBody), - signal: controller.signal, - }); - clearTimeout(timeoutId); - if (response.ok) { - const data = (await response.json()); - return { - success: true, - nextRequestWaitMs: data.next_request_wait_millis, - }; - } - const status = response.status; - if (status >= 500 || status === 429) { - return { success: false }; - } - logger('Telemetry permanent error:', status); - return { success: false, isPermanentError: true }; - } - catch { - clearTimeout(timeoutId); - return { success: false }; - } - } - async #finalFlush() { - if (this.#buffer.length === 0) { - return; - } - const eventsToSend = [...this.#buffer]; - await this.#sendBatch(eventsToSend); - } - stopForTesting() { - if (this.#flushTimer) { - clearTimeout(this.#flushTimer); - this.#flushTimer = null; - } - this.#timerStarted = false; - } - get bufferSizeForTesting() { - return this.#buffer.length; - } -} diff --git a/node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/main.js b/node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/main.js deleted file mode 100644 index 4357490..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/telemetry/watchdog/main.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * @license - * Copyright 2026 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ -import process from 'node:process'; -import readline from 'node:readline'; -import { parseArgs } from 'node:util'; -import { logger, flushLogs, saveLogsToFile } from '../../logger.js'; -import { WatchdogMessageType } from '../types.js'; -import { ClearcutSender } from './ClearcutSender.js'; -function parseWatchdogArgs() { - const { values } = parseArgs({ - options: { - 'parent-pid': { type: 'string' }, - 'app-version': { type: 'string' }, - 'os-type': { type: 'string' }, - 'log-file': { type: 'string' }, - 'clearcut-endpoint': { type: 'string' }, - 'clearcut-force-flush-interval-ms': { type: 'string' }, - 'clearcut-include-pid-header': { type: 'boolean' }, - }, - strict: true, - }); - // Verify required arguments - const parentPid = parseInt(values['parent-pid'] ?? '', 10); - const appVersion = values['app-version']; - const osType = parseInt(values['os-type'] ?? '', 10); - if (isNaN(parentPid) || !appVersion || isNaN(osType)) { - console.error('Invalid arguments provided for watchdog process: ', JSON.stringify({ parentPid, appVersion, osType })); - process.exit(1); - } - // Parse Optional Arguments - const logFile = values['log-file']; - const clearcutEndpoint = values['clearcut-endpoint']; - const clearcutIncludePidHeader = values['clearcut-include-pid-header']; - let clearcutForceFlushIntervalMs; - if (values['clearcut-force-flush-interval-ms']) { - const parsed = parseInt(values['clearcut-force-flush-interval-ms'], 10); - if (!isNaN(parsed)) { - clearcutForceFlushIntervalMs = parsed; - } - } - return { - parentPid, - appVersion, - osType, - logFile, - clearcutEndpoint, - clearcutForceFlushIntervalMs, - clearcutIncludePidHeader, - }; -} -function main() { - const { parentPid, appVersion, osType, logFile, clearcutEndpoint, clearcutForceFlushIntervalMs, clearcutIncludePidHeader, } = parseWatchdogArgs(); - let logStream; - if (logFile) { - logStream = saveLogsToFile(logFile); - } - const exit = (code) => { - if (!logStream) { - process.exit(code); - } - void flushLogs(logStream).finally(() => { - process.exit(code); - }); - }; - logger('Watchdog started', JSON.stringify({ - pid: process.pid, - parentPid, - version: appVersion, - osType, - }, null, 2)); - const sender = new ClearcutSender({ - appVersion, - osType: osType, - clearcutEndpoint, - forceFlushIntervalMs: clearcutForceFlushIntervalMs, - includePidHeader: clearcutIncludePidHeader, - }); - let isShuttingDown = false; - function onParentDeath(reason) { - if (isShuttingDown) { - return; - } - isShuttingDown = true; - logger(`Parent death detected (${reason}). Sending shutdown event...`); - sender - .sendShutdownEvent() - .then(() => { - logger('Shutdown event sent. Exiting.'); - exit(0); - }) - .catch(err => { - logger('Failed to send shutdown event', err); - exit(1); - }); - } - process.stdin.on('end', () => onParentDeath('stdin end')); - process.stdin.on('close', () => onParentDeath('stdin close')); - process.on('disconnect', () => onParentDeath('ipc disconnect')); - const rl = readline.createInterface({ - input: process.stdin, - terminal: false, - }); - rl.on('line', line => { - try { - if (!line.trim()) { - return; - } - const msg = JSON.parse(line); - if (msg.type === WatchdogMessageType.LOG_EVENT && msg.payload) { - sender.enqueueEvent(msg.payload); - } - } - catch (err) { - logger('Failed to parse IPC message', err); - } - }); -} -try { - main(); -} -catch (err) { - console.error('Watchdog fatal error:', err); - process.exit(1); -} diff --git a/node_modules/chrome-devtools-mcp/build/src/third_party/THIRD_PARTY_NOTICES b/node_modules/chrome-devtools-mcp/build/src/third_party/THIRD_PARTY_NOTICES deleted file mode 100644 index 86fabc1..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/third_party/THIRD_PARTY_NOTICES +++ /dev/null @@ -1,4297 +0,0 @@ -Name: core-js -URL: https://core-js.io -Version: 3.49.0 -License: MIT - -Copyright (c) 2013–2025 Denis Pushkarev (zloirock.ru) -Copyright (c) 2025–2026 CoreJS Company (core-js.io) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: cliui -URL: yargs/cliui -Version: 9.0.1 -License: ISC - -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ansi-regex -URL: chalk/ansi-regex -Version: 6.2.2 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: strip-ansi -URL: chalk/strip-ansi -Version: 7.1.2 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: get-east-asian-width -URL: sindresorhus/get-east-asian-width -Version: 1.4.0 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: emoji-regex -URL: https://mths.be/emoji-regex -Version: 10.6.0 -License: MIT - -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: string-width -URL: sindresorhus/string-width -Version: 7.2.0 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ansi-styles -URL: chalk/ansi-styles -Version: 6.2.3 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: wrap-ansi -URL: chalk/wrap-ansi -Version: 9.0.2 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: escalade -URL: lukeed/escalade -Version: 3.2.0 -License: MIT - -MIT License - -Copyright (c) Luke Edwards (lukeed.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: yargs-parser -URL: https://github.com/yargs/yargs-parser.git -Version: 22.0.0 -License: ISC - -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: yargs -URL: https://yargs.js.org/ -Version: 18.0.0 -License: MIT - -MIT License - -Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: y18n -URL: https://github.com/yargs/y18n -Version: 5.0.8 -License: ISC - -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: get-caller-file -URL: https://github.com/stefanpenner/get-caller-file#readme -Version: 2.0.5 -License: ISC - -ISC License (ISC) -Copyright 2018 Stefan Penner - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: debug -URL: git://github.com/debug-js/debug.git -Version: 4.4.3 -License: MIT - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ms -URL: vercel/ms -Version: 2.1.3 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: has-flag -URL: sindresorhus/has-flag -Version: 4.0.0 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: supports-color -URL: chalk/supports-color -Version: 7.2.0 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: zod -URL: https://zod.dev -Version: 3.25.76 -License: MIT - -MIT License - -Copyright (c) 2025 Colin McDonnell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @modelcontextprotocol/sdk -URL: https://modelcontextprotocol.io -Version: 1.28.0 -License: MIT - -MIT License - -Copyright (c) 2024 Anthropic, PBC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: zod-to-json-schema -URL: https://github.com/StefanTerdell/zod-to-json-schema -Version: 3.25.1 -License: ISC - -ISC License - -Copyright (c) 2020, Stefan Terdell - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ajv -URL: https://ajv.js.org -Version: 8.18.0 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2015-2021 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: fast-deep-equal -URL: https://github.com/epoberezkin/fast-deep-equal#readme -Version: 3.1.3 -License: MIT - -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: json-schema-traverse -URL: https://github.com/epoberezkin/json-schema-traverse#readme -Version: 1.0.0 -License: MIT - -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: fast-uri -URL: https://github.com/fastify/fast-uri -Version: 3.1.0 -License: BSD-3-Clause - -Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae -Copyright (c) 2021-present The Fastify team -All rights reserved. - -The Fastify team members are listed at https://github.com/fastify/fastify#team. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: -- https://github.com/garycourt/uri-js/graphs/contributors - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ajv-formats -URL: https://github.com/ajv-validator/ajv-formats#readme -Version: 3.0.1 -License: MIT - -MIT License - -Copyright (c) 2020 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: cross-spawn -URL: https://github.com/moxystudio/node-cross-spawn -Version: 7.0.6 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2018 Made With MOXY Lda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: isexe -URL: https://github.com/isaacs/isexe#readme -Version: 2.0.0 -License: ISC - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: which -URL: git://github.com/isaacs/node-which.git -Version: 2.0.2 -License: ISC - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: path-key -URL: sindresorhus/path-key -Version: 3.1.1 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: shebang-regex -URL: sindresorhus/shebang-regex -Version: 3.0.0 -License: MIT - -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: shebang-command -URL: kevva/shebang-command -Version: 2.0.0 -License: MIT - -MIT License - -Copyright (c) Kevin Mårtensson (github.com/kevva) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: uri-js -URL: https://github.com/garycourt/uri-js -Version: 4.4.1 -License: BSD-2-Clause - -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: fast-json-stable-stringify -URL: https://github.com/epoberezkin/fast-json-stable-stringify -Version: 2.1.0 -License: MIT - -This software is released under the MIT license: - -Copyright (c) 2017 Evgeny Poberezkin -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: puppeteer-core -URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core -Version: 24.40.0 -License: Apache-2.0 - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @puppeteer/browsers -URL: https://github.com/puppeteer/puppeteer/tree/main/packages/browsers -Version: 2.13.0 -License: Apache-2.0 - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: semver -URL: git+https://github.com/npm/node-semver.git -Version: 7.7.4 -License: ISC - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: proxy-agent -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 6.5.0 -License: MIT - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: lru-cache -URL: git://github.com/isaacs/node-lru-cache.git -Version: 7.18.3 -License: ISC - -The ISC License - -Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: agent-base -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 7.1.4 -License: MIT - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: proxy-from-env -URL: https://github.com/Rob--W/proxy-from-env#readme -Version: 1.1.0 -License: MIT - -The MIT License - -Copyright (C) 2016-2018 Rob Wu - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: http-proxy-agent -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 7.0.2 -License: MIT - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: https-proxy-agent -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 7.0.6 -License: MIT - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: socks-proxy-agent -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 8.0.5 -License: MIT - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: socks -URL: https://github.com/JoshGlazebrook/socks/ -Version: 2.8.7 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2013 Josh Glazebrook - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: smart-buffer -URL: https://github.com/JoshGlazebrook/smart-buffer/ -Version: 4.2.0 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2013-2017 Josh Glazebrook - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ip-address -URL: git://github.com/beaugunderson/ip-address.git -Version: 10.1.0 -License: MIT - -Copyright (C) 2011 by Beau Gunderson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: pac-proxy-agent -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 7.2.0 -License: MIT - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: get-uri -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 6.0.5 -License: MIT - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: data-uri-to-buffer -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 6.0.2 -License: MIT - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: basic-ftp -URL: https://github.com/patrickjuchli/basic-ftp.git -Version: 5.2.0 -License: MIT - -Copyright (c) 2019 Patrick Juchli - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: pac-resolver -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 7.0.1 -License: MIT - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: degenerator -URL: https://github.com/TooTallNate/proxy-agents.git -Version: 5.0.1 -License: MIT - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: escodegen -URL: http://github.com/estools/escodegen -Version: 2.1.0 -License: BSD-2-Clause - -Copyright (C) 2012 Yusuke Suzuki (twitter: @Constellation) and other contributors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: estraverse -URL: https://github.com/estools/estraverse -Version: 5.3.0 -License: BSD-2-Clause - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: esutils -URL: https://github.com/estools/esutils -Version: 2.0.3 -License: BSD-2-Clause - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: source-map -URL: https://github.com/mozilla/source-map -Version: 0.6.1 -License: BSD-3-Clause - - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: esprima -URL: http://esprima.org -Version: 4.0.1 -License: BSD-2-Clause - -Copyright JS Foundation and other contributors, https://js.foundation/ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ast-types -URL: http://github.com/benjamn/ast-types -Version: 0.13.4 -License: MIT - -Copyright (c) 2013 Ben Newman - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: tslib -URL: https://www.typescriptlang.org/ -Version: 2.8.1 -License: 0BSD - -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: netmask -URL: https://github.com/rs/node-netmask -Version: 2.0.2 -License: MIT - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @tootallnate/quickjs-emscripten -URL: https://github.com/justjake/quickjs-emscripten -Version: 0.23.0 -License: MIT - -MIT License - -quickjs-emscripten copyright (c) 2019 Jake Teton-Landis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: progress -URL: git://github.com/visionmedia/node-progress -Version: 2.0.3 -License: MIT - -(The MIT License) - -Copyright (c) 2017 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ws -URL: https://github.com/websockets/ws -Version: 8.19.0 -License: MIT - -Copyright (c) 2011 Einar Otto Stangvik -Copyright (c) 2013 Arnout Kazemier and contributors -Copyright (c) 2016 Luigi Pinca and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: chrome-devtools-frontend -License: Apache-2.0 - -// Copyright 2014 The Chromium Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: lighthouse -License: Apache-2.0 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: i18n -License: - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: intl-messageformat -License: - -Copyright (c) 2019, Oath Inc. - -Licensed under the terms of the New BSD license. See below for terms. - -Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the following -conditions are met: - -- Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -- Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -- Neither the name of Oath Inc. nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission of Oath Inc. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: legacy-javascript -License: - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: marked -License: - -## Marked - -Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -## Markdown - -Copyright © 2004, John Gruber -http://daringfireball.net/ -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name “Markdown” nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -This software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, -the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, -indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; -or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way -out of the use of this software, even if advised of the possibility of such damage. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: source-map-scopes-codec -License: - -Copyright 2025 The Chromium Authors - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: third-party-web -License: - -The MIT License (MIT) -Copyright (c) 2019 Patrick Hulce - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @formatjs/fast-memoize -URL: https://github.com/formatjs/formatjs#readme -Version: 2.2.0 -License: MIT - -MIT License - -Copyright (c) 2021 FormatJS - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @formatjs/icu-messageformat-parser -URL: https://github.com/formatjs/formatjs.git -Version: 2.6.2 -License: MIT - -MIT License - -Copyright (c) 2021 FormatJS - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @formatjs/icu-skeleton-parser -URL: https://github.com/formatjs/formatjs.git -Version: 1.6.2 -License: MIT - -MIT License - -Copyright (c) 2021 FormatJS - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @paulirish/trace_engine -URL: N/A -Version: 0.0.61 -License: BSD-3-Clause - -// Copyright 2014 The Chromium Authors -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: @sentry/node -URL: https://github.com/getsentry/sentry-javascript/tree/master/packages/node -Version: 9.28.1 -License: MIT - -MIT License - -Copyright (c) 2023 Functional Software, Inc. dba Sentry - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: axe-core -URL: https://www.deque.com/axe/ -Version: 4.11.0 -License: MPL-2.0 - -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: csp_evaluator -URL: https://csp-evaluator.withgoogle.com/ -Version: 1.1.5 -License: Apache-2.0 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: debug -URL: git://github.com/debug-js/debug.git -Version: 4.3.4 -License: MIT - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: http-link-header -URL: https://github.com/jhermsmeier/node-http-link-header -Version: 1.1.1 -License: MIT - -# The MIT License (MIT) -Copyright (c) 2016 Jonas Hermsmeier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: intl-messageformat -URL: https://github.com/formatjs/formatjs -Version: 10.5.3 -License: BSD-3-Clause - -Copyright (c) 2021, Oath Inc. - -Licensed under the terms of the New BSD license. See below for terms. - -Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the following -conditions are met: - -- Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -- Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -- Neither the name of Oath Inc. nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission of Oath Inc. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: js-library-detector -URL: https://github.com/johnmichel/Library-Detector-for-Chrome#readme -Version: 6.7.0 -License: MIT - -The MIT License (MIT) -Copyright (c) 2010-2016 Andrew Bredow, John Michel, and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: legacy-javascript -URL: https://github.com/GoogleChrome/lighthouse#readme -Version: 0.0.1 -License: Apache-2.0 - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: lighthouse-logger -URL: https://github.com/GoogleChrome/lighthouse.git -Version: 2.0.2 -License: Apache-2.0 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: lighthouse-stack-packs -URL: https://github.com/GoogleChrome/lighthouse-stack-packs#readme -Version: 1.12.3 -License: Apache-2.0 - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: lodash-es -URL: https://lodash.com/custom-builds -Version: 4.17.21 -License: MIT - -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: lookup-closest-locale -URL: https://github.com/format-message/format-message/tree/master/packages/lookup-closest-locale -Version: 6.2.0 -License: MIT - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: marky -URL: https://github.com/nolanlawson/marky#readme -Version: 1.2.2 -License: Apache-2.0 - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, and - distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by the - copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all other - entities that control, are controlled by, or are under common control with - that entity. For the purposes of this definition, "control" means (i) the - power, direct or indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (ii) ownership of - fifty percent (50%) or more of the outstanding shares, or (iii) beneficial - ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity exercising - permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation source, - and configuration files. - - "Object" form shall mean any form resulting from mechanical transformation - or translation of a Source form, including but not limited to compiled - object code, generated documentation, and conversions to - other media types. - - "Work" shall mean the work of authorship, whether in Source or Object - form, made available under the License, as indicated by a copyright notice - that is included in or attached to the work (an example is provided in the - Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object form, - that is based on (or derived from) the Work and for which the editorial - revisions, annotations, elaborations, or other modifications represent, - as a whole, an original work of authorship. For the purposes of this - License, Derivative Works shall not include works that remain separable - from, or merely link (or bind by name) to the interfaces of, the Work and - Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including the original - version of the Work and any modifications or additions to that Work or - Derivative Works thereof, that is intentionally submitted to Licensor for - inclusion in the Work by the copyright owner or by an individual or - Legal Entity authorized to submit on behalf of the copyright owner. - For the purposes of this definition, "submitted" means any form of - electronic, verbal, or written communication sent to the Licensor or its - representatives, including but not limited to communication on electronic - mailing lists, source code control systems, and issue tracking systems - that are managed by, or on behalf of, the Licensor for the purpose of - discussing and improving the Work, but excluding communication that is - conspicuously marked or otherwise designated in writing by the copyright - owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity on - behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. - - Subject to the terms and conditions of this License, each Contributor - hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, - royalty-free, irrevocable copyright license to reproduce, prepare - Derivative Works of, publicly display, publicly perform, sublicense, - and distribute the Work and such Derivative Works in - Source or Object form. - -3. Grant of Patent License. - - Subject to the terms and conditions of this License, each Contributor - hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, - royalty-free, irrevocable (except as stated in this section) patent - license to make, have made, use, offer to sell, sell, import, and - otherwise transfer the Work, where such license applies only to those - patent claims licensable by such Contributor that are necessarily - infringed by their Contribution(s) alone or by combination of their - Contribution(s) with the Work to which such Contribution(s) was submitted. - If You institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work or a - Contribution incorporated within the Work constitutes direct or - contributory patent infringement, then any patent licenses granted to - You under this License for that Work shall terminate as of the date such - litigation is filed. - -4. Redistribution. - - You may reproduce and distribute copies of the Work or Derivative Works - thereof in any medium, with or without modifications, and in Source or - Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a - copy of this License; and - - 2. You must cause any modified files to carry prominent notices stating - that You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You - distribute, all copyright, patent, trademark, and attribution notices from - the Source form of the Work, excluding those notices that do not pertain - to any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, - then any Derivative Works that You distribute must include a readable copy - of the attribution notices contained within such NOTICE file, excluding - those notices that do not pertain to any part of the Derivative Works, - in at least one of the following places: within a NOTICE text file - distributed as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, within a - display generated by the Derivative Works, if and wherever such - third-party notices normally appear. The contents of the NOTICE file are - for informational purposes only and do not modify the License. - You may add Your own attribution notices within Derivative Works that You - distribute, alongside or as an addendum to the NOTICE text from the Work, - provided that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and may - provide additional or different license terms and conditions for use, - reproduction, or distribution of Your modifications, or for any such - Derivative Works as a whole, provided Your use, reproduction, and - distribution of the Work otherwise complies with the conditions - stated in this License. - -5. Submission of Contributions. - - Unless You explicitly state otherwise, any Contribution intentionally - submitted for inclusion in the Work by You to the Licensor shall be under - the terms and conditions of this License, without any additional - terms or conditions. Notwithstanding the above, nothing herein shall - supersede or modify the terms of any separate license agreement you may - have executed with Licensor regarding such Contributions. - -6. Trademarks. - - This License does not grant permission to use the trade names, trademarks, - service marks, or product names of the Licensor, except as required for - reasonable and customary use in describing the origin of the Work and - reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - - Unless required by applicable law or agreed to in writing, Licensor - provides the Work (and each Contributor provides its Contributions) - on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied, including, without limitation, any warranties - or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS - FOR A PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any risks - associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - - In no event and under no legal theory, whether in tort - (including negligence), contract, or otherwise, unless required by - applicable law (such as deliberate and grossly negligent acts) or agreed - to in writing, shall any Contributor be liable to You for damages, - including any direct, indirect, special, incidental, or consequential - damages of any character arising as a result of this License or out of - the use or inability to use the Work (including but not limited to damages - for loss of goodwill, work stoppage, computer failure or malfunction, - or any and all other commercial damages or losses), even if such - Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - - While redistributing the Work or Derivative Works thereof, You may choose - to offer, and charge a fee for, acceptance of support, warranty, - indemnity, or other liability obligations and/or rights consistent with - this License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf of any - other Contributor, and only if You agree to indemnify, defend, and hold - each Contributor harmless for any liability incurred by, or claims - asserted against, such Contributor by reason of your accepting any such - warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - - To apply the Apache License to your work, attach the following boilerplate - notice, with the fields enclosed by brackets "[]" replaced with your own - identifying information. (Don't include the brackets!) The text should be - enclosed in the appropriate comment syntax for the file format. We also - recommend that a file or class name and description of purpose be included - on the same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 Nolan Lawson - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - or implied. See the License for the specific language governing - permissions and limitations under the License. - - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: ms -URL: zeit/ms -Version: 2.1.2 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: puppeteer-core -URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core -Version: 24.23.0 -License: Apache-2.0 - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: robots-parser -URL: https://github.com/samclarke/robots-parser -Version: 3.0.1 -License: MIT - -The MIT License (MIT) - -Copyright (c) 2014 Sam Clarke - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: third-party-web -URL: https://github.com/patrickhulce/third-party-web.git -Version: 0.26.2 -License: MIT - -The MIT License (MIT) -Copyright (c) 2019 Patrick Hulce - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: tldts-core -URL: https://github.com/remusao/tldts#readme -Version: 7.0.17 -License: MIT - -Copyright (c) 2017 Thomas Parisot, 2018 Rémi Berson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: tldts-icann -URL: https://github.com/remusao/tldts#readme -Version: 7.0.17 -License: MIT - -Copyright (c) 2017 Thomas Parisot, 2018 Rémi Berson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: tslib -URL: https://www.typescriptlang.org/ -Version: 2.6.2 -License: 0BSD - -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - --------------------- DEPENDENCY DIVIDER -------------------- - -Name: web-features -URL: git+https://github.com/web-platform-dx/web-features.git -Version: 3.21.0 -License: Apache-2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/chrome-devtools-mcp/build/src/third_party/bundled-packages.json b/node_modules/chrome-devtools-mcp/build/src/third_party/bundled-packages.json deleted file mode 100644 index 05f4a57..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/third_party/bundled-packages.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "@modelcontextprotocol/sdk": "1.28.0", - "chrome-devtools-frontend": "1.0.1602348", - "core-js": "3.49.0", - "debug": "4.4.3", - "lighthouse": "13.0.3", - "yargs": "18.0.0", - "puppeteer-core": "24.40.0" -} \ No newline at end of file diff --git a/node_modules/chrome-devtools-mcp/build/src/third_party/devtools-formatter-worker.js b/node_modules/chrome-devtools-mcp/build/src/third_party/devtools-formatter-worker.js deleted file mode 100644 index 9a037ad..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/third_party/devtools-formatter-worker.js +++ /dev/null @@ -1,15436 +0,0 @@ -import * as WorkerThreads from 'node:worker_threads'; - -// Copyright 2020 The Chromium Authors -const DEFAULT_COMPARATOR = (a, b) => { - return a < b ? -1 : (a > b ? 1 : 0); -}; -function lowerBound(array, needle, comparator, left, right) { - let l = 0; - let r = right !== undefined ? right : array.length; - while (l < r) { - const m = (l + r) >> 1; - if (comparator(needle, array[m]) > 0) { - l = m + 1; - } - else { - r = m; - } - } - return r; -} -function arrayDoesNotContainNullOrUndefined(arr) { - return !arr.includes(null) && !arr.includes(undefined); -} - -// Copyright 2021 The Chromium Authors -const EmptyUrlString = ''; - -// Copyright 2025 The Chromium Authors -class NodeWorkerScope { - postMessage(message) { - WorkerThreads.parentPort?.postMessage(message); - } - set onmessage(listener) { - WorkerThreads.parentPort?.on('message', data => { - listener({ data }); - }); - } -} -class NodeWorker { - #workerPromise; - #disposed = false; - #rejectWorkerPromise; - constructor(url) { - this.#workerPromise = new Promise((resolve, reject) => { - this.#rejectWorkerPromise = reject; - const worker = new WorkerThreads.Worker(new URL(url)); - worker.once('message', (message) => { - if (message === 'workerReady') { - resolve(worker); - } - }); - worker.on('error', reject); - }); - } - postMessage(message) { - void this.#workerPromise.then(worker => { - if (!this.#disposed) { - worker.postMessage(message); - } - }); - } - dispose() { - this.#disposed = true; - void this.#workerPromise.then(worker => worker.terminate()); - } - terminate(immediately) { - if (immediately) { - this.#rejectWorkerPromise?.(new Error('Worker terminated')); - } - this.dispose(); - } - set onmessage(listener) { - void this.#workerPromise.then(worker => { - worker.on('message', data => { - if (!this.#disposed) { - listener({ data }); - } - }); - }); - } - set onerror(listener) { - void this.#workerPromise.then(worker => { - worker.on('error', (error) => { - if (!this.#disposed) { - listener({ type: 'error', ...error }); - } - }); - }); - } -} -const HOST_RUNTIME$2 = { - createWorker(url) { - return new NodeWorker(url); - }, - workerScope: new NodeWorkerScope(), -}; - -var HostRuntime$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - HOST_RUNTIME: HOST_RUNTIME$2 -}); - -// Copyright 2025 The Chromium Authors - -var node = /*#__PURE__*/Object.freeze({ - __proto__: null, - HostRuntime: HostRuntime$1 -}); - -// Copyright 2025 The Chromium Authors -class WebWorkerScope { - postMessage(message) { - self.postMessage(message); - } - set onmessage(listener) { - self.onmessage = listener; - } -} -class WebWorker { - #workerPromise; - #disposed; - #rejectWorkerPromise; - constructor(workerLocation) { - this.#workerPromise = new Promise((fulfill, reject) => { - this.#rejectWorkerPromise = reject; - const worker = new Worker(new URL(workerLocation), { type: 'module' }); - worker.onerror = event => { - console.error(`Failed to load worker for ${workerLocation}:`, event); - }; - worker.onmessage = (event) => { - console.assert(event.data === 'workerReady'); - worker.onmessage = null; - fulfill(worker); - }; - }); - } - postMessage(message, transfer) { - void this.#workerPromise.then(worker => { - if (!this.#disposed) { - worker.postMessage(message, transfer ?? []); - } - }); - } - dispose() { - this.#disposed = true; - void this.#workerPromise.then(worker => worker.terminate()); - } - terminate(immediately = false) { - if (immediately) { - this.#rejectWorkerPromise?.(new Error('Worker terminated')); - } - this.dispose(); - } - set onmessage(listener) { - void this.#workerPromise.then(worker => { - worker.onmessage = listener; - }); - } - set onerror(listener) { - void this.#workerPromise.then(worker => { - worker.onerror = listener; - }); - } -} -const HOST_RUNTIME$1 = { - createWorker(url) { - return new WebWorker(url); - }, - workerScope: new WebWorkerScope(), -}; - -var HostRuntime = /*#__PURE__*/Object.freeze({ - __proto__: null, - HOST_RUNTIME: HOST_RUNTIME$1 -}); - -// Copyright 2025 The Chromium Authors - -var browser = /*#__PURE__*/Object.freeze({ - __proto__: null, - HostRuntime: HostRuntime -}); - -// Copyright 2025 The Chromium Authors -const IS_NODE = typeof process !== 'undefined' && process.versions?.node !== null; -const IS_BROWSER = -typeof window !== 'undefined' || (typeof self !== 'undefined' && typeof self.postMessage === 'function'); -const HOST_RUNTIME = await (async () => { - if (IS_NODE) { - return (await Promise.resolve().then(function () { return node; })).HostRuntime.HOST_RUNTIME; - } - if (IS_BROWSER) { - return (await Promise.resolve().then(function () { return browser; })).HostRuntime.HOST_RUNTIME; - } - throw new Error('Unknown runtime!'); -})(); - -// Copyright 2020 The Chromium Authors -const sprintf = (fmt, ...args) => { - let argIndex = 0; - const RE = /%(?:(\d+)\$)?(?:\.(\d*))?([%dfs])/g; - return fmt.replaceAll(RE, (_, index, precision, specifier) => { - if (specifier === '%') { - return '%'; - } - if (index !== undefined) { - argIndex = parseInt(index, 10) - 1; - if (argIndex < 0) { - throw new RangeError(`Invalid parameter index ${argIndex + 1}`); - } - } - if (argIndex >= args.length) { - throw new RangeError(`Expected at least ${argIndex + 1} format parameters, but only ${args.length} where given.`); - } - if (specifier === 's') { - const argValue = String(args[argIndex++]); - if (precision !== undefined) { - return argValue.substring(0, Number(precision)); - } - return argValue; - } - let argValue = Number(args[argIndex++]); - if (isNaN(argValue)) { - argValue = 0; - } - if (specifier === 'd') { - return String(Math.floor(argValue)).padStart(Number(precision), '0'); - } - if (precision !== undefined) { - return argValue.toFixed(Number(precision)); - } - return String(argValue); - }); -}; -const findIndexesOfSubString = (inputString, searchString) => { - const matches = []; - let i = inputString.indexOf(searchString); - while (i !== -1) { - matches.push(i); - i = inputString.indexOf(searchString, i + searchString.length); - } - return matches; -}; -const findLineEndingIndexes = (inputString) => { - const endings = findIndexesOfSubString(inputString, '\n'); - endings.push(inputString.length); - return endings; -}; -const isWhitespace = (inputString) => { - return /^\s*$/.test(inputString); -}; -const trimEndWithMaxLength = (str, maxLength) => { - if (str.length <= maxLength) { - return str; - } - const ellipsis = '…'; - const ellipsisLength = 1; - const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' }); - const iterator = segmenter.segment(str)[Symbol.iterator](); - let lastSegmentIndex = 0; - for (let i = 0; i <= maxLength - ellipsisLength; i++) { - const result = iterator.next(); - if (result.done) { - return str; - } - lastSegmentIndex = result.value.index; - } - for (let i = 0; i < ellipsisLength; i++) { - if (iterator.next().done) { - return str; - } - } - return str.slice(0, lastSegmentIndex) + ellipsis; -}; -const stringifyWithPrecision = function stringifyWithPrecision(s, precision = 2) { - if (precision === 0) { - return s.toFixed(0); - } - const string = s.toFixed(precision).replace(/\.?0*$/, ''); - return string === '-0' ? '0' : string; -}; - -// Copyright 2020 The Chromium Authors -function assertNever(_type, message) { - throw new Error(message); -} - -(function () { - function copyObj(obj, target, overwrite) { - if (!target) { - target = {}; - } - for (var prop in obj) { - if (obj.hasOwnProperty(prop) && (overwrite !== false)) { - target[prop] = obj[prop]; - } - } - return target; - } - function countColumn(string, end, tabSize, startIndex, startValue) { - if (end == null) { - end = string.search(/[^\s\u00a0]/); - if (end == -1) { - end = string.length; - } - } - for (var i = startIndex || 0, n = startValue || 0;;) { - var nextTab = string.indexOf("\t", i); - if (nextTab < 0 || nextTab >= end) { - return n + (end - i); - } - n += nextTab - i; - n += tabSize - (n % tabSize); - i = nextTab + 1; - } - } - function nothing() { } - function createObj(base, props) { - var inst; - if (Object.create) { - inst = Object.create(base); - } - else { - nothing.prototype = base; - inst = new nothing(); - } - if (props) { - copyObj(props, inst); - } - return inst; - } - var StringStream = function (string, tabSize, lineOracle) { - this.pos = this.start = 0; - this.string = string; - this.tabSize = tabSize || 8; - this.lastColumnPos = this.lastColumnValue = 0; - this.lineStart = 0; - this.lineOracle = lineOracle; - }; - StringStream.prototype.eol = function () { return this.pos >= this.string.length; }; - StringStream.prototype.sol = function () { return this.pos == this.lineStart; }; - StringStream.prototype.peek = function () { return this.string.charAt(this.pos) || undefined; }; - StringStream.prototype.next = function () { - if (this.pos < this.string.length) { - return this.string.charAt(this.pos++); - } - }; - StringStream.prototype.eat = function (match) { - var ch = this.string.charAt(this.pos); - var ok; - if (typeof match == "string") { - ok = ch == match; - } - else { - ok = ch && (match.test ? match.test(ch) : match(ch)); - } - if (ok) { - ++this.pos; - return ch; - } - }; - StringStream.prototype.eatWhile = function (match) { - var start = this.pos; - while (this.eat(match)) { } - return this.pos > start; - }; - StringStream.prototype.eatSpace = function () { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { - ++this.pos; - } - return this.pos > start; - }; - StringStream.prototype.skipToEnd = function () { this.pos = this.string.length; }; - StringStream.prototype.skipTo = function (ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) { - this.pos = found; - return true; - } - }; - StringStream.prototype.backUp = function (n) { this.pos -= n; }; - StringStream.prototype.column = function () { - if (this.lastColumnPos < this.start) { - this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); - this.lastColumnPos = this.start; - } - return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); - }; - StringStream.prototype.indentation = function () { - return countColumn(this.string, null, this.tabSize) - - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); - }; - StringStream.prototype.match = function (pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) { - this.pos += pattern.length; - } - return true; - } - } - else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) { - return null; - } - if (match && consume !== false) { - this.pos += match[0].length; - } - return match; - } - }; - StringStream.prototype.current = function () { return this.string.slice(this.start, this.pos); }; - StringStream.prototype.hideFirstChars = function (n, inner) { - this.lineStart += n; - try { - return inner(); - } - finally { - this.lineStart -= n; - } - }; - StringStream.prototype.lookAhead = function (n) { - var oracle = this.lineOracle; - return oracle && oracle.lookAhead(n); - }; - StringStream.prototype.baseToken = function () { - var oracle = this.lineOracle; - return oracle && oracle.baseToken(this.pos); - }; - var modes = {}, mimeModes = {}; - function defineMode(name, mode) { - if (arguments.length > 2) { - mode.dependencies = Array.prototype.slice.call(arguments, 2); - } - modes[name] = mode; - } - function defineMIME(mime, spec) { - mimeModes[mime] = spec; - } - function resolveMode(spec) { - if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { - spec = mimeModes[spec]; - } - else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { - var found = mimeModes[spec.name]; - if (typeof found == "string") { - found = { name: found }; - } - spec = createObj(found, spec); - spec.name = found.name; - } - else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { - return resolveMode("application/xml"); - } - else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { - return resolveMode("application/json"); - } - if (typeof spec == "string") { - return { name: spec }; - } - else { - return spec || { name: "null" }; - } - } - function getMode(options, spec) { - spec = resolveMode(spec); - var mfactory = modes[spec.name]; - if (!mfactory) { - return getMode(options, "text/plain"); - } - var modeObj = mfactory(options, spec); - if (modeExtensions.hasOwnProperty(spec.name)) { - var exts = modeExtensions[spec.name]; - for (var prop in exts) { - if (!exts.hasOwnProperty(prop)) { - continue; - } - if (modeObj.hasOwnProperty(prop)) { - modeObj["_" + prop] = modeObj[prop]; - } - modeObj[prop] = exts[prop]; - } - } - modeObj.name = spec.name; - if (spec.helperType) { - modeObj.helperType = spec.helperType; - } - if (spec.modeProps) { - for (var prop$1 in spec.modeProps) { - modeObj[prop$1] = spec.modeProps[prop$1]; - } - } - return modeObj; - } - var modeExtensions = {}; - function extendMode(mode, properties) { - var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); - copyObj(properties, exts); - } - function copyState(mode, state) { - if (state === true) { - return state; - } - if (mode.copyState) { - return mode.copyState(state); - } - var nstate = {}; - for (var n in state) { - var val = state[n]; - if (val instanceof Array) { - val = val.concat([]); - } - nstate[n] = val; - } - return nstate; - } - function innerMode(mode, state) { - var info; - while (mode.innerMode) { - info = mode.innerMode(state); - if (!info || info.mode == mode) { - break; - } - state = info.state; - mode = info.mode; - } - return info || { mode: mode, state: state }; - } - function startState(mode, a1, a2) { - return mode.startState ? mode.startState(a1, a2) : true; - } - var modeMethods = ({ - __proto__: null, - modes: modes, - mimeModes: mimeModes, - defineMode: defineMode, - defineMIME: defineMIME, - resolveMode: resolveMode, - getMode: getMode, - modeExtensions: modeExtensions, - extendMode: extendMode, - copyState: copyState, - innerMode: innerMode, - startState: startState - }); - var root = typeof globalThis !== 'undefined' ? globalThis : window; - root.CodeMirror = {}; - CodeMirror.StringStream = StringStream; - for (var exported in modeMethods) { - CodeMirror[exported] = modeMethods[exported]; - } - CodeMirror.defineMode("null", function () { return ({ token: function (stream) { return stream.skipToEnd(); } }); }); - CodeMirror.defineMIME("text/plain", "null"); - CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min; - CodeMirror.splitLines = function (string) { return string.split(/\r?\n|\r/); }; - CodeMirror.countColumn = countColumn; - CodeMirror.defaults = { indentUnit: 2 }; - // CodeMirror, copyright (c) by Marijn Haverbeke and others - (function (mod) { - if (typeof exports == "object" && typeof module == "object") - { - mod(require("../../lib/codemirror")); - } - else if (typeof define == "function" && define.amd) - { - define(["../../lib/codemirror"], mod); - } - else - { - mod(CodeMirror); - } - })(function (CodeMirror) { - CodeMirror.runMode = function (string, modespec, callback, options) { - var mode = CodeMirror.getMode(CodeMirror.defaults, modespec); - var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize; - if (callback.appendChild) { - var ie = /MSIE \d/.test(navigator.userAgent); - var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9); - var node = callback, col = 0; - node.innerHTML = ""; - callback = function (text, style) { - if (text == "\n") { - node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text)); - col = 0; - return; - } - var content = ""; - for (var pos = 0;;) { - var idx = text.indexOf("\t", pos); - if (idx == -1) { - content += text.slice(pos); - col += text.length - pos; - break; - } - else { - col += idx - pos; - content += text.slice(pos, idx); - var size = tabSize - col % tabSize; - col += size; - for (var i = 0; i < size; ++i) { - content += " "; - } - pos = idx + 1; - } - } - if (style) { - var sp = node.appendChild(document.createElement("span")); - sp.className = "cm-" + style.replace(/ +/g, " cm-"); - sp.appendChild(document.createTextNode(content)); - } - else { - node.appendChild(document.createTextNode(content)); - } - }; - } - var lines = CodeMirror.splitLines(string), state = (options && options.state) || CodeMirror.startState(mode); - for (var i = 0, e = lines.length; i < e; ++i) { - if (i) { - callback("\n"); - } - var stream = new CodeMirror.StringStream(lines[i], null, { - lookAhead: function (n) { return lines[i + n]; }, - baseToken: function () { } - }); - if (!stream.string && mode.blankLine) { - mode.blankLine(state); - } - while (!stream.eol()) { - var style = mode.token(stream, state); - callback(stream.current(), style, i, stream.start, state, mode); - stream.start = stream.pos; - } - } - }; - }); -}()); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -(function (mod) { - if (typeof exports == "object" && typeof module == "object") - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) - define(["../../lib/codemirror"], mod); - else - mod(CodeMirror); -})(function (CodeMirror) { - CodeMirror.defineMode("css", function (config, parserConfig) { - var inline = parserConfig.inline; - if (!parserConfig.propertyKeywords) - parserConfig = CodeMirror.resolveMode("text/css"); - var indentUnit = config.indentUnit, tokenHooks = parserConfig.tokenHooks, documentTypes = parserConfig.documentTypes || {}, mediaTypes = parserConfig.mediaTypes || {}, mediaFeatures = parserConfig.mediaFeatures || {}, mediaValueKeywords = parserConfig.mediaValueKeywords || {}, propertyKeywords = parserConfig.propertyKeywords || {}, nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {}, fontProperties = parserConfig.fontProperties || {}, counterDescriptors = parserConfig.counterDescriptors || {}, colorKeywords = parserConfig.colorKeywords || {}, valueKeywords = parserConfig.valueKeywords || {}, allowNested = parserConfig.allowNested, lineComment = parserConfig.lineComment, supportsAtComponent = parserConfig.supportsAtComponent === true, highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false; - var type, override; - function ret(style, tp) { type = tp; return style; } - function tokenBase(stream, state) { - var ch = stream.next(); - if (tokenHooks[ch]) { - var result = tokenHooks[ch](stream, state); - if (result !== false) - return result; - } - if (ch == "@") { - stream.eatWhile(/[\w\\\-]/); - return ret("def", stream.current()); - } - else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) { - return ret(null, "compare"); - } - else if (ch == "\"" || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - else if (ch == "#") { - stream.eatWhile(/[\w\\\-]/); - return ret("atom", "hash"); - } - else if (ch == "!") { - stream.match(/^\s*\w*/); - return ret("keyword", "important"); - } - else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) { - stream.eatWhile(/[\w.%]/); - return ret("number", "unit"); - } - else if (ch === "-") { - if (/[\d.]/.test(stream.peek())) { - stream.eatWhile(/[\w.%]/); - return ret("number", "unit"); - } - else if (stream.match(/^-[\w\\\-]*/)) { - stream.eatWhile(/[\w\\\-]/); - if (stream.match(/^\s*:/, false)) - return ret("variable-2", "variable-definition"); - return ret("variable-2", "variable"); - } - else if (stream.match(/^\w+-/)) { - return ret("meta", "meta"); - } - } - else if (/[,+>*\/]/.test(ch)) { - return ret(null, "select-op"); - } - else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) { - return ret("qualifier", "qualifier"); - } - else if (/[:;{}\[\]\(\)]/.test(ch)) { - return ret(null, ch); - } - else if (stream.match(/^[\w-.]+(?=\()/)) { - if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) { - state.tokenize = tokenParenthesized; - } - return ret("variable callee", "variable"); - } - else if (/[\w\\\-]/.test(ch)) { - stream.eatWhile(/[\w\\\-]/); - return ret("property", "word"); - } - else { - return ret(null, null); - } - } - function tokenString(quote) { - return function (stream, state) { - var escaped = false, ch; - while ((ch = stream.next()) != null) { - if (ch == quote && !escaped) { - if (quote == ")") - stream.backUp(1); - break; - } - escaped = !escaped && ch == "\\"; - } - if (ch == quote || !escaped && quote != ")") - state.tokenize = null; - return ret("string", "string"); - }; - } - function tokenParenthesized(stream, state) { - stream.next(); - if (!stream.match(/^\s*[\"\')]/, false)) - state.tokenize = tokenString(")"); - else - state.tokenize = null; - return ret(null, "("); - } - function Context(type, indent, prev) { - this.type = type; - this.indent = indent; - this.prev = prev; - } - function pushContext(state, stream, type, indent) { - state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context); - return type; - } - function popContext(state) { - if (state.context.prev) - state.context = state.context.prev; - return state.context.type; - } - function pass(type, stream, state) { - return states[state.context.type](type, stream, state); - } - function popAndPass(type, stream, state, n) { - for (var i = n || 1; i > 0; i--) - state.context = state.context.prev; - return pass(type, stream, state); - } - function wordAsValue(stream) { - var word = stream.current().toLowerCase(); - if (valueKeywords.hasOwnProperty(word)) - override = "atom"; - else if (colorKeywords.hasOwnProperty(word)) - override = "keyword"; - else - override = "variable"; - } - var states = {}; - states.top = function (type, stream, state) { - if (type == "{") { - return pushContext(state, stream, "block"); - } - else if (type == "}" && state.context.prev) { - return popContext(state); - } - else if (supportsAtComponent && /@component/i.test(type)) { - return pushContext(state, stream, "atComponentBlock"); - } - else if (/^@(-moz-)?document$/i.test(type)) { - return pushContext(state, stream, "documentTypes"); - } - else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) { - return pushContext(state, stream, "atBlock"); - } - else if (/^@(font-face|counter-style)/i.test(type)) { - state.stateArg = type; - return "restricted_atBlock_before"; - } - else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) { - return "keyframes"; - } - else if (type && type.charAt(0) == "@") { - return pushContext(state, stream, "at"); - } - else if (type == "hash") { - override = "builtin"; - } - else if (type == "word") { - override = "tag"; - } - else if (type == "variable-definition") { - return "maybeprop"; - } - else if (type == "interpolation") { - return pushContext(state, stream, "interpolation"); - } - else if (type == ":") { - return "pseudo"; - } - else if (allowNested && type == "(") { - return pushContext(state, stream, "parens"); - } - return state.context.type; - }; - states.block = function (type, stream, state) { - if (type == "word") { - var word = stream.current().toLowerCase(); - if (propertyKeywords.hasOwnProperty(word)) { - override = "property"; - return "maybeprop"; - } - else if (nonStandardPropertyKeywords.hasOwnProperty(word)) { - override = highlightNonStandardPropertyKeywords ? "string-2" : "property"; - return "maybeprop"; - } - else if (allowNested) { - override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag"; - return "block"; - } - else { - override += " error"; - return "maybeprop"; - } - } - else if (type == "meta") { - return "block"; - } - else if (!allowNested && (type == "hash" || type == "qualifier")) { - override = "error"; - return "block"; - } - else { - return states.top(type, stream, state); - } - }; - states.maybeprop = function (type, stream, state) { - if (type == ":") - return pushContext(state, stream, "prop"); - return pass(type, stream, state); - }; - states.prop = function (type, stream, state) { - if (type == ";") - return popContext(state); - if (type == "{" && allowNested) - return pushContext(state, stream, "propBlock"); - if (type == "}" || type == "{") - return popAndPass(type, stream, state); - if (type == "(") - return pushContext(state, stream, "parens"); - if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) { - override += " error"; - } - else if (type == "word") { - wordAsValue(stream); - } - else if (type == "interpolation") { - return pushContext(state, stream, "interpolation"); - } - return "prop"; - }; - states.propBlock = function (type, _stream, state) { - if (type == "}") - return popContext(state); - if (type == "word") { - override = "property"; - return "maybeprop"; - } - return state.context.type; - }; - states.parens = function (type, stream, state) { - if (type == "{" || type == "}") - return popAndPass(type, stream, state); - if (type == ")") - return popContext(state); - if (type == "(") - return pushContext(state, stream, "parens"); - if (type == "interpolation") - return pushContext(state, stream, "interpolation"); - if (type == "word") - wordAsValue(stream); - return "parens"; - }; - states.pseudo = function (type, stream, state) { - if (type == "meta") - return "pseudo"; - if (type == "word") { - override = "variable-3"; - return state.context.type; - } - return pass(type, stream, state); - }; - states.documentTypes = function (type, stream, state) { - if (type == "word" && documentTypes.hasOwnProperty(stream.current())) { - override = "tag"; - return state.context.type; - } - else { - return states.atBlock(type, stream, state); - } - }; - states.atBlock = function (type, stream, state) { - if (type == "(") - return pushContext(state, stream, "atBlock_parens"); - if (type == "}" || type == ";") - return popAndPass(type, stream, state); - if (type == "{") - return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top"); - if (type == "interpolation") - return pushContext(state, stream, "interpolation"); - if (type == "word") { - var word = stream.current().toLowerCase(); - if (word == "only" || word == "not" || word == "and" || word == "or") - override = "keyword"; - else if (mediaTypes.hasOwnProperty(word)) - override = "attribute"; - else if (mediaFeatures.hasOwnProperty(word)) - override = "property"; - else if (mediaValueKeywords.hasOwnProperty(word)) - override = "keyword"; - else if (propertyKeywords.hasOwnProperty(word)) - override = "property"; - else if (nonStandardPropertyKeywords.hasOwnProperty(word)) - override = highlightNonStandardPropertyKeywords ? "string-2" : "property"; - else if (valueKeywords.hasOwnProperty(word)) - override = "atom"; - else if (colorKeywords.hasOwnProperty(word)) - override = "keyword"; - else - override = "error"; - } - return state.context.type; - }; - states.atComponentBlock = function (type, stream, state) { - if (type == "}") - return popAndPass(type, stream, state); - if (type == "{") - return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false); - if (type == "word") - override = "error"; - return state.context.type; - }; - states.atBlock_parens = function (type, stream, state) { - if (type == ")") - return popContext(state); - if (type == "{" || type == "}") - return popAndPass(type, stream, state, 2); - return states.atBlock(type, stream, state); - }; - states.restricted_atBlock_before = function (type, stream, state) { - if (type == "{") - return pushContext(state, stream, "restricted_atBlock"); - if (type == "word" && state.stateArg == "@counter-style") { - override = "variable"; - return "restricted_atBlock_before"; - } - return pass(type, stream, state); - }; - states.restricted_atBlock = function (type, stream, state) { - if (type == "}") { - state.stateArg = null; - return popContext(state); - } - if (type == "word") { - if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) || - (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase()))) - override = "error"; - else - override = "property"; - return "maybeprop"; - } - return "restricted_atBlock"; - }; - states.keyframes = function (type, stream, state) { - if (type == "word") { - override = "variable"; - return "keyframes"; - } - if (type == "{") - return pushContext(state, stream, "top"); - return pass(type, stream, state); - }; - states.at = function (type, stream, state) { - if (type == ";") - return popContext(state); - if (type == "{" || type == "}") - return popAndPass(type, stream, state); - if (type == "word") - override = "tag"; - else if (type == "hash") - override = "builtin"; - return "at"; - }; - states.interpolation = function (type, stream, state) { - if (type == "}") - return popContext(state); - if (type == "{" || type == ";") - return popAndPass(type, stream, state); - if (type == "word") - override = "variable"; - else if (type != "variable" && type != "(" && type != ")") - override = "error"; - return "interpolation"; - }; - return { - startState: function (base) { - return { tokenize: null, - state: inline ? "block" : "top", - stateArg: null, - context: new Context(inline ? "block" : "top", base || 0, null) }; - }, - token: function (stream, state) { - if (!state.tokenize && stream.eatSpace()) - return null; - var style = (state.tokenize || tokenBase)(stream, state); - if (style && typeof style == "object") { - type = style[1]; - style = style[0]; - } - override = style; - if (type != "comment") - state.state = states[state.state](type, stream, state); - return override; - }, - indent: function (state, textAfter) { - var cx = state.context, ch = textAfter && textAfter.charAt(0); - var indent = cx.indent; - if (cx.type == "prop" && (ch == "}" || ch == ")")) - cx = cx.prev; - if (cx.prev) { - if (ch == "}" && (cx.type == "block" || cx.type == "top" || - cx.type == "interpolation" || cx.type == "restricted_atBlock")) { - cx = cx.prev; - indent = cx.indent; - } - else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") || - ch == "{" && (cx.type == "at" || cx.type == "atBlock")) { - indent = Math.max(0, cx.indent - indentUnit); - } - } - return indent; - }, - electricChars: "}", - blockCommentStart: "/*", - blockCommentEnd: "*/", - blockCommentContinue: " * ", - lineComment: lineComment, - fold: "brace" - }; - }); - function keySet(array) { - var keys = {}; - for (var i = 0; i < array.length; ++i) { - keys[array[i].toLowerCase()] = true; - } - return keys; - } - var documentTypes_ = [ - "domain", "regexp", "url", "url-prefix" - ], documentTypes = keySet(documentTypes_); - var mediaTypes_ = [ - "all", "aural", "braille", "handheld", "print", "projection", "screen", - "tty", "tv", "embossed" - ], mediaTypes = keySet(mediaTypes_); - var mediaFeatures_ = [ - "width", "min-width", "max-width", "height", "min-height", "max-height", - "device-width", "min-device-width", "max-device-width", "device-height", - "min-device-height", "max-device-height", "aspect-ratio", - "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", - "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", - "max-color", "color-index", "min-color-index", "max-color-index", - "monochrome", "min-monochrome", "max-monochrome", "resolution", - "min-resolution", "max-resolution", "scan", "grid", "orientation", - "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio", - "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme" - ], mediaFeatures = keySet(mediaFeatures_); - var mediaValueKeywords_ = [ - "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover", - "interlace", "progressive", - "dark", "light" - ], mediaValueKeywords = keySet(mediaValueKeywords_); - var propertyKeywords_ = [ - "align-content", "align-items", "align-self", "alignment-adjust", - "alignment-baseline", "all", "anchor-point", "animation", "animation-delay", - "animation-direction", "animation-duration", "animation-fill-mode", - "animation-iteration-count", "animation-name", "animation-play-state", - "animation-timing-function", "appearance", "azimuth", "backdrop-filter", - "backface-visibility", "background", "background-attachment", - "background-blend-mode", "background-clip", "background-color", - "background-image", "background-origin", "background-position", - "background-position-x", "background-position-y", "background-repeat", - "background-size", "baseline-shift", "binding", "bleed", "block-size", - "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target", - "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", - "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", - "border-collapse", "border-color", "border-image", "border-image-outset", - "border-image-repeat", "border-image-slice", "border-image-source", - "border-image-width", "border-left", "border-left-color", "border-left-style", - "border-left-width", "border-radius", "border-right", "border-right-color", - "border-right-style", "border-right-width", "border-spacing", "border-style", - "border-top", "border-top-color", "border-top-left-radius", - "border-top-right-radius", "border-top-style", "border-top-width", - "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", - "break-after", "break-before", "break-inside", "caption-side", "caret-color", - "clear", "clip", "color", "color-profile", "column-count", "column-fill", - "column-gap", "column-rule", "column-rule-color", "column-rule-style", - "column-rule-width", "column-span", "column-width", "columns", "contain", - "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after", - "cue-before", "cursor", "direction", "display", "dominant-baseline", - "drop-initial-after-adjust", "drop-initial-after-align", - "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size", - "drop-initial-value", "elevation", "empty-cells", "fit", "fit-position", - "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", - "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into", - "font", "font-family", "font-feature-settings", "font-kerning", - "font-language-override", "font-optical-sizing", "font-size", - "font-size-adjust", "font-stretch", "font-style", "font-synthesis", - "font-variant", "font-variant-alternates", "font-variant-caps", - "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", - "font-variant-position", "font-variation-settings", "font-weight", "gap", - "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", - "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start", - "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start", - "grid-template", "grid-template-areas", "grid-template-columns", - "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon", - "image-orientation", "image-rendering", "image-resolution", "inline-box-align", - "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline", - "inset-inline-end", "inset-inline-start", "isolation", "justify-content", - "justify-items", "justify-self", "left", "letter-spacing", "line-break", - "line-height", "line-height-step", "line-stacking", "line-stacking-ruby", - "line-stacking-shift", "line-stacking-strategy", "list-style", - "list-style-image", "list-style-position", "list-style-type", "margin", - "margin-bottom", "margin-left", "margin-right", "margin-top", "marks", - "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed", - "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode", - "mask-origin", "mask-position", "mask-repeat", "mask-size", "mask-type", - "max-block-size", "max-height", "max-inline-size", - "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", - "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right", - "nav-up", "object-fit", "object-position", "offset", "offset-anchor", - "offset-distance", "offset-path", "offset-position", "offset-rotate", - "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", - "outline-style", "outline-width", "overflow", "overflow-style", - "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", - "padding-left", "padding-right", "padding-top", "page", "page-break-after", - "page-break-before", "page-break-inside", "page-policy", "pause", - "pause-after", "pause-before", "perspective", "perspective-origin", "pitch", - "pitch-range", "place-content", "place-items", "place-self", "play-during", - "position", "presentation-level", "punctuation-trim", "quotes", - "region-break-after", "region-break-before", "region-break-inside", - "region-fragment", "rendering-intent", "resize", "rest", "rest-after", - "rest-before", "richness", "right", "rotate", "rotation", "rotation-point", - "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span", - "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block", - "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom", - "scroll-margin-inline", "scroll-margin-inline-end", - "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right", - "scroll-margin-top", "scroll-padding", "scroll-padding-block", - "scroll-padding-block-end", "scroll-padding-block-start", - "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end", - "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right", - "scroll-padding-top", "scroll-snap-align", "scroll-snap-type", - "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside", - "size", "speak", "speak-as", "speak-header", "speak-numeral", - "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size", - "table-layout", "target", "target-name", "target-new", "target-position", - "text-align", "text-align-last", "text-combine-upright", "text-decoration", - "text-decoration-color", "text-decoration-line", "text-decoration-skip", - "text-decoration-skip-ink", "text-decoration-style", "text-emphasis", - "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", - "text-height", "text-indent", "text-justify", "text-orientation", - "text-outline", "text-overflow", "text-rendering", "text-shadow", - "text-size-adjust", "text-space-collapse", "text-transform", - "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin", - "transform-style", "transition", "transition-delay", "transition-duration", - "transition-property", "transition-timing-function", "translate", - "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance", - "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", - "voice-stress", "voice-volume", "volume", "white-space", "widows", "width", - "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index", - "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color", - "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events", - "color-interpolation", "color-interpolation-filters", - "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering", - "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke", - "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", - "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering", - "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal", - "glyph-orientation-vertical", "text-anchor", "writing-mode", - ], propertyKeywords = keySet(propertyKeywords_); - var nonStandardPropertyKeywords_ = [ - "border-block", "border-block-color", "border-block-end", - "border-block-end-color", "border-block-end-style", "border-block-end-width", - "border-block-start", "border-block-start-color", "border-block-start-style", - "border-block-start-width", "border-block-style", "border-block-width", - "border-inline", "border-inline-color", "border-inline-end", - "border-inline-end-color", "border-inline-end-style", - "border-inline-end-width", "border-inline-start", "border-inline-start-color", - "border-inline-start-style", "border-inline-start-width", - "border-inline-style", "border-inline-width", "margin-block", - "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end", - "margin-inline-start", "padding-block", "padding-block-end", - "padding-block-start", "padding-inline", "padding-inline-end", - "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color", - "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color", - "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color", - "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration", - "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom" - ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_); - var fontProperties_ = [ - "font-display", "font-family", "src", "unicode-range", "font-variant", - "font-feature-settings", "font-stretch", "font-weight", "font-style" - ], fontProperties = keySet(fontProperties_); - var counterDescriptors_ = [ - "additive-symbols", "fallback", "negative", "pad", "prefix", "range", - "speak-as", "suffix", "symbols", "system" - ], counterDescriptors = keySet(counterDescriptors_); - var colorKeywords_ = [ - "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", - "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", - "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", - "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", - "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", - "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", - "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", - "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", - "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", - "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", - "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", - "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", - "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink", - "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", - "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", - "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", - "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", - "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", - "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", - "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", - "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", - "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", - "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", - "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", - "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", - "whitesmoke", "yellow", "yellowgreen" - ], colorKeywords = keySet(colorKeywords_); - var valueKeywords_ = [ - "above", "absolute", "activeborder", "additive", "activecaption", "afar", - "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", - "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", - "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page", - "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary", - "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", - "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel", - "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian", - "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", - "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch", - "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", - "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse", - "compact", "condensed", "contain", "content", "contents", - "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop", - "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal", - "decimal-leading-zero", "default", "default-button", "dense", "destination-atop", - "destination-in", "destination-out", "destination-over", "devanagari", "difference", - "disc", "discard", "disclosure-closed", "disclosure-open", "document", - "dot-dash", "dot-dot-dash", - "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", - "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", - "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", - "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", - "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", - "ethiopic-halehame-gez", "ethiopic-halehame-om-et", - "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", - "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", - "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed", - "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", - "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove", - "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew", - "help", "hidden", "hide", "higher", "highlight", "highlighttext", - "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore", - "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", - "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", - "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert", - "italic", "japanese-formal", "japanese-informal", "justify", "kannada", - "katakana", "katakana-iroha", "keep-all", "khmer", - "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal", - "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten", - "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem", - "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", - "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", - "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d", - "media-controls-background", "media-current-time-display", - "media-fullscreen-button", "media-mute-button", "media-play-button", - "media-return-to-realtime-button", "media-rewind-button", - "media-seek-back-button", "media-seek-forward-button", "media-slider", - "media-sliderthumb", "media-time-remaining-display", "media-volume-slider", - "media-volume-slider-container", "media-volume-sliderthumb", "medium", - "menu", "menulist", "menulist-button", "menulist-text", - "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", - "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize", - "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", - "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", - "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote", - "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", - "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", - "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter", - "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", - "progress", "push-button", "radial-gradient", "radio", "read-only", - "read-write", "read-write-plaintext-only", "rectangle", "region", - "relative", "repeat", "repeating-linear-gradient", - "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse", - "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", - "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running", - "s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen", - "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield", - "searchfield-cancel-button", "searchfield-decoration", - "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end", - "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", - "simp-chinese-formal", "simp-chinese-informal", "single", - "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal", - "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", - "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali", - "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square", - "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub", - "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table", - "table-caption", "table-cell", "table-column", "table-column-group", - "table-footer-group", "table-header-group", "table-row", "table-row-group", - "tamil", - "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", - "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", - "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", - "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", - "trad-chinese-formal", "trad-chinese-informal", "transform", - "translate", "translate3d", "translateX", "translateY", "translateZ", - "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up", - "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", - "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", - "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted", - "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", - "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor", - "xx-large", "xx-small" - ], valueKeywords = keySet(valueKeywords_); - var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_) - .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_) - .concat(valueKeywords_); - CodeMirror.registerHelper("hintWords", "css", allWords); - function tokenCComment(stream, state) { - var maybeEnd = false, ch; - while ((ch = stream.next()) != null) { - if (maybeEnd && ch == "/") { - state.tokenize = null; - break; - } - maybeEnd = (ch == "*"); - } - return ["comment", "comment"]; - } - CodeMirror.defineMIME("text/css", { - documentTypes: documentTypes, - mediaTypes: mediaTypes, - mediaFeatures: mediaFeatures, - mediaValueKeywords: mediaValueKeywords, - propertyKeywords: propertyKeywords, - nonStandardPropertyKeywords: nonStandardPropertyKeywords, - fontProperties: fontProperties, - counterDescriptors: counterDescriptors, - colorKeywords: colorKeywords, - valueKeywords: valueKeywords, - tokenHooks: { - "/": function (stream, state) { - if (!stream.eat("*")) - return false; - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - }, - name: "css" - }); - CodeMirror.defineMIME("text/x-scss", { - mediaTypes: mediaTypes, - mediaFeatures: mediaFeatures, - mediaValueKeywords: mediaValueKeywords, - propertyKeywords: propertyKeywords, - nonStandardPropertyKeywords: nonStandardPropertyKeywords, - colorKeywords: colorKeywords, - valueKeywords: valueKeywords, - fontProperties: fontProperties, - allowNested: true, - lineComment: "//", - tokenHooks: { - "/": function (stream, state) { - if (stream.eat("/")) { - stream.skipToEnd(); - return ["comment", "comment"]; - } - else if (stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - else { - return ["operator", "operator"]; - } - }, - ":": function (stream) { - if (stream.match(/^\s*\{/, false)) - return [null, null]; - return false; - }, - "$": function (stream) { - stream.match(/^[\w-]+/); - if (stream.match(/^\s*:/, false)) - return ["variable-2", "variable-definition"]; - return ["variable-2", "variable"]; - }, - "#": function (stream) { - if (!stream.eat("{")) - return false; - return [null, "interpolation"]; - } - }, - name: "css", - helperType: "scss" - }); - CodeMirror.defineMIME("text/x-less", { - mediaTypes: mediaTypes, - mediaFeatures: mediaFeatures, - mediaValueKeywords: mediaValueKeywords, - propertyKeywords: propertyKeywords, - nonStandardPropertyKeywords: nonStandardPropertyKeywords, - colorKeywords: colorKeywords, - valueKeywords: valueKeywords, - fontProperties: fontProperties, - allowNested: true, - lineComment: "//", - tokenHooks: { - "/": function (stream, state) { - if (stream.eat("/")) { - stream.skipToEnd(); - return ["comment", "comment"]; - } - else if (stream.eat("*")) { - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - else { - return ["operator", "operator"]; - } - }, - "@": function (stream) { - if (stream.eat("{")) - return [null, "interpolation"]; - if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) - return false; - stream.eatWhile(/[\w\\\-]/); - if (stream.match(/^\s*:/, false)) - return ["variable-2", "variable-definition"]; - return ["variable-2", "variable"]; - }, - "&": function () { - return ["atom", "atom"]; - } - }, - name: "css", - helperType: "less" - }); - CodeMirror.defineMIME("text/x-gss", { - documentTypes: documentTypes, - mediaTypes: mediaTypes, - mediaFeatures: mediaFeatures, - propertyKeywords: propertyKeywords, - nonStandardPropertyKeywords: nonStandardPropertyKeywords, - fontProperties: fontProperties, - counterDescriptors: counterDescriptors, - colorKeywords: colorKeywords, - valueKeywords: valueKeywords, - supportsAtComponent: true, - tokenHooks: { - "/": function (stream, state) { - if (!stream.eat("*")) - return false; - state.tokenize = tokenCComment; - return tokenCComment(stream, state); - } - }, - name: "css", - helperType: "gss" - }); -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -(function (mod) { - if (typeof exports == "object" && typeof module == "object") - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) - define(["../../lib/codemirror"], mod); - else - mod(CodeMirror); -})(function (CodeMirror) { - var htmlConfig = { - autoSelfClosers: { 'area': true, 'base': true, 'br': true, 'col': true, 'command': true, - 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true, - 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true, - 'track': true, 'wbr': true, 'menuitem': true }, - implicitlyClosed: { 'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true, - 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true, - 'th': true, 'tr': true }, - contextGrabbers: { - 'dd': { 'dd': true, 'dt': true }, - 'dt': { 'dd': true, 'dt': true }, - 'li': { 'li': true }, - 'option': { 'option': true, 'optgroup': true }, - 'optgroup': { 'optgroup': true }, - 'p': { 'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true, - 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true, - 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true, - 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true, - 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true }, - 'rp': { 'rp': true, 'rt': true }, - 'rt': { 'rp': true, 'rt': true }, - 'tbody': { 'tbody': true, 'tfoot': true }, - 'td': { 'td': true, 'th': true }, - 'tfoot': { 'tbody': true }, - 'th': { 'td': true, 'th': true }, - 'thead': { 'tbody': true, 'tfoot': true }, - 'tr': { 'tr': true } - }, - doNotIndent: { "pre": true }, - allowUnquoted: true, - allowMissing: true, - caseFold: true - }; - var xmlConfig = { - autoSelfClosers: {}, - implicitlyClosed: {}, - contextGrabbers: {}, - doNotIndent: {}, - allowUnquoted: false, - allowMissing: false, - allowMissingTagName: false, - caseFold: false - }; - CodeMirror.defineMode("xml", function (editorConf, config_) { - var indentUnit = editorConf.indentUnit; - var config = {}; - var defaults = config_.htmlMode ? htmlConfig : xmlConfig; - for (var prop in defaults) - config[prop] = defaults[prop]; - for (var prop in config_) - config[prop] = config_[prop]; - var type, setStyle; - function inText(stream, state) { - function chain(parser) { - state.tokenize = parser; - return parser(stream, state); - } - var ch = stream.next(); - if (ch == "<") { - if (stream.eat("!")) { - if (stream.eat("[")) { - if (stream.match("CDATA[")) - return chain(inBlock("atom", "]]>")); - else - return null; - } - else if (stream.match("--")) { - return chain(inBlock("comment", "-->")); - } - else if (stream.match("DOCTYPE", true, true)) { - stream.eatWhile(/[\w\._\-]/); - return chain(doctype(1)); - } - else { - return null; - } - } - else if (stream.eat("?")) { - stream.eatWhile(/[\w\._\-]/); - state.tokenize = inBlock("meta", "?>"); - return "meta"; - } - else { - type = stream.eat("/") ? "closeTag" : "openTag"; - state.tokenize = inTag; - return "tag bracket"; - } - } - else if (ch == "&") { - var ok; - if (stream.eat("#")) { - if (stream.eat("x")) { - ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); - } - else { - ok = stream.eatWhile(/[\d]/) && stream.eat(";"); - } - } - else { - ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";"); - } - return ok ? "atom" : "error"; - } - else { - stream.eatWhile(/[^&<]/); - return null; - } - } - inText.isInText = true; - function inTag(stream, state) { - var ch = stream.next(); - if (ch == ">" || (ch == "/" && stream.eat(">"))) { - state.tokenize = inText; - type = ch == ">" ? "endTag" : "selfcloseTag"; - return "tag bracket"; - } - else if (ch == "=") { - type = "equals"; - return null; - } - else if (ch == "<") { - state.tokenize = inText; - state.state = baseState; - state.tagName = state.tagStart = null; - var next = state.tokenize(stream, state); - return next ? next + " tag error" : "tag error"; - } - else if (/[\'\"]/.test(ch)) { - state.tokenize = inAttribute(ch); - state.stringStartCol = stream.column(); - return state.tokenize(stream, state); - } - else { - stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/); - return "word"; - } - } - function inAttribute(quote) { - var closure = function (stream, state) { - while (!stream.eol()) { - if (stream.next() == quote) { - state.tokenize = inTag; - break; - } - } - return "string"; - }; - closure.isInAttribute = true; - return closure; - } - function inBlock(style, terminator) { - return function (stream, state) { - while (!stream.eol()) { - if (stream.match(terminator)) { - state.tokenize = inText; - break; - } - stream.next(); - } - return style; - }; - } - function doctype(depth) { - return function (stream, state) { - var ch; - while ((ch = stream.next()) != null) { - if (ch == "<") { - state.tokenize = doctype(depth + 1); - return state.tokenize(stream, state); - } - else if (ch == ">") { - if (depth == 1) { - state.tokenize = inText; - break; - } - else { - state.tokenize = doctype(depth - 1); - return state.tokenize(stream, state); - } - } - } - return "meta"; - }; - } - function Context(state, tagName, startOfLine) { - this.prev = state.context; - this.tagName = tagName || ""; - this.indent = state.indented; - this.startOfLine = startOfLine; - if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent)) - this.noIndent = true; - } - function popContext(state) { - if (state.context) - state.context = state.context.prev; - } - function maybePopContext(state, nextTagName) { - var parentTagName; - while (true) { - if (!state.context) { - return; - } - parentTagName = state.context.tagName; - if (!config.contextGrabbers.hasOwnProperty(parentTagName) || - !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) { - return; - } - popContext(state); - } - } - function baseState(type, stream, state) { - if (type == "openTag") { - state.tagStart = stream.column(); - return tagNameState; - } - else if (type == "closeTag") { - return closeTagNameState; - } - else { - return baseState; - } - } - function tagNameState(type, stream, state) { - if (type == "word") { - state.tagName = stream.current(); - setStyle = "tag"; - return attrState; - } - else if (config.allowMissingTagName && type == "endTag") { - setStyle = "tag bracket"; - return attrState(type, stream, state); - } - else { - setStyle = "error"; - return tagNameState; - } - } - function closeTagNameState(type, stream, state) { - if (type == "word") { - var tagName = stream.current(); - if (state.context && state.context.tagName != tagName && - config.implicitlyClosed.hasOwnProperty(state.context.tagName)) - popContext(state); - if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) { - setStyle = "tag"; - return closeState; - } - else { - setStyle = "tag error"; - return closeStateErr; - } - } - else if (config.allowMissingTagName && type == "endTag") { - setStyle = "tag bracket"; - return closeState(type, stream, state); - } - else { - setStyle = "error"; - return closeStateErr; - } - } - function closeState(type, _stream, state) { - if (type != "endTag") { - setStyle = "error"; - return closeState; - } - popContext(state); - return baseState; - } - function closeStateErr(type, stream, state) { - setStyle = "error"; - return closeState(type, stream, state); - } - function attrState(type, _stream, state) { - if (type == "word") { - setStyle = "attribute"; - return attrEqState; - } - else if (type == "endTag" || type == "selfcloseTag") { - var tagName = state.tagName, tagStart = state.tagStart; - state.tagName = state.tagStart = null; - if (type == "selfcloseTag" || - config.autoSelfClosers.hasOwnProperty(tagName)) { - maybePopContext(state, tagName); - } - else { - maybePopContext(state, tagName); - state.context = new Context(state, tagName, tagStart == state.indented); - } - return baseState; - } - setStyle = "error"; - return attrState; - } - function attrEqState(type, stream, state) { - if (type == "equals") - return attrValueState; - if (!config.allowMissing) - setStyle = "error"; - return attrState(type, stream, state); - } - function attrValueState(type, stream, state) { - if (type == "string") - return attrContinuedState; - if (type == "word" && config.allowUnquoted) { - setStyle = "string"; - return attrState; - } - setStyle = "error"; - return attrState(type, stream, state); - } - function attrContinuedState(type, stream, state) { - if (type == "string") - return attrContinuedState; - return attrState(type, stream, state); - } - return { - startState: function (baseIndent) { - var state = { tokenize: inText, - state: baseState, - indented: baseIndent || 0, - tagName: null, tagStart: null, - context: null }; - if (baseIndent != null) - state.baseIndent = baseIndent; - return state; - }, - token: function (stream, state) { - if (!state.tagName && stream.sol()) - state.indented = stream.indentation(); - if (stream.eatSpace()) - return null; - type = null; - var style = state.tokenize(stream, state); - if ((style || type) && style != "comment") { - setStyle = null; - state.state = state.state(type || style, stream, state); - if (setStyle) - style = setStyle == "error" ? style + " error" : setStyle; - } - return style; - }, - indent: function (state, textAfter, fullLine) { - var context = state.context; - if (state.tokenize.isInAttribute) { - if (state.tagStart == state.indented) - return state.stringStartCol + 1; - else - return state.indented + indentUnit; - } - if (context && context.noIndent) - return CodeMirror.Pass; - if (state.tokenize != inTag && state.tokenize != inText) - return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; - if (state.tagName) { - if (config.multilineTagIndentPastTag !== false) - return state.tagStart + state.tagName.length + 2; - else - return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1); - } - if (config.alignCDATA && /$/, - blockCommentStart: "", - configuration: config.htmlMode ? "html" : "xml", - helperType: config.htmlMode ? "html" : "xml", - skipAttribute: function (state) { - if (state.state == attrValueState) - state.state = attrState; - }, - xmlCurrentTag: function (state) { - return state.tagName ? { name: state.tagName, close: state.type == "closeTag" } : null; - }, - xmlCurrentContext: function (state) { - var context = []; - for (var cx = state.context; cx; cx = cx.prev) - context.push(cx.tagName); - return context.reverse(); - } - }; - }); - CodeMirror.defineMIME("text/xml", "xml"); - CodeMirror.defineMIME("application/xml", "xml"); - if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) - CodeMirror.defineMIME("text/html", { name: "xml", htmlMode: true }); -}); - -// CodeMirror, copyright (c) by Marijn Haverbeke and others -(function (mod) { - if (typeof exports == "object" && typeof module == "object") - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) - define(["../../lib/codemirror"], mod); - else - mod(CodeMirror); -})(function (CodeMirror) { - CodeMirror.defineMode("javascript", function (config, parserConfig) { - var indentUnit = config.indentUnit; - var statementIndent = parserConfig.statementIndent; - var jsonldMode = parserConfig.jsonld; - var jsonMode = parserConfig.json || jsonldMode; - var trackScope = parserConfig.trackScope !== false; - var isTS = parserConfig.typescript; - var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; - var keywords = function () { - function kw(type) { return { type: type, style: "keyword" }; } - var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); - var operator = kw("operator"), atom = { type: "atom", style: "atom" }; - return { - "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, - "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C, - "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"), - "function": kw("function"), "catch": kw("catch"), - "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), - "in": operator, "typeof": operator, "instanceof": operator, - "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, - "this": kw("this"), "class": kw("class"), "super": kw("atom"), - "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, - "await": C - }; - }(); - var isOperatorChar = /[+\-*&%=<>!?|~^@]/; - var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; - function readRegexp(stream) { - var escaped = false, next, inSet = false; - while ((next = stream.next()) != null) { - if (!escaped) { - if (next == "/" && !inSet) - return; - if (next == "[") - inSet = true; - else if (inSet && next == "]") - inSet = false; - } - escaped = !escaped && next == "\\"; - } - } - var type, content; - function ret(tp, style, cont) { - type = tp; - content = cont; - return style; - } - function tokenBase(stream, state) { - var ch = stream.next(); - if (ch == '"' || ch == "'") { - state.tokenize = tokenString(ch); - return state.tokenize(stream, state); - } - else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) { - return ret("number", "number"); - } - else if (ch == "." && stream.match("..")) { - return ret("spread", "meta"); - } - else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { - return ret(ch); - } - else if (ch == "=" && stream.eat(">")) { - return ret("=>", "operator"); - } - else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) { - return ret("number", "number"); - } - else if (/\d/.test(ch)) { - stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/); - return ret("number", "number"); - } - else if (ch == "/") { - if (stream.eat("*")) { - state.tokenize = tokenComment; - return tokenComment(stream, state); - } - else if (stream.eat("/")) { - stream.skipToEnd(); - return ret("comment", "comment"); - } - else if (expressionAllowed(stream, state, 1)) { - readRegexp(stream); - stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/); - return ret("regexp", "string-2"); - } - else { - stream.eat("="); - return ret("operator", "operator", stream.current()); - } - } - else if (ch == "`") { - state.tokenize = tokenQuasi; - return tokenQuasi(stream, state); - } - else if (ch == "#" && stream.peek() == "!") { - stream.skipToEnd(); - return ret("meta", "meta"); - } - else if (ch == "#" && stream.eatWhile(wordRE)) { - return ret("variable", "property"); - } - else if (ch == "<" && stream.match("!--") || - (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) { - stream.skipToEnd(); - return ret("comment", "comment"); - } - else if (isOperatorChar.test(ch)) { - if (ch != ">" || !state.lexical || state.lexical.type != ">") { - if (stream.eat("=")) { - if (ch == "!" || ch == "=") - stream.eat("="); - } - else if (/[<>*+\-|&?]/.test(ch)) { - stream.eat(ch); - if (ch == ">") - stream.eat(ch); - } - } - if (ch == "?" && stream.eat(".")) - return ret("."); - return ret("operator", "operator", stream.current()); - } - else if (wordRE.test(ch)) { - stream.eatWhile(wordRE); - var word = stream.current(); - if (state.lastType != ".") { - if (keywords.propertyIsEnumerable(word)) { - var kw = keywords[word]; - return ret(kw.type, kw.style, word); - } - if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) - return ret("async", "keyword", word); - } - return ret("variable", "variable", word); - } - } - function tokenString(quote) { - return function (stream, state) { - var escaped = false, next; - if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)) { - state.tokenize = tokenBase; - return ret("jsonld-keyword", "meta"); - } - while ((next = stream.next()) != null) { - if (next == quote && !escaped) - break; - escaped = !escaped && next == "\\"; - } - if (!escaped) - state.tokenize = tokenBase; - return ret("string", "string"); - }; - } - function tokenComment(stream, state) { - var maybeEnd = false, ch; - while (ch = stream.next()) { - if (ch == "/" && maybeEnd) { - state.tokenize = tokenBase; - break; - } - maybeEnd = (ch == "*"); - } - return ret("comment", "comment"); - } - function tokenQuasi(stream, state) { - var escaped = false, next; - while ((next = stream.next()) != null) { - if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { - state.tokenize = tokenBase; - break; - } - escaped = !escaped && next == "\\"; - } - return ret("quasi", "string-2", stream.current()); - } - var brackets = "([{}])"; - function findFatArrow(stream, state) { - if (state.fatArrowAt) - state.fatArrowAt = null; - var arrow = stream.string.indexOf("=>", stream.start); - if (arrow < 0) - return; - if (isTS) { - var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow)); - if (m) - arrow = m.index; - } - var depth = 0, sawSomething = false; - for (var pos = arrow - 1; pos >= 0; --pos) { - var ch = stream.string.charAt(pos); - var bracket = brackets.indexOf(ch); - if (bracket >= 0 && bracket < 3) { - if (!depth) { - ++pos; - break; - } - if (--depth == 0) { - if (ch == "(") - sawSomething = true; - break; - } - } - else if (bracket >= 3 && bracket < 6) { - ++depth; - } - else if (wordRE.test(ch)) { - sawSomething = true; - } - else if (/["'\/`]/.test(ch)) { - for (;; --pos) { - if (pos == 0) - return; - var next = stream.string.charAt(pos - 1); - if (next == ch && stream.string.charAt(pos - 2) != "\\") { - pos--; - break; - } - } - } - else if (sawSomething && !depth) { - ++pos; - break; - } - } - if (sawSomething && !depth) - state.fatArrowAt = pos; - } - var atomicTypes = { "atom": true, "number": true, "variable": true, "string": true, - "regexp": true, "this": true, "import": true, "jsonld-keyword": true }; - function JSLexical(indented, column, type, align, prev, info) { - this.indented = indented; - this.column = column; - this.type = type; - this.prev = prev; - this.info = info; - if (align != null) - this.align = align; - } - function inScope(state, varname) { - if (!trackScope) - return false; - for (var v = state.localVars; v; v = v.next) - if (v.name == varname) - return true; - for (var cx = state.context; cx; cx = cx.prev) { - for (var v = cx.vars; v; v = v.next) - if (v.name == varname) - return true; - } - } - function parseJS(state, style, type, content, stream) { - var cc = state.cc; - cx.state = state; - cx.stream = stream; - cx.marked = null, cx.cc = cc; - cx.style = style; - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = true; - while (true) { - var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; - if (combinator(type, content)) { - while (cc.length && cc[cc.length - 1].lex) - cc.pop()(); - if (cx.marked) - return cx.marked; - if (type == "variable" && inScope(state, content)) - return "variable-2"; - return style; - } - } - } - var cx = { state: null, marked: null, cc: null }; - function pass() { - for (var i = arguments.length - 1; i >= 0; i--) - cx.cc.push(arguments[i]); - } - function cont() { - pass.apply(null, arguments); - return true; - } - function inList(name, list) { - for (var v = list; v; v = v.next) - if (v.name == name) - return true; - return false; - } - function register(varname) { - var state = cx.state; - cx.marked = "def"; - if (!trackScope) - return; - if (state.context) { - if (state.lexical.info == "var" && state.context && state.context.block) { - var newContext = registerVarScoped(varname, state.context); - if (newContext != null) { - state.context = newContext; - return; - } - } - else if (!inList(varname, state.localVars)) { - state.localVars = new Var(varname, state.localVars); - return; - } - } - if (parserConfig.globalVars && !inList(varname, state.globalVars)) - state.globalVars = new Var(varname, state.globalVars); - } - function registerVarScoped(varname, context) { - if (!context) { - return null; - } - else if (context.block) { - var inner = registerVarScoped(varname, context.prev); - if (!inner) - return null; - if (inner == context.prev) - return context; - return new Context(inner, context.vars, true); - } - else if (inList(varname, context.vars)) { - return context; - } - else { - return new Context(context.prev, new Var(varname, context.vars), false); - } - } - function isModifier(name) { - return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"; - } - function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block; } - function Var(name, next) { this.name = name; this.next = next; } - var defaultVars = new Var("this", new Var("arguments", null)); - function pushcontext() { - cx.state.context = new Context(cx.state.context, cx.state.localVars, false); - cx.state.localVars = defaultVars; - } - function pushblockcontext() { - cx.state.context = new Context(cx.state.context, cx.state.localVars, true); - cx.state.localVars = null; - } - function popcontext() { - cx.state.localVars = cx.state.context.vars; - cx.state.context = cx.state.context.prev; - } - popcontext.lex = true; - function pushlex(type, info) { - var result = function () { - var state = cx.state, indent = state.indented; - if (state.lexical.type == "stat") - indent = state.lexical.indented; - else - for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) - indent = outer.indented; - state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); - }; - result.lex = true; - return result; - } - function poplex() { - var state = cx.state; - if (state.lexical.prev) { - if (state.lexical.type == ")") - state.indented = state.lexical.indented; - state.lexical = state.lexical.prev; - } - } - poplex.lex = true; - function expect(wanted) { - function exp(type) { - if (type == wanted) - return cont(); - else if (wanted == ";" || type == "}" || type == ")" || type == "]") - return pass(); - else - return cont(exp); - } - return exp; - } - function statement(type, value) { - if (type == "var") - return cont(pushlex("vardef", value), vardef, expect(";"), poplex); - if (type == "keyword a") - return cont(pushlex("form"), parenExpr, statement, poplex); - if (type == "keyword b") - return cont(pushlex("form"), statement, poplex); - if (type == "keyword d") - return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex); - if (type == "debugger") - return cont(expect(";")); - if (type == "{") - return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext); - if (type == ";") - return cont(); - if (type == "if") { - if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) - cx.state.cc.pop()(); - return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse); - } - if (type == "function") - return cont(functiondef); - if (type == "for") - return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex); - if (type == "class" || (isTS && value == "interface")) { - cx.marked = "keyword"; - return cont(pushlex("form", type == "class" ? type : value), className, poplex); - } - if (type == "variable") { - if (isTS && value == "declare") { - cx.marked = "keyword"; - return cont(statement); - } - else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) { - cx.marked = "keyword"; - if (value == "enum") - return cont(enumdef); - else if (value == "type") - return cont(typename, expect("operator"), typeexpr, expect(";")); - else - return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex); - } - else if (isTS && value == "namespace") { - cx.marked = "keyword"; - return cont(pushlex("form"), expression, statement, poplex); - } - else if (isTS && value == "abstract") { - cx.marked = "keyword"; - return cont(statement); - } - else { - return cont(pushlex("stat"), maybelabel); - } - } - if (type == "switch") - return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, block, poplex, poplex, popcontext); - if (type == "case") - return cont(expression, expect(":")); - if (type == "default") - return cont(expect(":")); - if (type == "catch") - return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext); - if (type == "export") - return cont(pushlex("stat"), afterExport, poplex); - if (type == "import") - return cont(pushlex("stat"), afterImport, poplex); - if (type == "async") - return cont(statement); - if (value == "@") - return cont(expression, statement); - return pass(pushlex("stat"), expression, expect(";"), poplex); - } - function maybeCatchBinding(type) { - if (type == "(") - return cont(funarg, expect(")")); - } - function expression(type, value) { - return expressionInner(type, value, false); - } - function expressionNoComma(type, value) { - return expressionInner(type, value, true); - } - function parenExpr(type) { - if (type != "(") - return pass(); - return cont(pushlex(")"), maybeexpression, expect(")"), poplex); - } - function expressionInner(type, value, noComma) { - if (cx.state.fatArrowAt == cx.stream.start) { - var body = noComma ? arrowBodyNoComma : arrowBody; - if (type == "(") - return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); - else if (type == "variable") - return pass(pushcontext, pattern, expect("=>"), body, popcontext); - } - var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; - if (atomicTypes.hasOwnProperty(type)) - return cont(maybeop); - if (type == "function") - return cont(functiondef, maybeop); - if (type == "class" || (isTS && value == "interface")) { - cx.marked = "keyword"; - return cont(pushlex("form"), classExpression, poplex); - } - if (type == "keyword c" || type == "async") - return cont(noComma ? expressionNoComma : expression); - if (type == "(") - return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); - if (type == "operator" || type == "spread") - return cont(noComma ? expressionNoComma : expression); - if (type == "[") - return cont(pushlex("]"), arrayLiteral, poplex, maybeop); - if (type == "{") - return contCommasep(objprop, "}", null, maybeop); - if (type == "quasi") - return pass(quasi, maybeop); - if (type == "new") - return cont(maybeTarget(noComma)); - return cont(); - } - function maybeexpression(type) { - if (type.match(/[;\}\)\],]/)) - return pass(); - return pass(expression); - } - function maybeoperatorComma(type, value) { - if (type == ",") - return cont(maybeexpression); - return maybeoperatorNoComma(type, value, false); - } - function maybeoperatorNoComma(type, value, noComma) { - var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; - var expr = noComma == false ? expression : expressionNoComma; - if (type == "=>") - return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); - if (type == "operator") { - if (/\+\+|--/.test(value) || isTS && value == "!") - return cont(me); - if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false)) - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); - if (value == "?") - return cont(expression, expect(":"), expr); - return cont(expr); - } - if (type == "quasi") { - return pass(quasi, me); - } - if (type == ";") - return; - if (type == "(") - return contCommasep(expressionNoComma, ")", "call", me); - if (type == ".") - return cont(property, me); - if (type == "[") - return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); - if (isTS && value == "as") { - cx.marked = "keyword"; - return cont(typeexpr, me); - } - if (type == "regexp") { - cx.state.lastType = cx.marked = "operator"; - cx.stream.backUp(cx.stream.pos - cx.stream.start - 1); - return cont(expr); - } - } - function quasi(type, value) { - if (type != "quasi") - return pass(); - if (value.slice(value.length - 2) != "${") - return cont(quasi); - return cont(expression, continueQuasi); - } - function continueQuasi(type) { - if (type == "}") { - cx.marked = "string-2"; - cx.state.tokenize = tokenQuasi; - return cont(quasi); - } - } - function arrowBody(type) { - findFatArrow(cx.stream, cx.state); - return pass(type == "{" ? statement : expression); - } - function arrowBodyNoComma(type) { - findFatArrow(cx.stream, cx.state); - return pass(type == "{" ? statement : expressionNoComma); - } - function maybeTarget(noComma) { - return function (type) { - if (type == ".") - return cont(noComma ? targetNoComma : target); - else if (type == "variable" && isTS) - return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma); - else - return pass(noComma ? expressionNoComma : expression); - }; - } - function target(_, value) { - if (value == "target") { - cx.marked = "keyword"; - return cont(maybeoperatorComma); - } - } - function targetNoComma(_, value) { - if (value == "target") { - cx.marked = "keyword"; - return cont(maybeoperatorNoComma); - } - } - function maybelabel(type) { - if (type == ":") - return cont(poplex, statement); - return pass(maybeoperatorComma, expect(";"), poplex); - } - function property(type) { - if (type == "variable") { - cx.marked = "property"; - return cont(); - } - } - function objprop(type, value) { - if (type == "async") { - cx.marked = "property"; - return cont(objprop); - } - else if (type == "variable" || cx.style == "keyword") { - cx.marked = "property"; - if (value == "get" || value == "set") - return cont(getterSetter); - var m; - if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) - cx.state.fatArrowAt = cx.stream.pos + m[0].length; - return cont(afterprop); - } - else if (type == "number" || type == "string") { - cx.marked = jsonldMode ? "property" : (cx.style + " property"); - return cont(afterprop); - } - else if (type == "jsonld-keyword") { - return cont(afterprop); - } - else if (isTS && isModifier(value)) { - cx.marked = "keyword"; - return cont(objprop); - } - else if (type == "[") { - return cont(expression, maybetype, expect("]"), afterprop); - } - else if (type == "spread") { - return cont(expressionNoComma, afterprop); - } - else if (value == "*") { - cx.marked = "keyword"; - return cont(objprop); - } - else if (type == ":") { - return pass(afterprop); - } - } - function getterSetter(type) { - if (type != "variable") - return pass(afterprop); - cx.marked = "property"; - return cont(functiondef); - } - function afterprop(type) { - if (type == ":") - return cont(expressionNoComma); - if (type == "(") - return pass(functiondef); - } - function commasep(what, end, sep) { - function proceed(type, value) { - if (sep ? sep.indexOf(type) > -1 : type == ",") { - var lex = cx.state.lexical; - if (lex.info == "call") - lex.pos = (lex.pos || 0) + 1; - return cont(function (type, value) { - if (type == end || value == end) - return pass(); - return pass(what); - }, proceed); - } - if (type == end || value == end) - return cont(); - if (sep && sep.indexOf(";") > -1) - return pass(what); - return cont(expect(end)); - } - return function (type, value) { - if (type == end || value == end) - return cont(); - return pass(what, proceed); - }; - } - function contCommasep(what, end, info) { - for (var i = 3; i < arguments.length; i++) - cx.cc.push(arguments[i]); - return cont(pushlex(end, info), commasep(what, end), poplex); - } - function block(type) { - if (type == "}") - return cont(); - return pass(statement, block); - } - function maybetype(type, value) { - if (isTS) { - if (type == ":") - return cont(typeexpr); - if (value == "?") - return cont(maybetype); - } - } - function maybetypeOrIn(type, value) { - if (isTS && (type == ":" || value == "in")) - return cont(typeexpr); - } - function mayberettype(type) { - if (isTS && type == ":") { - if (cx.stream.match(/^\s*\w+\s+is\b/, false)) - return cont(expression, isKW, typeexpr); - else - return cont(typeexpr); - } - } - function isKW(_, value) { - if (value == "is") { - cx.marked = "keyword"; - return cont(); - } - } - function typeexpr(type, value) { - if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") { - cx.marked = "keyword"; - return cont(value == "typeof" ? expressionNoComma : typeexpr); - } - if (type == "variable" || value == "void") { - cx.marked = "type"; - return cont(afterType); - } - if (value == "|" || value == "&") - return cont(typeexpr); - if (type == "string" || type == "number" || type == "atom") - return cont(afterType); - if (type == "[") - return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType); - if (type == "{") - return cont(pushlex("}"), typeprops, poplex, afterType); - if (type == "(") - return cont(commasep(typearg, ")"), maybeReturnType, afterType); - if (type == "<") - return cont(commasep(typeexpr, ">"), typeexpr); - } - function maybeReturnType(type) { - if (type == "=>") - return cont(typeexpr); - } - function typeprops(type) { - if (type.match(/[\}\)\]]/)) - return cont(); - if (type == "," || type == ";") - return cont(typeprops); - return pass(typeprop, typeprops); - } - function typeprop(type, value) { - if (type == "variable" || cx.style == "keyword") { - cx.marked = "property"; - return cont(typeprop); - } - else if (value == "?" || type == "number" || type == "string") { - return cont(typeprop); - } - else if (type == ":") { - return cont(typeexpr); - } - else if (type == "[") { - return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop); - } - else if (type == "(") { - return pass(functiondecl, typeprop); - } - else if (!type.match(/[;\}\)\],]/)) { - return cont(); - } - } - function typearg(type, value) { - if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") - return cont(typearg); - if (type == ":") - return cont(typeexpr); - if (type == "spread") - return cont(typearg); - return pass(typeexpr); - } - function afterType(type, value) { - if (value == "<") - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType); - if (value == "|" || type == "." || value == "&") - return cont(typeexpr); - if (type == "[") - return cont(typeexpr, expect("]"), afterType); - if (value == "extends" || value == "implements") { - cx.marked = "keyword"; - return cont(typeexpr); - } - if (value == "?") - return cont(typeexpr, expect(":"), typeexpr); - } - function maybeTypeArgs(_, value) { - if (value == "<") - return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType); - } - function typeparam() { - return pass(typeexpr, maybeTypeDefault); - } - function maybeTypeDefault(_, value) { - if (value == "=") - return cont(typeexpr); - } - function vardef(_, value) { - if (value == "enum") { - cx.marked = "keyword"; - return cont(enumdef); - } - return pass(pattern, maybetype, maybeAssign, vardefCont); - } - function pattern(type, value) { - if (isTS && isModifier(value)) { - cx.marked = "keyword"; - return cont(pattern); - } - if (type == "variable") { - register(value); - return cont(); - } - if (type == "spread") - return cont(pattern); - if (type == "[") - return contCommasep(eltpattern, "]"); - if (type == "{") - return contCommasep(proppattern, "}"); - } - function proppattern(type, value) { - if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { - register(value); - return cont(maybeAssign); - } - if (type == "variable") - cx.marked = "property"; - if (type == "spread") - return cont(pattern); - if (type == "}") - return pass(); - if (type == "[") - return cont(expression, expect(']'), expect(':'), proppattern); - return cont(expect(":"), pattern, maybeAssign); - } - function eltpattern() { - return pass(pattern, maybeAssign); - } - function maybeAssign(_type, value) { - if (value == "=") - return cont(expressionNoComma); - } - function vardefCont(type) { - if (type == ",") - return cont(vardef); - } - function maybeelse(type, value) { - if (type == "keyword b" && value == "else") - return cont(pushlex("form", "else"), statement, poplex); - } - function forspec(type, value) { - if (value == "await") - return cont(forspec); - if (type == "(") - return cont(pushlex(")"), forspec1, poplex); - } - function forspec1(type) { - if (type == "var") - return cont(vardef, forspec2); - if (type == "variable") - return cont(forspec2); - return pass(forspec2); - } - function forspec2(type, value) { - if (type == ")") - return cont(); - if (type == ";") - return cont(forspec2); - if (value == "in" || value == "of") { - cx.marked = "keyword"; - return cont(expression, forspec2); - } - return pass(expression, forspec2); - } - function functiondef(type, value) { - if (value == "*") { - cx.marked = "keyword"; - return cont(functiondef); - } - if (type == "variable") { - register(value); - return cont(functiondef); - } - if (type == "(") - return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); - if (isTS && value == "<") - return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef); - } - function functiondecl(type, value) { - if (value == "*") { - cx.marked = "keyword"; - return cont(functiondecl); - } - if (type == "variable") { - register(value); - return cont(functiondecl); - } - if (type == "(") - return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext); - if (isTS && value == "<") - return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl); - } - function typename(type, value) { - if (type == "keyword" || type == "variable") { - cx.marked = "type"; - return cont(typename); - } - else if (value == "<") { - return cont(pushlex(">"), commasep(typeparam, ">"), poplex); - } - } - function funarg(type, value) { - if (value == "@") - cont(expression, funarg); - if (type == "spread") - return cont(funarg); - if (isTS && isModifier(value)) { - cx.marked = "keyword"; - return cont(funarg); - } - if (isTS && type == "this") - return cont(maybetype, maybeAssign); - return pass(pattern, maybetype, maybeAssign); - } - function classExpression(type, value) { - if (type == "variable") - return className(type, value); - return classNameAfter(type, value); - } - function className(type, value) { - if (type == "variable") { - register(value); - return cont(classNameAfter); - } - } - function classNameAfter(type, value) { - if (value == "<") - return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter); - if (value == "extends" || value == "implements" || (isTS && type == ",")) { - if (value == "implements") - cx.marked = "keyword"; - return cont(isTS ? typeexpr : expression, classNameAfter); - } - if (type == "{") - return cont(pushlex("}"), classBody, poplex); - } - function classBody(type, value) { - if (type == "async" || - (type == "variable" && - (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && - cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) { - cx.marked = "keyword"; - return cont(classBody); - } - if (type == "variable" || cx.style == "keyword") { - cx.marked = "property"; - return cont(classfield, classBody); - } - if (type == "number" || type == "string") - return cont(classfield, classBody); - if (type == "[") - return cont(expression, maybetype, expect("]"), classfield, classBody); - if (value == "*") { - cx.marked = "keyword"; - return cont(classBody); - } - if (isTS && type == "(") - return pass(functiondecl, classBody); - if (type == ";" || type == ",") - return cont(classBody); - if (type == "}") - return cont(); - if (value == "@") - return cont(expression, classBody); - } - function classfield(type, value) { - if (value == "?") - return cont(classfield); - if (type == ":") - return cont(typeexpr, maybeAssign); - if (value == "=") - return cont(expressionNoComma); - var context = cx.state.lexical.prev, isInterface = context && context.info == "interface"; - return pass(isInterface ? functiondecl : functiondef); - } - function afterExport(type, value) { - if (value == "*") { - cx.marked = "keyword"; - return cont(maybeFrom, expect(";")); - } - if (value == "default") { - cx.marked = "keyword"; - return cont(expression, expect(";")); - } - if (type == "{") - return cont(commasep(exportField, "}"), maybeFrom, expect(";")); - return pass(statement); - } - function exportField(type, value) { - if (value == "as") { - cx.marked = "keyword"; - return cont(expect("variable")); - } - if (type == "variable") - return pass(expressionNoComma, exportField); - } - function afterImport(type) { - if (type == "string") - return cont(); - if (type == "(") - return pass(expression); - if (type == ".") - return pass(maybeoperatorComma); - return pass(importSpec, maybeMoreImports, maybeFrom); - } - function importSpec(type, value) { - if (type == "{") - return contCommasep(importSpec, "}"); - if (type == "variable") - register(value); - if (value == "*") - cx.marked = "keyword"; - return cont(maybeAs); - } - function maybeMoreImports(type) { - if (type == ",") - return cont(importSpec, maybeMoreImports); - } - function maybeAs(_type, value) { - if (value == "as") { - cx.marked = "keyword"; - return cont(importSpec); - } - } - function maybeFrom(_type, value) { - if (value == "from") { - cx.marked = "keyword"; - return cont(expression); - } - } - function arrayLiteral(type) { - if (type == "]") - return cont(); - return pass(commasep(expressionNoComma, "]")); - } - function enumdef() { - return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex); - } - function enummember() { - return pass(pattern, maybeAssign); - } - function isContinuedStatement(state, textAfter) { - return state.lastType == "operator" || state.lastType == "," || - isOperatorChar.test(textAfter.charAt(0)) || - /[,.]/.test(textAfter.charAt(0)); - } - function expressionAllowed(stream, state, backUp) { - return state.tokenize == tokenBase && - /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || - (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))); - } - return { - startState: function (basecolumn) { - var state = { - tokenize: tokenBase, - lastType: "sof", - cc: [], - lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), - localVars: parserConfig.localVars, - context: parserConfig.localVars && new Context(null, null, false), - indented: basecolumn || 0 - }; - if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") - state.globalVars = parserConfig.globalVars; - return state; - }, - token: function (stream, state) { - if (stream.sol()) { - if (!state.lexical.hasOwnProperty("align")) - state.lexical.align = false; - state.indented = stream.indentation(); - findFatArrow(stream, state); - } - if (state.tokenize != tokenComment && stream.eatSpace()) - return null; - var style = state.tokenize(stream, state); - if (type == "comment") - return style; - state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; - return parseJS(state, style, type, content, stream); - }, - indent: function (state, textAfter) { - if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) - return CodeMirror.Pass; - if (state.tokenize != tokenBase) - return 0; - var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top; - if (!/^\s*else\b/.test(textAfter)) - for (var i = state.cc.length - 1; i >= 0; --i) { - var c = state.cc[i]; - if (c == poplex) - lexical = lexical.prev; - else if (c != maybeelse && c != popcontext) - break; - } - while ((lexical.type == "stat" || lexical.type == "form") && - (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) && - (top == maybeoperatorComma || top == maybeoperatorNoComma) && - !/^[,\.=+\-*:?[\(]/.test(textAfter)))) - lexical = lexical.prev; - if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") - lexical = lexical.prev; - var type = lexical.type, closing = firstChar == type; - if (type == "vardef") - return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0); - else if (type == "form" && firstChar == "{") - return lexical.indented; - else if (type == "form") - return lexical.indented + indentUnit; - else if (type == "stat") - return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); - else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) - return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); - else if (lexical.align) - return lexical.column + (closing ? 0 : 1); - else - return lexical.indented + (closing ? 0 : indentUnit); - }, - electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, - blockCommentStart: jsonMode ? null : "/*", - blockCommentEnd: jsonMode ? null : "*/", - blockCommentContinue: jsonMode ? null : " * ", - lineComment: jsonMode ? null : "//", - fold: "brace", - closeBrackets: "()[]{}''\"\"``", - helperType: jsonMode ? "json" : "javascript", - jsonldMode: jsonldMode, - jsonMode: jsonMode, - expressionAllowed: expressionAllowed, - skipExpression: function (state) { - var top = state.cc[state.cc.length - 1]; - if (top == expression || top == expressionNoComma) - state.cc.pop(); - } - }; - }); - CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); - CodeMirror.defineMIME("text/javascript", "javascript"); - CodeMirror.defineMIME("text/ecmascript", "javascript"); - CodeMirror.defineMIME("application/javascript", "javascript"); - CodeMirror.defineMIME("application/x-javascript", "javascript"); - CodeMirror.defineMIME("application/ecmascript", "javascript"); - CodeMirror.defineMIME("application/json", { name: "javascript", json: true }); - CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true }); - CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true }); - CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true }); - CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); - CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); -}); - -// Copyright 2026 The Chromium Authors -var ExperimentName; -(function (ExperimentName) { - ExperimentName["ALL"] = "*"; - ExperimentName["CAPTURE_NODE_CREATION_STACKS"] = "capture-node-creation-stacks"; - ExperimentName["LIVE_HEAP_PROFILE"] = "live-heap-profile"; - ExperimentName["PROTOCOL_MONITOR"] = "protocol-monitor"; - ExperimentName["SAMPLING_HEAP_PROFILER_TIMELINE"] = "sampling-heap-profiler-timeline"; - ExperimentName["SHOW_OPTION_TO_EXPOSE_INTERNALS_IN_HEAP_SNAPSHOT"] = "show-option-to-expose-internals-in-heap-snapshot"; - ExperimentName["TIMELINE_INVALIDATION_TRACKING"] = "timeline-invalidation-tracking"; - ExperimentName["TIMELINE_SHOW_ALL_EVENTS"] = "timeline-show-all-events"; - ExperimentName["APCA"] = "apca"; - ExperimentName["FONT_EDITOR"] = "font-editor"; - ExperimentName["FULL_ACCESSIBILITY_TREE"] = "full-accessibility-tree"; - ExperimentName["EXPERIMENTAL_COOKIE_FEATURES"] = "experimental-cookie-features"; - ExperimentName["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints"; - ExperimentName["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes"; - ExperimentName["TIMELINE_DEBUG_MODE"] = "timeline-debug-mode"; - ExperimentName["DURABLE_MESSAGES"] = "durable-messages"; - ExperimentName["JPEG_XL"] = "jpeg-xl"; -})(ExperimentName || (ExperimentName = {})); - -// Copyright 2016 The Chromium Authors -class FormattedContentBuilder { - indentString; - #lastOriginalPosition = 0; - #formattedContent = []; - #formattedContentLength = 0; - #lastFormattedPosition = 0; - #nestingLevel = 0; - #newLines = 0; - #enforceSpaceBetweenWords = true; - #softSpace = false; - #hardSpaces = 0; - #cachedIndents = new Map(); - #canBeIdentifierOrNumber = /[$\u200C\u200D\p{ID_Continue}]/u; - mapping = { original: [0], formatted: [0] }; - constructor(indentString) { - this.indentString = indentString; - } - setEnforceSpaceBetweenWords(value) { - const oldValue = this.#enforceSpaceBetweenWords; - this.#enforceSpaceBetweenWords = value; - return oldValue; - } - addToken(token, offset) { - if (this.#enforceSpaceBetweenWords && !this.#hardSpaces && !this.#softSpace) { - const lastCharOfLastToken = this.#formattedContent.at(-1)?.at(-1) ?? ''; - if (this.#canBeIdentifierOrNumber.test(lastCharOfLastToken) && this.#canBeIdentifierOrNumber.test(token)) { - this.addSoftSpace(); - } - } - this.#appendFormatting(); - this.#addMappingIfNeeded(offset); - this.#addText(token); - } - addSoftSpace() { - if (!this.#hardSpaces) { - this.#softSpace = true; - } - } - addHardSpace() { - this.#softSpace = false; - ++this.#hardSpaces; - } - addNewLine(noSquash) { - if (!this.#formattedContentLength) { - return; - } - if (noSquash) { - ++this.#newLines; - } - else { - this.#newLines = this.#newLines || 1; - } - } - increaseNestingLevel() { - this.#nestingLevel += 1; - } - decreaseNestingLevel() { - if (this.#nestingLevel > 0) { - this.#nestingLevel -= 1; - } - } - content() { - return this.#formattedContent.join('') + (this.#newLines ? '\n' : ''); - } - #appendFormatting() { - if (this.#newLines) { - for (let i = 0; i < this.#newLines; ++i) { - this.#addText('\n'); - } - this.#addText(this.#indent()); - } - else if (this.#softSpace) { - this.#addText(' '); - } - if (this.#hardSpaces) { - for (let i = 0; i < this.#hardSpaces; ++i) { - this.#addText(' '); - } - } - this.#newLines = 0; - this.#softSpace = false; - this.#hardSpaces = 0; - } - #indent() { - const cachedValue = this.#cachedIndents.get(this.#nestingLevel); - if (cachedValue) { - return cachedValue; - } - let fullIndent = ''; - for (let i = 0; i < this.#nestingLevel; ++i) { - fullIndent += this.indentString; - } - if (this.#nestingLevel <= 20) { - this.#cachedIndents.set(this.#nestingLevel, fullIndent); - } - return fullIndent; - } - #addText(text) { - this.#formattedContent.push(text); - this.#formattedContentLength += text.length; - } - #addMappingIfNeeded(originalPosition) { - if (originalPosition - this.#lastOriginalPosition === this.#formattedContentLength - this.#lastFormattedPosition) { - return; - } - this.mapping.original.push(originalPosition); - this.#lastOriginalPosition = originalPosition; - this.mapping.formatted.push(this.#formattedContentLength); - this.#lastFormattedPosition = this.#formattedContentLength; - } -} - -var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; -var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191]; -var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; -var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -}; -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; -var keywords$1 = { - 5: ecma5AndLessKeywords, - "5module": ecma5AndLessKeywords + " export import", - 6: ecma5AndLessKeywords + " const class extends export import super" -}; -var keywordRelationalOperator = /^in(stanceof)?$/; -var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { - return false; - } - pos += set[i + 1]; - if (pos >= code) { - return true; - } - } - return false; -} -function isIdentifierStart(code, astral) { - if (code < 65) { - return code === 36; - } - if (code < 91) { - return true; - } - if (code < 97) { - return code === 95; - } - if (code < 123) { - return true; - } - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - if (astral === false) { - return false; - } - return isInAstralSet(code, astralIdentifierStartCodes); -} -function isIdentifierChar(code, astral) { - if (code < 48) { - return code === 36; - } - if (code < 58) { - return true; - } - if (code < 65) { - return false; - } - if (code < 91) { - return true; - } - if (code < 97) { - return code === 95; - } - if (code < 123) { - return true; - } - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - if (astral === false) { - return false; - } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} -var TokenType = function TokenType(label, conf) { - if (conf === void 0) - conf = {}; - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; -}; -function binop(name, prec) { - return new TokenType(name, { beforeExpr: true, binop: prec }); -} -var beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true }; -var keywords = {}; -function kw(name, options) { - if (options === void 0) - options = {}; - options.keyword = name; - return keywords[name] = new TokenType(name, options); -} -var types$1 = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - privateId: new TokenType("privateId", startsExpr), - eof: new TokenType("eof"), - bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }), - braceR: new TokenType("}"), - parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }), - eq: new TokenType("=", { beforeExpr: true, isAssign: true }), - assign: new TokenType("_=", { beforeExpr: true, isAssign: true }), - incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), - prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", { beforeExpr: true }), - coalesce: binop("??", 1), - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", { isLoop: true, beforeExpr: true }), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", { isLoop: true }), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", { isLoop: true }), - _with: kw("with"), - _new: kw("new", { beforeExpr: true, startsExpr: true }), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import", startsExpr), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", { beforeExpr: true, binop: 7 }), - _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }), - _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), - _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }), - _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }) -}; -var lineBreak = /\r\n?|\n|\u2028|\u2029/; -var lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - return code === 10 || code === 13 || code === 0x2028 || code === 0x2029; -} -function nextLineBreak(code, from, end) { - if (end === void 0) - end = code.length; - for (var i = from; i < end; i++) { - var next = code.charCodeAt(i); - if (isNewLine(next)) { - return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1; - } - } - return -1; -} -var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; -var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -var ref = Object.prototype; -var hasOwnProperty = ref.hasOwnProperty; -var toString = ref.toString; -var hasOwn = Object.hasOwn || (function (obj, propName) { - return (hasOwnProperty.call(obj, propName)); -}); -var isArray = Array.isArray || (function (obj) { - return (toString.call(obj) === "[object Array]"); -}); -function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"); -} -function codePointToString(code) { - if (code <= 0xFFFF) { - return String.fromCharCode(code); - } - code -= 0x10000; - return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00); -} -var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; -var Position = function Position(line, col) { - this.line = line; - this.column = col; -}; -Position.prototype.offset = function offset(n) { - return new Position(this.line, this.column + n); -}; -var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { - this.source = p.sourceFile; - } -}; -function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - var nextBreak = nextLineBreak(input, cur, offset); - if (nextBreak < 0) { - return new Position(line, offset - cur); - } - ++line; - cur = nextBreak; - } -} -var defaultOptions = { - ecmaVersion: null, - sourceType: "script", - onInsertedSemicolon: null, - onTrailingComma: null, - allowReserved: null, - allowReturnOutsideFunction: false, - allowImportExportEverywhere: false, - allowAwaitOutsideFunction: null, - allowSuperOutsideMethod: null, - allowHashBang: false, - checkPrivateFields: true, - locations: false, - onToken: null, - onComment: null, - ranges: false, - program: null, - sourceFile: null, - directSourceFile: null, - preserveParens: false -}; -var warnedAboutEcmaVersion = false; -function getOptions(opts) { - var options = {}; - for (var opt in defaultOptions) { - options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; - } - if (options.ecmaVersion === "latest") { - options.ecmaVersion = 1e8; - } - else if (options.ecmaVersion == null) { - if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { - warnedAboutEcmaVersion = true; - console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); - } - options.ecmaVersion = 11; - } - else if (options.ecmaVersion >= 2015) { - options.ecmaVersion -= 2009; - } - if (options.allowReserved == null) { - options.allowReserved = options.ecmaVersion < 5; - } - if (!opts || opts.allowHashBang == null) { - options.allowHashBang = options.ecmaVersion >= 14; - } - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) { - options.onComment = pushComment(options, options.onComment); - } - return options; -} -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) { - comment.loc = new SourceLocation(this, startLoc, endLoc); - } - if (options.ranges) { - comment.range = [start, end]; - } - array.push(comment); - }; -} -var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; -function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0); -} -var BIND_NONE = 0, -BIND_VAR = 1, -BIND_LEXICAL = 2, -BIND_FUNCTION = 3, -BIND_SIMPLE_CATCH = 4, -BIND_OUTSIDE = 5; -var Parser$1 = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); - var reserved = ""; - if (options.allowReserved !== true) { - reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; - if (options.sourceType === "module") { - reserved += " await"; - } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - this.containsEsc = false; - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } - else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - this.type = types$1.eof; - this.value = null; - this.start = this.end = this.pos; - this.startLoc = this.endLoc = this.curPosition(); - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - this.context = this.initialContext(); - this.exprAllowed = true; - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - this.potentialArrowAt = -1; - this.potentialArrowInForAwait = false; - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - this.labels = []; - this.undefinedExports = Object.create(null); - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") { - this.skipLineComment(2); - } - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - this.regexpState = null; - this.privateNameStack = []; -}; -var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } }; -Parser$1.prototype.parse = function parse() { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node); -}; -prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; }; -prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit; }; -prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit; }; -prototypeAccessors.canAwait.get = function () { - for (var i = this.scopeStack.length - 1; i >= 0; i--) { - var scope = this.scopeStack[i]; - if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { - return false; - } - if (scope.flags & SCOPE_FUNCTION) { - return (scope.flags & SCOPE_ASYNC) > 0; - } - } - return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction; -}; -prototypeAccessors.allowSuper.get = function () { - var ref = this.currentThisScope(); - var flags = ref.flags; - var inClassFieldInit = ref.inClassFieldInit; - return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod; -}; -prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; }; -prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()); }; -prototypeAccessors.allowNewDotTarget.get = function () { - var ref = this.currentThisScope(); - var flags = ref.flags; - var inClassFieldInit = ref.inClassFieldInit; - return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit; -}; -prototypeAccessors.inClassStaticBlock.get = function () { - return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0; -}; -Parser$1.extend = function extend() { - var plugins = [], len = arguments.length; - while (len--) - plugins[len] = arguments[len]; - var cls = this; - for (var i = 0; i < plugins.length; i++) { - cls = plugins[i](cls); - } - return cls; -}; -Parser$1.parse = function parse(input, options) { - return new this(options, input).parse(); -}; -Parser$1.parseExpressionAt = function parseExpressionAt(input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression(); -}; -Parser$1.tokenizer = function tokenizer(input, options) { - return new this(options, input); -}; -Object.defineProperties(Parser$1.prototype, prototypeAccessors); -var pp$9 = Parser$1.prototype; -var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/; -pp$9.strictDirective = function (start) { - if (this.options.ecmaVersion < 5) { - return false; - } - for (;;) { - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - var match = literal.exec(this.input.slice(start)); - if (!match) { - return false; - } - if ((match[1] || match[2]) === "use strict") { - skipWhiteSpace.lastIndex = start + match[0].length; - var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; - var next = this.input.charAt(end); - return next === ";" || next === "}" || - (lineBreak.test(spaceAfter[0]) && - !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")); - } - start += match[0].length; - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - if (this.input[start] === ";") { - start++; - } - } -}; -pp$9.eat = function (type) { - if (this.type === type) { - this.next(); - return true; - } - else { - return false; - } -}; -pp$9.isContextual = function (name) { - return this.type === types$1.name && this.value === name && !this.containsEsc; -}; -pp$9.eatContextual = function (name) { - if (!this.isContextual(name)) { - return false; - } - this.next(); - return true; -}; -pp$9.expectContextual = function (name) { - if (!this.eatContextual(name)) { - this.unexpected(); - } -}; -pp$9.canInsertSemicolon = function () { - return this.type === types$1.eof || - this.type === types$1.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; -pp$9.insertSemicolon = function () { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) { - this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); - } - return true; - } -}; -pp$9.semicolon = function () { - if (!this.eat(types$1.semi) && !this.insertSemicolon()) { - this.unexpected(); - } -}; -pp$9.afterTrailingComma = function (tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) { - this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); - } - if (!notNext) { - this.next(); - } - return true; - } -}; -pp$9.expect = function (type) { - this.eat(type) || this.unexpected(); -}; -pp$9.unexpected = function (pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); -}; -var DestructuringErrors = function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; -}; -pp$9.checkPatternErrors = function (refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { - return; - } - if (refDestructuringErrors.trailingComma > -1) { - this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); - } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { - this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); - } -}; -pp$9.checkExpressionErrors = function (refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { - return false; - } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { - return shorthandAssign >= 0 || doubleProto >= 0; - } - if (shorthandAssign >= 0) { - this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); - } - if (doubleProto >= 0) { - this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); - } -}; -pp$9.checkYieldAwaitInDefaultParams = function () { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) { - this.raise(this.yieldPos, "Yield expression cannot be a default value"); - } - if (this.awaitPos) { - this.raise(this.awaitPos, "Await expression cannot be a default value"); - } -}; -pp$9.isSimpleAssignTarget = function (expr) { - if (expr.type === "ParenthesizedExpression") { - return this.isSimpleAssignTarget(expr.expression); - } - return expr.type === "Identifier" || expr.type === "MemberExpression"; -}; -var pp$8 = Parser$1.prototype; -pp$8.parseTopLevel = function (node) { - var exports$1 = Object.create(null); - if (!node.body) { - node.body = []; - } - while (this.type !== types$1.eof) { - var stmt = this.parseStatement(null, true, exports$1); - node.body.push(stmt); - } - if (this.inModule) { - for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) { - var name = list[i]; - this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } - } - this.adaptDirectivePrologue(node.body); - this.next(); - node.sourceType = this.options.sourceType; - return this.finishNode(node, "Program"); -}; -var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" }; -pp$8.isLet = function (context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { - return false; - } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 91 || nextCh === 92) { - return true; - } - if (context) { - return false; - } - if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { - return true; - } - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { - ++pos; - } - if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { - return true; - } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { - return true; - } - } - return false; -}; -pp$8.isAsyncFunction = function () { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) { - return false; - } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, after; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || - !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00)); -}; -pp$8.parseStatement = function (context, topLevel, exports$1) { - var starttype = this.type, node = this.startNode(), kind; - if (this.isLet(context)) { - starttype = types$1._var; - kind = "let"; - } - switch (starttype) { - case types$1._break: - case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword); - case types$1._debugger: return this.parseDebuggerStatement(node); - case types$1._do: return this.parseDoStatement(node); - case types$1._for: return this.parseForStatement(node); - case types$1._function: - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { - this.unexpected(); - } - return this.parseFunctionStatement(node, false, !context); - case types$1._class: - if (context) { - this.unexpected(); - } - return this.parseClass(node, true); - case types$1._if: return this.parseIfStatement(node); - case types$1._return: return this.parseReturnStatement(node); - case types$1._switch: return this.parseSwitchStatement(node); - case types$1._throw: return this.parseThrowStatement(node); - case types$1._try: return this.parseTryStatement(node); - case types$1._const: - case types$1._var: - kind = kind || this.value; - if (context && kind !== "var") { - this.unexpected(); - } - return this.parseVarStatement(node, kind); - case types$1._while: return this.parseWhileStatement(node); - case types$1._with: return this.parseWithStatement(node); - case types$1.braceL: return this.parseBlock(true, node); - case types$1.semi: return this.parseEmptyStatement(node); - case types$1._export: - case types$1._import: - if (this.options.ecmaVersion > 10 && starttype === types$1._import) { - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 40 || nextCh === 46) - { - return this.parseExpressionStatement(node, this.parseExpression()); - } - } - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) { - this.raise(this.start, "'import' and 'export' may only appear at the top level"); - } - if (!this.inModule) { - this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); - } - } - return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1); - default: - if (this.isAsyncFunction()) { - if (context) { - this.unexpected(); - } - this.next(); - return this.parseFunctionStatement(node, true, !context); - } - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) { - return this.parseLabeledStatement(node, maybeName, expr, context); - } - else { - return this.parseExpressionStatement(node, expr); - } - } -}; -pp$8.parseBreakContinueStatement = function (node, keyword) { - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types$1.semi) || this.insertSemicolon()) { - node.label = null; - } - else if (this.type !== types$1.name) { - this.unexpected(); - } - else { - node.label = this.parseIdent(); - this.semicolon(); - } - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { - break; - } - if (node.label && isBreak) { - break; - } - } - } - if (i === this.labels.length) { - this.raise(node.start, "Unsyntactic " + keyword); - } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); -}; -pp$8.parseDebuggerStatement = function (node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); -}; -pp$8.parseDoStatement = function (node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types$1._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) { - this.eat(types$1.semi); - } - else { - this.semicolon(); - } - return this.finishNode(node, "DoWhileStatement"); -}; -pp$8.parseForStatement = function (node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types$1.parenL); - if (this.type === types$1.semi) { - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - return this.parseFor(node, null); - } - var isLet = this.isLet(); - if (this.type === types$1._var || this.type === types$1._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types$1._in) { - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - } - else { - node.await = awaitAt > -1; - } - } - return this.parseForIn(node, init$1); - } - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - return this.parseFor(node, init$1); - } - var startsWithLet = this.isContextual("let"), isForOf = false; - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors); - if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types$1._in) { - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - } - else { - node.await = awaitAt > -1; - } - } - if (startsWithLet && isForOf) { - this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLValPattern(init); - return this.parseForIn(node, init); - } - else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - return this.parseFor(node, init); -}; -pp$8.parseFunctionStatement = function (node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync); -}; -pp$8.parseIfStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement"); -}; -pp$8.parseReturnStatement = function (node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.start, "'return' outside of function"); - } - this.next(); - if (this.eat(types$1.semi) || this.insertSemicolon()) { - node.argument = null; - } - else { - node.argument = this.parseExpression(); - this.semicolon(); - } - return this.finishNode(node, "ReturnStatement"); -}; -pp$8.parseSwitchStatement = function (node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types$1.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - var cur; - for (var sawDefault = false; this.type !== types$1.braceR;) { - if (this.type === types$1._case || this.type === types$1._default) { - var isCase = this.type === types$1._case; - if (cur) { - this.finishNode(cur, "SwitchCase"); - } - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } - else { - if (sawDefault) { - this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); - } - sawDefault = true; - cur.test = null; - } - this.expect(types$1.colon); - } - else { - if (!cur) { - this.unexpected(); - } - cur.consequent.push(this.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { - this.finishNode(cur, "SwitchCase"); - } - this.next(); - this.labels.pop(); - return this.finishNode(node, "SwitchStatement"); -}; -pp$8.parseThrowStatement = function (node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) { - this.raise(this.lastTokEnd, "Illegal newline after throw"); - } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); -}; -var empty$1 = []; -pp$8.parseCatchClauseParam = function () { - var param = this.parseBindingAtom(); - var simple = param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types$1.parenR); - return param; -}; -pp$8.parseTryStatement = function (node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types$1._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types$1.parenL)) { - clause.param = this.parseCatchClauseParam(); - } - else { - if (this.options.ecmaVersion < 10) { - this.unexpected(); - } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } - return this.finishNode(node, "TryStatement"); -}; -pp$8.parseVarStatement = function (node, kind, allowMissingInitializer) { - this.next(); - this.parseVar(node, false, kind, allowMissingInitializer); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); -}; -pp$8.parseWhileStatement = function (node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement"); -}; -pp$8.parseWithStatement = function (node) { - if (this.strict) { - this.raise(this.start, "'with' in strict mode"); - } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement"); -}; -pp$8.parseEmptyStatement = function (node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); -}; -pp$8.parseLabeledStatement = function (node, maybeName, expr, context) { - for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) { - var label = list[i$1]; - if (label.name === maybeName) { - this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } - } - var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this.labels[i]; - if (label$1.statementStart === node.start) { - label$1.statementStart = this.start; - label$1.kind = kind; - } - else { - break; - } - } - this.labels.push({ name: maybeName, kind: kind, statementStart: this.start }); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); -}; -pp$8.parseExpressionStatement = function (node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); -}; -pp$8.parseBlock = function (createNewLexicalScope, node, exitStrict) { - if (createNewLexicalScope === void 0) - createNewLexicalScope = true; - if (node === void 0) - node = this.startNode(); - node.body = []; - this.expect(types$1.braceL); - if (createNewLexicalScope) { - this.enterScope(0); - } - while (this.type !== types$1.braceR) { - var stmt = this.parseStatement(null); - node.body.push(stmt); - } - if (exitStrict) { - this.strict = false; - } - this.next(); - if (createNewLexicalScope) { - this.exitScope(); - } - return this.finishNode(node, "BlockStatement"); -}; -pp$8.parseFor = function (node, init) { - node.init = init; - this.expect(types$1.semi); - node.test = this.type === types$1.semi ? null : this.parseExpression(); - this.expect(types$1.semi); - node.update = this.type === types$1.parenR ? null : this.parseExpression(); - this.expect(types$1.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement"); -}; -pp$8.parseForIn = function (node, init) { - var isForIn = this.type === types$1._in; - this.next(); - if (init.type === "VariableDeclaration" && - init.declarations[0].init != null && - (!isForIn || - this.options.ecmaVersion < 8 || - this.strict || - init.kind !== "var" || - init.declarations[0].id.type !== "Identifier")) { - this.raise(init.start, ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer")); - } - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types$1.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); -}; -pp$8.parseVar = function (node, isFor, kind, allowMissingInitializer) { - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl, kind); - if (this.eat(types$1.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } - else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { - this.unexpected(); - } - else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } - else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types$1.comma)) { - break; - } - } - return node; -}; -pp$8.parseVarId = function (decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); -}; -var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; -pp$8.parseFunction = function (node, statement, allowExpressionBody, isAsync, forInit) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT)) { - this.unexpected(); - } - node.generator = this.eat(types$1.star); - } - if (this.options.ecmaVersion >= 8) { - node.async = !!isAsync; - } - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - { - this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); - } - } - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - if (!(statement & FUNC_STATEMENT)) { - node.id = this.type === types$1.name ? this.parseIdent() : null; - } - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false, forInit); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression"); -}; -pp$8.parseFunctionParams = function (node) { - this.expect(types$1.parenL); - node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); -}; -pp$8.parseClass = function (node, isStatement) { - this.next(); - var oldStrict = this.strict; - this.strict = true; - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var privateNameMap = this.enterClassBody(); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types$1.braceL); - while (this.type !== types$1.braceR) { - var element = this.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { - this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); - } - hadConstructor = true; - } - else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { - this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared")); - } - } - } - this.strict = oldStrict; - this.next(); - node.body = this.finishNode(classBody, "ClassBody"); - this.exitClassBody(); - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); -}; -pp$8.parseClassElement = function (constructorAllowsSuper) { - if (this.eat(types$1.semi)) { - return null; - } - var ecmaVersion = this.options.ecmaVersion; - var node = this.startNode(); - var keyName = ""; - var isGenerator = false; - var isAsync = false; - var kind = "method"; - var isStatic = false; - if (this.eatContextual("static")) { - if (ecmaVersion >= 13 && this.eat(types$1.braceL)) { - this.parseClassStaticBlock(node); - return node; - } - if (this.isClassElementNameStart() || this.type === types$1.star) { - isStatic = true; - } - else { - keyName = "static"; - } - } - node.static = isStatic; - if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) { - if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { - isAsync = true; - } - else { - keyName = "async"; - } - } - if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) { - isGenerator = true; - } - if (!keyName && !isAsync && !isGenerator) { - var lastValue = this.value; - if (this.eatContextual("get") || this.eatContextual("set")) { - if (this.isClassElementNameStart()) { - kind = lastValue; - } - else { - keyName = lastValue; - } - } - } - if (keyName) { - node.computed = false; - node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); - node.key.name = keyName; - this.finishNode(node.key, "Identifier"); - } - else { - this.parseClassElementName(node); - } - if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { - var isConstructor = !node.static && checkKeyName(node, "constructor"); - var allowsDirectSuper = isConstructor && constructorAllowsSuper; - if (isConstructor && kind !== "method") { - this.raise(node.key.start, "Constructor can't have get/set modifier"); - } - node.kind = isConstructor ? "constructor" : kind; - this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); - } - else { - this.parseClassField(node); - } - return node; -}; -pp$8.isClassElementNameStart = function () { - return (this.type === types$1.name || - this.type === types$1.privateId || - this.type === types$1.num || - this.type === types$1.string || - this.type === types$1.bracketL || - this.type.keyword); -}; -pp$8.parseClassElementName = function (element) { - if (this.type === types$1.privateId) { - if (this.value === "constructor") { - this.raise(this.start, "Classes can't have an element named '#constructor'"); - } - element.computed = false; - element.key = this.parsePrivateIdent(); - } - else { - this.parsePropertyName(element); - } -}; -pp$8.parseClassMethod = function (method, isGenerator, isAsync, allowsDirectSuper) { - var key = method.key; - if (method.kind === "constructor") { - if (isGenerator) { - this.raise(key.start, "Constructor can't be a generator"); - } - if (isAsync) { - this.raise(key.start, "Constructor can't be an async method"); - } - } - else if (method.static && checkKeyName(method, "prototype")) { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && value.params.length !== 0) { - this.raiseRecoverable(value.start, "getter should have no params"); - } - if (method.kind === "set" && value.params.length !== 1) { - this.raiseRecoverable(value.start, "setter should have exactly one param"); - } - if (method.kind === "set" && value.params[0].type === "RestElement") { - this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); - } - return this.finishNode(method, "MethodDefinition"); -}; -pp$8.parseClassField = function (field) { - if (checkKeyName(field, "constructor")) { - this.raise(field.key.start, "Classes can't have a field named 'constructor'"); - } - else if (field.static && checkKeyName(field, "prototype")) { - this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); - } - if (this.eat(types$1.eq)) { - var scope = this.currentThisScope(); - var inClassFieldInit = scope.inClassFieldInit; - scope.inClassFieldInit = true; - field.value = this.parseMaybeAssign(); - scope.inClassFieldInit = inClassFieldInit; - } - else { - field.value = null; - } - this.semicolon(); - return this.finishNode(field, "PropertyDefinition"); -}; -pp$8.parseClassStaticBlock = function (node) { - node.body = []; - var oldLabels = this.labels; - this.labels = []; - this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); - while (this.type !== types$1.braceR) { - var stmt = this.parseStatement(null); - node.body.push(stmt); - } - this.next(); - this.exitScope(); - this.labels = oldLabels; - return this.finishNode(node, "StaticBlock"); -}; -pp$8.parseClassId = function (node, isStatement) { - if (this.type === types$1.name) { - node.id = this.parseIdent(); - if (isStatement) { - this.checkLValSimple(node.id, BIND_LEXICAL, false); - } - } - else { - if (isStatement === true) { - this.unexpected(); - } - node.id = null; - } -}; -pp$8.parseClassSuper = function (node) { - node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; -}; -pp$8.enterClassBody = function () { - var element = { declared: Object.create(null), used: [] }; - this.privateNameStack.push(element); - return element.declared; -}; -pp$8.exitClassBody = function () { - var ref = this.privateNameStack.pop(); - var declared = ref.declared; - var used = ref.used; - if (!this.options.checkPrivateFields) { - return; - } - var len = this.privateNameStack.length; - var parent = len === 0 ? null : this.privateNameStack[len - 1]; - for (var i = 0; i < used.length; ++i) { - var id = used[i]; - if (!hasOwn(declared, id.name)) { - if (parent) { - parent.used.push(id); - } - else { - this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class")); - } - } - } -}; -function isPrivateNameConflicted(privateNameMap, element) { - var name = element.key.name; - var curr = privateNameMap[name]; - var next = "true"; - if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { - next = (element.static ? "s" : "i") + element.kind; - } - if (curr === "iget" && next === "iset" || - curr === "iset" && next === "iget" || - curr === "sget" && next === "sset" || - curr === "sset" && next === "sget") { - privateNameMap[name] = "true"; - return false; - } - else if (!curr) { - privateNameMap[name] = next; - return false; - } - else { - return true; - } -} -function checkKeyName(node, name) { - var computed = node.computed; - var key = node.key; - return !computed && (key.type === "Identifier" && key.name === name || - key.type === "Literal" && key.value === name); -} -pp$8.parseExportAllDeclaration = function (node, exports$1) { - if (this.options.ecmaVersion >= 11) { - if (this.eatContextual("as")) { - node.exported = this.parseModuleExportName(); - this.checkExport(exports$1, node.exported, this.lastTokStart); - } - else { - node.exported = null; - } - } - this.expectContextual("from"); - if (this.type !== types$1.string) { - this.unexpected(); - } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration"); -}; -pp$8.parseExport = function (node, exports$1) { - this.next(); - if (this.eat(types$1.star)) { - return this.parseExportAllDeclaration(node, exports$1); - } - if (this.eat(types$1._default)) { - this.checkExport(exports$1, "default", this.lastTokStart); - node.declaration = this.parseExportDefaultDeclaration(); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - if (this.shouldParseExportStatement()) { - node.declaration = this.parseExportDeclaration(node); - if (node.declaration.type === "VariableDeclaration") { - this.checkVariableExport(exports$1, node.declaration.declarations); - } - else { - this.checkExport(exports$1, node.declaration.id, node.declaration.id.start); - } - node.specifiers = []; - node.source = null; - } - else { - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports$1); - if (this.eatContextual("from")) { - if (this.type !== types$1.string) { - this.unexpected(); - } - node.source = this.parseExprAtom(); - } - else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - var spec = list[i]; - this.checkUnreserved(spec.local); - this.checkLocalExport(spec.local); - if (spec.local.type === "Literal") { - this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); - } - } - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration"); -}; -pp$8.parseExportDeclaration = function (node) { - return this.parseStatement(null); -}; -pp$8.parseExportDefaultDeclaration = function () { - var isAsync; - if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { - this.next(); - } - return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } - else if (this.type === types$1._class) { - var cNode = this.startNode(); - return this.parseClass(cNode, "nullableID"); - } - else { - var declaration = this.parseMaybeAssign(); - this.semicolon(); - return declaration; - } -}; -pp$8.checkExport = function (exports$1, name, pos) { - if (!exports$1) { - return; - } - if (typeof name !== "string") { - name = name.type === "Identifier" ? name.name : name.value; - } - if (hasOwn(exports$1, name)) { - this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); - } - exports$1[name] = true; -}; -pp$8.checkPatternExport = function (exports$1, pat) { - var type = pat.type; - if (type === "Identifier") { - this.checkExport(exports$1, pat, pat.start); - } - else if (type === "ObjectPattern") { - for (var i = 0, list = pat.properties; i < list.length; i += 1) { - var prop = list[i]; - this.checkPatternExport(exports$1, prop); - } - } - else if (type === "ArrayPattern") { - for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - if (elt) { - this.checkPatternExport(exports$1, elt); - } - } - } - else if (type === "Property") { - this.checkPatternExport(exports$1, pat.value); - } - else if (type === "AssignmentPattern") { - this.checkPatternExport(exports$1, pat.left); - } - else if (type === "RestElement") { - this.checkPatternExport(exports$1, pat.argument); - } - else if (type === "ParenthesizedExpression") { - this.checkPatternExport(exports$1, pat.expression); - } -}; -pp$8.checkVariableExport = function (exports$1, decls) { - if (!exports$1) { - return; - } - for (var i = 0, list = decls; i < list.length; i += 1) { - var decl = list[i]; - this.checkPatternExport(exports$1, decl.id); - } -}; -pp$8.shouldParseExportStatement = function () { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction(); -}; -pp$8.parseExportSpecifier = function (exports$1) { - var node = this.startNode(); - node.local = this.parseModuleExportName(); - node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; - this.checkExport(exports$1, node.exported, node.exported.start); - return this.finishNode(node, "ExportSpecifier"); -}; -pp$8.parseExportSpecifiers = function (exports$1) { - var nodes = [], first = true; - this.expect(types$1.braceL); - while (!this.eat(types$1.braceR)) { - if (!first) { - this.expect(types$1.comma); - if (this.afterTrailingComma(types$1.braceR)) { - break; - } - } - else { - first = false; - } - nodes.push(this.parseExportSpecifier(exports$1)); - } - return nodes; -}; -pp$8.parseImport = function (node) { - this.next(); - if (this.type === types$1.string) { - node.specifiers = empty$1; - node.source = this.parseExprAtom(); - } - else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); -}; -pp$8.parseImportSpecifier = function () { - var node = this.startNode(); - node.imported = this.parseModuleExportName(); - if (this.eatContextual("as")) { - node.local = this.parseIdent(); - } - else { - this.checkUnreserved(node.imported); - node.local = node.imported; - } - this.checkLValSimple(node.local, BIND_LEXICAL); - return this.finishNode(node, "ImportSpecifier"); -}; -pp$8.parseImportDefaultSpecifier = function () { - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLValSimple(node.local, BIND_LEXICAL); - return this.finishNode(node, "ImportDefaultSpecifier"); -}; -pp$8.parseImportNamespaceSpecifier = function () { - var node = this.startNode(); - this.next(); - this.expectContextual("as"); - node.local = this.parseIdent(); - this.checkLValSimple(node.local, BIND_LEXICAL); - return this.finishNode(node, "ImportNamespaceSpecifier"); -}; -pp$8.parseImportSpecifiers = function () { - var nodes = [], first = true; - if (this.type === types$1.name) { - nodes.push(this.parseImportDefaultSpecifier()); - if (!this.eat(types$1.comma)) { - return nodes; - } - } - if (this.type === types$1.star) { - nodes.push(this.parseImportNamespaceSpecifier()); - return nodes; - } - this.expect(types$1.braceL); - while (!this.eat(types$1.braceR)) { - if (!first) { - this.expect(types$1.comma); - if (this.afterTrailingComma(types$1.braceR)) { - break; - } - } - else { - first = false; - } - nodes.push(this.parseImportSpecifier()); - } - return nodes; -}; -pp$8.parseModuleExportName = function () { - if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { - var stringLiteral = this.parseLiteral(this.value); - if (loneSurrogate.test(stringLiteral.value)) { - this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); - } - return stringLiteral; - } - return this.parseIdent(true); -}; -pp$8.adaptDirectivePrologue = function (statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } -}; -pp$8.isDirectiveCandidate = function (statement) { - return (this.options.ecmaVersion >= 5 && - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - (this.input[statement.start] === "\"" || this.input[statement.start] === "'")); -}; -var pp$7 = Parser$1.prototype; -pp$7.toAssignable = function (node, isBinding, refDestructuringErrors) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") { - this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); - } - break; - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - break; - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { - this.checkPatternErrors(refDestructuringErrors, true); - } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - this.toAssignable(prop, isBinding); - if (prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) { - this.raise(prop.argument.start, "Unexpected token"); - } - } - break; - case "Property": - if (node.kind !== "init") { - this.raise(node.key.start, "Object pattern can't contain getter or setter"); - } - this.toAssignable(node.value, isBinding); - break; - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { - this.checkPatternErrors(refDestructuringErrors, true); - } - this.toAssignableList(node.elements, isBinding); - break; - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") { - this.raise(node.argument.start, "Rest elements cannot have a default value"); - } - break; - case "AssignmentExpression": - if (node.operator !== "=") { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - break; - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break; - case "ChainExpression": - this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); - break; - case "MemberExpression": - if (!isBinding) { - break; - } - default: - this.raise(node.start, "Assigning to rvalue"); - } - } - else if (refDestructuringErrors) { - this.checkPatternErrors(refDestructuringErrors, true); - } - return node; -}; -pp$7.toAssignableList = function (exprList, isBinding) { - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { - this.toAssignable(elt, isBinding); - } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") { - this.unexpected(last.argument.start); - } - } - return exprList; -}; -pp$7.parseSpread = function (refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement"); -}; -pp$7.parseRestBinding = function () { - var node = this.startNode(); - this.next(); - if (this.options.ecmaVersion === 6 && this.type !== types$1.name) { - this.unexpected(); - } - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); -}; -pp$7.parseBindingAtom = function () { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types$1.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types$1.bracketR, true, true); - return this.finishNode(node, "ArrayPattern"); - case types$1.braceL: - return this.parseObj(true); - } - } - return this.parseIdent(); -}; -pp$7.parseBindingList = function (close, allowEmpty, allowTrailingComma, allowModifiers) { - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { - first = false; - } - else { - this.expect(types$1.comma); - } - if (allowEmpty && this.type === types$1.comma) { - elts.push(null); - } - else if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } - else if (this.type === types$1.ellipsis) { - var rest = this.parseRestBinding(); - this.parseBindingListItem(rest); - elts.push(rest); - if (this.type === types$1.comma) { - this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); - } - this.expect(close); - break; - } - else { - elts.push(this.parseAssignableListItem(allowModifiers)); - } - } - return elts; -}; -pp$7.parseAssignableListItem = function (allowModifiers) { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - return elem; -}; -pp$7.parseBindingListItem = function (param) { - return param; -}; -pp$7.parseMaybeDefault = function (startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { - return left; - } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); -}; -pp$7.checkLValSimple = function (expr, bindingType, checkClashes) { - if (bindingType === void 0) - bindingType = BIND_NONE; - var isBind = bindingType !== BIND_NONE; - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) { - this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); - } - if (isBind) { - if (bindingType === BIND_LEXICAL && expr.name === "let") { - this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); - } - if (checkClashes) { - if (hasOwn(checkClashes, expr.name)) { - this.raiseRecoverable(expr.start, "Argument name clash"); - } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_OUTSIDE) { - this.declareName(expr.name, bindingType, expr.start); - } - } - break; - case "ChainExpression": - this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); - break; - case "MemberExpression": - if (isBind) { - this.raiseRecoverable(expr.start, "Binding member expression"); - } - break; - case "ParenthesizedExpression": - if (isBind) { - this.raiseRecoverable(expr.start, "Binding parenthesized expression"); - } - return this.checkLValSimple(expr.expression, bindingType, checkClashes); - default: - this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); - } -}; -pp$7.checkLValPattern = function (expr, bindingType, checkClashes) { - if (bindingType === void 0) - bindingType = BIND_NONE; - switch (expr.type) { - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) { - var prop = list[i]; - this.checkLValInnerPattern(prop, bindingType, checkClashes); - } - break; - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; - if (elem) { - this.checkLValInnerPattern(elem, bindingType, checkClashes); - } - } - break; - default: - this.checkLValSimple(expr, bindingType, checkClashes); - } -}; -pp$7.checkLValInnerPattern = function (expr, bindingType, checkClashes) { - if (bindingType === void 0) - bindingType = BIND_NONE; - switch (expr.type) { - case "Property": - this.checkLValInnerPattern(expr.value, bindingType, checkClashes); - break; - case "AssignmentPattern": - this.checkLValPattern(expr.left, bindingType, checkClashes); - break; - case "RestElement": - this.checkLValPattern(expr.argument, bindingType, checkClashes); - break; - default: - this.checkLValPattern(expr, bindingType, checkClashes); - } -}; -var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; -}; -var types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) -}; -var pp$6 = Parser$1.prototype; -pp$6.initialContext = function () { - return [types.b_stat]; -}; -pp$6.curContext = function () { - return this.context[this.context.length - 1]; -}; -pp$6.braceIsBlock = function (prevType) { - var parent = this.curContext(); - if (parent === types.f_expr || parent === types.f_stat) { - return true; - } - if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) { - return !parent.isExpr; - } - if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) { - return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); - } - if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) { - return true; - } - if (prevType === types$1.braceL) { - return parent === types.b_stat; - } - if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) { - return false; - } - return !this.exprAllowed; -}; -pp$6.inGeneratorContext = function () { - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this.context[i]; - if (context.token === "function") { - return context.generator; - } - } - return false; -}; -pp$6.updateContext = function (prevType) { - var update, type = this.type; - if (type.keyword && prevType === types$1.dot) { - this.exprAllowed = false; - } - else if (update = type.updateContext) { - update.call(this, prevType); - } - else { - this.exprAllowed = type.beforeExpr; - } -}; -pp$6.overrideContext = function (tokenCtx) { - if (this.curContext() !== tokenCtx) { - this.context[this.context.length - 1] = tokenCtx; - } -}; -types$1.parenR.updateContext = types$1.braceR.updateContext = function () { - if (this.context.length === 1) { - this.exprAllowed = true; - return; - } - var out = this.context.pop(); - if (out === types.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; -}; -types$1.braceL.updateContext = function (prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); - this.exprAllowed = true; -}; -types$1.dollarBraceL.updateContext = function () { - this.context.push(types.b_tmpl); - this.exprAllowed = true; -}; -types$1.parenL.updateContext = function (prevType) { - var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; - this.context.push(statementParens ? types.p_stat : types.p_expr); - this.exprAllowed = true; -}; -types$1.incDec.updateContext = function () { -}; -types$1._function.updateContext = types$1._class.updateContext = function (prevType) { - if (prevType.beforeExpr && prevType !== types$1._else && - !(prevType === types$1.semi && this.curContext() !== types.p_stat) && - !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) { - this.context.push(types.f_expr); - } - else { - this.context.push(types.f_stat); - } - this.exprAllowed = false; -}; -types$1.backQuote.updateContext = function () { - if (this.curContext() === types.q_tmpl) { - this.context.pop(); - } - else { - this.context.push(types.q_tmpl); - } - this.exprAllowed = false; -}; -types$1.star.updateContext = function (prevType) { - if (prevType === types$1._function) { - var index = this.context.length - 1; - if (this.context[index] === types.f_expr) { - this.context[index] = types.f_expr_gen; - } - else { - this.context[index] = types.f_gen; - } - } - this.exprAllowed = true; -}; -types$1.name.updateContext = function (prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) { - allowed = true; - } - } - this.exprAllowed = allowed; -}; -var pp$5 = Parser$1.prototype; -pp$5.checkPropClash = function (prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") { - return; - } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) { - return; - } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": - name = key.name; - break; - case "Literal": - name = String(key.value); - break; - default: return; - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors) { - if (refDestructuringErrors.doubleProto < 0) { - refDestructuringErrors.doubleProto = key.start; - } - } - else { - this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); - } - } - propHash.proto = true; - } - return; - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } - else { - redefinition = other.init || other[kind]; - } - if (redefinition) { - this.raiseRecoverable(key.start, "Redefinition of property"); - } - } - else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; -}; -pp$5.parseExpression = function (forInit, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); - if (this.type === types$1.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types$1.comma)) { - node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); - } - return this.finishNode(node, "SequenceExpression"); - } - return expr; -}; -pp$5.parseMaybeAssign = function (forInit, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { - return this.parseYield(forInit); - } - else { - this.exprAllowed = false; - } - } - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldDoubleProto = refDestructuringErrors.doubleProto; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; - } - else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types$1.parenL || this.type === types$1.name) { - this.potentialArrowAt = this.start; - this.potentialArrowInForAwait = forInit === "await"; - } - var left = this.parseMaybeConditional(forInit, refDestructuringErrors); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - if (this.type === types$1.eq) { - left = this.toAssignable(left, false, refDestructuringErrors); - } - if (!ownDestructuringErrors) { - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; - } - if (refDestructuringErrors.shorthandAssign >= left.start) { - refDestructuringErrors.shorthandAssign = -1; - } - if (this.type === types$1.eq) { - this.checkLValPattern(left); - } - else { - this.checkLValSimple(left); - } - node.left = left; - this.next(); - node.right = this.parseMaybeAssign(forInit); - if (oldDoubleProto > -1) { - refDestructuringErrors.doubleProto = oldDoubleProto; - } - return this.finishNode(node, "AssignmentExpression"); - } - else { - if (ownDestructuringErrors) { - this.checkExpressionErrors(refDestructuringErrors, true); - } - } - if (oldParenAssign > -1) { - refDestructuringErrors.parenthesizedAssign = oldParenAssign; - } - if (oldTrailingComma > -1) { - refDestructuringErrors.trailingComma = oldTrailingComma; - } - return left; -}; -pp$5.parseMaybeConditional = function (forInit, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(forInit, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { - return expr; - } - if (this.eat(types$1.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types$1.colon); - node.alternate = this.parseMaybeAssign(forInit); - return this.finishNode(node, "ConditionalExpression"); - } - return expr; -}; -pp$5.parseExprOps = function (forInit, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); - if (this.checkExpressionErrors(refDestructuringErrors)) { - return expr; - } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit); -}; -pp$5.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, forInit) { - var prec = this.type.binop; - if (prec != null && (!forInit || this.type !== types$1._in)) { - if (prec > minPrec) { - var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; - var coalesce = this.type === types$1.coalesce; - if (coalesce) { - prec = types$1.logicalAND.binop; - } - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); - if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) { - this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); - } - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit); - } - } - return left; -}; -pp$5.buildBinary = function (startPos, startLoc, left, right, op, logical) { - if (right.type === "PrivateIdentifier") { - this.raise(right.start, "Private identifier can only be left side of binary expression"); - } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression"); -}; -pp$5.parseMaybeUnary = function (refDestructuringErrors, sawUnary, incDec, forInit) { - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && this.canAwait) { - expr = this.parseAwait(forInit); - sawUnary = true; - } - else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types$1.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true, update, forInit); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { - this.checkLValSimple(node.argument); - } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") { - this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); - } - else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) { - this.raiseRecoverable(node.start, "Private fields can not be deleted"); - } - else { - sawUnary = true; - } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - else if (!sawUnary && this.type === types$1.privateId) { - if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { - this.unexpected(); - } - expr = this.parsePrivateIdent(); - if (this.type !== types$1._in) { - this.unexpected(); - } - } - else { - expr = this.parseExprSubscripts(refDestructuringErrors, forInit); - if (this.checkExpressionErrors(refDestructuringErrors)) { - return expr; - } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.operator = this.value; - node$1.prefix = false; - node$1.argument = expr; - this.checkLValSimple(expr); - this.next(); - expr = this.finishNode(node$1, "UpdateExpression"); - } - } - if (!incDec && this.eat(types$1.starstar)) { - if (sawUnary) { - this.unexpected(this.lastTokStart); - } - else { - return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false); - } - } - else { - return expr; - } -}; -function isPrivateFieldAccess(node) { - return (node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || - node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)); -} -pp$5.parseExprSubscripts = function (refDestructuringErrors, forInit) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors, forInit); - if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") { - return expr; - } - var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { - refDestructuringErrors.parenthesizedAssign = -1; - } - if (refDestructuringErrors.parenthesizedBind >= result.start) { - refDestructuringErrors.parenthesizedBind = -1; - } - if (refDestructuringErrors.trailingComma >= result.start) { - refDestructuringErrors.trailingComma = -1; - } - } - return result; -}; -pp$5.parseSubscripts = function (base, startPos, startLoc, noCalls, forInit) { - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && - this.potentialArrowAt === base.start; - var optionalChained = false; - while (true) { - var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); - if (element.optional) { - optionalChained = true; - } - if (element === base || element.type === "ArrowFunctionExpression") { - if (optionalChained) { - var chainNode = this.startNodeAt(startPos, startLoc); - chainNode.expression = element; - element = this.finishNode(chainNode, "ChainExpression"); - } - return element; - } - base = element; - } -}; -pp$5.shouldParseAsyncArrow = function () { - return !this.canInsertSemicolon() && this.eat(types$1.arrow); -}; -pp$5.parseSubscriptAsyncArrow = function (startPos, startLoc, exprList, forInit) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit); -}; -pp$5.parseSubscript = function (base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { - var optionalSupported = this.options.ecmaVersion >= 11; - var optional = optionalSupported && this.eat(types$1.questionDot); - if (noCalls && optional) { - this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); - } - var computed = this.eat(types$1.bracketL); - if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - if (computed) { - node.property = this.parseExpression(); - this.expect(types$1.bracketR); - } - else if (this.type === types$1.privateId && base.type !== "Super") { - node.property = this.parsePrivateIdent(); - } - else { - node.property = this.parseIdent(this.options.allowReserved !== "never"); - } - node.computed = !!computed; - if (optionalSupported) { - node.optional = optional; - } - base = this.finishNode(node, "MemberExpression"); - } - else if (!noCalls && this.eat(types$1.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); - if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) { - this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); - } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit); - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - if (optionalSupported) { - node$1.optional = optional; - } - base = this.finishNode(node$1, "CallExpression"); - } - else if (this.type === types$1.backQuote) { - if (optional || optionalChained) { - this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); - } - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({ isTagged: true }); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base; -}; -pp$5.parseExprAtom = function (refDestructuringErrors, forInit, forNew) { - if (this.type === types$1.slash) { - this.readRegexp(); - } - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types$1._super: - if (!this.allowSuper) { - this.raise(this.start, "'super' keyword outside a method"); - } - node = this.startNode(); - this.next(); - if (this.type === types$1.parenL && !this.allowDirectSuper) { - this.raise(node.start, "super() call outside constructor of a subclass"); - } - if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) { - this.unexpected(); - } - return this.finishNode(node, "Super"); - case types$1._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - case types$1.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { - this.overrideContext(types.f_expr); - return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit); - } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types$1.arrow)) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit); - } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && - (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) { - this.unexpected(); - } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit); - } - } - return id; - case types$1.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = { pattern: value.pattern, flags: value.flags }; - return node; - case types$1.num: - case types$1.string: - return this.parseLiteral(this.value); - case types$1._null: - case types$1._true: - case types$1._false: - node = this.startNode(); - node.value = this.type === types$1._null ? null : this.type === types$1._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal"); - case types$1.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) { - refDestructuringErrors.parenthesizedAssign = start; - } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = start; - } - } - return expr; - case types$1.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression"); - case types$1.braceL: - this.overrideContext(types.b_expr); - return this.parseObj(false, refDestructuringErrors); - case types$1._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0); - case types$1._class: - return this.parseClass(this.startNode(), false); - case types$1._new: - return this.parseNew(); - case types$1.backQuote: - return this.parseTemplate(); - case types$1._import: - if (this.options.ecmaVersion >= 11) { - return this.parseExprImport(forNew); - } - else { - return this.unexpected(); - } - default: - return this.parseExprAtomDefault(); - } -}; -pp$5.parseExprAtomDefault = function () { - this.unexpected(); -}; -pp$5.parseExprImport = function (forNew) { - var node = this.startNode(); - if (this.containsEsc) { - this.raiseRecoverable(this.start, "Escape sequence in keyword import"); - } - var meta = this.parseIdent(true); - if (this.type === types$1.parenL && !forNew) { - return this.parseDynamicImport(node); - } - else if (this.type === types$1.dot) { - node.meta = meta; - return this.parseImportMeta(node); - } - else { - this.unexpected(); - } -}; -pp$5.parseDynamicImport = function (node) { - this.next(); - node.source = this.parseMaybeAssign(); - if (!this.eat(types$1.parenR)) { - var errorPos = this.start; - if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { - this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); - } - else { - this.unexpected(errorPos); - } - } - return this.finishNode(node, "ImportExpression"); -}; -pp$5.parseImportMeta = function (node) { - this.next(); - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "meta") { - this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); - } - if (containsEsc) { - this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); - } - if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) { - this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); - } - return this.finishNode(node, "MetaProperty"); -}; -pp$5.parseLiteral = function (value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - if (node.raw.charCodeAt(node.raw.length - 1) === 110) { - node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); - } - this.next(); - return this.finishNode(node, "Literal"); -}; -pp$5.parseParenExpression = function () { - this.expect(types$1.parenL); - var val = this.parseExpression(); - this.expect(types$1.parenR); - return val; -}; -pp$5.shouldParseArrow = function (exprList) { - return !this.canInsertSemicolon(); -}; -pp$5.parseParenAndDistinguishExpression = function (canBeArrow, forInit) { - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - while (this.type !== types$1.parenR) { - first ? first = false : this.expect(types$1.comma); - if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { - lastIsComma = true; - break; - } - else if (this.type === types$1.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRestBinding())); - if (this.type === types$1.comma) { - this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); - } - break; - } - else { - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); - } - } - var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; - this.expect(types$1.parenR); - if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList, forInit); - } - if (!exprList.length || lastIsComma) { - this.unexpected(this.lastTokStart); - } - if (spreadStart) { - this.unexpected(spreadStart); - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } - else { - val = exprList[0]; - } - } - else { - val = this.parseParenExpression(); - } - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression"); - } - else { - return val; - } -}; -pp$5.parseParenItem = function (item) { - return item; -}; -pp$5.parseParenArrowList = function (startPos, startLoc, exprList, forInit) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit); -}; -var empty = []; -pp$5.parseNew = function () { - if (this.containsEsc) { - this.raiseRecoverable(this.start, "Escape sequence in keyword new"); - } - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target") { - this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); - } - if (containsEsc) { - this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); - } - if (!this.allowNewDotTarget) { - this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); - } - return this.finishNode(node, "MetaProperty"); - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); - if (this.eat(types$1.parenL)) { - node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); - } - else { - node.arguments = empty; - } - return this.finishNode(node, "NewExpression"); -}; -pp$5.parseTemplateElement = function (ref) { - var isTagged = ref.isTagged; - var elem = this.startNode(); - if (this.type === types$1.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } - else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value - }; - } - this.next(); - elem.tail = this.type === types$1.backQuote; - return this.finishNode(elem, "TemplateElement"); -}; -pp$5.parseTemplate = function (ref) { - if (ref === void 0) - ref = {}; - var isTagged = ref.isTagged; - if (isTagged === void 0) - isTagged = false; - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({ isTagged: isTagged }); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this.type === types$1.eof) { - this.raise(this.pos, "Unterminated template literal"); - } - this.expect(types$1.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types$1.braceR); - node.quasis.push(curElt = this.parseTemplateElement({ isTagged: isTagged })); - } - this.next(); - return this.finishNode(node, "TemplateLiteral"); -}; -pp$5.isAsyncProp = function (prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); -}; -pp$5.parseObj = function (isPattern, refDestructuringErrors) { - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types$1.braceR)) { - if (!first) { - this.expect(types$1.comma); - if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { - break; - } - } - else { - first = false; - } - var prop = this.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { - this.checkPropClash(prop, propHash, refDestructuringErrors); - } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); -}; -pp$5.parseProperty = function (isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types$1.comma) { - this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); - } - return this.finishNode(prop, "RestElement"); - } - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; - } - return this.finishNode(prop, "SpreadElement"); - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) { - isGenerator = this.eat(types$1.star); - } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); - this.parsePropertyName(prop); - } - else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property"); -}; -pp$5.parseGetterSetter = function (prop) { - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") { - this.raiseRecoverable(start, "getter should have no params"); - } - else { - this.raiseRecoverable(start, "setter should have exactly one param"); - } - } - else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { - this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); - } - } -}; -pp$5.parsePropertyValue = function (prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types$1.colon) { - this.unexpected(); - } - if (this.eat(types$1.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } - else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { - if (isPattern) { - this.unexpected(); - } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } - else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) { - if (isGenerator || isAsync) { - this.unexpected(); - } - this.parseGetterSetter(prop); - } - else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { - this.unexpected(); - } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) { - this.awaitIdentPos = startPos; - } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); - } - else if (this.type === types$1.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) { - refDestructuringErrors.shorthandAssign = this.start; - } - prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); - } - else { - prop.value = this.copyNode(prop.key); - } - prop.shorthand = true; - } - else { - this.unexpected(); - } -}; -pp$5.parsePropertyName = function (prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types$1.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types$1.bracketR); - return prop.key; - } - else { - prop.computed = false; - } - } - return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); -}; -pp$5.initFunction = function (node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { - node.generator = node.expression = false; - } - if (this.options.ecmaVersion >= 8) { - node.async = false; - } -}; -pp$5.parseMethod = function (isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.initFunction(node); - if (this.options.ecmaVersion >= 6) { - node.generator = isGenerator; - } - if (this.options.ecmaVersion >= 8) { - node.async = !!isAsync; - } - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - this.expect(types$1.parenL); - node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true, false); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression"); -}; -pp$5.parseArrowExpression = function (node, params, isAsync, forInit) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { - node.async = !!isAsync; - } - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false, forInit); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression"); -}; -pp$5.parseFunctionBody = function (node, isArrowFunction, isMethod, forInit) { - var isExpression = isArrowFunction && this.type !== types$1.braceL; - var oldStrict = this.strict, useStrict = false; - if (isExpression) { - node.body = this.parseMaybeAssign(forInit); - node.expression = true; - this.checkParams(node, false); - } - else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - if (useStrict && nonSimple) { - this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); - } - } - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { - this.strict = true; - } - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - if (this.strict && node.id) { - this.checkLValSimple(node.id, BIND_OUTSIDE); - } - node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); -}; -pp$5.isSimpleParamList = function (params) { - for (var i = 0, list = params; i < list.length; i += 1) { - var param = list[i]; - if (param.type !== "Identifier") { - return false; - } - } - return true; -}; -pp$5.checkParams = function (node, allowDuplicates) { - var nameHash = Object.create(null); - for (var i = 0, list = node.params; i < list.length; i += 1) { - var param = list[i]; - this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); - } -}; -pp$5.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(types$1.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) { - break; - } - } - else { - first = false; - } - var elt = (void 0); - if (allowEmpty && this.type === types$1.comma) { - elt = null; - } - else if (this.type === types$1.ellipsis) { - elt = this.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; - } - } - else { - elt = this.parseMaybeAssign(false, refDestructuringErrors); - } - elts.push(elt); - } - return elts; -}; -pp$5.checkUnreserved = function (ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - if (this.inGenerator && name === "yield") { - this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); - } - if (this.inAsync && name === "await") { - this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); - } - if (this.currentThisScope().inClassFieldInit && name === "arguments") { - this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); - } - if (this.inClassStaticBlock && (name === "arguments" || name === "await")) { - this.raise(start, ("Cannot use " + name + " in class static initialization block")); - } - if (this.keywords.test(name)) { - this.raise(start, ("Unexpected keyword '" + name + "'")); - } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { - return; - } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") { - this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); - } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } -}; -pp$5.parseIdent = function (liberal) { - var node = this.parseIdentNode(); - this.next(!!liberal); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) { - this.awaitIdentPos = node.start; - } - } - return node; -}; -pp$5.parseIdentNode = function () { - var node = this.startNode(); - if (this.type === types$1.name) { - node.name = this.value; - } - else if (this.type.keyword) { - node.name = this.type.keyword; - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } - else { - this.unexpected(); - } - return node; -}; -pp$5.parsePrivateIdent = function () { - var node = this.startNode(); - if (this.type === types$1.privateId) { - node.name = this.value; - } - else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "PrivateIdentifier"); - if (this.options.checkPrivateFields) { - if (this.privateNameStack.length === 0) { - this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class")); - } - else { - this.privateNameStack[this.privateNameStack.length - 1].used.push(node); - } - } - return node; -}; -pp$5.parseYield = function (forInit) { - if (!this.yieldPos) { - this.yieldPos = this.start; - } - var node = this.startNode(); - this.next(); - if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } - else { - node.delegate = this.eat(types$1.star); - node.argument = this.parseMaybeAssign(forInit); - } - return this.finishNode(node, "YieldExpression"); -}; -pp$5.parseAwait = function (forInit) { - if (!this.awaitPos) { - this.awaitPos = this.start; - } - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true, false, forInit); - return this.finishNode(node, "AwaitExpression"); -}; -var pp$4 = Parser$1.prototype; -pp$4.raise = function (pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - err.raisedAt = this.pos; - throw err; -}; -pp$4.raiseRecoverable = pp$4.raise; -pp$4.curPosition = function () { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart); - } -}; -var pp$3 = Parser$1.prototype; -var Scope$1 = function Scope(flags) { - this.flags = flags; - this.var = []; - this.lexical = []; - this.functions = []; - this.inClassFieldInit = false; -}; -pp$3.enterScope = function (flags) { - this.scopeStack.push(new Scope$1(flags)); -}; -pp$3.exitScope = function () { - this.scopeStack.pop(); -}; -pp$3.treatFunctionsAsVarInScope = function (scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP); -}; -pp$3.declareName = function (name, bindingType, pos) { - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) { - delete this.undefinedExports[name]; - } - } - else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } - else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) { - redeclared = scope$2.lexical.indexOf(name) > -1; - } - else { - redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; - } - scope$2.functions.push(name); - } - else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break; - } - scope$3.var.push(name); - if (this.inModule && (scope$3.flags & SCOPE_TOP)) { - delete this.undefinedExports[name]; - } - if (scope$3.flags & SCOPE_VAR) { - break; - } - } - } - if (redeclared) { - this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); - } -}; -pp$3.checkLocalExport = function (id) { - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } -}; -pp$3.currentScope = function () { - return this.scopeStack[this.scopeStack.length - 1]; -}; -pp$3.currentVarScope = function () { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { - return scope; - } - } -}; -pp$3.currentThisScope = function () { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { - return scope; - } - } -}; -var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) { - this.loc = new SourceLocation(parser, loc); - } - if (parser.options.directSourceFile) { - this.sourceFile = parser.options.directSourceFile; - } - if (parser.options.ranges) { - this.range = [pos, 0]; - } -}; -var pp$2 = Parser$1.prototype; -pp$2.startNode = function () { - return new Node(this, this.start, this.startLoc); -}; -pp$2.startNodeAt = function (pos, loc) { - return new Node(this, pos, loc); -}; -function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) { - node.loc.end = loc; - } - if (this.options.ranges) { - node.range[1] = pos; - } - return node; -} -pp$2.finishNode = function (node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); -}; -pp$2.finishNodeAt = function (node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc); -}; -pp$2.copyNode = function (node) { - var newNode = new Node(this, node.start, this.startLoc); - for (var prop in node) { - newNode[prop] = node[prop]; - } - return newNode; -}; -var ecma9BinaryProperties = "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 Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation 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"; -var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; -var ecma11BinaryProperties = ecma10BinaryProperties; -var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; -var ecma13BinaryProperties = ecma12BinaryProperties; -var ecma14BinaryProperties = ecma13BinaryProperties; -var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma10BinaryProperties, - 11: ecma11BinaryProperties, - 12: ecma12BinaryProperties, - 13: ecma13BinaryProperties, - 14: ecma14BinaryProperties -}; -var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; -var unicodeBinaryPropertiesOfStrings = { - 9: "", - 10: "", - 11: "", - 12: "", - 13: "", - 14: ecma14BinaryPropertiesOfStrings -}; -var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; -var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; -var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; -var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; -var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; -var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; -var ecma14ScriptValues = ecma13ScriptValues + " Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"; -var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma10ScriptValues, - 11: ecma11ScriptValues, - 12: ecma12ScriptValues, - 13: ecma13ScriptValues, - 14: ecma14ScriptValues -}; -var data = {}; -function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; -} -for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { - var ecmaVersion = list[i]; - buildUnicodeData(ecmaVersion); -} -var pp$1 = Parser$1.prototype; -var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchV = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; -}; -RegExpValidationState.prototype.reset = function reset(start, pattern, flags) { - var unicodeSets = flags.indexOf("v") !== -1; - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - if (unicodeSets && this.parser.options.ecmaVersion >= 15) { - this.switchU = true; - this.switchV = true; - this.switchN = true; - } - else { - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchV = false; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; - } -}; -RegExpValidationState.prototype.raise = function raise(message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); -}; -RegExpValidationState.prototype.at = function at(i, forceU) { - if (forceU === void 0) - forceU = false; - var s = this.source; - var l = s.length; - if (i >= l) { - return -1; - } - var c = s.charCodeAt(i); - if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c; - } - var next = s.charCodeAt(i + 1); - return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c; -}; -RegExpValidationState.prototype.nextIndex = function nextIndex(i, forceU) { - if (forceU === void 0) - forceU = false; - var s = this.source; - var l = s.length; - if (i >= l) { - return l; - } - var c = s.charCodeAt(i), next; - if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || - (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { - return i + 1; - } - return i + 2; -}; -RegExpValidationState.prototype.current = function current(forceU) { - if (forceU === void 0) - forceU = false; - return this.at(this.pos, forceU); -}; -RegExpValidationState.prototype.lookahead = function lookahead(forceU) { - if (forceU === void 0) - forceU = false; - return this.at(this.nextIndex(this.pos, forceU), forceU); -}; -RegExpValidationState.prototype.advance = function advance(forceU) { - if (forceU === void 0) - forceU = false; - this.pos = this.nextIndex(this.pos, forceU); -}; -RegExpValidationState.prototype.eat = function eat(ch, forceU) { - if (forceU === void 0) - forceU = false; - if (this.current(forceU) === ch) { - this.advance(forceU); - return true; - } - return false; -}; -RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) { - if (forceU === void 0) - forceU = false; - var pos = this.pos; - for (var i = 0, list = chs; i < list.length; i += 1) { - var ch = list[i]; - var current = this.at(pos, forceU); - if (current === -1 || current !== ch) { - return false; - } - pos = this.nextIndex(pos, forceU); - } - this.pos = pos; - return true; -}; -pp$1.validateRegExpFlags = function (state) { - var validFlags = state.validFlags; - var flags = state.flags; - var u = false; - var v = false; - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this.raise(state.start, "Duplicate regular expression flag"); - } - if (flag === "u") { - u = true; - } - if (flag === "v") { - v = true; - } - } - if (this.options.ecmaVersion >= 15 && u && v) { - this.raise(state.start, "Invalid regular expression flag"); - } -}; -pp$1.validateRegExpPattern = function (state) { - this.regexp_pattern(state); - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } -}; -pp$1.regexp_pattern = function (state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - this.regexp_disjunction(state); - if (state.pos !== state.source.length) { - if (state.eat(0x29 )) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D ) || state.eat(0x7D )) { - state.raise("Lone quantifier brackets"); - } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); - } - } -}; -pp$1.regexp_disjunction = function (state) { - this.regexp_alternative(state); - while (state.eat(0x7C )) { - this.regexp_alternative(state); - } - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B )) { - state.raise("Lone quantifier brackets"); - } -}; -pp$1.regexp_alternative = function (state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) { } -}; -pp$1.regexp_eatTerm = function (state) { - if (this.regexp_eatAssertion(state)) { - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - if (state.switchU) { - state.raise("Invalid quantifier"); - } - } - return true; - } - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true; - } - return false; -}; -pp$1.regexp_eatAssertion = function (state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; - if (state.eat(0x5E ) || state.eat(0x24 )) { - return true; - } - if (state.eat(0x5C )) { - if (state.eat(0x42 ) || state.eat(0x62 )) { - return true; - } - state.pos = start; - } - if (state.eat(0x28 ) && state.eat(0x3F )) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C ); - } - if (state.eat(0x3D ) || state.eat(0x21 )) { - this.regexp_disjunction(state); - if (!state.eat(0x29 )) { - state.raise("Unterminated group"); - } - state.lastAssertionIsQuantifiable = !lookbehind; - return true; - } - } - state.pos = start; - return false; -}; -pp$1.regexp_eatQuantifier = function (state, noError) { - if (noError === void 0) - noError = false; - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F ); - return true; - } - return false; -}; -pp$1.regexp_eatQuantifierPrefix = function (state, noError) { - return (state.eat(0x2A ) || - state.eat(0x2B ) || - state.eat(0x3F ) || - this.regexp_eatBracedQuantifier(state, noError)); -}; -pp$1.regexp_eatBracedQuantifier = function (state, noError) { - var start = state.pos; - if (state.eat(0x7B )) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C ) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; - } - if (state.eat(0x7D )) { - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } - return true; - } - } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatAtom = function (state) { - return (this.regexp_eatPatternCharacters(state) || - state.eat(0x2E ) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state)); -}; -pp$1.regexp_eatReverseSolidusAtomEscape = function (state) { - var start = state.pos; - if (state.eat(0x5C )) { - if (this.regexp_eatAtomEscape(state)) { - return true; - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatUncapturingGroup = function (state) { - var start = state.pos; - if (state.eat(0x28 )) { - if (state.eat(0x3F ) && state.eat(0x3A )) { - this.regexp_disjunction(state); - if (state.eat(0x29 )) { - return true; - } - state.raise("Unterminated group"); - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatCapturingGroup = function (state) { - if (state.eat(0x28 )) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } - else if (state.current() === 0x3F ) { - state.raise("Invalid group"); - } - this.regexp_disjunction(state); - if (state.eat(0x29 )) { - state.numCapturingParens += 1; - return true; - } - state.raise("Unterminated group"); - } - return false; -}; -pp$1.regexp_eatExtendedAtom = function (state) { - return (state.eat(0x2E ) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state)); -}; -pp$1.regexp_eatInvalidBracedQuantifier = function (state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false; -}; -pp$1.regexp_eatSyntaxCharacter = function (state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true; - } - return false; -}; -function isSyntaxCharacter(ch) { - return (ch === 0x24 || - ch >= 0x28 && ch <= 0x2B || - ch === 0x2E || - ch === 0x3F || - ch >= 0x5B && ch <= 0x5E || - ch >= 0x7B && ch <= 0x7D ); -} -pp$1.regexp_eatPatternCharacters = function (state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start; -}; -pp$1.regexp_eatExtendedPatternCharacter = function (state) { - var ch = state.current(); - if (ch !== -1 && - ch !== 0x24 && - !(ch >= 0x28 && ch <= 0x2B ) && - ch !== 0x2E && - ch !== 0x3F && - ch !== 0x5B && - ch !== 0x5E && - ch !== 0x7C ) { - state.advance(); - return true; - } - return false; -}; -pp$1.regexp_groupSpecifier = function (state) { - if (state.eat(0x3F )) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return; - } - state.raise("Invalid group"); - } -}; -pp$1.regexp_eatGroupName = function (state) { - state.lastStringValue = ""; - if (state.eat(0x3C )) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E )) { - return true; - } - state.raise("Invalid capture group name"); - } - return false; -}; -pp$1.regexp_eatRegExpIdentifierName = function (state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - } - return true; - } - return false; -}; -pp$1.regexp_eatRegExpIdentifierStart = function (state) { - var start = state.pos; - var forceU = this.options.ecmaVersion >= 11; - var ch = state.current(forceU); - state.advance(forceU); - if (ch === 0x5C && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true; - } - state.pos = start; - return false; -}; -function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 || ch === 0x5F; -} -pp$1.regexp_eatRegExpIdentifierPart = function (state) { - var start = state.pos; - var forceU = this.options.ecmaVersion >= 11; - var ch = state.current(forceU); - state.advance(forceU); - if (ch === 0x5C && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true; - } - state.pos = start; - return false; -}; -function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 || ch === 0x5F || ch === 0x200C || ch === 0x200D; -} -pp$1.regexp_eatAtomEscape = function (state) { - if (this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state))) { - return true; - } - if (state.switchU) { - if (state.current() === 0x63 ) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false; -}; -pp$1.regexp_eatBackReference = function (state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; - if (state.switchU) { - if (n > state.maxBackReference) { - state.maxBackReference = n; - } - return true; - } - if (n <= state.numCapturingParens) { - return true; - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatKGroupName = function (state) { - if (state.eat(0x6B )) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); - return true; - } - state.raise("Invalid named reference"); - } - return false; -}; -pp$1.regexp_eatCharacterEscape = function (state) { - return (this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state)); -}; -pp$1.regexp_eatCControlLetter = function (state) { - var start = state.pos; - if (state.eat(0x63 )) { - if (this.regexp_eatControlLetter(state)) { - return true; - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatZero = function (state) { - if (state.current() === 0x30 && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true; - } - return false; -}; -pp$1.regexp_eatControlEscape = function (state) { - var ch = state.current(); - if (ch === 0x74 ) { - state.lastIntValue = 0x09; - state.advance(); - return true; - } - if (ch === 0x6E ) { - state.lastIntValue = 0x0A; - state.advance(); - return true; - } - if (ch === 0x76 ) { - state.lastIntValue = 0x0B; - state.advance(); - return true; - } - if (ch === 0x66 ) { - state.lastIntValue = 0x0C; - state.advance(); - return true; - } - if (ch === 0x72 ) { - state.lastIntValue = 0x0D; - state.advance(); - return true; - } - return false; -}; -pp$1.regexp_eatControlLetter = function (state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true; - } - return false; -}; -function isControlLetter(ch) { - return ((ch >= 0x41 && ch <= 0x5A ) || - (ch >= 0x61 && ch <= 0x7A )); -} -pp$1.regexp_eatRegExpUnicodeEscapeSequence = function (state, forceU) { - if (forceU === void 0) - forceU = false; - var start = state.pos; - var switchU = forceU || state.switchU; - if (state.eat(0x75 )) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C ) && state.eat(0x75 ) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true; - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } - return true; - } - if (switchU && - state.eat(0x7B ) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D ) && - isValidUnicode(state.lastIntValue)) { - return true; - } - if (switchU) { - state.raise("Invalid unicode escape"); - } - state.pos = start; - } - return false; -}; -function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF; -} -pp$1.regexp_eatIdentityEscape = function (state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true; - } - if (state.eat(0x2F )) { - state.lastIntValue = 0x2F; - return true; - } - return false; - } - var ch = state.current(); - if (ch !== 0x63 && (!state.switchN || ch !== 0x6B )) { - state.lastIntValue = ch; - state.advance(); - return true; - } - return false; -}; -pp$1.regexp_eatDecimalEscape = function (state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 && ch <= 0x39 ) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 ); - state.advance(); - } while ((ch = state.current()) >= 0x30 && ch <= 0x39 ); - return true; - } - return false; -}; -var CharSetNone = 0; -var CharSetOk = 1; -var CharSetString = 2; -pp$1.regexp_eatCharacterClassEscape = function (state) { - var ch = state.current(); - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return CharSetOk; - } - var negate = false; - if (state.switchU && - this.options.ecmaVersion >= 9 && - ((negate = ch === 0x50 ) || ch === 0x70 )) { - state.lastIntValue = -1; - state.advance(); - var result; - if (state.eat(0x7B ) && - (result = this.regexp_eatUnicodePropertyValueExpression(state)) && - state.eat(0x7D )) { - if (negate && result === CharSetString) { - state.raise("Invalid property name"); - } - return result; - } - state.raise("Invalid property name"); - } - return CharSetNone; -}; -function isCharacterClassEscape(ch) { - return (ch === 0x64 || - ch === 0x44 || - ch === 0x73 || - ch === 0x53 || - ch === 0x77 || - ch === 0x57 ); -} -pp$1.regexp_eatUnicodePropertyValueExpression = function (state) { - var start = state.pos; - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D )) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return CharSetOk; - } - } - state.pos = start; - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - } - return CharSetNone; -}; -pp$1.regexp_validateUnicodePropertyNameAndValue = function (state, name, value) { - if (!hasOwn(state.unicodeProperties.nonBinary, name)) { - state.raise("Invalid property name"); - } - if (!state.unicodeProperties.nonBinary[name].test(value)) { - state.raise("Invalid property value"); - } -}; -pp$1.regexp_validateUnicodePropertyNameOrValue = function (state, nameOrValue) { - if (state.unicodeProperties.binary.test(nameOrValue)) { - return CharSetOk; - } - if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { - return CharSetString; - } - state.raise("Invalid property name"); -}; -pp$1.regexp_eatUnicodePropertyName = function (state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== ""; -}; -function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F; -} -pp$1.regexp_eatUnicodePropertyValue = function (state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== ""; -}; -function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch); -} -pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function (state) { - return this.regexp_eatUnicodePropertyValue(state); -}; -pp$1.regexp_eatCharacterClass = function (state) { - if (state.eat(0x5B )) { - var negate = state.eat(0x5E ); - var result = this.regexp_classContents(state); - if (!state.eat(0x5D )) { - state.raise("Unterminated character class"); - } - if (negate && result === CharSetString) { - state.raise("Negated character class may contain strings"); - } - return true; - } - return false; -}; -pp$1.regexp_classContents = function (state) { - if (state.current() === 0x5D ) { - return CharSetOk; - } - if (state.switchV) { - return this.regexp_classSetExpression(state); - } - this.regexp_nonEmptyClassRanges(state); - return CharSetOk; -}; -pp$1.regexp_nonEmptyClassRanges = function (state) { - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D ) && this.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); - } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); - } - } - } -}; -pp$1.regexp_eatClassAtom = function (state) { - var start = state.pos; - if (state.eat(0x5C )) { - if (this.regexp_eatClassEscape(state)) { - return true; - } - if (state.switchU) { - var ch$1 = state.current(); - if (ch$1 === 0x63 || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); - } - state.pos = start; - } - var ch = state.current(); - if (ch !== 0x5D ) { - state.lastIntValue = ch; - state.advance(); - return true; - } - return false; -}; -pp$1.regexp_eatClassEscape = function (state) { - var start = state.pos; - if (state.eat(0x62 )) { - state.lastIntValue = 0x08; - return true; - } - if (state.switchU && state.eat(0x2D )) { - state.lastIntValue = 0x2D; - return true; - } - if (!state.switchU && state.eat(0x63 )) { - if (this.regexp_eatClassControlLetter(state)) { - return true; - } - state.pos = start; - } - return (this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state)); -}; -pp$1.regexp_classSetExpression = function (state) { - var result = CharSetOk, subResult; - if (this.regexp_eatClassSetRange(state)) - ; - else if (subResult = this.regexp_eatClassSetOperand(state)) { - if (subResult === CharSetString) { - result = CharSetString; - } - var start = state.pos; - while (state.eatChars([0x26, 0x26] )) { - if (state.current() !== 0x26 && - (subResult = this.regexp_eatClassSetOperand(state))) { - if (subResult !== CharSetString) { - result = CharSetOk; - } - continue; - } - state.raise("Invalid character in character class"); - } - if (start !== state.pos) { - return result; - } - while (state.eatChars([0x2D, 0x2D] )) { - if (this.regexp_eatClassSetOperand(state)) { - continue; - } - state.raise("Invalid character in character class"); - } - if (start !== state.pos) { - return result; - } - } - else { - state.raise("Invalid character in character class"); - } - for (;;) { - if (this.regexp_eatClassSetRange(state)) { - continue; - } - subResult = this.regexp_eatClassSetOperand(state); - if (!subResult) { - return result; - } - if (subResult === CharSetString) { - result = CharSetString; - } - } -}; -pp$1.regexp_eatClassSetRange = function (state) { - var start = state.pos; - if (this.regexp_eatClassSetCharacter(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D ) && this.regexp_eatClassSetCharacter(state)) { - var right = state.lastIntValue; - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); - } - return true; - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatClassSetOperand = function (state) { - if (this.regexp_eatClassSetCharacter(state)) { - return CharSetOk; - } - return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state); -}; -pp$1.regexp_eatNestedClass = function (state) { - var start = state.pos; - if (state.eat(0x5B )) { - var negate = state.eat(0x5E ); - var result = this.regexp_classContents(state); - if (state.eat(0x5D )) { - if (negate && result === CharSetString) { - state.raise("Negated character class may contain strings"); - } - return result; - } - state.pos = start; - } - if (state.eat(0x5C )) { - var result$1 = this.regexp_eatCharacterClassEscape(state); - if (result$1) { - return result$1; - } - state.pos = start; - } - return null; -}; -pp$1.regexp_eatClassStringDisjunction = function (state) { - var start = state.pos; - if (state.eatChars([0x5C, 0x71] )) { - if (state.eat(0x7B )) { - var result = this.regexp_classStringDisjunctionContents(state); - if (state.eat(0x7D )) { - return result; - } - } - else { - state.raise("Invalid escape"); - } - state.pos = start; - } - return null; -}; -pp$1.regexp_classStringDisjunctionContents = function (state) { - var result = this.regexp_classString(state); - while (state.eat(0x7C )) { - if (this.regexp_classString(state) === CharSetString) { - result = CharSetString; - } - } - return result; -}; -pp$1.regexp_classString = function (state) { - var count = 0; - while (this.regexp_eatClassSetCharacter(state)) { - count++; - } - return count === 1 ? CharSetOk : CharSetString; -}; -pp$1.regexp_eatClassSetCharacter = function (state) { - var start = state.pos; - if (state.eat(0x5C )) { - if (this.regexp_eatCharacterEscape(state) || - this.regexp_eatClassSetReservedPunctuator(state)) { - return true; - } - if (state.eat(0x62 )) { - state.lastIntValue = 0x08; - return true; - } - state.pos = start; - return false; - } - var ch = state.current(); - if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { - return false; - } - if (isClassSetSyntaxCharacter(ch)) { - return false; - } - state.advance(); - state.lastIntValue = ch; - return true; -}; -function isClassSetReservedDoublePunctuatorCharacter(ch) { - return (ch === 0x21 || - ch >= 0x23 && ch <= 0x26 || - ch >= 0x2A && ch <= 0x2C || - ch === 0x2E || - ch >= 0x3A && ch <= 0x40 || - ch === 0x5E || - ch === 0x60 || - ch === 0x7E ); -} -function isClassSetSyntaxCharacter(ch) { - return (ch === 0x28 || - ch === 0x29 || - ch === 0x2D || - ch === 0x2F || - ch >= 0x5B && ch <= 0x5D || - ch >= 0x7B && ch <= 0x7D ); -} -pp$1.regexp_eatClassSetReservedPunctuator = function (state) { - var ch = state.current(); - if (isClassSetReservedPunctuator(ch)) { - state.lastIntValue = ch; - state.advance(); - return true; - } - return false; -}; -function isClassSetReservedPunctuator(ch) { - return (ch === 0x21 || - ch === 0x23 || - ch === 0x25 || - ch === 0x26 || - ch === 0x2C || - ch === 0x2D || - ch >= 0x3A && ch <= 0x3E || - ch === 0x40 || - ch === 0x60 || - ch === 0x7E ); -} -pp$1.regexp_eatClassControlLetter = function (state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F ) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true; - } - return false; -}; -pp$1.regexp_eatHexEscapeSequence = function (state) { - var start = state.pos; - if (state.eat(0x78 )) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true; - } - if (state.switchU) { - state.raise("Invalid escape"); - } - state.pos = start; - } - return false; -}; -pp$1.regexp_eatDecimalDigits = function (state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 ); - state.advance(); - } - return state.pos !== start; -}; -function isDecimalDigit(ch) { - return ch >= 0x30 && ch <= 0x39; -} -pp$1.regexp_eatHexDigits = function (state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start; -}; -function isHexDigit(ch) { - return ((ch >= 0x30 && ch <= 0x39 ) || - (ch >= 0x41 && ch <= 0x46 ) || - (ch >= 0x61 && ch <= 0x66 )); -} -function hexToInt(ch) { - if (ch >= 0x41 && ch <= 0x46 ) { - return 10 + (ch - 0x41 ); - } - if (ch >= 0x61 && ch <= 0x66 ) { - return 10 + (ch - 0x61 ); - } - return ch - 0x30; -} -pp$1.regexp_eatLegacyOctalEscapeSequence = function (state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; - if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; - } - else { - state.lastIntValue = n1 * 8 + n2; - } - } - else { - state.lastIntValue = n1; - } - return true; - } - return false; -}; -pp$1.regexp_eatOctalDigit = function (state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; - state.advance(); - return true; - } - state.lastIntValue = 0; - return false; -}; -function isOctalDigit(ch) { - return ch >= 0x30 && ch <= 0x37; -} -pp$1.regexp_eatFixedHexDigits = function (state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { - var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false; - } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return true; -}; -var Token$1 = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) { - this.loc = new SourceLocation(p, p.startLoc, p.endLoc); - } - if (p.options.ranges) { - this.range = [p.start, p.end]; - } -}; -var pp = Parser$1.prototype; -pp.next = function (ignoreEscapeSequenceInKeyword) { - if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) { - this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); - } - if (this.options.onToken) { - this.options.onToken(new Token$1(this)); - } - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); -}; -pp.getToken = function () { - this.next(); - return new Token$1(this); -}; -if (typeof Symbol !== "undefined") { - pp[Symbol.iterator] = function () { - var this$1$1 = this; - return { - next: function () { - var token = this$1$1.getToken(); - return { - done: token.type === types$1.eof, - value: token - }; - } - }; - }; -} -pp.nextToken = function () { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { - this.skipSpace(); - } - this.start = this.pos; - if (this.options.locations) { - this.startLoc = this.curPosition(); - } - if (this.pos >= this.input.length) { - return this.finishToken(types$1.eof); - } - if (curContext.override) { - return curContext.override(this); - } - else { - this.readToken(this.fullCharCodeAtPos()); - } -}; -pp.readToken = function (code) { - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 ) { - return this.readWord(); - } - return this.getTokenFromCode(code); -}; -pp.fullCharCodeAtPos = function () { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xdc00) { - return code; - } - var next = this.input.charCodeAt(this.pos + 1); - return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00; -}; -pp.skipBlockComment = function () { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { - this.raise(this.pos - 2, "Unterminated comment"); - } - this.pos = end + 2; - if (this.options.locations) { - for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) { - ++this.curLine; - pos = this.lineStart = nextBreak; - } - } - if (this.options.onComment) { - this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition()); - } -}; -pp.skipLineComment = function (startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this.input.charCodeAt(++this.pos); - } - if (this.options.onComment) { - this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition()); - } -}; -pp.skipSpace = function () { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32: - case 160: - ++this.pos; - break; - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10: - case 8232: - case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break; - case 47: - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: - this.skipBlockComment(); - break; - case 47: - this.skipLineComment(2); - break; - default: - break loop; - } - break; - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } - else { - break loop; - } - } - } -}; -pp.finishToken = function (type, val) { - this.end = this.pos; - if (this.options.locations) { - this.endLoc = this.curPosition(); - } - var prevType = this.type; - this.type = type; - this.value = val; - this.updateContext(prevType); -}; -pp.readToken_dot = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { - return this.readNumber(true); - } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { - this.pos += 3; - return this.finishToken(types$1.ellipsis); - } - else { - ++this.pos; - return this.finishToken(types$1.dot); - } -}; -pp.readToken_slash = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { - ++this.pos; - return this.readRegexp(); - } - if (next === 61) { - return this.finishOp(types$1.assign, 2); - } - return this.finishOp(types$1.slash, 1); -}; -pp.readToken_mult_modulo_exp = function (code) { - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types$1.star : types$1.modulo; - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types$1.starstar; - next = this.input.charCodeAt(this.pos + 2); - } - if (next === 61) { - return this.finishOp(types$1.assign, size + 1); - } - return this.finishOp(tokentype, size); -}; -pp.readToken_pipe_amp = function (code) { - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (this.options.ecmaVersion >= 12) { - var next2 = this.input.charCodeAt(this.pos + 2); - if (next2 === 61) { - return this.finishOp(types$1.assign, 3); - } - } - return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2); - } - if (next === 61) { - return this.finishOp(types$1.assign, 2); - } - return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1); -}; -pp.readToken_caret = function () { - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { - return this.finishOp(types$1.assign, 2); - } - return this.finishOp(types$1.bitwiseXOR, 1); -}; -pp.readToken_plus_min = function (code) { - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken(); - } - return this.finishOp(types$1.incDec, 2); - } - if (next === 61) { - return this.finishOp(types$1.assign, 2); - } - return this.finishOp(types$1.plusMin, 1); -}; -pp.readToken_lt_gt = function (code) { - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { - return this.finishOp(types$1.assign, size + 1); - } - return this.finishOp(types$1.bitShift, size); - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - this.skipLineComment(4); - this.skipSpace(); - return this.nextToken(); - } - if (next === 61) { - size = 2; - } - return this.finishOp(types$1.relational, size); -}; -pp.readToken_eq_excl = function (code) { - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { - return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); - } - if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { - this.pos += 2; - return this.finishToken(types$1.arrow); - } - return this.finishOp(code === 61 ? types$1.eq : types$1.prefix, 1); -}; -pp.readToken_question = function () { - var ecmaVersion = this.options.ecmaVersion; - if (ecmaVersion >= 11) { - var next = this.input.charCodeAt(this.pos + 1); - if (next === 46) { - var next2 = this.input.charCodeAt(this.pos + 2); - if (next2 < 48 || next2 > 57) { - return this.finishOp(types$1.questionDot, 2); - } - } - if (next === 63) { - if (ecmaVersion >= 12) { - var next2$1 = this.input.charCodeAt(this.pos + 2); - if (next2$1 === 61) { - return this.finishOp(types$1.assign, 3); - } - } - return this.finishOp(types$1.coalesce, 2); - } - } - return this.finishOp(types$1.question, 1); -}; -pp.readToken_numberSign = function () { - var ecmaVersion = this.options.ecmaVersion; - var code = 35; - if (ecmaVersion >= 13) { - ++this.pos; - code = this.fullCharCodeAtPos(); - if (isIdentifierStart(code, true) || code === 92 ) { - return this.finishToken(types$1.privateId, this.readWord1()); - } - } - this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'"); -}; -pp.getTokenFromCode = function (code) { - switch (code) { - case 46: - return this.readToken_dot(); - case 40: - ++this.pos; - return this.finishToken(types$1.parenL); - case 41: - ++this.pos; - return this.finishToken(types$1.parenR); - case 59: - ++this.pos; - return this.finishToken(types$1.semi); - case 44: - ++this.pos; - return this.finishToken(types$1.comma); - case 91: - ++this.pos; - return this.finishToken(types$1.bracketL); - case 93: - ++this.pos; - return this.finishToken(types$1.bracketR); - case 123: - ++this.pos; - return this.finishToken(types$1.braceL); - case 125: - ++this.pos; - return this.finishToken(types$1.braceR); - case 58: - ++this.pos; - return this.finishToken(types$1.colon); - case 96: - if (this.options.ecmaVersion < 6) { - break; - } - ++this.pos; - return this.finishToken(types$1.backQuote); - case 48: - var next = this.input.charCodeAt(this.pos + 1); - if (next === 120 || next === 88) { - return this.readRadixNumber(16); - } - if (this.options.ecmaVersion >= 6) { - if (next === 111 || next === 79) { - return this.readRadixNumber(8); - } - if (next === 98 || next === 66) { - return this.readRadixNumber(2); - } - } - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - return this.readNumber(false); - case 34: - case 39: - return this.readString(code); - case 47: - return this.readToken_slash(); - case 37: - case 42: - return this.readToken_mult_modulo_exp(code); - case 124: - case 38: - return this.readToken_pipe_amp(code); - case 94: - return this.readToken_caret(); - case 43: - case 45: - return this.readToken_plus_min(code); - case 60: - case 62: - return this.readToken_lt_gt(code); - case 61: - case 33: - return this.readToken_eq_excl(code); - case 63: - return this.readToken_question(); - case 126: - return this.finishOp(types$1.prefix, 1); - case 35: - return this.readToken_numberSign(); - } - this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'"); -}; -pp.finishOp = function (type, size) { - var str = this.input.slice(this.pos, this.pos + size); - this.pos += size; - return this.finishToken(type, str); -}; -pp.readRegexp = function () { - var escaped, inClass, start = this.pos; - for (;;) { - if (this.pos >= this.input.length) { - this.raise(start, "Unterminated regular expression"); - } - var ch = this.input.charAt(this.pos); - if (lineBreak.test(ch)) { - this.raise(start, "Unterminated regular expression"); - } - if (!escaped) { - if (ch === "[") { - inClass = true; - } - else if (ch === "]" && inClass) { - inClass = false; - } - else if (ch === "/" && !inClass) { - break; - } - escaped = ch === "\\"; - } - else { - escaped = false; - } - ++this.pos; - } - var pattern = this.input.slice(start, this.pos); - ++this.pos; - var flagsStart = this.pos; - var flags = this.readWord1(); - if (this.containsEsc) { - this.unexpected(flagsStart); - } - var state = this.regexpState || (this.regexpState = new RegExpValidationState(this)); - state.reset(start, pattern, flags); - this.validateRegExpFlags(state); - this.validateRegExpPattern(state); - var value = null; - try { - value = new RegExp(pattern, flags); - } - catch (e) { - } - return this.finishToken(types$1.regexp, { pattern: pattern, flags: flags, value: value }); -}; -pp.readInt = function (radix, len, maybeLegacyOctalNumericLiteral) { - var allowSeparators = this.options.ecmaVersion >= 12 && len === undefined; - var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48; - var start = this.pos, total = 0, lastCode = 0; - for (var i = 0, e = len == null ? Infinity : len; i < e; ++i, ++this.pos) { - var code = this.input.charCodeAt(this.pos), val = (void 0); - if (allowSeparators && code === 95) { - if (isLegacyOctalNumericLiteral) { - this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"); - } - if (lastCode === 95) { - this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"); - } - if (i === 0) { - this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"); - } - lastCode = code; - continue; - } - if (code >= 97) { - val = code - 97 + 10; - } - else if (code >= 65) { - val = code - 65 + 10; - } - else if (code >= 48 && code <= 57) { - val = code - 48; - } - else { - val = Infinity; - } - if (val >= radix) { - break; - } - lastCode = code; - total = total * radix + val; - } - if (allowSeparators && lastCode === 95) { - this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"); - } - if (this.pos === start || len != null && this.pos - start !== len) { - return null; - } - return total; -}; -function stringToNumber(str, isLegacyOctalNumericLiteral) { - if (isLegacyOctalNumericLiteral) { - return parseInt(str, 8); - } - return parseFloat(str.replace(/_/g, "")); -} -function stringToBigInt(str) { - if (typeof BigInt !== "function") { - return null; - } - return BigInt(str.replace(/_/g, "")); -} -pp.readRadixNumber = function (radix) { - var start = this.pos; - this.pos += 2; - var val = this.readInt(radix); - if (val == null) { - this.raise(this.start + 2, "Expected number in radix " + radix); - } - if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) { - val = stringToBigInt(this.input.slice(start, this.pos)); - ++this.pos; - } - else if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.pos, "Identifier directly after number"); - } - return this.finishToken(types$1.num, val); -}; -pp.readNumber = function (startsWithDot) { - var start = this.pos; - if (!startsWithDot && this.readInt(10, undefined, true) === null) { - this.raise(start, "Invalid number"); - } - var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48; - if (octal && this.strict) { - this.raise(start, "Invalid number"); - } - var next = this.input.charCodeAt(this.pos); - if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) { - var val$1 = stringToBigInt(this.input.slice(start, this.pos)); - ++this.pos; - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.pos, "Identifier directly after number"); - } - return this.finishToken(types$1.num, val$1); - } - if (octal && /[89]/.test(this.input.slice(start, this.pos))) { - octal = false; - } - if (next === 46 && !octal) { - ++this.pos; - this.readInt(10); - next = this.input.charCodeAt(this.pos); - } - if ((next === 69 || next === 101) && !octal) { - next = this.input.charCodeAt(++this.pos); - if (next === 43 || next === 45) { - ++this.pos; - } - if (this.readInt(10) === null) { - this.raise(start, "Invalid number"); - } - } - if (isIdentifierStart(this.fullCharCodeAtPos())) { - this.raise(this.pos, "Identifier directly after number"); - } - var val = stringToNumber(this.input.slice(start, this.pos), octal); - return this.finishToken(types$1.num, val); -}; -pp.readCodePoint = function () { - var ch = this.input.charCodeAt(this.pos), code; - if (ch === 123) { - if (this.options.ecmaVersion < 6) { - this.unexpected(); - } - var codePos = ++this.pos; - code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos); - ++this.pos; - if (code > 0x10FFFF) { - this.invalidStringToken(codePos, "Code point out of bounds"); - } - } - else { - code = this.readHexChar(4); - } - return code; -}; -pp.readString = function (quote) { - var out = "", chunkStart = ++this.pos; - for (;;) { - if (this.pos >= this.input.length) { - this.raise(this.start, "Unterminated string constant"); - } - var ch = this.input.charCodeAt(this.pos); - if (ch === quote) { - break; - } - if (ch === 92) { - out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(false); - chunkStart = this.pos; - } - else if (ch === 0x2028 || ch === 0x2029) { - if (this.options.ecmaVersion < 10) { - this.raise(this.start, "Unterminated string constant"); - } - ++this.pos; - if (this.options.locations) { - this.curLine++; - this.lineStart = this.pos; - } - } - else { - if (isNewLine(ch)) { - this.raise(this.start, "Unterminated string constant"); - } - ++this.pos; - } - } - out += this.input.slice(chunkStart, this.pos++); - return this.finishToken(types$1.string, out); -}; -var INVALID_TEMPLATE_ESCAPE_ERROR = {}; -pp.tryReadTemplateToken = function () { - this.inTemplateElement = true; - try { - this.readTmplToken(); - } - catch (err) { - if (err === INVALID_TEMPLATE_ESCAPE_ERROR) { - this.readInvalidTemplateToken(); - } - else { - throw err; - } - } - this.inTemplateElement = false; -}; -pp.invalidStringToken = function (position, message) { - if (this.inTemplateElement && this.options.ecmaVersion >= 9) { - throw INVALID_TEMPLATE_ESCAPE_ERROR; - } - else { - this.raise(position, message); - } -}; -pp.readTmplToken = function () { - var out = "", chunkStart = this.pos; - for (;;) { - if (this.pos >= this.input.length) { - this.raise(this.start, "Unterminated template"); - } - var ch = this.input.charCodeAt(this.pos); - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { - if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) { - if (ch === 36) { - this.pos += 2; - return this.finishToken(types$1.dollarBraceL); - } - else { - ++this.pos; - return this.finishToken(types$1.backQuote); - } - } - out += this.input.slice(chunkStart, this.pos); - return this.finishToken(types$1.template, out); - } - if (ch === 92) { - out += this.input.slice(chunkStart, this.pos); - out += this.readEscapedChar(true); - chunkStart = this.pos; - } - else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.pos); - ++this.pos; - switch (ch) { - case 13: - if (this.input.charCodeAt(this.pos) === 10) { - ++this.pos; - } - case 10: - out += "\n"; - break; - default: - out += String.fromCharCode(ch); - break; - } - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - chunkStart = this.pos; - } - else { - ++this.pos; - } - } -}; -pp.readInvalidTemplateToken = function () { - for (; this.pos < this.input.length; this.pos++) { - switch (this.input[this.pos]) { - case "\\": - ++this.pos; - break; - case "$": - if (this.input[this.pos + 1] !== "{") { - break; - } - case "`": - return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos)); - } - } - this.raise(this.start, "Unterminated template"); -}; -pp.readEscapedChar = function (inTemplate) { - var ch = this.input.charCodeAt(++this.pos); - ++this.pos; - switch (ch) { - case 110: return "\n"; - case 114: return "\r"; - case 120: return String.fromCharCode(this.readHexChar(2)); - case 117: return codePointToString(this.readCodePoint()); - case 116: return "\t"; - case 98: return "\b"; - case 118: return "\u000b"; - case 102: return "\f"; - case 13: if (this.input.charCodeAt(this.pos) === 10) { - ++this.pos; - } - case 10: - if (this.options.locations) { - this.lineStart = this.pos; - ++this.curLine; - } - return ""; - case 56: - case 57: - if (this.strict) { - this.invalidStringToken(this.pos - 1, "Invalid escape sequence"); - } - if (inTemplate) { - var codePos = this.pos - 1; - this.invalidStringToken(codePos, "Invalid escape sequence in template string"); - } - default: - if (ch >= 48 && ch <= 55) { - var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]; - var octal = parseInt(octalStr, 8); - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - this.pos += octalStr.length - 1; - ch = this.input.charCodeAt(this.pos); - if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) { - this.invalidStringToken(this.pos - 1 - octalStr.length, inTemplate - ? "Octal literal in template string" - : "Octal literal in strict mode"); - } - return String.fromCharCode(octal); - } - if (isNewLine(ch)) { - return ""; - } - return String.fromCharCode(ch); - } -}; -pp.readHexChar = function (len) { - var codePos = this.pos; - var n = this.readInt(16, len); - if (n === null) { - this.invalidStringToken(codePos, "Bad character escape sequence"); - } - return n; -}; -pp.readWord1 = function () { - this.containsEsc = false; - var word = "", first = true, chunkStart = this.pos; - var astral = this.options.ecmaVersion >= 6; - while (this.pos < this.input.length) { - var ch = this.fullCharCodeAtPos(); - if (isIdentifierChar(ch, astral)) { - this.pos += ch <= 0xffff ? 1 : 2; - } - else if (ch === 92) { - this.containsEsc = true; - word += this.input.slice(chunkStart, this.pos); - var escStart = this.pos; - if (this.input.charCodeAt(++this.pos) !== 117) - { - this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"); - } - ++this.pos; - var esc = this.readCodePoint(); - if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) { - this.invalidStringToken(escStart, "Invalid Unicode escape"); - } - word += codePointToString(esc); - chunkStart = this.pos; - } - else { - break; - } - first = false; - } - return word + this.input.slice(chunkStart, this.pos); -}; -pp.readWord = function () { - var word = this.readWord1(); - var type = types$1.name; - if (this.keywords.test(word)) { - type = keywords[word]; - } - return this.finishToken(type, word); -}; -var version = "8.10.0"; -Parser$1.acorn = { - Parser: Parser$1, - version: version, - defaultOptions: defaultOptions, - Position: Position, - SourceLocation: SourceLocation, - getLineInfo: getLineInfo, - Node: Node, - TokenType: TokenType, - tokTypes: types$1, - keywordTypes: keywords, - TokContext: TokContext, - tokContexts: types, - isIdentifierChar: isIdentifierChar, - isIdentifierStart: isIdentifierStart, - Token: Token$1, - isNewLine: isNewLine, - lineBreak: lineBreak, - lineBreakG: lineBreakG, - nonASCIIwhitespace: nonASCIIwhitespace -}; - -// Copyright (c) 2020 The Chromium Authors. All rights reserved. -Parser$1.tokenizer.bind(Parser$1); -const parse$1 = Parser$1.parse.bind(Parser$1); - -// Copyright 2020 The Chromium Authors -class TextCursor { - #lineEndings; - #offset = 0; - #lineNumber = 0; - #columnNumber = 0; - constructor(lineEndings) { - this.#lineEndings = lineEndings; - } - advance(offset) { - this.#offset = offset; - while (this.#lineNumber < this.#lineEndings.length && this.#lineEndings[this.#lineNumber] < this.#offset) { - ++this.#lineNumber; - } - this.#columnNumber = this.#lineNumber ? this.#offset - this.#lineEndings[this.#lineNumber - 1] - 1 : this.#offset; - } - offset() { - return this.#offset; - } - resetTo(offset) { - this.#offset = offset; - this.#lineNumber = - lowerBound(this.#lineEndings, offset, DEFAULT_COMPARATOR); - this.#columnNumber = this.#lineNumber ? this.#offset - this.#lineEndings[this.#lineNumber - 1] - 1 : this.#offset; - } - lineNumber() { - return this.#lineNumber; - } - columnNumber() { - return this.#columnNumber; - } -} - -// Copyright 2020 The Chromium Authors -const BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const BASE64_CODES = new Uint8Array(123); -for (let index = 0; index < BASE64_CHARS.length; ++index) { - BASE64_CODES[BASE64_CHARS.charCodeAt(index)] = index; -} - -// Copyright 2022 The Chromium Authors -const D50_X = 0.9642; -const D50_Y = 1.0; -const D50_Z = 0.8251; -class Vector3 { - values = [0, 0, 0]; - constructor(values) { - if (values) { - this.values = values; - } - } -} -class Matrix3x3 { - values = [ - [0, 0, 0], - [0, 0, 0], - [0, 0, 0], - ]; - constructor(values) { - if (values) { - this.values = values; - } - } - multiply(other) { - const dst = new Vector3(); - for (let row = 0; row < 3; ++row) { - dst.values[row] = this.values[row][0] * other.values[0] + this.values[row][1] * other.values[1] + - this.values[row][2] * other.values[2]; - } - return dst; - } -} -class TransferFunction { - g; - a; - b; - c; - d; - e; - f; - constructor(g, a, b = 0, c = 0, d = 0, e = 0, f = 0) { - this.g = g; - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - } - eval(val) { - const sign = val < 0 ? -1 : 1.0; - const abs = val * sign; - if (abs < this.d) { - return sign * (this.c * abs + this.f); - } - return sign * (Math.pow(this.a * abs + this.b, this.g) + this.e); - } -} -const NAMED_TRANSFER_FN = { - sRGB: new TransferFunction(2.4, (1 / 1.055), (0.055 / 1.055), (1 / 12.92), 0.04045, 0.0, 0.0), - sRGB_INVERSE: new TransferFunction(0.416667, 1.13728, -0, 12.92, 0.0031308, -0.0549698, -0), - proPhotoRGB: new TransferFunction(1.8, 1), - proPhotoRGB_INVERSE: new TransferFunction(0.555556, 1, -0, 0, 0, 0, 0), - k2Dot2: new TransferFunction(2.2, 1.0), - k2Dot2_INVERSE: new TransferFunction(0.454545, 1), - rec2020: new TransferFunction(2.22222, 0.909672, 0.0903276, 0.222222, 0.0812429, 0, 0), - rec2020_INVERSE: new TransferFunction(0.45, 1.23439, -0, 4.5, 0.018054, -0.0993195, -0), -}; -const NAMED_GAMUTS = { - sRGB: new Matrix3x3([ - [0.436065674, 0.385147095, 0.143066406], - [0.222488403, 0.716873169, 0.060607910], - [0.013916016, 0.097076416, 0.714096069], - ]), - sRGB_INVERSE: new Matrix3x3([ - [3.134112151374599, -1.6173924597114966, -0.4906334036481285], - [-0.9787872938826594, 1.9162795854799963, 0.0334547139520088], - [0.07198304248352326, -0.2289858493321844, 1.4053851325241447], - ]), - displayP3: new Matrix3x3([ - [0.515102, 0.291965, 0.157153], - [0.241182, 0.692236, 0.0665819], - [-104941e-8, 0.0418818, 0.784378], - ]), - displayP3_INVERSE: new Matrix3x3([ - [2.404045155982687, -0.9898986932663839, -0.3976317191366333], - [-0.8422283799266768, 1.7988505115115485, 0.016048170293157416], - [0.04818705979712955, -0.09737385156228891, 1.2735066448052303], - ]), - adobeRGB: new Matrix3x3([ - [0.60974, 0.20528, 0.14919], - [0.31111, 0.62567, 0.06322], - [0.01947, 0.06087, 0.74457], - ]), - adobeRGB_INVERSE: new Matrix3x3([ - [1.9625385510109137, -0.6106892546501431, -0.3413827467482388], - [-0.9787580455521, 1.9161624707082339, 0.03341676594241408], - [0.028696263137883395, -0.1406807819331586, 1.349252109991369], - ]), - rec2020: new Matrix3x3([ - [0.673459, 0.165661, 0.125100], - [0.279033, 0.675338, 0.0456288], - [-193139e-8, 0.0299794, 0.797162], - ]), - rec2020_INVERSE: new Matrix3x3([ - [1.647275201661012, -0.3936024771460771, -0.23598028884792507], - [-0.6826176165196962, 1.647617775014935, 0.01281626807852422], - [0.029662725298529837, -0.06291668721366285, 1.2533964313435522], - ])}; -function degToRad(deg) { - return deg * (Math.PI / 180); -} -function radToDeg(rad) { - return rad * (180 / Math.PI); -} -function applyTransferFns(fn, r, g, b) { - return [fn.eval(r), fn.eval(g), fn.eval(b)]; -} -const OKLAB_TO_LMS_MATRIX = new Matrix3x3([ - [0.99999999845051981432, 0.39633779217376785678, 0.21580375806075880339], - [1.0000000088817607767, -0.10556134232365635, -0.06385417477170591], - [1.0000000546724109177, -0.08948418209496575, -1.2914855378640917], -]); -const LMS_TO_OKLAB_MATRIX = new Matrix3x3([ - [0.2104542553, 0.7936177849999999, -0.0040720468], - [1.9779984951000003, -2.4285922049999997, 0.4505937099000001], - [0.025904037099999982, 0.7827717662, -0.8086757660000001], -]); -const XYZ_TO_LMS_MATRIX = new Matrix3x3([ - [0.8190224432164319, 0.3619062562801221, -0.12887378261216414], - [0.0329836671980271, 0.9292868468965546, 0.03614466816999844], - [0.048177199566046255, 0.26423952494422764, 0.6335478258136937], -]); -const LMS_TO_XYZ_MATRIX = new Matrix3x3([ - [1.226879873374156, -0.5578149965554814, 0.2813910501772159], - [-0.040575762624313734, 1.1122868293970596, -0.07171106666151703], - [-0.07637294974672144, -0.4214933239627915, 1.586924024427242], -]); -const PRO_PHOTO_TO_XYZD50_MATRIX = new Matrix3x3([ - [0.7976700747153241, 0.13519395152800417, 0.03135596341127167], - [0.28803902352472205, 0.7118744007923554, 0.00008661179538844252], - [2.739876695467402e-7, -14405226518969991e-22, 0.825211112593861], -]); -const XYZD50_TO_PRO_PHOTO_MATRIX = new Matrix3x3([ - [1.3459533710138858, -0.25561367037652133, -0.051116041522131374], - [-0.544600415668951, 1.5081687311475767, 0.020535163968720935], - [-13975622054109725e-22, 0.000002717590904589903, 1.2118111696814942], -]); -const XYZD65_TO_XYZD50_MATRIX = new Matrix3x3([ - [1.0478573189120088, 0.022907374491829943, -0.050162247377152525], - [0.029570500050499514, 0.9904755577034089, -0.017061518194840468], - [-0.00924047197558879, 0.015052921526981566, 0.7519708530777581], -]); -const XYZD50_TO_XYZD65_MATRIX = new Matrix3x3([ - [0.9555366447632887, -0.02306009252137888, 0.06321844147263304], - [-0.028315378228764922, 1.009951351591575, 0.021026001591792402], - [0.012308773293784308, -0.02050053471777469, 1.3301947294775631], -]); -class ColorConverter { - static labToXyzd50(l, a, b) { - let y = (l + 16.0) / 116.0; - let x = y + a / 500.0; - let z = y - b / 200.0; - function labInverseTransferFunction(t) { - const delta = (24.0 / 116.0); - if (t <= delta) { - return (108.0 / 841.0) * (t - (16.0 / 116.0)); - } - return t * t * t; - } - x = labInverseTransferFunction(x) * D50_X; - y = labInverseTransferFunction(y) * D50_Y; - z = labInverseTransferFunction(z) * D50_Z; - return [x, y, z]; - } - static xyzd50ToLab(x, y, z) { - function labTransferFunction(t) { - const deltaLimit = (24.0 / 116.0) * (24.0 / 116.0) * (24.0 / 116.0); - if (t <= deltaLimit) { - return (841.0 / 108.0) * t + (16.0 / 116.0); - } - return Math.pow(t, 1.0 / 3.0); - } - x = labTransferFunction(x / D50_X); - y = labTransferFunction(y / D50_Y); - z = labTransferFunction(z / D50_Z); - const l = 116.0 * y - 16.0; - const a = 500.0 * (x - y); - const b = 200.0 * (y - z); - return [l, a, b]; - } - static oklabToXyzd65(l, a, b) { - const labInput = new Vector3([l, a, b]); - const lmsIntermediate = OKLAB_TO_LMS_MATRIX.multiply(labInput); - lmsIntermediate.values[0] = lmsIntermediate.values[0] * lmsIntermediate.values[0] * lmsIntermediate.values[0]; - lmsIntermediate.values[1] = lmsIntermediate.values[1] * lmsIntermediate.values[1] * lmsIntermediate.values[1]; - lmsIntermediate.values[2] = lmsIntermediate.values[2] * lmsIntermediate.values[2] * lmsIntermediate.values[2]; - const xyzOutput = LMS_TO_XYZ_MATRIX.multiply(lmsIntermediate); - return xyzOutput.values; - } - static xyzd65ToOklab(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const lmsIntermediate = XYZ_TO_LMS_MATRIX.multiply(xyzInput); - lmsIntermediate.values[0] = Math.pow(lmsIntermediate.values[0], 1.0 / 3.0); - lmsIntermediate.values[1] = Math.pow(lmsIntermediate.values[1], 1.0 / 3.0); - lmsIntermediate.values[2] = Math.pow(lmsIntermediate.values[2], 1.0 / 3.0); - const labOutput = LMS_TO_OKLAB_MATRIX.multiply(lmsIntermediate); - return [labOutput.values[0], labOutput.values[1], labOutput.values[2]]; - } - static lchToLab(l, c, h) { - if (h === undefined) { - return [l, 0, 0]; - } - return [l, c * Math.cos(degToRad(h)), c * Math.sin(degToRad(h))]; - } - static labToLch(l, a, b) { - return [l, Math.sqrt(a * a + b * b), radToDeg(Math.atan2(b, a))]; - } - static displayP3ToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.sRGB, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.displayP3.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToDisplayP3(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.displayP3_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static proPhotoToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = PRO_PHOTO_TO_XYZD50_MATRIX.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToProPhoto(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = XYZD50_TO_PRO_PHOTO_MATRIX.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static adobeRGBToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.k2Dot2, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.adobeRGB.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToAdobeRGB(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.adobeRGB_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.k2Dot2_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static rec2020ToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.rec2020, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.rec2020.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToRec2020(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.rec2020_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.rec2020_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static xyzd50ToD65(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const xyzOutput = XYZD50_TO_XYZD65_MATRIX.multiply(xyzInput); - return xyzOutput.values; - } - static xyzd65ToD50(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const xyzOutput = XYZD65_TO_XYZD50_MATRIX.multiply(xyzInput); - return xyzOutput.values; - } - static xyzd50TosRGBLinear(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbResult = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput); - return rgbResult.values; - } - static srgbLinearToXyzd50(r, g, b) { - const rgbInput = new Vector3([r, g, b]); - const xyzOutput = NAMED_GAMUTS.sRGB.multiply(rgbInput); - return xyzOutput.values; - } - static srgbToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.sRGB, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.sRGB.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToSrgb(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static oklchToXyzd50(lInput, c, h) { - const [l, a, b] = ColorConverter.lchToLab(lInput, c, h); - const [x65, y65, z65] = ColorConverter.oklabToXyzd65(l, a, b); - return ColorConverter.xyzd65ToD50(x65, y65, z65); - } - static xyzd50ToOklch(x, y, z) { - const [x65, y65, z65] = ColorConverter.xyzd50ToD65(x, y, z); - const [l, a, b] = ColorConverter.xyzd65ToOklab(x65, y65, z65); - return ColorConverter.labToLch(l, a, b); - } -} - -// Copyright 2020 The Chromium Authors -function blendColors(fgRGBA, bgRGBA) { - const alpha = fgRGBA[3]; - return [ - ((1 - alpha) * bgRGBA[0]) + (alpha * fgRGBA[0]), - ((1 - alpha) * bgRGBA[1]) + (alpha * fgRGBA[1]), - ((1 - alpha) * bgRGBA[2]) + (alpha * fgRGBA[2]), - alpha + (bgRGBA[3] * (1 - alpha)), - ]; -} -function rgbToHue([r, g, b]) { - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - const diff = max - min; - let h; - if (min === max) { - h = 0; - } - else if (r === max) { - h = ((1 / 6 * (g - b) / diff) + 1) % 1; - } - else if (g === max) { - h = (1 / 6 * (b - r) / diff) + 1 / 3; - } - else { - h = (1 / 6 * (r - g) / diff) + 2 / 3; - } - return h; -} -function rgbToHsl(rgb) { - const [h, s, l] = rgbaToHsla([...rgb, undefined]); - return [h, s, l]; -} -function rgbaToHsla([r, g, b, a]) { - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - const diff = max - min; - const sum = max + min; - const h = rgbToHue([r, g, b]); - const l = 0.5 * sum; - let s; - if (l === 0) { - s = 0; - } - else if (l === 1) { - s = 0; - } - else if (l <= 0.5) { - s = diff / sum; - } - else { - s = diff / (2 - sum); - } - return [h, s, l, a]; -} -function rgbToHwb(rgb) { - const [h, w, b] = rgbaToHwba([...rgb, undefined]); - return [h, w, b]; -} -function rgbaToHwba([r, g, b, a]) { - const h = rgbToHue([r, g, b]); - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - return [h, min, 1 - max, a]; -} - -// Copyright 2021 The Chromium Authors -/* - * Copyright (C) 2009 Apple Inc. All rights reserved. - * Copyright (C) 2009 Joseph Pecoraro - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -function normalizeHue(hue) { - return ((hue % 360) + 360) % 360; -} -function parseAngle(angleText) { - const angle = angleText.replace(/(deg|g?rad|turn)$/, ''); - if (isNaN(angle) || angleText.match(/\s+(deg|g?rad|turn)/)) { - return null; - } - const number = parseFloat(angle); - if (angleText.includes('turn')) { - return number * 360; - } - if (angleText.includes('grad')) { - return number * 9 / 10; - } - if (angleText.includes('rad')) { - return number * 180 / Math.PI; - } - return number; -} -function getColorSpace(colorSpaceText) { - switch (colorSpaceText) { - case "srgb" : - return "srgb" ; - case "srgb-linear" : - return "srgb-linear" ; - case "display-p3" : - return "display-p3" ; - case "a98-rgb" : - return "a98-rgb" ; - case "prophoto-rgb" : - return "prophoto-rgb" ; - case "rec2020" : - return "rec2020" ; - case "xyz" : - return "xyz" ; - case "xyz-d50" : - return "xyz-d50" ; - case "xyz-d65" : - return "xyz-d65" ; - } - return null; -} -function mapPercentToRange(percent, range) { - const sign = Math.sign(percent); - const absPercent = Math.abs(percent); - const [outMin, outMax] = range; - return sign * (absPercent * (outMax - outMin) / 100 + outMin); -} -function clamp(value, { min, max }) { - if (value === null) { - return value; - } - { - value = Math.max(value, min); - } - if (max !== undefined) { - value = Math.min(value, max); - } - return value; -} -function parsePercentage(value, range) { - if (!value.endsWith('%')) { - return null; - } - const percentage = parseFloat(value.substr(0, value.length - 1)); - return isNaN(percentage) ? null : mapPercentToRange(percentage, range); -} -function parseNumber(value) { - const number = parseFloat(value); - return isNaN(number) ? null : number; -} -function parseAlpha(value) { - if (value === undefined) { - return null; - } - return clamp(parsePercentage(value, [0, 1]) ?? parseNumber(value), { min: 0, max: 1 }); -} -function parsePercentOrNumber(value, range = [0, 1]) { - if (isNaN(value.replace('%', ''))) { - return null; - } - const parsed = parseFloat(value); - if (value.indexOf('%') !== -1) { - if (value.indexOf('%') !== value.length - 1) { - return null; - } - return mapPercentToRange(parsed, range); - } - return parsed; -} -function parseRgbNumeric(value) { - const parsed = parsePercentOrNumber(value); - if (parsed === null) { - return null; - } - if (value.indexOf('%') !== -1) { - return parsed; - } - return parsed / 255; -} -function parseHueNumeric(value) { - const angle = value.replace(/(deg|g?rad|turn)$/, ''); - if (isNaN(angle) || value.match(/\s+(deg|g?rad|turn)/)) { - return null; - } - const number = parseFloat(angle); - if (value.indexOf('turn') !== -1) { - return number % 1; - } - if (value.indexOf('grad') !== -1) { - return (number / 400) % 1; - } - if (value.indexOf('rad') !== -1) { - return (number / (2 * Math.PI)) % 1; - } - return (number / 360) % 1; -} -function parseSatLightNumeric(value) { - if (value.indexOf('%') !== value.length - 1 || isNaN(value.replace('%', ''))) { - return null; - } - const parsed = parseFloat(value); - return parsed / 100; -} -function parseAlphaNumeric(value) { - return parsePercentOrNumber(value); -} -function hsva2hsla(hsva) { - const h = hsva[0]; - let s = hsva[1]; - const v = hsva[2]; - const t = (2 - s) * v; - if (v === 0 || s === 0) { - s = 0; - } - else { - s *= v / (t < 1 ? t : 2 - t); - } - return [h, s, t / 2, hsva[3]]; -} -function hsl2rgb(hsl) { - const h = hsl[0]; - let s = hsl[1]; - const l = hsl[2]; - function hue2rgb(p, q, h) { - if (h < 0) { - h += 1; - } - else if (h > 1) { - h -= 1; - } - if ((h * 6) < 1) { - return p + (q - p) * h * 6; - } - if ((h * 2) < 1) { - return q; - } - if ((h * 3) < 2) { - return p + (q - p) * ((2 / 3) - h) * 6; - } - return p; - } - if (s < 0) { - s = 0; - } - let q; - if (l <= 0.5) { - q = l * (1 + s); - } - else { - q = l + s - (l * s); - } - const p = 2 * l - q; - const tr = h + (1 / 3); - const tg = h; - const tb = h - (1 / 3); - return [hue2rgb(p, q, tr), hue2rgb(p, q, tg), hue2rgb(p, q, tb), hsl[3]]; -} -function hwb2rgb(hwb) { - const h = hwb[0]; - const w = hwb[1]; - const b = hwb[2]; - const whiteRatio = w / (w + b); - let result = [whiteRatio, whiteRatio, whiteRatio, hwb[3]]; - if (w + b < 1) { - result = hsl2rgb([h, 1, 0.5, hwb[3]]); - for (let i = 0; i < 3; ++i) { - result[i] += w - (w + b) * result[i]; - } - } - return result; -} -function hsva2rgba(hsva) { - return hsl2rgb(hsva2hsla(hsva)); -} -const EPSILON = 0.01; -const WIDE_RANGE_EPSILON = 1; -function equals(a, b, accuracy = EPSILON) { - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return false; - } - for (const i in a) { - if (!equals(a[i], b[i])) { - return false; - } - } - return true; - } - if (Array.isArray(a) || Array.isArray(b)) { - return false; - } - if (a === null || b === null) { - return a === b; - } - return Math.abs(a - b) < accuracy; -} -function lessOrEquals(a, b, accuracy = EPSILON) { - return a - b <= accuracy; -} -class Lab { - l; - a; - b; - alpha; - #authoredText; - #rawParams; - channels = ["l" , "a" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(self.l, self.a, self.b), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => self, - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.labToXyzd50(this.l, this.a, this.b); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, a, b, alpha, authoredText) { - this.#rawParams = [l, a, b]; - this.l = clamp(l, { min: 0, max: 100 }); - if (equals(this.l, 0, WIDE_RANGE_EPSILON) || equals(this.l, 100, WIDE_RANGE_EPSILON)) { - a = b = 0; - } - this.a = a; - this.b = b; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - is(format) { - return format === this.format(); - } - as(format) { - return Lab.#conversions[format](this); - } - asLegacyColor() { - return this.as("rgba" ); - } - equal(color) { - const lab = color.as("lab" ); - return equals(lab.l, this.l, WIDE_RANGE_EPSILON) && equals(lab.a, this.a) && equals(lab.b, this.b) && - equals(lab.alpha, this.alpha); - } - format() { - return "lab" ; - } - setAlpha(alpha) { - return new Lab(this.l, this.a, this.b, alpha, undefined); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.a, this.b); - } - #stringify(l, a, b) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `lab(${stringifyWithPrecision(l, 0)} ${stringifyWithPrecision(a)} ${stringifyWithPrecision(b)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 100]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const a = parsePercentage(spec[1], [0, 125]) ?? parseNumber(spec[1]); - if (a === null) { - return null; - } - const b = parsePercentage(spec[2], [0, 125]) ?? parseNumber(spec[2]); - if (b === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new Lab(L, a, b, alpha, text); - } -} -class LCH { - #rawParams; - l; - c; - h; - alpha; - #authoredText; - channels = ["l" , "c" , "h" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => self, - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.lchToLab(self.l, self.c, self.h), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.labToXyzd50(...ColorConverter.lchToLab(this.l, this.c, this.h)); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, c, h, alpha, authoredText) { - this.#rawParams = [l, c, h]; - this.l = clamp(l, { min: 0, max: 100 }); - c = equals(this.l, 0, WIDE_RANGE_EPSILON) || equals(this.l, 100, WIDE_RANGE_EPSILON) ? 0 : c; - this.c = clamp(c, { min: 0 }); - h = equals(c, 0) ? 0 : h; - this.h = normalizeHue(h); - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - return LCH.#conversions[format](this); - } - equal(color) { - const lch = color.as("lch" ); - return equals(lch.l, this.l, WIDE_RANGE_EPSILON) && equals(lch.c, this.c) && equals(lch.h, this.h) && - equals(lch.alpha, this.alpha); - } - format() { - return "lch" ; - } - setAlpha(alpha) { - return new LCH(this.l, this.c, this.h, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.c, this.h); - } - #stringify(l, c, h) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `lch(${stringifyWithPrecision(l, 0)} ${stringifyWithPrecision(c)} ${stringifyWithPrecision(h)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - isHuePowerless() { - return equals(this.c, 0); - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 100]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const c = parsePercentage(spec[1], [0, 150]) ?? parseNumber(spec[1]); - if (c === null) { - return null; - } - const h = parseAngle(spec[2]); - if (h === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new LCH(L, c, h, alpha, text); - } -} -class Oklab { - #rawParams; - l; - a; - b; - alpha; - #authoredText; - channels = ["l" , "a" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => self, - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.xyzd65ToD50(...ColorConverter.oklabToXyzd65(this.l, this.a, this.b)); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, a, b, alpha, authoredText) { - this.#rawParams = [l, a, b]; - this.l = clamp(l, { min: 0, max: 1 }); - if (equals(this.l, 0) || equals(this.l, 1)) { - a = b = 0; - } - this.a = a; - this.b = b; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - return Oklab.#conversions[format](this); - } - equal(color) { - const oklab = color.as("oklab" ); - return equals(oklab.l, this.l) && equals(oklab.a, this.a) && equals(oklab.b, this.b) && - equals(oklab.alpha, this.alpha); - } - format() { - return "oklab" ; - } - setAlpha(alpha) { - return new Oklab(this.l, this.a, this.b, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.a, this.b); - } - #stringify(l, a, b) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `oklab(${stringifyWithPrecision(l)} ${stringifyWithPrecision(a)} ${stringifyWithPrecision(b)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 1]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const a = parsePercentage(spec[1], [0, 0.4]) ?? parseNumber(spec[1]); - if (a === null) { - return null; - } - const b = parsePercentage(spec[2], [0, 0.4]) ?? parseNumber(spec[2]); - if (b === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new Oklab(L, a, b, alpha, text); - } -} -class Oklch { - #rawParams; - l; - c; - h; - alpha; - #authoredText; - channels = ["l" , "c" , "h" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => self, - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.oklchToXyzd50(this.l, this.c, this.h); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, c, h, alpha, authoredText) { - this.#rawParams = [l, c, h]; - this.l = clamp(l, { min: 0, max: 1 }); - c = equals(this.l, 0) || equals(this.l, 1) ? 0 : c; - this.c = clamp(c, { min: 0 }); - h = equals(c, 0) ? 0 : h; - this.h = normalizeHue(h); - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - return Oklch.#conversions[format](this); - } - equal(color) { - const oklch = color.as("oklch" ); - return equals(oklch.l, this.l) && equals(oklch.c, this.c) && equals(oklch.h, this.h) && - equals(oklch.alpha, this.alpha); - } - format() { - return "oklch" ; - } - setAlpha(alpha) { - return new Oklch(this.l, this.c, this.h, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.c, this.h); - } - #stringify(l, c, h) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `oklch(${stringifyWithPrecision(l)} ${stringifyWithPrecision(c)} ${stringifyWithPrecision(h)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 1]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const c = parsePercentage(spec[1], [0, 0.4]) ?? parseNumber(spec[1]); - if (c === null) { - return null; - } - const h = parseAngle(spec[2]); - if (h === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new Oklch(L, c, h, alpha, text); - } -} -class ColorFunction { - #rawParams; - p0; - p1; - p2; - alpha; - colorSpace; - #authoredText; - get channels() { - return this.isXYZ() ? ["x" , "y" , "z" , "alpha" ] : - ["r" , "g" , "b" , "alpha" ]; - } - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - const [p0, p1, p2] = this.#rawParams; - switch (this.colorSpace) { - case "srgb" : - return ColorConverter.srgbToXyzd50(p0, p1, p2); - case "srgb-linear" : - return ColorConverter.srgbLinearToXyzd50(p0, p1, p2); - case "display-p3" : - return ColorConverter.displayP3ToXyzd50(p0, p1, p2); - case "a98-rgb" : - return ColorConverter.adobeRGBToXyzd50(p0, p1, p2); - case "prophoto-rgb" : - return ColorConverter.proPhotoToXyzd50(p0, p1, p2); - case "rec2020" : - return ColorConverter.rec2020ToXyzd50(p0, p1, p2); - case "xyz-d50" : - return [p0, p1, p2]; - case "xyz" : - case "xyz-d65" : - return ColorConverter.xyzd65ToD50(p0, p1, p2); - } - throw new Error('Invalid color space'); - } - #getRGBArray(withAlpha = true) { - const [p0, p1, p2] = this.#rawParams; - const params = this.colorSpace === "srgb" ? [p0, p1, p2] : [...ColorConverter.xyzd50ToSrgb(...this.#toXyzd50())]; - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(colorSpace, p0, p1, p2, alpha, authoredText) { - this.#rawParams = [p0, p1, p2]; - this.colorSpace = colorSpace; - this.#authoredText = authoredText; - if (this.colorSpace !== "xyz-d50" && this.colorSpace !== "xyz-d65" && this.colorSpace !== "xyz" ) { - p0 = clamp(p0, { min: 0, max: 1 }); - p1 = clamp(p1, { min: 0, max: 1 }); - p2 = clamp(p2, { min: 0, max: 1 }); - } - this.p0 = p0; - this.p1 = p1; - this.p2 = p2; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - if (this.colorSpace === format) { - return this; - } - return ColorFunction.#conversions[format](this); - } - equal(color) { - const space = color.as(this.colorSpace); - return equals(this.p0, space.p0) && equals(this.p1, space.p1) && equals(this.p2, space.p2) && - equals(this.alpha, space.alpha); - } - format() { - return this.colorSpace; - } - setAlpha(alpha) { - return new ColorFunction(this.colorSpace, this.p0, this.p1, this.p2, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.p0, this.p1, this.p2); - } - #stringify(p0, p1, p2) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `color(${this.colorSpace} ${stringifyWithPrecision(p0)} ${stringifyWithPrecision(p1)} ${stringifyWithPrecision(p2)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - if (this.colorSpace !== "xyz-d50" && this.colorSpace !== "xyz-d65" && this.colorSpace !== "xyz" ) { - return !equals(this.#rawParams, [this.p0, this.p1, this.p2]); - } - return false; - } - isXYZ() { - switch (this.colorSpace) { - case "xyz" : - case "xyz-d50" : - case "xyz-d65" : - return true; - } - return false; - } - static fromSpec(authoredText, parametersWithAlphaText) { - const [parametersText, alphaText] = parametersWithAlphaText.split('/', 2); - const parameters = parametersText.trim().split(/\s+/); - const [colorSpaceText, ...remainingParams] = parameters; - const colorSpace = getColorSpace(colorSpaceText); - if (!colorSpace) { - return null; - } - if (remainingParams.length === 0 && alphaText === undefined) { - return new ColorFunction(colorSpace, 0, 0, 0, null, authoredText); - } - if (remainingParams.length === 0 && alphaText !== undefined && alphaText.trim().split(/\s+/).length > 1) { - return null; - } - if (remainingParams.length > 3) { - return null; - } - const nonesReplacedParams = remainingParams.map(param => param === 'none' ? '0' : param); - const values = nonesReplacedParams.map(param => parsePercentOrNumber(param, [0, 1])); - const containsNull = values.includes(null); - if (containsNull) { - return null; - } - const alphaValue = alphaText ? parsePercentOrNumber(alphaText, [0, 1]) ?? 1 : 1; - const rgbOrXyza = [ - values[0] ?? 0, - values[1] ?? 0, - values[2] ?? 0, - alphaValue, - ]; - return new ColorFunction(colorSpace, ...rgbOrXyza, authoredText); - } -} -class HSL { - h; - s; - l; - alpha; - #rawParams; - #authoredText; - channels = ["h" , "s" , "l" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => self, - ["hsla" ]: (self) => self, - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #getRGBArray(withAlpha = true) { - const rgb = hsl2rgb([this.h, this.s, this.l, 0]); - if (withAlpha) { - return [rgb[0], rgb[1], rgb[2], this.alpha ?? undefined]; - } - return [rgb[0], rgb[1], rgb[2]]; - } - #toXyzd50() { - const rgb = this.#getRGBArray(false); - return ColorConverter.srgbToXyzd50(rgb[0], rgb[1], rgb[2]); - } - constructor(h, s, l, alpha, authoredText) { - this.#rawParams = [h, s, l]; - this.l = clamp(l, { min: 0, max: 1 }); - s = equals(this.l, 0) || equals(this.l, 1) ? 0 : s; - this.s = clamp(s, { min: 0, max: 1 }); - h = equals(this.s, 0) ? 0 : h; - this.h = normalizeHue(h * 360) / 360; - this.alpha = clamp(alpha ?? null, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - equal(color) { - const hsl = color.as("hsl" ); - return equals(this.h, hsl.h) && equals(this.s, hsl.s) && equals(this.l, hsl.l) && equals(this.alpha, hsl.alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.h, this.s, this.l); - } - #stringify(h, s, l) { - const start = sprintf('hsl(%sdeg %s% %s%', stringifyWithPrecision(h * 360), stringifyWithPrecision(s * 100), stringifyWithPrecision(l * 100)); - if (this.alpha !== null && this.alpha !== 1) { - return start + - sprintf(' / %s%)', stringifyWithPrecision(this.alpha * 100)); - } - return start + ')'; - } - setAlpha(alpha) { - return new HSL(this.h, this.s, this.l, alpha); - } - format() { - return this.alpha === null || this.alpha === 1 ? "hsl" : "hsla" ; - } - is(format) { - return format === this.format(); - } - as(format) { - if (format === this.format()) { - return this; - } - return HSL.#conversions[format](this); - } - asLegacyColor() { - return this.as("rgba" ); - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return !lessOrEquals(this.#rawParams[1], 1) || !lessOrEquals(0, this.#rawParams[1]); - } - static fromSpec(spec, text) { - const h = parseHueNumeric(spec[0]); - if (h === null) { - return null; - } - const s = parseSatLightNumeric(spec[1]); - if (s === null) { - return null; - } - const l = parseSatLightNumeric(spec[2]); - if (l === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new HSL(h, s, l, alpha, text); - } - hsva() { - const s = this.s * (this.l < 0.5 ? this.l : 1 - this.l); - return [this.h, s !== 0 ? 2 * s / (this.l + s) : 0, (this.l + s), this.alpha ?? 1]; - } - canonicalHSLA() { - return [Math.round(this.h * 360), Math.round(this.s * 100), Math.round(this.l * 100), this.alpha ?? 1]; - } -} -class HWB { - h; - w; - b; - alpha; - #rawParams; - #authoredText; - channels = ["h" , "w" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => self, - ["hwba" ]: (self) => self, - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #getRGBArray(withAlpha = true) { - const rgb = hwb2rgb([this.h, this.w, this.b, 0]); - if (withAlpha) { - return [rgb[0], rgb[1], rgb[2], this.alpha ?? undefined]; - } - return [rgb[0], rgb[1], rgb[2]]; - } - #toXyzd50() { - const rgb = this.#getRGBArray(false); - return ColorConverter.srgbToXyzd50(rgb[0], rgb[1], rgb[2]); - } - constructor(h, w, b, alpha, authoredText) { - this.#rawParams = [h, w, b]; - this.w = clamp(w, { min: 0, max: 1 }); - this.b = clamp(b, { min: 0, max: 1 }); - h = lessOrEquals(1, this.w + this.b) ? 0 : h; - this.h = normalizeHue(h * 360) / 360; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - if (lessOrEquals(1, this.w + this.b)) { - const ratio = this.w / this.b; - this.b = 1 / (1 + ratio); - this.w = 1 - this.b; - } - this.#authoredText = authoredText; - } - equal(color) { - const hwb = color.as("hwb" ); - return equals(this.h, hwb.h) && equals(this.w, hwb.w) && equals(this.b, hwb.b) && equals(this.alpha, hwb.alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.h, this.w, this.b); - } - #stringify(h, w, b) { - const start = sprintf('hwb(%sdeg %s% %s%', stringifyWithPrecision(h * 360), stringifyWithPrecision(w * 100), stringifyWithPrecision(b * 100)); - if (this.alpha !== null && this.alpha !== 1) { - return start + - sprintf(' / %s%)', stringifyWithPrecision(this.alpha * 100)); - } - return start + ')'; - } - setAlpha(alpha) { - return new HWB(this.h, this.w, this.b, alpha, this.#authoredText); - } - format() { - return this.alpha !== null && !equals(this.alpha, 1) ? "hwba" : "hwb" ; - } - is(format) { - return format === this.format(); - } - as(format) { - if (format === this.format()) { - return this; - } - return HWB.#conversions[format](this); - } - asLegacyColor() { - return this.as("rgba" ); - } - getAuthoredText() { - return this.#authoredText ?? null; - } - canonicalHWBA() { - return [ - Math.round(this.h * 360), - Math.round(this.w * 100), - Math.round(this.b * 100), - this.alpha ?? 1, - ]; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return !lessOrEquals(this.#rawParams[1], 1) || !lessOrEquals(0, this.#rawParams[1]) || - !lessOrEquals(this.#rawParams[2], 1) || !lessOrEquals(0, this.#rawParams[2]); - } - static fromSpec(spec, text) { - const h = parseHueNumeric(spec[0]); - if (h === null) { - return null; - } - const w = parseSatLightNumeric(spec[1]); - if (w === null) { - return null; - } - const b = parseSatLightNumeric(spec[2]); - if (b === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new HWB(h, w, b, alpha, text); - } -} -function toRgbValue(value) { - return Math.round(value * 255); -} -class ShortFormatColorBase { - color; - channels = ["r" , "g" , "b" , "alpha" ]; - constructor(color) { - this.color = color; - } - get alpha() { - return this.color.alpha; - } - rgba() { - return this.color.rgba(); - } - equal(color) { - return this.color.equal(color); - } - setAlpha(alpha) { - return this.color.setAlpha(alpha); - } - format() { - return (this.alpha ?? 1) !== 1 ? "hexa" : "hex" ; - } - as(format) { - return this.color.as(format); - } - is(format) { - return this.color.is(format); - } - asLegacyColor() { - return this.color.asLegacyColor(); - } - getAuthoredText() { - return this.color.getAuthoredText(); - } - getRawParameters() { - return this.color.getRawParameters(); - } - isGamutClipped() { - return this.color.isGamutClipped(); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - const [r, g, b] = this.color.rgba(); - return this.stringify(r, g, b); - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - const [r, g, b] = this.getRawParameters(); - return this.stringify(r, g, b); - } -} -class ShortHex extends ShortFormatColorBase { - setAlpha(alpha) { - return new ShortHex(this.color.setAlpha(alpha)); - } - asString(format) { - return format && format !== this.format() ? super.as(format).asString() : super.asString(); - } - stringify(r, g, b) { - function toShortHexValue(value) { - return (Math.round(value * 255) / 17).toString(16); - } - if (this.color.hasAlpha()) { - return sprintf('#%s%s%s%s', toShortHexValue(r), toShortHexValue(g), toShortHexValue(b), toShortHexValue(this.alpha ?? 1)) - .toLowerCase(); - } - return sprintf('#%s%s%s', toShortHexValue(r), toShortHexValue(g), toShortHexValue(b)) - .toLowerCase(); - } -} -class Nickname extends ShortFormatColorBase { - nickname; - constructor(nickname, color) { - super(color); - this.nickname = nickname; - } - static fromName(name, text) { - const nickname = name.toLowerCase(); - const rgba = Nicknames.get(nickname); - if (rgba !== undefined) { - return new Nickname(nickname, Legacy.fromRGBA(rgba, text)); - } - return null; - } - stringify() { - return this.nickname; - } - getAsRawString(format) { - return this.color.getAsRawString(format); - } -} -class Legacy { - #rawParams; - #rgba; - #authoredText; - #format; - channels = ["r" , "g" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#rgba, "hex" ), - ["hexa" ]: (self) => new Legacy(self.#rgba, "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#rgba, "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#rgba, "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - const [r, g, b] = this.#rgba; - return ColorConverter.srgbToXyzd50(r, g, b); - } - get alpha() { - switch (this.format()) { - case "hexa" : - case "rgba" : - return this.#rgba[3]; - default: - return null; - } - } - asLegacyColor() { - return this; - } - nickname() { - const nickname = RGBAToNickname.get(String(this.canonicalRGBA())); - return nickname ? new Nickname(nickname, this) : null; - } - shortHex() { - for (let i = 0; i < 4; ++i) { - const c = Math.round(this.#rgba[i] * 255); - if (c % 0x11) { - return null; - } - } - return new ShortHex(this); - } - constructor(rgba, format, authoredText) { - this.#authoredText = authoredText || null; - this.#format = format; - this.#rawParams = [rgba[0], rgba[1], rgba[2]]; - this.#rgba = [ - clamp(rgba[0], { min: 0, max: 1 }), - clamp(rgba[1], { min: 0, max: 1 }), - clamp(rgba[2], { min: 0, max: 1 }), - clamp(rgba[3] ?? 1, { min: 0, max: 1 }), - ]; - } - static fromHex(hex, text) { - hex = hex.toLowerCase(); - const hasAlpha = hex.length === 4 || hex.length === 8; - const format = hasAlpha ? "hexa" : "hex" ; - const isShort = hex.length <= 4; - if (isShort) { - hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2) + - hex.charAt(3) + hex.charAt(3); - } - const r = parseInt(hex.substring(0, 2), 16); - const g = parseInt(hex.substring(2, 4), 16); - const b = parseInt(hex.substring(4, 6), 16); - let a = 1; - if (hex.length === 8) { - a = parseInt(hex.substring(6, 8), 16) / 255; - } - const color = new Legacy([r / 255, g / 255, b / 255, a], format, text); - return isShort ? new ShortHex(color) : color; - } - static fromRGBAFunction(r, g, b, alpha, text) { - const rgba = [ - parseRgbNumeric(r), - parseRgbNumeric(g), - parseRgbNumeric(b), - alpha ? parseAlphaNumeric(alpha) : 1, - ]; - if (!arrayDoesNotContainNullOrUndefined(rgba)) { - return null; - } - return new Legacy(rgba, alpha ? "rgba" : "rgb" , text); - } - static fromRGBA(rgba, authoredText) { - return new Legacy([rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3]], "rgba" , authoredText); - } - static fromHSVA(hsva) { - const rgba = hsva2rgba(hsva); - return new Legacy(rgba, "rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - if (format === this.format()) { - return this; - } - return Legacy.#conversions[format](this); - } - format() { - return this.#format; - } - hasAlpha() { - return this.#rgba[3] !== 1; - } - detectHEXFormat() { - const hasAlpha = this.hasAlpha(); - return hasAlpha ? "hexa" : "hex" ; - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(format, this.#rgba[0], this.#rgba[1], this.#rgba[2]); - } - #stringify(format, r, g, b) { - if (!format) { - format = this.#format; - } - function toHexValue(value) { - const hex = Math.round(value * 255).toString(16); - return hex.length === 1 ? '0' + hex : hex; - } - switch (format) { - case "rgb" : - case "rgba" : { - const start = sprintf('rgb(%d %d %d', toRgbValue(r), toRgbValue(g), toRgbValue(b)); - if (this.hasAlpha()) { - return start + sprintf(' / %d%)', Math.round(this.#rgba[3] * 100)); - } - return start + ')'; - } - case "hex" : - case "hexa" : { - if (this.hasAlpha()) { - return sprintf('#%s%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b), toHexValue(this.#rgba[3])) - .toLowerCase(); - } - return sprintf('#%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b)).toLowerCase(); - } - } - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(format, ...this.#rawParams); - } - isGamutClipped() { - return !equals(this.#rawParams.map(toRgbValue), [this.#rgba[0], this.#rgba[1], this.#rgba[2]].map(toRgbValue), WIDE_RANGE_EPSILON); - } - rgba() { - return [...this.#rgba]; - } - canonicalRGBA() { - const rgba = new Array(4); - for (let i = 0; i < 3; ++i) { - rgba[i] = Math.round(this.#rgba[i] * 255); - } - rgba[3] = this.#rgba[3]; - return rgba; - } - toProtocolRGBA() { - const rgba = this.canonicalRGBA(); - const result = { r: rgba[0], g: rgba[1], b: rgba[2] }; - if (rgba[3] !== 1) { - result.a = rgba[3]; - } - return result; - } - invert() { - const rgba = [0, 0, 0, 0]; - rgba[0] = 1 - this.#rgba[0]; - rgba[1] = 1 - this.#rgba[1]; - rgba[2] = 1 - this.#rgba[2]; - rgba[3] = this.#rgba[3]; - return new Legacy(rgba, "rgba" ); - } - grayscale() { - const [r, g, b] = this.#rgba; - const gray = r * 0.299 + g * 0.587 + b * 0.114; - return new Legacy([gray, gray, gray, 0.5], "rgba" ); - } - setAlpha(alpha) { - const rgba = [...this.#rgba]; - rgba[3] = alpha; - return new Legacy(rgba, "rgba" ); - } - blendWith(fgColor) { - const rgba = blendColors(fgColor.#rgba, this.#rgba); - return new Legacy(rgba, "rgba" ); - } - blendWithAlpha(alpha) { - const rgba = [...this.#rgba]; - rgba[3] *= alpha; - return new Legacy(rgba, "rgba" ); - } - setFormat(format) { - this.#format = format; - } - equal(other) { - const legacy = other.as(this.#format); - return equals(toRgbValue(this.#rgba[0]), toRgbValue(legacy.#rgba[0]), WIDE_RANGE_EPSILON) && - equals(toRgbValue(this.#rgba[1]), toRgbValue(legacy.#rgba[1]), WIDE_RANGE_EPSILON) && - equals(toRgbValue(this.#rgba[2]), toRgbValue(legacy.#rgba[2]), WIDE_RANGE_EPSILON) && - equals(this.#rgba[3], legacy.#rgba[3]); - } -} -const COLOR_TO_RGBA_ENTRIES = [ - ['aliceblue', [240, 248, 255]], - ['antiquewhite', [250, 235, 215]], - ['aqua', [0, 255, 255]], - ['aquamarine', [127, 255, 212]], - ['azure', [240, 255, 255]], - ['beige', [245, 245, 220]], - ['bisque', [255, 228, 196]], - ['black', [0, 0, 0]], - ['blanchedalmond', [255, 235, 205]], - ['blue', [0, 0, 255]], - ['blueviolet', [138, 43, 226]], - ['brown', [165, 42, 42]], - ['burlywood', [222, 184, 135]], - ['cadetblue', [95, 158, 160]], - ['chartreuse', [127, 255, 0]], - ['chocolate', [210, 105, 30]], - ['coral', [255, 127, 80]], - ['cornflowerblue', [100, 149, 237]], - ['cornsilk', [255, 248, 220]], - ['crimson', [237, 20, 61]], - ['cyan', [0, 255, 255]], - ['darkblue', [0, 0, 139]], - ['darkcyan', [0, 139, 139]], - ['darkgoldenrod', [184, 134, 11]], - ['darkgray', [169, 169, 169]], - ['darkgrey', [169, 169, 169]], - ['darkgreen', [0, 100, 0]], - ['darkkhaki', [189, 183, 107]], - ['darkmagenta', [139, 0, 139]], - ['darkolivegreen', [85, 107, 47]], - ['darkorange', [255, 140, 0]], - ['darkorchid', [153, 50, 204]], - ['darkred', [139, 0, 0]], - ['darksalmon', [233, 150, 122]], - ['darkseagreen', [143, 188, 143]], - ['darkslateblue', [72, 61, 139]], - ['darkslategray', [47, 79, 79]], - ['darkslategrey', [47, 79, 79]], - ['darkturquoise', [0, 206, 209]], - ['darkviolet', [148, 0, 211]], - ['deeppink', [255, 20, 147]], - ['deepskyblue', [0, 191, 255]], - ['dimgray', [105, 105, 105]], - ['dimgrey', [105, 105, 105]], - ['dodgerblue', [30, 144, 255]], - ['firebrick', [178, 34, 34]], - ['floralwhite', [255, 250, 240]], - ['forestgreen', [34, 139, 34]], - ['fuchsia', [255, 0, 255]], - ['gainsboro', [220, 220, 220]], - ['ghostwhite', [248, 248, 255]], - ['gold', [255, 215, 0]], - ['goldenrod', [218, 165, 32]], - ['gray', [128, 128, 128]], - ['grey', [128, 128, 128]], - ['green', [0, 128, 0]], - ['greenyellow', [173, 255, 47]], - ['honeydew', [240, 255, 240]], - ['hotpink', [255, 105, 180]], - ['indianred', [205, 92, 92]], - ['indigo', [75, 0, 130]], - ['ivory', [255, 255, 240]], - ['khaki', [240, 230, 140]], - ['lavender', [230, 230, 250]], - ['lavenderblush', [255, 240, 245]], - ['lawngreen', [124, 252, 0]], - ['lemonchiffon', [255, 250, 205]], - ['lightblue', [173, 216, 230]], - ['lightcoral', [240, 128, 128]], - ['lightcyan', [224, 255, 255]], - ['lightgoldenrodyellow', [250, 250, 210]], - ['lightgreen', [144, 238, 144]], - ['lightgray', [211, 211, 211]], - ['lightgrey', [211, 211, 211]], - ['lightpink', [255, 182, 193]], - ['lightsalmon', [255, 160, 122]], - ['lightseagreen', [32, 178, 170]], - ['lightskyblue', [135, 206, 250]], - ['lightslategray', [119, 136, 153]], - ['lightslategrey', [119, 136, 153]], - ['lightsteelblue', [176, 196, 222]], - ['lightyellow', [255, 255, 224]], - ['lime', [0, 255, 0]], - ['limegreen', [50, 205, 50]], - ['linen', [250, 240, 230]], - ['magenta', [255, 0, 255]], - ['maroon', [128, 0, 0]], - ['mediumaquamarine', [102, 205, 170]], - ['mediumblue', [0, 0, 205]], - ['mediumorchid', [186, 85, 211]], - ['mediumpurple', [147, 112, 219]], - ['mediumseagreen', [60, 179, 113]], - ['mediumslateblue', [123, 104, 238]], - ['mediumspringgreen', [0, 250, 154]], - ['mediumturquoise', [72, 209, 204]], - ['mediumvioletred', [199, 21, 133]], - ['midnightblue', [25, 25, 112]], - ['mintcream', [245, 255, 250]], - ['mistyrose', [255, 228, 225]], - ['moccasin', [255, 228, 181]], - ['navajowhite', [255, 222, 173]], - ['navy', [0, 0, 128]], - ['oldlace', [253, 245, 230]], - ['olive', [128, 128, 0]], - ['olivedrab', [107, 142, 35]], - ['orange', [255, 165, 0]], - ['orangered', [255, 69, 0]], - ['orchid', [218, 112, 214]], - ['palegoldenrod', [238, 232, 170]], - ['palegreen', [152, 251, 152]], - ['paleturquoise', [175, 238, 238]], - ['palevioletred', [219, 112, 147]], - ['papayawhip', [255, 239, 213]], - ['peachpuff', [255, 218, 185]], - ['peru', [205, 133, 63]], - ['pink', [255, 192, 203]], - ['plum', [221, 160, 221]], - ['powderblue', [176, 224, 230]], - ['purple', [128, 0, 128]], - ['rebeccapurple', [102, 51, 153]], - ['red', [255, 0, 0]], - ['rosybrown', [188, 143, 143]], - ['royalblue', [65, 105, 225]], - ['saddlebrown', [139, 69, 19]], - ['salmon', [250, 128, 114]], - ['sandybrown', [244, 164, 96]], - ['seagreen', [46, 139, 87]], - ['seashell', [255, 245, 238]], - ['sienna', [160, 82, 45]], - ['silver', [192, 192, 192]], - ['skyblue', [135, 206, 235]], - ['slateblue', [106, 90, 205]], - ['slategray', [112, 128, 144]], - ['slategrey', [112, 128, 144]], - ['snow', [255, 250, 250]], - ['springgreen', [0, 255, 127]], - ['steelblue', [70, 130, 180]], - ['tan', [210, 180, 140]], - ['teal', [0, 128, 128]], - ['thistle', [216, 191, 216]], - ['tomato', [255, 99, 71]], - ['turquoise', [64, 224, 208]], - ['violet', [238, 130, 238]], - ['wheat', [245, 222, 179]], - ['white', [255, 255, 255]], - ['whitesmoke', [245, 245, 245]], - ['yellow', [255, 255, 0]], - ['yellowgreen', [154, 205, 50]], - ['transparent', [0, 0, 0, 0]], -]; -console.assert(COLOR_TO_RGBA_ENTRIES.every(([nickname]) => nickname.toLowerCase() === nickname), 'All color nicknames must be lowercase.'); -const Nicknames = new Map(COLOR_TO_RGBA_ENTRIES); -const RGBAToNickname = new Map( -COLOR_TO_RGBA_ENTRIES.map(([nickname, [r, g, b, a = 1]]) => { - return [String([r, g, b, a]), nickname]; -})); -const LAYOUT_LINES_HIGHLIGHT_COLOR = [127, 32, 210]; -({ - Content: Legacy.fromRGBA([111, 168, 220, .66]), - ContentLight: Legacy.fromRGBA([111, 168, 220, .5]), - ContentOutline: Legacy.fromRGBA([9, 83, 148]), - Padding: Legacy.fromRGBA([147, 196, 125, .55]), - PaddingLight: Legacy.fromRGBA([147, 196, 125, .4]), - Border: Legacy.fromRGBA([255, 229, 153, .66]), - BorderLight: Legacy.fromRGBA([255, 229, 153, .5]), - Margin: Legacy.fromRGBA([246, 178, 107, .66]), - MarginLight: Legacy.fromRGBA([246, 178, 107, .5]), - EventTarget: Legacy.fromRGBA([255, 196, 196, .66]), - Shape: Legacy.fromRGBA([96, 82, 177, 0.8]), - ShapeMargin: Legacy.fromRGBA([96, 82, 127, .6]), - CssGrid: Legacy.fromRGBA([0x4b, 0, 0x82, 1]), - LayoutLine: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 1]), - GridBorder: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 1]), - GapBackground: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, .3]), - GapHatch: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, .8]), - GridAreaBorder: Legacy.fromRGBA([26, 115, 232, 1]), -}); -({ - ParentOutline: Legacy.fromRGBA([224, 90, 183, 1]), - ChildOutline: Legacy.fromRGBA([0, 120, 212, 1]), -}); -({ - Resizer: Legacy.fromRGBA([222, 225, 230, 1]), - ResizerHandle: Legacy.fromRGBA([166, 166, 166, 1]), - Mask: Legacy.fromRGBA([248, 249, 249, 1]), -}); - -// Copyright 2021 The Chromium Authors -let devToolsLocaleInstance = null; -class DevToolsLocale { - locale; - lookupClosestDevToolsLocale; - constructor(data) { - this.lookupClosestDevToolsLocale = data.lookupClosestDevToolsLocale; - if (data.settingLanguage === 'browserLanguage') { - this.locale = data.navigatorLanguage || 'en-US'; - } - else { - this.locale = data.settingLanguage; - } - this.locale = this.lookupClosestDevToolsLocale(this.locale); - } - static instance(opts = { create: false }) { - if (!devToolsLocaleInstance && !opts.create) { - throw new Error('No LanguageSelector instance exists yet.'); - } - if (opts.create) { - devToolsLocaleInstance = new DevToolsLocale(opts.data); - } - return devToolsLocaleInstance; - } - static removeInstance() { - devToolsLocaleInstance = null; - } - forceFallbackLocale() { - this.locale = 'en-US'; - } - languageIsSupportedByDevTools(localeString) { - return localeLanguagesMatch(localeString, this.lookupClosestDevToolsLocale(localeString)); - } -} -function localeLanguagesMatch(localeString1, localeString2) { - const locale1 = new Intl.Locale(localeString1); - const locale2 = new Intl.Locale(localeString2); - return locale1.language === locale2.language; -} - -var __assign = function () { - __assign = Object.assign || function __assign2(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var ErrorKind; -(function (ErrorKind2) { - ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE"; - ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT"; - ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT"; - ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE"; - ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE"; - ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE"; - ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON"; - ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON"; - ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON"; - ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON"; - ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"; - ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS"; - ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"; - ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"; - ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"; - ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"; - ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE"; - ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG"; - ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME"; - ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG"; - ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG"; -})(ErrorKind || (ErrorKind = {})); -var TYPE; -(function (TYPE2) { - TYPE2[TYPE2["literal"] = 0] = "literal"; - TYPE2[TYPE2["argument"] = 1] = "argument"; - TYPE2[TYPE2["number"] = 2] = "number"; - TYPE2[TYPE2["date"] = 3] = "date"; - TYPE2[TYPE2["time"] = 4] = "time"; - TYPE2[TYPE2["select"] = 5] = "select"; - TYPE2[TYPE2["plural"] = 6] = "plural"; - TYPE2[TYPE2["pound"] = 7] = "pound"; - TYPE2[TYPE2["tag"] = 8] = "tag"; -})(TYPE || (TYPE = {})); -var SKELETON_TYPE; -(function (SKELETON_TYPE2) { - SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number"; - SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime"; -})(SKELETON_TYPE || (SKELETON_TYPE = {})); -function isLiteralElement(el) { - return el.type === TYPE.literal; -} -function isArgumentElement(el) { - return el.type === TYPE.argument; -} -function isNumberElement(el) { - return el.type === TYPE.number; -} -function isDateElement(el) { - return el.type === TYPE.date; -} -function isTimeElement(el) { - return el.type === TYPE.time; -} -function isSelectElement(el) { - return el.type === TYPE.select; -} -function isPluralElement(el) { - return el.type === TYPE.plural; -} -function isPoundElement(el) { - return el.type === TYPE.pound; -} -function isTagElement(el) { - return el.type === TYPE.tag; -} -function isNumberSkeleton(el) { - return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number); -} -function isDateTimeSkeleton(el) { - return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime); -} -var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/; -var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; -function parseDateTimeSkeleton(skeleton) { - var result = {}; - skeleton.replace(DATE_TIME_REGEX, function (match) { - var len = match.length; - switch (match[0]) { - case "G": - result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short"; - break; - case "y": - result.year = len === 2 ? "2-digit" : "numeric"; - break; - case "Y": - case "u": - case "U": - case "r": - throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead"); - case "q": - case "Q": - throw new RangeError("`q/Q` (quarter) patterns are not supported"); - case "M": - case "L": - result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1]; - break; - case "w": - case "W": - throw new RangeError("`w/W` (week) patterns are not supported"); - case "d": - result.day = ["numeric", "2-digit"][len - 1]; - break; - case "D": - case "F": - case "g": - throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead"); - case "E": - result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short"; - break; - case "e": - if (len < 4) { - throw new RangeError("`e..eee` (weekday) patterns are not supported"); - } - result.weekday = ["short", "long", "narrow", "short"][len - 4]; - break; - case "c": - if (len < 4) { - throw new RangeError("`c..ccc` (weekday) patterns are not supported"); - } - result.weekday = ["short", "long", "narrow", "short"][len - 4]; - break; - case "a": - result.hour12 = true; - break; - case "b": - case "B": - throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead"); - case "h": - result.hourCycle = "h12"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "H": - result.hourCycle = "h23"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "K": - result.hourCycle = "h11"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "k": - result.hourCycle = "h24"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "j": - case "J": - case "C": - throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead"); - case "m": - result.minute = ["numeric", "2-digit"][len - 1]; - break; - case "s": - result.second = ["numeric", "2-digit"][len - 1]; - break; - case "S": - case "A": - throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead"); - case "z": - result.timeZoneName = len < 4 ? "short" : "long"; - break; - case "Z": - case "O": - case "v": - case "V": - case "X": - case "x": - throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead"); - } - return ""; - }); - return result; -} -var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; -function parseNumberSkeletonFromString(skeleton) { - if (skeleton.length === 0) { - throw new Error("Number skeleton cannot be empty"); - } - var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function (x) { - return x.length > 0; - }); - var tokens = []; - for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) { - var stringToken = stringTokens_1[_i]; - var stemAndOptions = stringToken.split("/"); - if (stemAndOptions.length === 0) { - throw new Error("Invalid number skeleton"); - } - var stem = stemAndOptions[0], options = stemAndOptions.slice(1); - for (var _a2 = 0, options_1 = options; _a2 < options_1.length; _a2++) { - var option = options_1[_a2]; - if (option.length === 0) { - throw new Error("Invalid number skeleton"); - } - } - tokens.push({ stem, options }); - } - return tokens; -} -function icuUnitToEcma(unit) { - return unit.replace(/^(.*?)-/, ""); -} -var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g; -var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g; -var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g; -var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/; -function parseSignificantPrecision(str) { - var result = {}; - str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) { - if (typeof g2 !== "string") { - result.minimumSignificantDigits = g1.length; - result.maximumSignificantDigits = g1.length; - } - else if (g2 === "+") { - result.minimumSignificantDigits = g1.length; - } - else if (g1[0] === "#") { - result.maximumSignificantDigits = g1.length; - } - else { - result.minimumSignificantDigits = g1.length; - result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0); - } - return ""; - }); - return result; -} -function parseSign(str) { - switch (str) { - case "sign-auto": - return { - signDisplay: "auto" - }; - case "sign-accounting": - case "()": - return { - currencySign: "accounting" - }; - case "sign-always": - case "+!": - return { - signDisplay: "always" - }; - case "sign-accounting-always": - case "()!": - return { - signDisplay: "always", - currencySign: "accounting" - }; - case "sign-except-zero": - case "+?": - return { - signDisplay: "exceptZero" - }; - case "sign-accounting-except-zero": - case "()?": - return { - signDisplay: "exceptZero", - currencySign: "accounting" - }; - case "sign-never": - case "+_": - return { - signDisplay: "never" - }; - } -} -function parseConciseScientificAndEngineeringStem(stem) { - var result; - if (stem[0] === "E" && stem[1] === "E") { - result = { - notation: "engineering" - }; - stem = stem.slice(2); - } - else if (stem[0] === "E") { - result = { - notation: "scientific" - }; - stem = stem.slice(1); - } - if (result) { - var signDisplay = stem.slice(0, 2); - if (signDisplay === "+!") { - result.signDisplay = "always"; - stem = stem.slice(2); - } - else if (signDisplay === "+?") { - result.signDisplay = "exceptZero"; - stem = stem.slice(2); - } - if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) { - throw new Error("Malformed concise eng/scientific notation"); - } - result.minimumIntegerDigits = stem.length; - } - return result; -} -function parseNotationOptions(opt) { - var result = {}; - var signOpts = parseSign(opt); - if (signOpts) { - return signOpts; - } - return result; -} -function parseNumberSkeleton(tokens) { - var result = {}; - for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) { - var token = tokens_1[_i]; - switch (token.stem) { - case "percent": - case "%": - result.style = "percent"; - continue; - case "%x100": - result.style = "percent"; - result.scale = 100; - continue; - case "currency": - result.style = "currency"; - result.currency = token.options[0]; - continue; - case "group-off": - case ",_": - result.useGrouping = false; - continue; - case "precision-integer": - case ".": - result.maximumFractionDigits = 0; - continue; - case "measure-unit": - case "unit": - result.style = "unit"; - result.unit = icuUnitToEcma(token.options[0]); - continue; - case "compact-short": - case "K": - result.notation = "compact"; - result.compactDisplay = "short"; - continue; - case "compact-long": - case "KK": - result.notation = "compact"; - result.compactDisplay = "long"; - continue; - case "scientific": - result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function (all, opt) { - return __assign(__assign({}, all), parseNotationOptions(opt)); - }, {})); - continue; - case "engineering": - result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function (all, opt) { - return __assign(__assign({}, all), parseNotationOptions(opt)); - }, {})); - continue; - case "notation-simple": - result.notation = "standard"; - continue; - case "unit-width-narrow": - result.currencyDisplay = "narrowSymbol"; - result.unitDisplay = "narrow"; - continue; - case "unit-width-short": - result.currencyDisplay = "code"; - result.unitDisplay = "short"; - continue; - case "unit-width-full-name": - result.currencyDisplay = "name"; - result.unitDisplay = "long"; - continue; - case "unit-width-iso-code": - result.currencyDisplay = "symbol"; - continue; - case "scale": - result.scale = parseFloat(token.options[0]); - continue; - case "integer-width": - if (token.options.length > 1) { - throw new RangeError("integer-width stems only accept a single optional option"); - } - token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) { - if (g1) { - result.minimumIntegerDigits = g2.length; - } - else if (g3 && g4) { - throw new Error("We currently do not support maximum integer digits"); - } - else if (g5) { - throw new Error("We currently do not support exact integer digits"); - } - return ""; - }); - continue; - } - if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) { - result.minimumIntegerDigits = token.stem.length; - continue; - } - if (FRACTION_PRECISION_REGEX.test(token.stem)) { - if (token.options.length > 1) { - throw new RangeError("Fraction-precision stems only accept a single optional option"); - } - token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) { - if (g2 === "*") { - result.minimumFractionDigits = g1.length; - } - else if (g3 && g3[0] === "#") { - result.maximumFractionDigits = g3.length; - } - else if (g4 && g5) { - result.minimumFractionDigits = g4.length; - result.maximumFractionDigits = g4.length + g5.length; - } - else { - result.minimumFractionDigits = g1.length; - result.maximumFractionDigits = g1.length; - } - return ""; - }); - if (token.options.length) { - result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0])); - } - continue; - } - if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) { - result = __assign(__assign({}, result), parseSignificantPrecision(token.stem)); - continue; - } - var signOpts = parseSign(token.stem); - if (signOpts) { - result = __assign(__assign({}, result), signOpts); - } - var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem); - if (conciseScientificAndEngineeringOpts) { - result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts); - } - } - return result; -} -var _a; -var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*"); -var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$"); -function createLocation(start, end) { - return { start, end }; -} -var hasNativeStartsWith = !!String.prototype.startsWith; -var hasNativeFromCodePoint = !!String.fromCodePoint; -var hasNativeFromEntries = !!Object.fromEntries; -var hasNativeCodePointAt = !!String.prototype.codePointAt; -var hasTrimStart = !!String.prototype.trimStart; -var hasTrimEnd = !!String.prototype.trimEnd; -var hasNativeIsSafeInteger = !!Number.isSafeInteger; -var isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function (n) { - return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991; -}; -var REGEX_SUPPORTS_U_AND_Y = true; -try { - re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec("a")) === null || _a === void 0 ? void 0 : _a[0]) === "a"; -} -catch (_) { - REGEX_SUPPORTS_U_AND_Y = false; -} -var re; -var startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) { - return s.startsWith(search, position); -} : function startsWith3(s, search, position) { - return s.slice(position, position + search.length) === search; -}; -var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() { - var codePoints = []; - for (var _i = 0; _i < arguments.length; _i++) { - codePoints[_i] = arguments[_i]; - } - var elements = ""; - var length = codePoints.length; - var i = 0; - var code; - while (length > i) { - code = codePoints[i++]; - if (code > 1114111) - throw RangeError(code + " is not a valid code point"); - elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320); - } - return elements; -}; -var fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) { - var obj = {}; - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var _a2 = entries_1[_i], k = _a2[0], v = _a2[1]; - obj[k] = v; - } - return obj; -}; -var codePointAt = hasNativeCodePointAt ? function codePointAt2(s, index) { - return s.codePointAt(index); -} : function codePointAt3(s, index) { - var size = s.length; - if (index < 0 || index >= size) { - return void 0; - } - var first = s.charCodeAt(index); - var second; - return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536; -}; -var trimStart = hasTrimStart ? function trimStart2(s) { - return s.trimStart(); -} : function trimStart3(s) { - return s.replace(SPACE_SEPARATOR_START_REGEX, ""); -}; -var trimEnd = hasTrimEnd ? function trimEnd2(s) { - return s.trimEnd(); -} : function trimEnd3(s) { - return s.replace(SPACE_SEPARATOR_END_REGEX, ""); -}; -function RE(s, flag) { - return new RegExp(s, flag); -} -var matchIdentifierAtIndex; -if (REGEX_SUPPORTS_U_AND_Y) { - IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) { - var _a2; - IDENTIFIER_PREFIX_RE_1.lastIndex = index; - var match = IDENTIFIER_PREFIX_RE_1.exec(s); - return (_a2 = match[1]) !== null && _a2 !== void 0 ? _a2 : ""; - }; -} -else { - matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) { - var match = []; - while (true) { - var c = codePointAt(s, index); - if (c === void 0 || _isWhiteSpace(c) || _isPatternSyntax(c)) { - break; - } - match.push(c); - index += c >= 65536 ? 2 : 1; - } - return fromCodePoint.apply(void 0, match); - }; -} -var IDENTIFIER_PREFIX_RE_1; -var Parser = function () { - function Parser2(message, options) { - if (options === void 0) { - options = {}; - } - this.message = message; - this.position = { offset: 0, line: 1, column: 1 }; - this.ignoreTag = !!options.ignoreTag; - this.requiresOtherClause = !!options.requiresOtherClause; - this.shouldParseSkeletons = !!options.shouldParseSkeletons; - } - Parser2.prototype.parse = function () { - if (this.offset() !== 0) { - throw Error("parser can only be used once"); - } - return this.parseMessage(0, "", false); - }; - Parser2.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) { - var elements = []; - while (!this.isEOF()) { - var char = this.char(); - if (char === 123) { - var result = this.parseArgument(nestingLevel, expectingCloseTag); - if (result.err) { - return result; - } - elements.push(result.val); - } - else if (char === 125 && nestingLevel > 0) { - break; - } - else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) { - var position = this.clonePosition(); - this.bump(); - elements.push({ - type: TYPE.pound, - location: createLocation(position, this.clonePosition()) - }); - } - else if (char === 60 && !this.ignoreTag && this.peek() === 47) { - if (expectingCloseTag) { - break; - } - else { - return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition())); - } - } - else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) { - var result = this.parseTag(nestingLevel, parentArgType); - if (result.err) { - return result; - } - elements.push(result.val); - } - else { - var result = this.parseLiteral(nestingLevel, parentArgType); - if (result.err) { - return result; - } - elements.push(result.val); - } - } - return { val: elements, err: null }; - }; - Parser2.prototype.parseTag = function (nestingLevel, parentArgType) { - var startPosition = this.clonePosition(); - this.bump(); - var tagName = this.parseTagName(); - this.bumpSpace(); - if (this.bumpIf("/>")) { - return { - val: { - type: TYPE.literal, - value: "<" + tagName + "/>", - location: createLocation(startPosition, this.clonePosition()) - }, - err: null - }; - } - else if (this.bumpIf(">")) { - var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true); - if (childrenResult.err) { - return childrenResult; - } - var children = childrenResult.val; - var endTagStartPosition = this.clonePosition(); - if (this.bumpIf("")) { - return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition())); - } - return { - val: { - type: TYPE.tag, - value: tagName, - children, - location: createLocation(startPosition, this.clonePosition()) - }, - err: null - }; - } - else { - return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition())); - } - } - else { - return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition())); - } - }; - Parser2.prototype.parseTagName = function () { - var startOffset = this.offset(); - this.bump(); - while (!this.isEOF() && _isPotentialElementNameChar(this.char())) { - this.bump(); - } - return this.message.slice(startOffset, this.offset()); - }; - Parser2.prototype.parseLiteral = function (nestingLevel, parentArgType) { - var start = this.clonePosition(); - var value = ""; - while (true) { - var parseQuoteResult = this.tryParseQuote(parentArgType); - if (parseQuoteResult) { - value += parseQuoteResult; - continue; - } - var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType); - if (parseUnquotedResult) { - value += parseUnquotedResult; - continue; - } - var parseLeftAngleResult = this.tryParseLeftAngleBracket(); - if (parseLeftAngleResult) { - value += parseLeftAngleResult; - continue; - } - break; - } - var location = createLocation(start, this.clonePosition()); - return { - val: { type: TYPE.literal, value, location }, - err: null - }; - }; - Parser2.prototype.tryParseLeftAngleBracket = function () { - if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) { - this.bump(); - return "<"; - } - return null; - }; - Parser2.prototype.tryParseQuote = function (parentArgType) { - if (this.isEOF() || this.char() !== 39) { - return null; - } - switch (this.peek()) { - case 39: - this.bump(); - this.bump(); - return "'"; - case 123: - case 60: - case 62: - case 125: - break; - case 35: - if (parentArgType === "plural" || parentArgType === "selectordinal") { - break; - } - return null; - default: - return null; - } - this.bump(); - var codePoints = [this.char()]; - this.bump(); - while (!this.isEOF()) { - var ch = this.char(); - if (ch === 39) { - if (this.peek() === 39) { - codePoints.push(39); - this.bump(); - } - else { - this.bump(); - break; - } - } - else { - codePoints.push(ch); - } - this.bump(); - } - return fromCodePoint.apply(void 0, codePoints); - }; - Parser2.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) { - if (this.isEOF()) { - return null; - } - var ch = this.char(); - if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) { - return null; - } - else { - this.bump(); - return fromCodePoint(ch); - } - }; - Parser2.prototype.parseArgument = function (nestingLevel, expectingCloseTag) { - var openingBracePosition = this.clonePosition(); - this.bump(); - this.bumpSpace(); - if (this.isEOF()) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - if (this.char() === 125) { - this.bump(); - return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition())); - } - var value = this.parseIdentifierIfPossible().value; - if (!value) { - return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition())); - } - this.bumpSpace(); - if (this.isEOF()) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - switch (this.char()) { - case 125: { - this.bump(); - return { - val: { - type: TYPE.argument, - value, - location: createLocation(openingBracePosition, this.clonePosition()) - }, - err: null - }; - } - case 44: { - this.bump(); - this.bumpSpace(); - if (this.isEOF()) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition); - } - default: - return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition())); - } - }; - Parser2.prototype.parseIdentifierIfPossible = function () { - var startingPosition = this.clonePosition(); - var startOffset = this.offset(); - var value = matchIdentifierAtIndex(this.message, startOffset); - var endOffset = startOffset + value.length; - this.bumpTo(endOffset); - var endPosition = this.clonePosition(); - var location = createLocation(startingPosition, endPosition); - return { value, location }; - }; - Parser2.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) { - var _a2; - var typeStartPosition = this.clonePosition(); - var argType = this.parseIdentifierIfPossible().value; - var typeEndPosition = this.clonePosition(); - switch (argType) { - case "": - return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition)); - case "number": - case "date": - case "time": { - this.bumpSpace(); - var styleAndLocation = null; - if (this.bumpIf(",")) { - this.bumpSpace(); - var styleStartPosition = this.clonePosition(); - var result = this.parseSimpleArgStyleIfPossible(); - if (result.err) { - return result; - } - var style = trimEnd(result.val); - if (style.length === 0) { - return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition())); - } - var styleLocation = createLocation(styleStartPosition, this.clonePosition()); - styleAndLocation = { style, styleLocation }; - } - var argCloseResult = this.tryParseArgumentClose(openingBracePosition); - if (argCloseResult.err) { - return argCloseResult; - } - var location_1 = createLocation(openingBracePosition, this.clonePosition()); - if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) { - var skeleton = trimStart(styleAndLocation.style.slice(2)); - if (argType === "number") { - var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation); - if (result.err) { - return result; - } - return { - val: { type: TYPE.number, value, location: location_1, style: result.val }, - err: null - }; - } - else { - if (skeleton.length === 0) { - return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1); - } - var style = { - type: SKELETON_TYPE.dateTime, - pattern: skeleton, - location: styleAndLocation.styleLocation, - parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(skeleton) : {} - }; - var type = argType === "date" ? TYPE.date : TYPE.time; - return { - val: { type, value, location: location_1, style }, - err: null - }; - } - } - return { - val: { - type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time, - value, - location: location_1, - style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null - }, - err: null - }; - } - case "plural": - case "selectordinal": - case "select": { - var typeEndPosition_1 = this.clonePosition(); - this.bumpSpace(); - if (!this.bumpIf(",")) { - return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1))); - } - this.bumpSpace(); - var identifierAndLocation = this.parseIdentifierIfPossible(); - var pluralOffset = 0; - if (argType !== "select" && identifierAndLocation.value === "offset") { - if (!this.bumpIf(":")) { - return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition())); - } - this.bumpSpace(); - var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE); - if (result.err) { - return result; - } - this.bumpSpace(); - identifierAndLocation = this.parseIdentifierIfPossible(); - pluralOffset = result.val; - } - var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation); - if (optionsResult.err) { - return optionsResult; - } - var argCloseResult = this.tryParseArgumentClose(openingBracePosition); - if (argCloseResult.err) { - return argCloseResult; - } - var location_2 = createLocation(openingBracePosition, this.clonePosition()); - if (argType === "select") { - return { - val: { - type: TYPE.select, - value, - options: fromEntries(optionsResult.val), - location: location_2 - }, - err: null - }; - } - else { - return { - val: { - type: TYPE.plural, - value, - options: fromEntries(optionsResult.val), - offset: pluralOffset, - pluralType: argType === "plural" ? "cardinal" : "ordinal", - location: location_2 - }, - err: null - }; - } - } - default: - return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition)); - } - }; - Parser2.prototype.tryParseArgumentClose = function (openingBracePosition) { - if (this.isEOF() || this.char() !== 125) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - this.bump(); - return { val: true, err: null }; - }; - Parser2.prototype.parseSimpleArgStyleIfPossible = function () { - var nestedBraces = 0; - var startPosition = this.clonePosition(); - while (!this.isEOF()) { - var ch = this.char(); - switch (ch) { - case 39: { - this.bump(); - var apostrophePosition = this.clonePosition(); - if (!this.bumpUntil("'")) { - return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition())); - } - this.bump(); - break; - } - case 123: { - nestedBraces += 1; - this.bump(); - break; - } - case 125: { - if (nestedBraces > 0) { - nestedBraces -= 1; - } - else { - return { - val: this.message.slice(startPosition.offset, this.offset()), - err: null - }; - } - break; - } - default: - this.bump(); - break; - } - } - return { - val: this.message.slice(startPosition.offset, this.offset()), - err: null - }; - }; - Parser2.prototype.parseNumberSkeletonFromString = function (skeleton, location) { - var tokens = []; - try { - tokens = parseNumberSkeletonFromString(skeleton); - } - catch (e) { - return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location); - } - return { - val: { - type: SKELETON_TYPE.number, - tokens, - location, - parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {} - }, - err: null - }; - }; - Parser2.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) { - var _a2; - var hasOtherClause = false; - var options = []; - var parsedSelectors = new Set(); - var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location; - while (true) { - if (selector.length === 0) { - var startPosition = this.clonePosition(); - if (parentArgType !== "select" && this.bumpIf("=")) { - var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR); - if (result.err) { - return result; - } - selectorLocation = createLocation(startPosition, this.clonePosition()); - selector = this.message.slice(startPosition.offset, this.offset()); - } - else { - break; - } - } - if (parsedSelectors.has(selector)) { - return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation); - } - if (selector === "other") { - hasOtherClause = true; - } - this.bumpSpace(); - var openingBracePosition = this.clonePosition(); - if (!this.bumpIf("{")) { - return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition())); - } - var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag); - if (fragmentResult.err) { - return fragmentResult; - } - var argCloseResult = this.tryParseArgumentClose(openingBracePosition); - if (argCloseResult.err) { - return argCloseResult; - } - options.push([ - selector, - { - value: fragmentResult.val, - location: createLocation(openingBracePosition, this.clonePosition()) - } - ]); - parsedSelectors.add(selector); - this.bumpSpace(); - _a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location; - } - if (options.length === 0) { - return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition())); - } - if (this.requiresOtherClause && !hasOtherClause) { - return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition())); - } - return { val: options, err: null }; - }; - Parser2.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) { - var sign = 1; - var startingPosition = this.clonePosition(); - if (this.bumpIf("+")) ; - else if (this.bumpIf("-")) { - sign = -1; - } - var hasDigits = false; - var decimal = 0; - while (!this.isEOF()) { - var ch = this.char(); - if (ch >= 48 && ch <= 57) { - hasDigits = true; - decimal = decimal * 10 + (ch - 48); - this.bump(); - } - else { - break; - } - } - var location = createLocation(startingPosition, this.clonePosition()); - if (!hasDigits) { - return this.error(expectNumberError, location); - } - decimal *= sign; - if (!isSafeInteger(decimal)) { - return this.error(invalidNumberError, location); - } - return { val: decimal, err: null }; - }; - Parser2.prototype.offset = function () { - return this.position.offset; - }; - Parser2.prototype.isEOF = function () { - return this.offset() === this.message.length; - }; - Parser2.prototype.clonePosition = function () { - return { - offset: this.position.offset, - line: this.position.line, - column: this.position.column - }; - }; - Parser2.prototype.char = function () { - var offset = this.position.offset; - if (offset >= this.message.length) { - throw Error("out of bound"); - } - var code = codePointAt(this.message, offset); - if (code === void 0) { - throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary"); - } - return code; - }; - Parser2.prototype.error = function (kind, location) { - return { - val: null, - err: { - kind, - message: this.message, - location - } - }; - }; - Parser2.prototype.bump = function () { - if (this.isEOF()) { - return; - } - var code = this.char(); - if (code === 10) { - this.position.line += 1; - this.position.column = 1; - this.position.offset += 1; - } - else { - this.position.column += 1; - this.position.offset += code < 65536 ? 1 : 2; - } - }; - Parser2.prototype.bumpIf = function (prefix) { - if (startsWith(this.message, prefix, this.offset())) { - for (var i = 0; i < prefix.length; i++) { - this.bump(); - } - return true; - } - return false; - }; - Parser2.prototype.bumpUntil = function (pattern) { - var currentOffset = this.offset(); - var index = this.message.indexOf(pattern, currentOffset); - if (index >= 0) { - this.bumpTo(index); - return true; - } - else { - this.bumpTo(this.message.length); - return false; - } - }; - Parser2.prototype.bumpTo = function (targetOffset) { - if (this.offset() > targetOffset) { - throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset()); - } - targetOffset = Math.min(targetOffset, this.message.length); - while (true) { - var offset = this.offset(); - if (offset === targetOffset) { - break; - } - if (offset > targetOffset) { - throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary"); - } - this.bump(); - if (this.isEOF()) { - break; - } - } - }; - Parser2.prototype.bumpSpace = function () { - while (!this.isEOF() && _isWhiteSpace(this.char())) { - this.bump(); - } - }; - Parser2.prototype.peek = function () { - if (this.isEOF()) { - return null; - } - var code = this.char(); - var offset = this.offset(); - var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1)); - return nextCode !== null && nextCode !== void 0 ? nextCode : null; - }; - return Parser2; -}(); -function _isAlpha(codepoint) { - return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90; -} -function _isAlphaOrSlash(codepoint) { - return _isAlpha(codepoint) || codepoint === 47; -} -function _isPotentialElementNameChar(c) { - return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; -} -function _isWhiteSpace(c) { - return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233; -} -function _isPatternSyntax(c) { - return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094; -} -function pruneLocation(els) { - els.forEach(function (el) { - delete el.location; - if (isSelectElement(el) || isPluralElement(el)) { - for (var k in el.options) { - delete el.options[k].location; - pruneLocation(el.options[k].value); - } - } - else if (isNumberElement(el) && isNumberSkeleton(el.style)) { - delete el.style.location; - } - else if ((isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style)) { - delete el.style.location; - } - else if (isTagElement(el)) { - pruneLocation(el.children); - } - }); -} -function parse(message, opts) { - if (opts === void 0) { - opts = {}; - } - opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts); - var result = new Parser(message, opts).parse(); - if (result.err) { - var error = SyntaxError(ErrorKind[result.err.kind]); - error.location = result.err.location; - error.originalMessage = result.err.message; - throw error; - } - if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) { - pruneLocation(result.val); - } - return result.val; -} -function memoize(fn, options) { - var cache = options && options.cache ? options.cache : cacheDefault; - var serializer = options && options.serializer ? options.serializer : serializerDefault; - var strategy = options && options.strategy ? options.strategy : strategyDefault; - return strategy(fn, { - cache, - serializer - }); -} -function isPrimitive(value) { - return value == null || typeof value === "number" || typeof value === "boolean"; -} -function monadic(fn, cache, serializer, arg) { - var cacheKey = isPrimitive(arg) ? arg : serializer(arg); - var computedValue = cache.get(cacheKey); - if (typeof computedValue === "undefined") { - computedValue = fn.call(this, arg); - cache.set(cacheKey, computedValue); - } - return computedValue; -} -function variadic(fn, cache, serializer) { - var args = Array.prototype.slice.call(arguments, 3); - var cacheKey = serializer(args); - var computedValue = cache.get(cacheKey); - if (typeof computedValue === "undefined") { - computedValue = fn.apply(this, args); - cache.set(cacheKey, computedValue); - } - return computedValue; -} -function assemble(fn, context, strategy, cache, serialize) { - return strategy.bind(context, fn, cache, serialize); -} -function strategyDefault(fn, options) { - var strategy = fn.length === 1 ? monadic : variadic; - return assemble(fn, this, strategy, options.cache.create(), options.serializer); -} -function strategyVariadic(fn, options) { - return assemble(fn, this, variadic, options.cache.create(), options.serializer); -} -var serializerDefault = function () { - return JSON.stringify(arguments); -}; -function ObjectWithoutPrototypeCache() { - this.cache = Object.create(null); -} -ObjectWithoutPrototypeCache.prototype.has = function (key) { - return key in this.cache; -}; -ObjectWithoutPrototypeCache.prototype.get = function (key) { - return this.cache[key]; -}; -ObjectWithoutPrototypeCache.prototype.set = function (key, value) { - this.cache[key] = value; -}; -var cacheDefault = { - create: function create() { - return new ObjectWithoutPrototypeCache(); - } -}; -var strategies = { - variadic: strategyVariadic}; -var ErrorCode; -(function (ErrorCode2) { - ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE"; - ErrorCode2["INVALID_VALUE"] = "INVALID_VALUE"; - ErrorCode2["MISSING_INTL_API"] = "MISSING_INTL_API"; -})(ErrorCode || (ErrorCode = {})); -var FormatError = class extends Error { - constructor(msg, code, originalMessage) { - super(msg); - this.code = code; - this.originalMessage = originalMessage; - } - toString() { - return `[formatjs Error: ${this.code}] ${this.message}`; - } -}; -var InvalidValueError = class extends FormatError { - constructor(variableId, value, options, originalMessage) { - super(`Invalid values for "${variableId}": "${value}". Options are "${Object.keys(options).join('", "')}"`, ErrorCode.INVALID_VALUE, originalMessage); - } -}; -var InvalidValueTypeError = class extends FormatError { - constructor(value, type, originalMessage) { - super(`Value for "${value}" must be of type ${type}`, ErrorCode.INVALID_VALUE, originalMessage); - } -}; -var MissingValueError = class extends FormatError { - constructor(variableId, originalMessage) { - super(`The intl string context variable "${variableId}" was not provided to the string "${originalMessage}"`, ErrorCode.MISSING_VALUE, originalMessage); - } -}; -var PART_TYPE; -(function (PART_TYPE2) { - PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal"; - PART_TYPE2[PART_TYPE2["object"] = 1] = "object"; -})(PART_TYPE || (PART_TYPE = {})); -function mergeLiteral(parts) { - if (parts.length < 2) { - return parts; - } - return parts.reduce((all, part) => { - const lastPart = all[all.length - 1]; - if (!lastPart || lastPart.type !== PART_TYPE.literal || part.type !== PART_TYPE.literal) { - all.push(part); - } - else { - lastPart.value += part.value; - } - return all; - }, []); -} -function isFormatXMLElementFn(el) { - return typeof el === "function"; -} -function formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) { - if (els.length === 1 && isLiteralElement(els[0])) { - return [ - { - type: PART_TYPE.literal, - value: els[0].value - } - ]; - } - const result = []; - for (const el of els) { - if (isLiteralElement(el)) { - result.push({ - type: PART_TYPE.literal, - value: el.value - }); - continue; - } - if (isPoundElement(el)) { - if (typeof currentPluralValue === "number") { - result.push({ - type: PART_TYPE.literal, - value: formatters.getNumberFormat(locales).format(currentPluralValue) - }); - } - continue; - } - const { value: varName } = el; - if (!(values && varName in values)) { - throw new MissingValueError(varName, originalMessage); - } - let value = values[varName]; - if (isArgumentElement(el)) { - if (!value || typeof value === "string" || typeof value === "number") { - value = typeof value === "string" || typeof value === "number" ? String(value) : ""; - } - result.push({ - type: typeof value === "string" ? PART_TYPE.literal : PART_TYPE.object, - value - }); - continue; - } - if (isDateElement(el)) { - const style = typeof el.style === "string" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0; - result.push({ - type: PART_TYPE.literal, - value: formatters.getDateTimeFormat(locales, style).format(value) - }); - continue; - } - if (isTimeElement(el)) { - const style = typeof el.style === "string" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0; - result.push({ - type: PART_TYPE.literal, - value: formatters.getDateTimeFormat(locales, style).format(value) - }); - continue; - } - if (isNumberElement(el)) { - const style = typeof el.style === "string" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0; - if (style && style.scale) { - value = value * (style.scale || 1); - } - result.push({ - type: PART_TYPE.literal, - value: formatters.getNumberFormat(locales, style).format(value) - }); - continue; - } - if (isTagElement(el)) { - const { children, value: value2 } = el; - const formatFn = values[value2]; - if (!isFormatXMLElementFn(formatFn)) { - throw new InvalidValueTypeError(value2, "function", originalMessage); - } - const parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue); - let chunks = formatFn(parts.map((p) => p.value)); - if (!Array.isArray(chunks)) { - chunks = [chunks]; - } - result.push(...chunks.map((c) => { - return { - type: typeof c === "string" ? PART_TYPE.literal : PART_TYPE.object, - value: c - }; - })); - } - if (isSelectElement(el)) { - const opt = el.options[value] || el.options.other; - if (!opt) { - throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage); - } - result.push(...formatToParts(opt.value, locales, formatters, formats, values)); - continue; - } - if (isPluralElement(el)) { - let opt = el.options[`=${value}`]; - if (!opt) { - if (!Intl.PluralRules) { - throw new FormatError(`Intl.PluralRules is not available in this environment. -Try polyfilling it using "@formatjs/intl-pluralrules" -`, ErrorCode.MISSING_INTL_API, originalMessage); - } - const rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(value - (el.offset || 0)); - opt = el.options[rule] || el.options.other; - } - if (!opt) { - throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage); - } - result.push(...formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0))); - continue; - } - } - return mergeLiteral(result); -} -function mergeConfig(c1, c2) { - if (!c2) { - return c1; - } - return { - ...c1 || {}, - ...c2 || {}, - ...Object.keys(c1).reduce((all, k) => { - all[k] = { - ...c1[k], - ...c2[k] || {} - }; - return all; - }, {}) - }; -} -function mergeConfigs(defaultConfig, configs) { - if (!configs) { - return defaultConfig; - } - return Object.keys(defaultConfig).reduce((all, k) => { - all[k] = mergeConfig(defaultConfig[k], configs[k]); - return all; - }, { ...defaultConfig }); -} -function createFastMemoizeCache(store) { - return { - create() { - return { - has(key) { - return key in store; - }, - get(key) { - return store[key]; - }, - set(key, value) { - store[key] = value; - } - }; - } - }; -} -function createDefaultFormatters(cache = { - number: {}, - dateTime: {}, - pluralRules: {} -}) { - return { - getNumberFormat: memoize((...args) => new Intl.NumberFormat(...args), { - cache: createFastMemoizeCache(cache.number), - strategy: strategies.variadic - }), - getDateTimeFormat: memoize((...args) => new Intl.DateTimeFormat(...args), { - cache: createFastMemoizeCache(cache.dateTime), - strategy: strategies.variadic - }), - getPluralRules: memoize((...args) => new Intl.PluralRules(...args), { - cache: createFastMemoizeCache(cache.pluralRules), - strategy: strategies.variadic - }) - }; -} -var IntlMessageFormat = class { - constructor(message, locales = IntlMessageFormat.defaultLocale, overrideFormats, opts) { - this.formatterCache = { - number: {}, - dateTime: {}, - pluralRules: {} - }; - this.format = (values) => { - const parts = this.formatToParts(values); - if (parts.length === 1) { - return parts[0].value; - } - const result = parts.reduce((all, part) => { - if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") { - all.push(part.value); - } - else { - all[all.length - 1] += part.value; - } - return all; - }, []); - if (result.length <= 1) { - return result[0] || ""; - } - return result; - }; - this.formatToParts = (values) => formatToParts(this.ast, this.locales, this.formatters, this.formats, values, void 0, this.message); - this.resolvedOptions = () => ({ - locale: Intl.NumberFormat.supportedLocalesOf(this.locales)[0] - }); - this.getAst = () => this.ast; - if (typeof message === "string") { - this.message = message; - if (!IntlMessageFormat.__parse) { - throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`"); - } - this.ast = IntlMessageFormat.__parse(message, { - ignoreTag: opts?.ignoreTag - }); - } - else { - this.ast = message; - } - if (!Array.isArray(this.ast)) { - throw new TypeError("A message must be provided as a String or AST."); - } - this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats); - this.locales = locales; - this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache); - } - static get defaultLocale() { - if (!IntlMessageFormat.memoizedDefaultLocale) { - IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale; - } - return IntlMessageFormat.memoizedDefaultLocale; - } -}; -IntlMessageFormat.memoizedDefaultLocale = null; -IntlMessageFormat.__parse = parse; -IntlMessageFormat.formats = { - number: { - integer: { - maximumFractionDigits: 0 - }, - currency: { - style: "currency" - }, - percent: { - style: "percent" - } - }, - date: { - short: { - month: "numeric", - day: "numeric", - year: "2-digit" - }, - medium: { - month: "short", - day: "numeric", - year: "numeric" - }, - long: { - month: "long", - day: "numeric", - year: "numeric" - }, - full: { - weekday: "long", - month: "long", - day: "numeric", - year: "numeric" - } - }, - time: { - short: { - hour: "numeric", - minute: "numeric" - }, - medium: { - hour: "numeric", - minute: "numeric", - second: "numeric" - }, - long: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - }, - full: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - } - } -}; -var lib_esnext_default = IntlMessageFormat; -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -// Copyright 2018 The Lighthouse Authors. All Rights Reserved. -const EMPTY_VALUES_OBJECT = {}; -class RegisteredFileStrings { - filename; - stringStructure; - localizedMessages; - localizedStringSet; - constructor(filename, stringStructure, localizedMessages) { - this.filename = filename; - this.stringStructure = stringStructure; - this.localizedMessages = localizedMessages; - } - getLocalizedStringSetFor(locale) { - if (this.localizedStringSet) { - return this.localizedStringSet; - } - const localeData = this.localizedMessages.get(locale); - if (!localeData) { - throw new Error(`No locale data registered for '${locale}'`); - } - this.localizedStringSet = new LocalizedStringSet(this.filename, this.stringStructure, locale, localeData); - return this.localizedStringSet; - } -} -class LocalizedStringSet { - filename; - stringStructure; - localizedMessages; - cachedSimpleStrings = new Map(); - cachedMessageFormatters = new Map(); - localeForFormatter; - constructor(filename, stringStructure, locale, localizedMessages) { - this.filename = filename; - this.stringStructure = stringStructure; - this.localizedMessages = localizedMessages; - this.localeForFormatter = (locale === 'en-XA' || locale === 'en-XL') ? 'de-DE' : locale; - } - getLocalizedString(message, values = EMPTY_VALUES_OBJECT) { - if (values === EMPTY_VALUES_OBJECT || Object.keys(values).length === 0) { - return this.getSimpleLocalizedString(message); - } - return this.getFormattedLocalizedString(message, values); - } - getMessageFormatterFor(message) { - const keyname = Object.keys(this.stringStructure).find(key => this.stringStructure[key] === message); - if (!keyname) { - throw new Error(`Unable to locate '${message}' in UIStrings object`); - } - const i18nId = `${this.filename} | ${keyname}`; - const localeMessage = this.localizedMessages[i18nId]; - const messageToTranslate = localeMessage ? localeMessage.message : message; - return new lib_esnext_default(messageToTranslate, this.localeForFormatter, undefined, { ignoreTag: true }); - } - getSimpleLocalizedString(message) { - const cachedSimpleString = this.cachedSimpleStrings.get(message); - if (cachedSimpleString) { - return cachedSimpleString; - } - const formatter = this.getMessageFormatterFor(message); - try { - const translatedString = formatter.format(); - this.cachedSimpleStrings.set(message, translatedString); - return translatedString; - } - catch { - const formatter = new lib_esnext_default(message, this.localeForFormatter, undefined, { ignoreTag: true }); - const translatedString = formatter.format(); - this.cachedSimpleStrings.set(message, translatedString); - return translatedString; - } - } - getFormattedLocalizedString(message, values) { - let formatter = this.cachedMessageFormatters.get(message); - if (!formatter) { - formatter = this.getMessageFormatterFor(message); - this.cachedMessageFormatters.set(message, formatter); - } - try { - return formatter.format(values); - } - catch { - const formatter = new lib_esnext_default(message, this.localeForFormatter, undefined, { ignoreTag: true }); - return formatter.format(values); - } - } -} - -// Copyright 2018 The Lighthouse Authors. All Rights Reserved. -class I18n { - supportedLocales; - localeData = new Map(); - defaultLocale; - constructor(supportedLocales, defaultLocale) { - this.defaultLocale = defaultLocale; - this.supportedLocales = new Set(supportedLocales); - } - registerLocaleData(locale, messages) { - this.localeData.set(locale, messages); - } - hasLocaleDataForTest(locale) { - return this.localeData.has(locale); - } - resetLocaleDataForTest() { - this.localeData.clear(); - } - registerFileStrings(filename, stringStructure) { - return new RegisteredFileStrings(filename, stringStructure, this.localeData); - } - lookupClosestSupportedLocale(locale) { - const canonicalLocale = Intl.getCanonicalLocales(locale)[0]; - const localeParts = canonicalLocale.split('-'); - while (localeParts.length) { - const candidate = localeParts.join('-'); - if (this.supportedLocales.has(candidate)) { - return candidate; - } - localeParts.pop(); - } - return this.defaultLocale; - } -} - -const LOCALES = [ - 'en-US', -]; -const DEFAULT_LOCALE = 'en-US'; - -// Copyright 2020 The Chromium Authors -const i18nInstance = new I18n(LOCALES, DEFAULT_LOCALE); -function getLazilyComputedLocalizedString(registeredStrings, id, values = {}) { - return () => getLocalizedString(registeredStrings, id, values); -} -function getLocalizedString(registeredStrings, id, values = {}) { - return registeredStrings.getLocalizedStringSetFor(DevToolsLocale.instance().locale).getLocalizedString(id, values); -} -function registerUIStrings(path, stringStructure) { - return i18nInstance.registerFileStrings(path, stringStructure); -} -function lockedLazyString(str) { - return () => str; -} - -// Copyright 2014 The Chromium Authors -const UIStrings$2 = { - elementsPanel: 'Elements panel', - stylesSidebar: 'styles sidebar', - changesDrawer: 'Changes drawer', - issuesView: 'Issues view', - networkPanel: 'Network panel', - requestConditionsDrawer: 'Request conditions drawer', - applicationPanel: 'Application panel', - sourcesPanel: 'Sources panel', - timelinePanel: 'Performance panel', - memoryInspectorPanel: 'Memory inspector panel', - developerResourcesPanel: 'Developer Resources panel', - animationsPanel: 'Animations panel', -}; -const str_$2 = registerUIStrings('core/common/Revealer.ts', UIStrings$2); -const i18nLazyString$1 = getLazilyComputedLocalizedString.bind(undefined, str_$2); -({ - DEVELOPER_RESOURCES_PANEL: i18nLazyString$1(UIStrings$2.developerResourcesPanel), - ELEMENTS_PANEL: i18nLazyString$1(UIStrings$2.elementsPanel), - STYLES_SIDEBAR: i18nLazyString$1(UIStrings$2.stylesSidebar), - CHANGES_DRAWER: i18nLazyString$1(UIStrings$2.changesDrawer), - ISSUES_VIEW: i18nLazyString$1(UIStrings$2.issuesView), - NETWORK_PANEL: i18nLazyString$1(UIStrings$2.networkPanel), - REQUEST_CONDITIONS_DRAWER: i18nLazyString$1(UIStrings$2.requestConditionsDrawer), - TIMELINE_PANEL: i18nLazyString$1(UIStrings$2.timelinePanel), - APPLICATION_PANEL: i18nLazyString$1(UIStrings$2.applicationPanel), - SOURCES_PANEL: i18nLazyString$1(UIStrings$2.sourcesPanel), - MEMORY_INSPECTOR_PANEL: i18nLazyString$1(UIStrings$2.memoryInspectorPanel), - ANIMATIONS_PANEL: i18nLazyString$1(UIStrings$2.animationsPanel), -}); - -// Copyright 2014 The Chromium Authors -var FrontendMessageSource; -(function (FrontendMessageSource) { - FrontendMessageSource["CSS"] = "css"; - FrontendMessageSource["ConsoleAPI"] = "console-api"; - FrontendMessageSource["ISSUE_PANEL"] = "issue-panel"; - FrontendMessageSource["SELF_XSS"] = "self-xss"; -})(FrontendMessageSource || (FrontendMessageSource = {})); - -// Copyright 2012 The Chromium Authors -function normalizePath(path) { - if (path.indexOf('..') === -1 && path.indexOf('.') === -1) { - return path; - } - const segments = (path[0] === '/' ? path.substring(1) : path).split('/'); - const normalizedSegments = []; - for (const segment of segments) { - if (segment === '.') { - continue; - } - else if (segment === '..') { - normalizedSegments.pop(); - } - else { - normalizedSegments.push(segment); - } - } - let normalizedPath = normalizedSegments.join('/'); - if (path[0] === '/' && normalizedPath) { - normalizedPath = '/' + normalizedPath; - } - if (normalizedPath[normalizedPath.length - 1] !== '/' && - ((path[path.length - 1] === '/') || (segments[segments.length - 1] === '.') || - (segments[segments.length - 1] === '..'))) { - normalizedPath = normalizedPath + '/'; - } - return normalizedPath; -} -class ParsedURL { - isValid = false; - url; - scheme = ''; - user = ''; - host = ''; - port = ''; - path = ''; - queryParams = ''; - fragment = ''; - folderPathComponents = ''; - lastPathComponent = ''; - blobInnerScheme; - #displayName; - #dataURLDisplayName; - constructor(url) { - this.url = url; - const isBlobUrl = this.url.startsWith('blob:'); - const urlToMatch = isBlobUrl ? url.substring(5) : url; - const match = urlToMatch.match(ParsedURL.urlRegex()); - if (match) { - this.isValid = true; - if (isBlobUrl) { - this.blobInnerScheme = match[2].toLowerCase(); - this.scheme = 'blob'; - } - else { - this.scheme = match[2].toLowerCase(); - } - this.user = match[3] ?? ''; - this.host = match[4] ?? ''; - this.port = match[5] ?? ''; - this.path = match[6] ?? '/'; - this.queryParams = match[7] ?? ''; - this.fragment = match[8] ?? ''; - } - else { - if (this.url.startsWith('data:')) { - this.scheme = 'data'; - return; - } - if (this.url.startsWith('blob:')) { - this.scheme = 'blob'; - return; - } - if (this.url === 'about:blank') { - this.scheme = 'about'; - return; - } - this.path = this.url; - } - const lastSlashExceptTrailingIndex = this.path.lastIndexOf('/', this.path.length - 2); - if (lastSlashExceptTrailingIndex !== -1) { - this.lastPathComponent = this.path.substring(lastSlashExceptTrailingIndex + 1); - } - else { - this.lastPathComponent = this.path; - } - const lastSlashIndex = this.path.lastIndexOf('/'); - if (lastSlashIndex !== -1) { - this.folderPathComponents = this.path.substring(0, lastSlashIndex); - } - } - static fromString(string) { - const parsedURL = new ParsedURL(string.toString()); - if (parsedURL.isValid) { - return parsedURL; - } - return null; - } - static preEncodeSpecialCharactersInPath(path) { - for (const specialChar of ['%', ';', '#', '?', ' ']) { - (path) = path.replaceAll(specialChar, encodeURIComponent(specialChar)); - } - return path; - } - static rawPathToEncodedPathString(path) { - const partiallyEncoded = ParsedURL.preEncodeSpecialCharactersInPath(path); - if (path.startsWith('/')) { - return new URL(partiallyEncoded, 'file:///').pathname; - } - return new URL('/' + partiallyEncoded, 'file:///').pathname.substr(1); - } - static encodedFromParentPathAndName(parentPath, name) { - return ParsedURL.concatenate(parentPath, '/', ParsedURL.preEncodeSpecialCharactersInPath(name)); - } - static urlFromParentUrlAndName(parentUrl, name) { - return ParsedURL.concatenate(parentUrl, '/', ParsedURL.preEncodeSpecialCharactersInPath(name)); - } - static encodedPathToRawPathString(encPath) { - return decodeURIComponent(encPath); - } - static rawPathToUrlString(fileSystemPath) { - let preEncodedPath = ParsedURL.preEncodeSpecialCharactersInPath(fileSystemPath.replace(/\\/g, '/')); - preEncodedPath = preEncodedPath.replace(/\\/g, '/'); - if (!preEncodedPath.startsWith('file://')) { - if (preEncodedPath.startsWith('/')) { - preEncodedPath = 'file://' + preEncodedPath; - } - else { - preEncodedPath = 'file:///' + preEncodedPath; - } - } - return new URL(preEncodedPath).toString(); - } - static relativePathToUrlString(relativePath, baseURL) { - const preEncodedPath = ParsedURL.preEncodeSpecialCharactersInPath(relativePath.replace(/\\/g, '/')); - return new URL(preEncodedPath, baseURL).toString(); - } - static urlToRawPathString(fileURL, isWindows) { - console.assert(fileURL.startsWith('file://'), 'This must be a file URL.'); - const decodedFileURL = decodeURIComponent(fileURL); - if (isWindows) { - return decodedFileURL.substr('file:///'.length).replace(/\//g, '\\'); - } - return decodedFileURL.substr('file://'.length); - } - static sliceUrlToEncodedPathString(url, start) { - return url.substring(start); - } - static substr(devToolsPath, from, length) { - return devToolsPath.substr(from, length); - } - static substring(devToolsPath, start, end) { - return devToolsPath.substring(start, end); - } - static prepend(prefix, devToolsPath) { - return prefix + devToolsPath; - } - static concatenate(devToolsPath, ...appendage) { - return devToolsPath.concat(...appendage); - } - static trim(devToolsPath) { - return devToolsPath.trim(); - } - static slice(devToolsPath, start, end) { - return devToolsPath.slice(start, end); - } - static join(devToolsPaths, separator) { - return devToolsPaths.join(separator); - } - static split(devToolsPath, separator, limit) { - return devToolsPath.split(separator, limit); - } - static toLowerCase(devToolsPath) { - return devToolsPath.toLowerCase(); - } - static isValidUrlString(str) { - return new ParsedURL(str).isValid; - } - static urlWithoutHash(url) { - const hashIndex = url.indexOf('#'); - if (hashIndex !== -1) { - return url.substr(0, hashIndex); - } - return url; - } - static urlRegex() { - if (ParsedURL.urlRegexInstance) { - return ParsedURL.urlRegexInstance; - } - const schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//; - const userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/; - const hostRegex = /((?:\[::\d?\])|(?:[^\s\/:]*))/; - const portRegex = /(?::([\d]+))?/; - const pathRegex = /(\/[^#?]*)?/; - const queryRegex = /(?:\?([^#]*))?/; - const fragmentRegex = /(?:#(.*))?/; - ParsedURL.urlRegexInstance = new RegExp('^(' + schemeRegex.source + userRegex.source + hostRegex.source + portRegex.source + ')' + pathRegex.source + - queryRegex.source + fragmentRegex.source + '$'); - return ParsedURL.urlRegexInstance; - } - static extractPath(url) { - const parsedURL = this.fromString(url); - return (parsedURL ? parsedURL.path : ''); - } - static extractOrigin(url) { - const parsedURL = this.fromString(url); - return parsedURL ? parsedURL.securityOrigin() : EmptyUrlString; - } - static extractExtension(url) { - url = ParsedURL.urlWithoutHash(url); - const indexOfQuestionMark = url.indexOf('?'); - if (indexOfQuestionMark !== -1) { - url = url.substr(0, indexOfQuestionMark); - } - const lastIndexOfSlash = url.lastIndexOf('/'); - if (lastIndexOfSlash !== -1) { - url = url.substr(lastIndexOfSlash + 1); - } - const lastIndexOfDot = url.lastIndexOf('.'); - if (lastIndexOfDot !== -1) { - url = url.substr(lastIndexOfDot + 1); - const lastIndexOfPercent = url.indexOf('%'); - if (lastIndexOfPercent !== -1) { - return url.substr(0, lastIndexOfPercent); - } - return url; - } - return ''; - } - static extractName(url) { - if (url.endsWith('/')) { - url = url.slice(0, -1); - } - let index = url.lastIndexOf('/'); - const pathAndQuery = index !== -1 ? url.substr(index + 1) : url; - index = pathAndQuery.indexOf('?'); - return index < 0 ? pathAndQuery : pathAndQuery.substr(0, index); - } - static completeURL(baseURL, href) { - if (href.startsWith('data:') || href.startsWith('blob:') || href.startsWith('javascript:') || - href.startsWith('mailto:')) { - return href; - } - const trimmedHref = href.trim(); - const parsedHref = this.fromString(trimmedHref); - if (parsedHref?.scheme) { - const securityOrigin = parsedHref.securityOrigin(); - const pathText = normalizePath(parsedHref.path); - const queryText = parsedHref.queryParams && `?${parsedHref.queryParams}`; - const fragmentText = parsedHref.fragment && `#${parsedHref.fragment}`; - return securityOrigin + pathText + queryText + fragmentText; - } - const parsedURL = this.fromString(baseURL); - if (!parsedURL) { - return null; - } - if (parsedURL.isDataURL()) { - return href; - } - if (href.length > 1 && href.charAt(0) === '/' && href.charAt(1) === '/') { - return parsedURL.scheme + ':' + href; - } - const securityOrigin = parsedURL.securityOrigin(); - const pathText = parsedURL.path; - const queryText = parsedURL.queryParams ? '?' + parsedURL.queryParams : ''; - if (!href.length) { - return securityOrigin + pathText + queryText; - } - if (href.charAt(0) === '#') { - return securityOrigin + pathText + queryText + href; - } - if (href.charAt(0) === '?') { - return securityOrigin + pathText + href; - } - const hrefMatches = href.match(/^[^#?]*/); - if (!hrefMatches || !href.length) { - throw new Error('Invalid href'); - } - let hrefPath = hrefMatches[0]; - const hrefSuffix = href.substring(hrefPath.length); - if (hrefPath.charAt(0) !== '/') { - hrefPath = parsedURL.folderPathComponents + '/' + hrefPath; - } - return securityOrigin + normalizePath(hrefPath) + hrefSuffix; - } - static splitLineAndColumn(string) { - const beforePathMatch = string.match(ParsedURL.urlRegex()); - let beforePath = ''; - let pathAndAfter = string; - if (beforePathMatch) { - beforePath = beforePathMatch[1]; - pathAndAfter = string.substring(beforePathMatch[1].length); - } - const lineColumnRegEx = /(?::(\d+))?(?::(\d+))?$/; - const lineColumnMatch = lineColumnRegEx.exec(pathAndAfter); - let lineNumber; - let columnNumber; - console.assert(Boolean(lineColumnMatch)); - if (!lineColumnMatch) { - return { url: string, lineNumber: 0, columnNumber: 0 }; - } - if (typeof (lineColumnMatch[1]) === 'string') { - lineNumber = parseInt(lineColumnMatch[1], 10); - lineNumber = isNaN(lineNumber) ? undefined : lineNumber - 1; - } - if (typeof (lineColumnMatch[2]) === 'string') { - columnNumber = parseInt(lineColumnMatch[2], 10); - columnNumber = isNaN(columnNumber) ? undefined : columnNumber - 1; - } - let url = beforePath + pathAndAfter.substring(0, pathAndAfter.length - lineColumnMatch[0].length); - if (lineColumnMatch[1] === undefined && lineColumnMatch[2] === undefined) { - const wasmCodeOffsetRegex = /wasm-function\[\d+\]:0x([a-z0-9]+)$/g; - const wasmCodeOffsetMatch = wasmCodeOffsetRegex.exec(pathAndAfter); - if (wasmCodeOffsetMatch && typeof (wasmCodeOffsetMatch[1]) === 'string') { - url = ParsedURL.removeWasmFunctionInfoFromURL(url); - columnNumber = parseInt(wasmCodeOffsetMatch[1], 16); - columnNumber = isNaN(columnNumber) ? undefined : columnNumber; - } - } - return { url, lineNumber, columnNumber }; - } - static removeWasmFunctionInfoFromURL(url) { - const wasmFunctionRegEx = /:wasm-function\[\d+\]/; - const wasmFunctionIndex = url.search(wasmFunctionRegEx); - if (wasmFunctionIndex === -1) { - return url; - } - return ParsedURL.substring(url, 0, wasmFunctionIndex); - } - static beginsWithWindowsDriveLetter(url) { - return /^[A-Za-z]:/.test(url); - } - static beginsWithScheme(url) { - return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(url); - } - static isRelativeURL(url) { - return !this.beginsWithScheme(url) || this.beginsWithWindowsDriveLetter(url); - } - get displayName() { - if (this.#displayName) { - return this.#displayName; - } - if (this.isDataURL()) { - return this.dataURLDisplayName(); - } - if (this.isBlobURL()) { - return this.url; - } - if (this.isAboutBlank()) { - return this.url; - } - this.#displayName = this.lastPathComponent; - if (!this.#displayName) { - this.#displayName = (this.host || '') + '/'; - } - if (this.#displayName === '/') { - this.#displayName = this.url; - } - return this.#displayName; - } - dataURLDisplayName() { - if (this.#dataURLDisplayName) { - return this.#dataURLDisplayName; - } - if (!this.isDataURL()) { - return ''; - } - this.#dataURLDisplayName = trimEndWithMaxLength(this.url, 20); - return this.#dataURLDisplayName; - } - isAboutBlank() { - return this.url === 'about:blank'; - } - isDataURL() { - return this.scheme === 'data'; - } - extractDataUrlMimeType() { - const regexp = /^data:((?\w+)\/(?\w+))?(;base64)?,/; - const match = this.url.match(regexp); - return { - type: match?.groups?.type, - subtype: match?.groups?.subtype, - }; - } - isBlobURL() { - return this.url.startsWith('blob:'); - } - lastPathComponentWithFragment() { - return this.lastPathComponent + (this.fragment ? '#' + this.fragment : ''); - } - domain() { - if (this.isDataURL()) { - return 'data:'; - } - return this.host + (this.port ? ':' + this.port : ''); - } - securityOrigin() { - if (this.isDataURL()) { - return 'data:'; - } - const scheme = this.isBlobURL() ? this.blobInnerScheme : this.scheme; - return scheme + '://' + this.domain(); - } - urlWithoutScheme() { - if (this.scheme && this.url.startsWith(this.scheme + '://')) { - return this.url.substring(this.scheme.length + 3); - } - return this.url; - } - static urlRegexInstance = null; -} - -// Copyright 2021 The Chromium Authors -/* - * Copyright (C) 2012 Google Inc. All rights reserved. - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -const UIStrings$1 = { - fetchAndXHR: '`Fetch` and `XHR`', - javascript: 'JavaScript', - js: 'JS', - css: 'CSS', - img: 'Img', - media: 'Media', - font: 'Font', - doc: 'Doc', - socketShort: 'Socket', - webassembly: 'WebAssembly', - wasm: 'Wasm', - manifest: 'Manifest', - other: 'Other', - document: 'Document', - stylesheet: 'Stylesheet', - image: 'Image', - script: 'Script', - texttrack: 'TextTrack', - fetch: 'Fetch', - eventsource: 'EventSource', - websocket: 'WebSocket', - webtransport: 'WebTransport', - directsocket: 'DirectSocket', - signedexchange: 'SignedExchange', - ping: 'Ping', - cspviolationreport: 'CSPViolationReport', - preflight: 'Preflight', - fedcm: 'FedCM', -}; -const str_$1 = registerUIStrings('core/common/ResourceType.ts', UIStrings$1); -const i18nLazyString = getLazilyComputedLocalizedString.bind(undefined, str_$1); -class ResourceType { - #name; - #title; - #category; - #isTextType; - constructor(name, title, category, isTextType) { - this.#name = name; - this.#title = title; - this.#category = category; - this.#isTextType = isTextType; - } - static fromMimeType(mimeType) { - if (!mimeType) { - return resourceTypes.Other; - } - if (mimeType.startsWith('text/html')) { - return resourceTypes.Document; - } - if (mimeType.startsWith('text/css')) { - return resourceTypes.Stylesheet; - } - if (mimeType.startsWith('image/')) { - return resourceTypes.Image; - } - if (mimeType.startsWith('text/')) { - return resourceTypes.Script; - } - if (mimeType.includes('font')) { - return resourceTypes.Font; - } - if (mimeType.includes('script')) { - return resourceTypes.Script; - } - if (mimeType.includes('octet')) { - return resourceTypes.Other; - } - if (mimeType.includes('application')) { - return resourceTypes.Script; - } - return resourceTypes.Other; - } - static fromMimeTypeOverride(mimeType) { - if (mimeType === 'application/manifest+json') { - return resourceTypes.Manifest; - } - if (mimeType === 'application/wasm') { - return resourceTypes.Wasm; - } - return null; - } - static fromURL(url) { - return resourceTypeByExtension.get(ParsedURL.extractExtension(url)) || null; - } - static fromName(name) { - for (const resourceType of Object.values(resourceTypes)) { - if (resourceType.name() === name) { - return resourceType; - } - } - return null; - } - static mimeFromURL(url) { - if (url.startsWith('snippet://') || url.startsWith('debugger://')) { - return 'text/javascript'; - } - const name = ParsedURL.extractName(url); - if (mimeTypeByName.has(name)) { - return mimeTypeByName.get(name); - } - let ext = ParsedURL.extractExtension(url).toLowerCase(); - if (ext === 'html' && name.endsWith('.component.html')) { - ext = 'component.html'; - } - return mimeTypeByExtension.get(ext); - } - static mimeFromExtension(ext) { - return mimeTypeByExtension.get(ext); - } - static simplifyContentType(contentType) { - const regex = new RegExp('^application(.*json$|\/json\+.*)'); - return regex.test(contentType) ? 'application/json' : contentType; - } - static isJavaScriptMimeType(mimeType) { - return mimeType === 'application/javascript' || mimeType === 'text/javascript'; - } - static mediaTypeForMetrics(mimeType, isFromSourceMap, isMinified, isSnippet, isDebugger) { - if (mimeType !== 'text/javascript') { - return mimeType; - } - if (isFromSourceMap) { - return 'text/javascript+sourcemapped'; - } - if (isMinified) { - return 'text/javascript+minified'; - } - if (isSnippet) { - return 'text/javascript+snippet'; - } - if (isDebugger) { - return 'text/javascript+eval'; - } - return 'text/javascript+plain'; - } - name() { - return this.#name; - } - title() { - return this.#title(); - } - category() { - return this.#category; - } - isTextType() { - return this.#isTextType; - } - isScript() { - return this.#name === 'script' || this.#name === 'sm-script'; - } - hasScripts() { - return this.isScript() || this.isDocument(); - } - isStyleSheet() { - return this.#name === 'stylesheet' || this.#name === 'sm-stylesheet'; - } - hasStyleSheets() { - return this.isStyleSheet() || this.isDocument(); - } - isDocument() { - return this.#name === 'document'; - } - isDocumentOrScriptOrStyleSheet() { - return this.isDocument() || this.isScript() || this.isStyleSheet(); - } - isFont() { - return this.#name === 'font'; - } - isImage() { - return this.#name === 'image'; - } - isFromSourceMap() { - return this.#name.startsWith('sm-'); - } - toString() { - return this.#name; - } - canonicalMimeType() { - if (this.isDocument()) { - return 'text/html'; - } - if (this.isScript()) { - return 'text/javascript'; - } - if (this.isStyleSheet()) { - return 'text/css'; - } - return ''; - } -} -class ResourceCategory { - name; - title; - shortTitle; - constructor(name, title, shortTitle) { - this.name = name; - this.title = title; - this.shortTitle = shortTitle; - } -} -const resourceCategories = { - XHR: new ResourceCategory('Fetch and XHR', i18nLazyString(UIStrings$1.fetchAndXHR), lockedLazyString('Fetch/XHR')), - Document: new ResourceCategory(UIStrings$1.document, i18nLazyString(UIStrings$1.document), i18nLazyString(UIStrings$1.doc)), - Stylesheet: new ResourceCategory(UIStrings$1.css, i18nLazyString(UIStrings$1.css), i18nLazyString(UIStrings$1.css)), - Script: new ResourceCategory(UIStrings$1.javascript, i18nLazyString(UIStrings$1.javascript), i18nLazyString(UIStrings$1.js)), - Font: new ResourceCategory(UIStrings$1.font, i18nLazyString(UIStrings$1.font), i18nLazyString(UIStrings$1.font)), - Image: new ResourceCategory(UIStrings$1.image, i18nLazyString(UIStrings$1.image), i18nLazyString(UIStrings$1.img)), - Media: new ResourceCategory(UIStrings$1.media, i18nLazyString(UIStrings$1.media), i18nLazyString(UIStrings$1.media)), - Manifest: new ResourceCategory(UIStrings$1.manifest, i18nLazyString(UIStrings$1.manifest), i18nLazyString(UIStrings$1.manifest)), - Socket: new ResourceCategory('Socket', lockedLazyString('WebSocket | WebTransport | DirectSocket'), i18nLazyString(UIStrings$1.socketShort)), - Wasm: new ResourceCategory(UIStrings$1.webassembly, i18nLazyString(UIStrings$1.webassembly), i18nLazyString(UIStrings$1.wasm)), - Other: new ResourceCategory(UIStrings$1.other, i18nLazyString(UIStrings$1.other), i18nLazyString(UIStrings$1.other)), -}; -const resourceTypes = { - Document: new ResourceType('document', i18nLazyString(UIStrings$1.document), resourceCategories.Document, true), - Stylesheet: new ResourceType('stylesheet', i18nLazyString(UIStrings$1.stylesheet), resourceCategories.Stylesheet, true), - Image: new ResourceType('image', i18nLazyString(UIStrings$1.image), resourceCategories.Image, false), - Media: new ResourceType('media', i18nLazyString(UIStrings$1.media), resourceCategories.Media, false), - Font: new ResourceType('font', i18nLazyString(UIStrings$1.font), resourceCategories.Font, false), - Script: new ResourceType('script', i18nLazyString(UIStrings$1.script), resourceCategories.Script, true), - TextTrack: new ResourceType('texttrack', i18nLazyString(UIStrings$1.texttrack), resourceCategories.Other, true), - XHR: new ResourceType('xhr', lockedLazyString('XHR'), resourceCategories.XHR, true), - Fetch: new ResourceType('fetch', i18nLazyString(UIStrings$1.fetch), resourceCategories.XHR, true), - Prefetch: new ResourceType('prefetch', lockedLazyString('Prefetch'), resourceCategories.Document, true), - EventSource: new ResourceType('eventsource', i18nLazyString(UIStrings$1.eventsource), resourceCategories.XHR, true), - WebSocket: new ResourceType('websocket', i18nLazyString(UIStrings$1.websocket), resourceCategories.Socket, false), - WebTransport: new ResourceType('webtransport', i18nLazyString(UIStrings$1.webtransport), resourceCategories.Socket, false), - DirectSocket: new ResourceType('directsocket', i18nLazyString(UIStrings$1.directsocket), resourceCategories.Socket, false), - Wasm: new ResourceType('wasm', i18nLazyString(UIStrings$1.wasm), resourceCategories.Wasm, false), - Manifest: new ResourceType('manifest', i18nLazyString(UIStrings$1.manifest), resourceCategories.Manifest, true), - SignedExchange: new ResourceType('signed-exchange', i18nLazyString(UIStrings$1.signedexchange), resourceCategories.Other, false), - Ping: new ResourceType('ping', i18nLazyString(UIStrings$1.ping), resourceCategories.Other, false), - CSPViolationReport: new ResourceType('csp-violation-report', i18nLazyString(UIStrings$1.cspviolationreport), resourceCategories.Other, false), - Other: new ResourceType('other', i18nLazyString(UIStrings$1.other), resourceCategories.Other, false), - Preflight: new ResourceType('preflight', i18nLazyString(UIStrings$1.preflight), resourceCategories.Other, true), - SourceMapScript: new ResourceType('sm-script', i18nLazyString(UIStrings$1.script), resourceCategories.Script, true), - SourceMapStyleSheet: new ResourceType('sm-stylesheet', i18nLazyString(UIStrings$1.stylesheet), resourceCategories.Stylesheet, true), - FedCM: new ResourceType('fedcm', i18nLazyString(UIStrings$1.fedcm), resourceCategories.Other, false), -}; -const mimeTypeByName = new Map([ - ['Cakefile', 'text/x-coffeescript'], -]); -const resourceTypeByExtension = new Map([ - ['js', resourceTypes.Script], - ['mjs', resourceTypes.Script], - ['css', resourceTypes.Stylesheet], - ['xsl', resourceTypes.Stylesheet], - ['avif', resourceTypes.Image], - ['bmp', resourceTypes.Image], - ['gif', resourceTypes.Image], - ['ico', resourceTypes.Image], - ['jpeg', resourceTypes.Image], - ['jpg', resourceTypes.Image], - ['jxl', resourceTypes.Image], - ['png', resourceTypes.Image], - ['svg', resourceTypes.Image], - ['tif', resourceTypes.Image], - ['tiff', resourceTypes.Image], - ['vue', resourceTypes.Document], - ['webmanifest', resourceTypes.Manifest], - ['webp', resourceTypes.Media], - ['otf', resourceTypes.Font], - ['ttc', resourceTypes.Font], - ['ttf', resourceTypes.Font], - ['woff', resourceTypes.Font], - ['woff2', resourceTypes.Font], - ['wasm', resourceTypes.Wasm], -]); -const mimeTypeByExtension = new Map([ - ['js', 'text/javascript'], - ['mjs', 'text/javascript'], - ['css', 'text/css'], - ['html', 'text/html'], - ['htm', 'text/html'], - ['xml', 'application/xml'], - ['xsl', 'application/xml'], - ['wasm', 'application/wasm'], - ['webmanifest', 'application/manifest+json'], - ['asp', 'application/x-aspx'], - ['aspx', 'application/x-aspx'], - ['jsp', 'application/x-jsp'], - ['c', 'text/x-c++src'], - ['cc', 'text/x-c++src'], - ['cpp', 'text/x-c++src'], - ['h', 'text/x-c++src'], - ['m', 'text/x-c++src'], - ['mm', 'text/x-c++src'], - ['coffee', 'text/x-coffeescript'], - ['dart', 'application/vnd.dart'], - ['ts', 'text/typescript'], - ['tsx', 'text/typescript-jsx'], - ['json', 'application/json'], - ['gyp', 'application/json'], - ['gypi', 'application/json'], - ['map', 'application/json'], - ['cs', 'text/x-csharp'], - ['go', 'text/x-go'], - ['java', 'text/x-java'], - ['kt', 'text/x-kotlin'], - ['scala', 'text/x-scala'], - ['less', 'text/x-less'], - ['php', 'application/x-httpd-php'], - ['phtml', 'application/x-httpd-php'], - ['py', 'text/x-python'], - ['sh', 'text/x-sh'], - ['gss', 'text/x-gss'], - ['sass', 'text/x-sass'], - ['scss', 'text/x-scss'], - ['vtt', 'text/vtt'], - ['ls', 'text/x-livescript'], - ['md', 'text/markdown'], - ['cljs', 'text/x-clojure'], - ['cljc', 'text/x-clojure'], - ['cljx', 'text/x-clojure'], - ['styl', 'text/x-styl'], - ['jsx', 'text/jsx'], - ['avif', 'image/avif'], - ['bmp', 'image/bmp'], - ['gif', 'image/gif'], - ['ico', 'image/ico'], - ['jpeg', 'image/jpeg'], - ['jpg', 'image/jpeg'], - ['jxl', 'image/jxl'], - ['png', 'image/png'], - ['svg', 'image/svg+xml'], - ['tif', 'image/tif'], - ['tiff', 'image/tiff'], - ['webp', 'image/webp'], - ['otf', 'font/otf'], - ['ttc', 'font/collection'], - ['ttf', 'font/ttf'], - ['woff', 'font/woff'], - ['woff2', 'font/woff2'], - ['component.html', 'text/x.angular'], - ['svelte', 'text/x.svelte'], - ['vue', 'text/x.vue'], -]); - -// Copyright 2020 The Chromium Authors -const UIStrings = { - elements: 'Elements', - ai: 'AI', - appearance: 'Appearance', - sources: 'Sources', - network: 'Network', - performance: 'Performance', - console: 'Console', - persistence: 'Persistence', - debugger: 'Debugger', - global: 'Global', - rendering: 'Rendering', - grid: 'Grid', - mobile: 'Mobile', - memory: 'Memory', - extension: 'Extension', - adorner: 'Adorner', - account: 'Account', - privacy: 'Privacy', -}; -const str_ = registerUIStrings('core/common/SettingRegistration.ts', UIStrings); -getLocalizedString.bind(undefined, str_); - -// Copyright 2014 The Chromium Authors -class AcornTokenizer { - #textCursor; - #tokenLineStart; - #tokenLineEnd; - #tokens; - #idx = 0; - constructor(content, tokens) { - this.#tokens = tokens; - const contentLineEndings = findLineEndingIndexes(content); - this.#textCursor = new TextCursor(contentLineEndings); - this.#tokenLineStart = 0; - this.#tokenLineEnd = 0; - } - static punctuator(token, values) { - return token.type !== types$1.num && token.type !== types$1.regexp && - token.type !== types$1.string && token.type !== types$1.name && !token.type.keyword && - (!values || (token.type.label.length === 1 && values.indexOf(token.type.label) !== -1)); - } - static keyword(token, keyword) { - return Boolean(token.type.keyword) && token.type !== types$1['_true'] && - token.type !== types$1['_false'] && token.type !== types$1['_null'] && - (!keyword || token.type.keyword === keyword); - } - static identifier(token, identifier) { - return token.type === types$1.name && (!identifier || token.value === identifier); - } - static arrowIdentifier(token, identifier) { - return token.type === types$1.arrow && (!identifier || token.type.label === identifier); - } - static lineComment(token) { - return token.type === 'Line'; - } - static blockComment(token) { - return token.type === 'Block'; - } - nextToken() { - const token = this.#tokens[this.#idx++]; - if (!token || token.type === types$1.eof) { - return null; - } - this.#textCursor.advance(token.start); - this.#tokenLineStart = this.#textCursor.lineNumber(); - this.#textCursor.advance(token.end); - this.#tokenLineEnd = this.#textCursor.lineNumber(); - return token; - } - peekToken() { - const token = this.#tokens[this.#idx]; - if (!token || token.type === types$1.eof) { - return null; - } - return token; - } - tokenLineStart() { - return this.#tokenLineStart; - } - tokenLineEnd() { - return this.#tokenLineEnd; - } -} -const ECMA_VERSION = 2022; - -// Copyright 2014 The Chromium Authors -class ESTreeWalker { - #beforeVisit; - #afterVisit; - constructor(beforeVisit, afterVisit) { - this.#beforeVisit = beforeVisit; - this.#afterVisit = afterVisit; - } - walk(ast) { - this.#innerWalk(ast, null); - } - #innerWalk(node, parent) { - if (!node) { - return; - } - node.parent = parent; - this.#beforeVisit.call(null, node); - const walkOrder = WALK_ORDER[node.type]; - if (!walkOrder) { - console.error('Walk order not defined for ' + node.type); - return; - } - if (node.type === 'TemplateLiteral') { - const templateLiteral = (node); - const expressionsLength = templateLiteral.expressions.length; - for (let i = 0; i < expressionsLength; ++i) { - this.#innerWalk(templateLiteral.quasis[i], templateLiteral); - this.#innerWalk(templateLiteral.expressions[i], templateLiteral); - } - this.#innerWalk(templateLiteral.quasis[expressionsLength], templateLiteral); - } - else { - for (let i = 0; i < walkOrder.length; ++i) { - const entity = node[walkOrder[i]]; - if (Array.isArray(entity)) { - this.#walkArray(entity, node); - } - else { - this.#innerWalk(entity, node); - } - } - } - this.#afterVisit.call(null, node); - } - #walkArray(nodeArray, parentNode) { - for (let i = 0; i < nodeArray.length; ++i) { - this.#innerWalk(nodeArray[i], parentNode); - } - } -} -const WALK_ORDER = { - AwaitExpression: ['argument'], - ArrayExpression: ['elements'], - ArrayPattern: ['elements'], - ArrowFunctionExpression: ['params', 'body'], - AssignmentExpression: ['left', 'right'], - AssignmentPattern: ['left', 'right'], - BinaryExpression: ['left', 'right'], - BlockStatement: ['body'], - BreakStatement: ['label'], - CallExpression: ['callee', 'arguments'], - CatchClause: ['param', 'body'], - ClassBody: ['body'], - ClassDeclaration: ['id', 'superClass', 'body'], - ClassExpression: ['id', 'superClass', 'body'], - ChainExpression: ['expression'], - ConditionalExpression: ['test', 'consequent', 'alternate'], - ContinueStatement: ['label'], - DebuggerStatement: [], - DoWhileStatement: ['body', 'test'], - EmptyStatement: [], - ExpressionStatement: ['expression'], - ForInStatement: ['left', 'right', 'body'], - ForOfStatement: ['left', 'right', 'body'], - ForStatement: ['init', 'test', 'update', 'body'], - FunctionDeclaration: ['id', 'params', 'body'], - FunctionExpression: ['id', 'params', 'body'], - Identifier: [], - ImportDeclaration: ['specifiers', 'source'], - ImportDefaultSpecifier: ['local'], - ImportNamespaceSpecifier: ['local'], - ImportSpecifier: ['imported', 'local'], - ImportExpression: ['source'], - ExportAllDeclaration: ['source'], - ExportDefaultDeclaration: ['declaration'], - ExportNamedDeclaration: ['specifiers', 'source', 'declaration'], - ExportSpecifier: ['exported', 'local'], - IfStatement: ['test', 'consequent', 'alternate'], - LabeledStatement: ['label', 'body'], - Literal: [], - LogicalExpression: ['left', 'right'], - MemberExpression: ['object', 'property'], - MetaProperty: ['meta', 'property'], - MethodDefinition: ['key', 'value'], - NewExpression: ['callee', 'arguments'], - ObjectExpression: ['properties'], - ObjectPattern: ['properties'], - ParenthesizedExpression: ['expression'], - PrivateIdentifier: [], - PropertyDefinition: ['key', 'value'], - Program: ['body'], - Property: ['key', 'value'], - RestElement: ['argument'], - ReturnStatement: ['argument'], - SequenceExpression: ['expressions'], - SpreadElement: ['argument'], - StaticBlock: ['body'], - Super: [], - SwitchCase: ['test', 'consequent'], - SwitchStatement: ['discriminant', 'cases'], - TaggedTemplateExpression: ['tag', 'quasi'], - TemplateElement: [], - TemplateLiteral: ['quasis', 'expressions'], - ThisExpression: [], - ThrowStatement: ['argument'], - TryStatement: ['block', 'handler', 'finalizer'], - UnaryExpression: ['argument'], - UpdateExpression: ['argument'], - VariableDeclaration: ['declarations'], - VariableDeclarator: ['id', 'init'], - WhileStatement: ['test', 'body'], - WithStatement: ['object', 'body'], - YieldExpression: ['argument'], -}; - -// Copyright 2011 The Chromium Authors -class JavaScriptFormatter { - #builder; - #tokenizer; - #content; - #fromOffset; - #lastLineNumber; - #toOffset; - constructor(builder) { - this.#builder = builder; - } - format(text, _lineEndings, fromOffset, toOffset) { - this.#fromOffset = fromOffset; - this.#toOffset = toOffset; - this.#content = text.substring(this.#fromOffset, this.#toOffset); - this.#lastLineNumber = 0; - const tokens = []; - const ast = parse$1(this.#content, { - ranges: false, - preserveParens: true, - allowAwaitOutsideFunction: true, - allowImportExportEverywhere: true, - ecmaVersion: ECMA_VERSION, - allowHashBang: true, - onToken: tokens, - onComment: tokens, - }); - this.#tokenizer = new AcornTokenizer(this.#content, tokens); - const walker = new ESTreeWalker(this.#beforeVisit.bind(this), this.#afterVisit.bind(this)); - walker.walk(ast); - } - #push(token, format) { - for (let i = 0; i < format.length; ++i) { - if (format[i] === 's') { - this.#builder.addSoftSpace(); - } - else if (format[i] === 'S') { - this.#builder.addHardSpace(); - } - else if (format[i] === 'n') { - this.#builder.addNewLine(); - } - else if (format[i] === '>') { - this.#builder.increaseNestingLevel(); - } - else if (format[i] === '<') { - this.#builder.decreaseNestingLevel(); - } - else if (format[i] === 't') { - if (this.#tokenizer.tokenLineStart() - this.#lastLineNumber > 1) { - this.#builder.addNewLine(true); - } - this.#lastLineNumber = this.#tokenizer.tokenLineEnd(); - if (token) { - this.#builder.addToken(this.#content.substring(token.start, token.end), this.#fromOffset + token.start); - } - } - } - } - #beforeVisit(node) { - if (!node.parent) { - return; - } - if (node.type === 'TemplateLiteral') { - this.#builder.setEnforceSpaceBetweenWords(false); - } - let token; - while ((token = this.#tokenizer.peekToken()) && token.start < node.start) { - const token = this.#tokenizer.nextToken(); - const format = this.#formatToken(node.parent, token); - this.#push(token, format); - } - } - #afterVisit(node) { - const restore = this.#builder.setEnforceSpaceBetweenWords(node.type !== 'TemplateElement'); - let token; - while ((token = this.#tokenizer.peekToken()) && token.start < node.end) { - const token = this.#tokenizer.nextToken(); - const format = this.#formatToken(node, token); - this.#push(token, format); - } - this.#push(null, this.#finishNode(node)); - this.#builder.setEnforceSpaceBetweenWords(restore || node.type === 'TemplateLiteral'); - } - #inForLoopHeader(node) { - const parent = node.parent; - if (!parent) { - return false; - } - if (parent.type === 'ForStatement') { - const parentNode = parent; - return node === parentNode.init || node === parentNode.test || node === parentNode.update; - } - if (parent.type === 'ForInStatement' || parent.type === 'ForOfStatement') { - const parentNode = parent; - return node === parentNode.left || node === parentNode.right; - } - return false; - } - #formatToken(node, tokenOrComment) { - const AT = AcornTokenizer; - if (AT.lineComment(tokenOrComment)) { - return 'tn'; - } - if (AT.blockComment(tokenOrComment)) { - return 'tn'; - } - const token = tokenOrComment; - const nodeType = node.type; - if (nodeType === 'ContinueStatement' || nodeType === 'BreakStatement') { - return node.label && AT.keyword(token) ? 'ts' : 't'; - } - if (nodeType === 'Identifier') { - return 't'; - } - if (nodeType === 'PrivateIdentifier') { - return 't'; - } - if (nodeType === 'ReturnStatement') { - if (AT.punctuator(token, ';')) { - return 't'; - } - return node.argument ? 'ts' : 't'; - } - if (nodeType === 'AwaitExpression') { - if (AT.punctuator(token, ';')) { - return 't'; - } - return node.argument ? 'ts' : 't'; - } - if (nodeType === 'Property') { - if (AT.punctuator(token, ':')) { - return 'ts'; - } - return 't'; - } - if (nodeType === 'ArrayExpression') { - if (AT.punctuator(token, ',')) { - return 'ts'; - } - return 't'; - } - if (nodeType === 'LabeledStatement') { - if (AT.punctuator(token, ':')) { - return 'ts'; - } - } - else if (nodeType === 'LogicalExpression' || nodeType === 'AssignmentExpression' || nodeType === 'BinaryExpression') { - if (AT.punctuator(token) && !AT.punctuator(token, '()')) { - return 'sts'; - } - } - else if (nodeType === 'ConditionalExpression') { - if (AT.punctuator(token, '?:')) { - return 'sts'; - } - } - else if (nodeType === 'VariableDeclarator') { - if (AT.punctuator(token, '=')) { - return 'sts'; - } - } - else if (nodeType === 'ObjectPattern') { - if (node.parent?.type === 'VariableDeclarator' && AT.punctuator(token, '{')) { - return 'st'; - } - if (AT.punctuator(token, ',')) { - return 'ts'; - } - } - else if (nodeType === 'FunctionDeclaration') { - if (AT.punctuator(token, ',)')) { - return 'ts'; - } - } - else if (nodeType === 'FunctionExpression') { - if (AT.punctuator(token, ',)')) { - return 'ts'; - } - if (AT.keyword(token, 'function')) { - return node.id ? 'ts' : 't'; - } - } - else if (nodeType === 'ArrowFunctionExpression') { - if (AT.punctuator(token, ',)')) { - return 'ts'; - } - if (AT.punctuator(token, '(')) { - return 'st'; - } - if (AT.arrowIdentifier(token, '=>')) { - return 'sts'; - } - } - else if (nodeType === 'WithStatement') { - if (AT.punctuator(token, ')')) { - return node.body?.type === 'BlockStatement' ? 'ts' : 'tn>'; - } - } - else if (nodeType === 'SwitchStatement') { - if (AT.punctuator(token, '{')) { - return 'tn>'; - } - if (AT.punctuator(token, '}')) { - return 'n'; - } - } - else if (nodeType === 'VariableDeclaration') { - if (AT.punctuator(token, ',')) { - let allVariablesInitialized = true; - const declarations = node.declarations; - for (let i = 0; i < declarations.length; ++i) { - allVariablesInitialized = allVariablesInitialized && Boolean(declarations[i].init); - } - return !this.#inForLoopHeader(node) && allVariablesInitialized ? 'nSSts' : 'ts'; - } - } - else if (nodeType === 'PropertyDefinition') { - if (AT.punctuator(token, '=')) { - return 'sts'; - } - if (AT.punctuator(token, ';')) { - return 'tn'; - } - } - else if (nodeType === 'BlockStatement') { - if (AT.punctuator(token, '{')) { - return node.body.length ? 'tn>' : 't'; - } - if (AT.punctuator(token, '}')) { - return node.body.length ? 'n'; - } - if (AT.punctuator(token, '}')) { - return 'n'; - } - if (AT.keyword(token, 'else')) { - const preFormat = node.consequent?.type === 'BlockStatement' ? 'st' : 'n'; - } - } - else if (nodeType === 'WhileStatement') { - if (AT.punctuator(token, ')')) { - return node.body?.type === 'BlockStatement' ? 'ts' : 'tn>'; - } - } - else if (nodeType === 'DoWhileStatement') { - const blockBody = node.body?.type === 'BlockStatement'; - if (AT.keyword(token, 'do')) { - return blockBody ? 'ts' : 'tn>'; - } - if (AT.keyword(token, 'while')) { - return blockBody ? 'sts' : 'n'; - } - if (AT.punctuator(token, '}')) { - return ' { - this.#tokens.push(token); - this.#updateDOM(token); - const element = this.#stack[this.#stack.length - 1]; - if (element && (element.name === 'script' || element.name === 'style') && - element.openTag?.endOffset === lastOffset) { - return AbortTokenization; - } - return; - }; - const processToken = (tokenValue, type, tokenStart, tokenEnd) => { - tokenStart += baseOffset; - tokenEnd += baseOffset; - lastOffset = tokenEnd; - const tokenType = type ? new Set(type.split(' ')) : new Set(); - const token = new Token(tokenValue, tokenType, tokenStart, tokenEnd); - if (pendingToken) { - if (tokenValue === '/' && type === 'attribute' && pendingToken.type.has('string')) { - token.startOffset = pendingToken.startOffset; - token.value = `${pendingToken.value}${tokenValue}`; - token.type = pendingToken.type; - } - else if ((tokenValue.startsWith('&') && type === 'error' && pendingToken.type.size === 0) || - (type === null && pendingToken.type.has('error'))) { - pendingToken.endOffset = token.endOffset; - pendingToken.value += tokenValue; - pendingToken.type = token.type; - return; - } - else if (pushToken(pendingToken) === AbortTokenization) { - return AbortTokenization; - } - pendingToken = null; - } - if (type === 'string' || type === null) { - pendingToken = token; - return; - } - return pushToken(token); - }; - while (true) { - baseOffset = lastOffset; - tokenizer(text.substring(lastOffset), processToken); - if (pendingToken) { - pushToken(pendingToken); - pendingToken = null; - } - if (lastOffset >= text.length) { - break; - } - const element = this.#stack[this.#stack.length - 1]; - if (!element) { - break; - } - while (true) { - lastOffset = text.indexOf(' 1) { - const element = this.#stack[this.#stack.length - 1]; - if (!element) { - break; - } - this.#popElement(new Tag(element.name, text.length, text.length, new Map(), false, false)); - } - } - #updateDOM(token) { - const value = token.value; - const type = token.type; - switch (this.#state) { - case "Initial" : - if (hasTokenInSet(type, 'bracket') && (value === '<' || value === '' || value === '/>')) { - this.#onEndTag(token); - this.#state = "Initial" ; - } - return; - case "AttributeName" : - if (!type.size && value === '=') { - this.#state = "AttributeValue" ; - } - else if (hasTokenInSet(type, 'bracket') && (value === '>' || value === '/>')) { - this.#onEndTag(token); - this.#state = "Initial" ; - } - return; - case "AttributeValue" : - if (hasTokenInSet(type, 'string')) { - this.#attributes.set(this.#attributeName, value); - this.#state = "Tag" ; - } - else if (hasTokenInSet(type, 'bracket') && (value === '>' || value === '/>')) { - this.#onEndTag(token); - this.#state = "Initial" ; - } - return; - } - } - #onStartTag(token) { - this.#tagName = ''; - this.#tagStartOffset = token.startOffset; - this.#tagEndOffset = null; - this.#attributes = new Map(); - this.#attributeName = ''; - this.#isOpenTag = token.value === '<'; - } - #onEndTag(token) { - this.#tagEndOffset = token.endOffset; - const selfClosingTag = token.value === '/>' || SelfClosingTags.has(this.#tagName); - const tag = new Tag(this.#tagName, this.#tagStartOffset || 0, this.#tagEndOffset, this.#attributes, this.#isOpenTag, selfClosingTag); - this.#onTagComplete(tag); - } - #onTagComplete(tag) { - if (tag.isOpenTag) { - const topElement = this.#stack[this.#stack.length - 1]; - if (topElement) { - const tagSet = AutoClosingTags.get(topElement.name); - if (topElement !== this.#document && topElement.openTag?.selfClosingTag) { - this.#popElement(autocloseTag(topElement, topElement.openTag.endOffset)); - } - else if (tagSet?.has(tag.name)) { - this.#popElement(autocloseTag(topElement, tag.startOffset)); - } - this.#pushElement(tag); - } - return; - } - let lastTag = this.#stack[this.#stack.length - 1]; - while (this.#stack.length > 1 && lastTag && lastTag.name !== tag.name) { - this.#popElement(autocloseTag(lastTag, tag.startOffset)); - lastTag = this.#stack[this.#stack.length - 1]; - } - if (this.#stack.length === 1) { - return; - } - this.#popElement(tag); - function autocloseTag(element, offset) { - return new Tag(element.name, offset, offset, new Map(), false, false); - } - } - #popElement(closeTag) { - const element = this.#stack.pop(); - if (!element) { - return; - } - element.closeTag = closeTag; - } - #pushElement(openTag) { - const topElement = this.#stack[this.#stack.length - 1]; - const newElement = new FormatterElement(openTag.name); - if (topElement) { - newElement.parent = topElement; - topElement.children.push(newElement); - } - newElement.openTag = openTag; - this.#stack.push(newElement); - } - peekToken() { - return this.#tokenIndex < this.#tokens.length ? this.#tokens[this.#tokenIndex] : null; - } - nextToken() { - return this.#tokens[this.#tokenIndex++]; - } - document() { - return this.#document; - } -} -const SelfClosingTags = new Set([ - 'area', - 'base', - 'br', - 'col', - 'command', - 'embed', - 'hr', - 'img', - 'input', - 'keygen', - 'link', - 'meta', - 'param', - 'source', - 'track', - 'wbr', -]); -const AutoClosingTags = new Map([ - ['head', new Set(['body'])], - ['li', new Set(['li'])], - ['dt', new Set(['dt', 'dd'])], - ['dd', new Set(['dt', 'dd'])], - [ - 'p', - new Set([ - 'address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form', - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', - 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul', - ]), - ], - ['rb', new Set(['rb', 'rt', 'rtc', 'rp'])], - ['rt', new Set(['rb', 'rt', 'rtc', 'rp'])], - ['rtc', new Set(['rb', 'rtc', 'rp'])], - ['rp', new Set(['rb', 'rt', 'rtc', 'rp'])], - ['optgroup', new Set(['optgroup'])], - ['option', new Set(['option', 'optgroup'])], - ['colgroup', new Set(['colgroup'])], - ['thead', new Set(['tbody', 'tfoot'])], - ['tbody', new Set(['tbody', 'tfoot'])], - ['tfoot', new Set(['tbody'])], - ['tr', new Set(['tr'])], - ['td', new Set(['td', 'th'])], - ['th', new Set(['td', 'th'])], -]); -class Token { - value; - type; - startOffset; - endOffset; - constructor(value, type, startOffset, endOffset) { - this.value = value; - this.type = type; - this.startOffset = startOffset; - this.endOffset = endOffset; - } -} -class Tag { - name; - startOffset; - endOffset; - attributes; - isOpenTag; - selfClosingTag; - constructor(name, startOffset, endOffset, attributes, isOpenTag, selfClosingTag) { - this.name = name; - this.startOffset = startOffset; - this.endOffset = endOffset; - this.attributes = attributes; - this.isOpenTag = isOpenTag; - this.selfClosingTag = selfClosingTag; - } -} -class FormatterElement { - name; - children = []; - parent = null; - openTag = null; - closeTag = null; - constructor(name) { - this.name = name; - } -} - -// Copyright 2016 The Chromium Authors -class IdentityFormatter { - builder; - constructor(builder) { - this.builder = builder; - } - format(text, _lineEndings, fromOffset, toOffset) { - const content = text.substring(fromOffset, toOffset); - this.builder.addToken(content, fromOffset); - } -} - -// Copyright 2022 The Chromium Authors -function parseScopes(expression, sourceType = 'script') { - let root = null; - try { - root = parse$1(expression, { ecmaVersion: ECMA_VERSION, allowAwaitOutsideFunction: true, ranges: false, sourceType }); - } - catch { - return null; - } - return new ScopeVariableAnalysis(root, expression).run(); -} -class Scope { - variables = new Map(); - parent; - start; - end; - kind; - name; - nameMappingLocations; - children = []; - constructor(start, end, parent, kind, name, nameMappingLocations) { - this.start = start; - this.end = end; - this.parent = parent; - this.kind = kind; - this.name = name; - this.nameMappingLocations = nameMappingLocations; - if (parent) { - parent.children.push(this); - } - } - export() { - const variables = []; - for (const variable of this.variables) { - const offsets = []; - for (const use of variable[1].uses) { - offsets.push(use.offset); - } - variables.push({ name: variable[0], kind: variable[1].definitionKind, offsets }); - } - const children = this.children.map(c => c.export()); - return { - start: this.start, - end: this.end, - variables, - kind: this.kind, - name: this.name, - nameMappingLocations: this.nameMappingLocations, - children, - }; - } - addVariable(name, offset, definitionKind, isShorthandAssignmentProperty) { - const variable = this.variables.get(name); - const use = { offset, scope: this, isShorthandAssignmentProperty }; - if (!variable) { - this.variables.set(name, { definitionKind, uses: [use] }); - return; - } - if (variable.definitionKind === 0 ) { - variable.definitionKind = definitionKind; - } - variable.uses.push(use); - } - findBinders(name) { - const result = []; - let scope = this; - while (scope !== null) { - const defUse = scope.variables.get(name); - if (defUse && defUse.definitionKind !== 0 ) { - result.push(defUse); - } - scope = scope.parent; - } - return result; - } - #mergeChildDefUses(name, defUses) { - const variable = this.variables.get(name); - if (!variable) { - this.variables.set(name, defUses); - return; - } - variable.uses.push(...defUses.uses); - if (defUses.definitionKind === 2 ) { - console.assert(variable.definitionKind !== 1 ); - if (variable.definitionKind === 0 ) { - variable.definitionKind = defUses.definitionKind; - } - } - else { - console.assert(defUses.definitionKind === 0 ); - } - } - finalizeToParent(isFunctionScope) { - if (!this.parent) { - console.error('Internal error: wrong nesting in scope analysis.'); - throw new Error('Internal error'); - } - const keysToRemove = []; - for (const [name, defUse] of this.variables.entries()) { - if (defUse.definitionKind === 0 || - (defUse.definitionKind === 2 && !isFunctionScope)) { - this.parent.#mergeChildDefUses(name, defUse); - keysToRemove.push(name); - } - } - keysToRemove.forEach(k => this.variables.delete(k)); - } -} -class ScopeVariableAnalysis { - #rootScope; - #allNames = new Set(); - #currentScope; - #rootNode; - #sourceText; - #methodName; - #additionalMappingLocations = []; - constructor(node, sourceText) { - this.#rootNode = node; - this.#sourceText = sourceText; - this.#rootScope = new Scope(node.start, node.end, null, 3 ); - this.#currentScope = this.#rootScope; - } - run() { - this.#processNode(this.#rootNode); - return this.#rootScope; - } - #processNode(node) { - if (node === null) { - return; - } - switch (node.type) { - case 'AwaitExpression': - this.#processNode(node.argument); - break; - case 'ArrayExpression': - node.elements.forEach(item => this.#processNode(item)); - break; - case 'ExpressionStatement': - this.#processNode(node.expression); - break; - case 'Program': - console.assert(this.#currentScope === this.#rootScope); - node.body.forEach(item => this.#processNode(item)); - console.assert(this.#currentScope === this.#rootScope); - break; - case 'ArrayPattern': - node.elements.forEach(item => this.#processNode(item)); - break; - case 'ArrowFunctionExpression': { - this.#pushScope(node.start, node.end, 4 , undefined, mappingLocationsForArrowFunctions(node, this.#sourceText)); - node.params.forEach(this.#processNodeAsDefinition.bind(this, 2 , false)); - if (node.body.type === 'BlockStatement') { - node.body.body.forEach(this.#processNode.bind(this)); - } - else { - this.#processNode(node.body); - } - this.#popScope(true); - break; - } - case 'AssignmentExpression': - case 'AssignmentPattern': - case 'BinaryExpression': - case 'LogicalExpression': - this.#processNode(node.left); - this.#processNode(node.right); - break; - case 'BlockStatement': - this.#pushScope(node.start, node.end, 1 ); - node.body.forEach(this.#processNode.bind(this)); - this.#popScope(false); - break; - case 'CallExpression': - this.#processNode(node.callee); - node.arguments.forEach(this.#processNode.bind(this)); - break; - case 'VariableDeclaration': { - const definitionKind = node.kind === 'var' ? 2 : 1 ; - node.declarations.forEach(this.#processVariableDeclarator.bind(this, definitionKind)); - break; - } - case 'CatchClause': - this.#pushScope(node.start, node.end, 1 ); - this.#processNodeAsDefinition(1 , false, node.param); - this.#processNode(node.body); - this.#popScope(false); - break; - case 'ClassBody': - node.body.forEach(this.#processNode.bind(this)); - break; - case 'ClassDeclaration': - this.#processNodeAsDefinition(1 , false, node.id); - this.#processNode(node.superClass ?? null); - this.#processNode(node.body); - break; - case 'ClassExpression': - this.#processNode(node.superClass ?? null); - this.#processNode(node.body); - break; - case 'ChainExpression': - this.#processNode(node.expression); - break; - case 'ConditionalExpression': - this.#processNode(node.test); - this.#processNode(node.consequent); - this.#processNode(node.alternate); - break; - case 'DoWhileStatement': - this.#processNode(node.body); - this.#processNode(node.test); - break; - case 'ForInStatement': - case 'ForOfStatement': - this.#pushScope(node.start, node.end, 1 ); - this.#processNode(node.left); - this.#processNode(node.right); - this.#processNode(node.body); - this.#popScope(false); - break; - case 'ForStatement': - this.#pushScope(node.start, node.end, 1 ); - this.#processNode(node.init ?? null); - this.#processNode(node.test ?? null); - this.#processNode(node.update ?? null); - this.#processNode(node.body); - this.#popScope(false); - break; - case 'FunctionDeclaration': - this.#processNodeAsDefinition(2 , false, node.id); - this.#pushScope(node.id?.end ?? node.start, node.end, 2 , node.id.name, mappingLocationsForFunctionDeclaration(node, this.#sourceText)); - this.#addVariable('this', node.start, 3 ); - this.#addVariable('arguments', node.start, 3 ); - node.params.forEach(this.#processNodeAsDefinition.bind(this, 1 , false)); - node.body.body.forEach(this.#processNode.bind(this)); - this.#popScope(true); - break; - case 'FunctionExpression': - this.#pushScope(node.id?.end ?? node.start, node.end, 2 , this.#methodName ?? node.id?.name, [...this.#additionalMappingLocations, ...mappingLocationsForFunctionExpression(node, this.#sourceText)]); - this.#additionalMappingLocations = []; - this.#methodName = undefined; - this.#addVariable('this', node.start, 3 ); - this.#addVariable('arguments', node.start, 3 ); - node.params.forEach(this.#processNodeAsDefinition.bind(this, 1 , false)); - node.body.body.forEach(this.#processNode.bind(this)); - this.#popScope(true); - break; - case 'Identifier': - this.#addVariable(node.name, node.start); - break; - case 'IfStatement': - this.#processNode(node.test); - this.#processNode(node.consequent); - this.#processNode(node.alternate ?? null); - break; - case 'LabeledStatement': - this.#processNode(node.body); - break; - case 'MetaProperty': - break; - case 'MethodDefinition': - if (node.computed) { - this.#processNode(node.key); - } - else { - this.#additionalMappingLocations = mappingLocationsForMethodDefinition(node); - this.#methodName = nameForMethodDefinition(node); - } - this.#processNode(node.value); - break; - case 'NewExpression': - this.#processNode(node.callee); - node.arguments.forEach(this.#processNode.bind(this)); - break; - case 'MemberExpression': - this.#processNode(node.object); - if (node.computed) { - this.#processNode(node.property); - } - break; - case 'ObjectExpression': - node.properties.forEach(this.#processNode.bind(this)); - break; - case 'ObjectPattern': - node.properties.forEach(this.#processNode.bind(this)); - break; - case 'PrivateIdentifier': - break; - case 'PropertyDefinition': - if (node.computed) { - this.#processNode(node.key); - } - this.#processNode(node.value ?? null); - break; - case 'Property': - if (node.shorthand) { - console.assert(node.value.type === 'Identifier'); - console.assert(node.key.type === 'Identifier'); - console.assert(node.value.name === node.key.name); - this.#addVariable(node.value.name, node.value.start, 0 , true); - } - else { - if (node.computed) { - this.#processNode(node.key); - } - else if (node.value.type === 'FunctionExpression') { - this.#additionalMappingLocations = mappingLocationsForMethodDefinition(node); - this.#methodName = nameForMethodDefinition(node); - } - this.#processNode(node.value); - } - break; - case 'RestElement': - this.#processNodeAsDefinition(1 , false, node.argument); - break; - case 'ReturnStatement': - this.#processNode(node.argument ?? null); - break; - case 'SequenceExpression': - node.expressions.forEach(this.#processNode.bind(this)); - break; - case 'SpreadElement': - this.#processNode(node.argument); - break; - case 'SwitchCase': - this.#processNode(node.test ?? null); - node.consequent.forEach(this.#processNode.bind(this)); - break; - case 'SwitchStatement': - this.#processNode(node.discriminant); - node.cases.forEach(this.#processNode.bind(this)); - break; - case 'TaggedTemplateExpression': - this.#processNode(node.tag); - this.#processNode(node.quasi); - break; - case 'TemplateLiteral': - node.expressions.forEach(this.#processNode.bind(this)); - break; - case 'ThisExpression': - this.#addVariable('this', node.start); - break; - case 'ThrowStatement': - this.#processNode(node.argument); - break; - case 'TryStatement': - this.#processNode(node.block); - this.#processNode(node.handler ?? null); - this.#processNode(node.finalizer ?? null); - break; - case 'WithStatement': - this.#processNode(node.object); - this.#processNode(node.body); - break; - case 'YieldExpression': - this.#processNode(node.argument ?? null); - break; - case 'UnaryExpression': - case 'UpdateExpression': - this.#processNode(node.argument); - break; - case 'WhileStatement': - this.#processNode(node.test); - this.#processNode(node.body); - break; - case 'BreakStatement': - case 'ContinueStatement': - case 'DebuggerStatement': - case 'EmptyStatement': - case 'Literal': - case 'Super': - case 'TemplateElement': - break; - case 'ImportDeclaration': - case 'ImportDefaultSpecifier': - case 'ImportNamespaceSpecifier': - case 'ImportSpecifier': - case 'ImportExpression': - case 'ExportAllDeclaration': - case 'ExportDefaultDeclaration': - case 'ExportNamedDeclaration': - case 'ExportSpecifier': - break; - case 'VariableDeclarator': - console.error('Should not encounter VariableDeclarator in general traversal.'); - break; - } - } - getFreeVariables() { - const result = new Map(); - for (const [name, defUse] of this.#rootScope.variables) { - if (defUse.definitionKind !== 0 ) { - continue; - } - result.set(name, defUse.uses); - } - return result; - } - getAllNames() { - return this.#allNames; - } - #pushScope(start, end, kind, name, nameMappingLocations) { - this.#currentScope = new Scope(start, end, this.#currentScope, kind, name, nameMappingLocations); - } - #popScope(isFunctionContext) { - if (this.#currentScope.parent === null) { - console.error('Internal error: wrong nesting in scope analysis.'); - throw new Error('Internal error'); - } - this.#currentScope.finalizeToParent(isFunctionContext); - this.#currentScope = this.#currentScope.parent; - } - #addVariable(name, offset, definitionKind = 0 , isShorthandAssignmentProperty = false) { - this.#allNames.add(name); - this.#currentScope.addVariable(name, offset, definitionKind, isShorthandAssignmentProperty); - } - #processNodeAsDefinition(definitionKind, isShorthandAssignmentProperty, node) { - if (node === null) { - return; - } - switch (node.type) { - case 'ArrayPattern': - node.elements.forEach(this.#processNodeAsDefinition.bind(this, definitionKind, false)); - break; - case 'AssignmentPattern': - this.#processNodeAsDefinition(definitionKind, isShorthandAssignmentProperty, node.left); - this.#processNode(node.right); - break; - case 'Identifier': - this.#addVariable(node.name, node.start, definitionKind, isShorthandAssignmentProperty); - break; - case 'MemberExpression': - this.#processNode(node.object); - if (node.computed) { - this.#processNode(node.property); - } - break; - case 'ObjectPattern': - node.properties.forEach(this.#processNodeAsDefinition.bind(this, definitionKind, false)); - break; - case 'Property': - if (node.computed) { - this.#processNode(node.key); - } - this.#processNodeAsDefinition(definitionKind, node.shorthand, node.value); - break; - case 'RestElement': - this.#processNodeAsDefinition(definitionKind, false, node.argument); - break; - } - } - #processVariableDeclarator(definitionKind, decl) { - this.#processNodeAsDefinition(definitionKind, false, decl.id); - this.#processNode(decl.init ?? null); - } -} -function mappingLocationsForFunctionDeclaration(node, sourceText) { - const result = [node.id.start]; - const searchParenEndPos = node.params.length ? node.params[0].start : node.body.start; - const parenPos = indexOfCharInBounds(sourceText, '(', node.id.end, searchParenEndPos); - if (parenPos >= 0) { - result.push(parenPos); - } - return result; -} -function mappingLocationsForFunctionExpression(node, sourceText) { - const result = []; - if (node.id) { - result.push(node.id.start); - } - const searchParenStartPos = node.id ? node.id.end : node.start; - const searchParenEndPos = node.params.length ? node.params[0].start : node.body.start; - const parenPos = indexOfCharInBounds(sourceText, '(', searchParenStartPos, searchParenEndPos); - if (parenPos >= 0) { - result.push(parenPos); - } - return result; -} -function mappingLocationsForMethodDefinition(node) { - if (node.key.type === 'Identifier' || node.key.type === 'PrivateIdentifier') { - const id = node.key; - return [id.start]; - } - return []; -} -function nameForMethodDefinition(node) { - if (node.key.type === 'Identifier') { - return node.key.name; - } - if (node.key.type === 'PrivateIdentifier') { - return '#' + node.key.name; - } - return undefined; -} -function mappingLocationsForArrowFunctions(node, sourceText) { - const result = []; - const searchParenStartPos = node.async ? node.start + 5 : node.start; - const searchParenEndPos = node.params.length ? node.params[0].start : node.body.start; - const parenPos = indexOfCharInBounds(sourceText, '(', searchParenStartPos, searchParenEndPos); - if (parenPos >= 0) { - result.push(parenPos); - } - const searchArrowStartPos = node.params.length ? node.params[node.params.length - 1].end : node.start; - const arrowPos = indexOfCharInBounds(sourceText, '=', searchArrowStartPos, node.body.start); - if (arrowPos >= 0 && sourceText[arrowPos + 1] === '>') { - result.push(arrowPos); - } - return result; -} -function indexOfCharInBounds(str, needle, start, end) { - for (let i = start; i < end; ++i) { - if (str[i] === needle) { - return i; - } - } - return -1; -} - -// Copyright 2022 The Chromium Authors -function substituteExpression(expression, nameMap) { - const replacements = computeSubstitution(expression, nameMap); - return applySubstitution(expression, replacements); -} -function computeSubstitution(expression, nameMap) { - const root = parse$1(expression, { - ecmaVersion: ECMA_VERSION, - allowAwaitOutsideFunction: true, - allowImportExportEverywhere: true, - checkPrivateFields: false, - ranges: false, - }); - const scopeVariables = new ScopeVariableAnalysis(root, expression); - scopeVariables.run(); - const freeVariables = scopeVariables.getFreeVariables(); - const result = []; - const allNames = scopeVariables.getAllNames(); - for (const rename of nameMap.values()) { - if (rename) { - allNames.add(rename); - } - } - function getNewName(base) { - let i = 1; - while (allNames.has(`${base}_${i}`)) { - i++; - } - const newName = `${base}_${i}`; - allNames.add(newName); - return newName; - } - for (const [name, rename] of nameMap.entries()) { - const defUse = freeVariables.get(name); - if (!defUse) { - continue; - } - if (rename === null) { - throw new Error(`Cannot substitute '${name}' as the underlying variable '${rename}' is unavailable`); - } - const binders = []; - for (const use of defUse) { - result.push({ - from: name, - to: rename, - offset: use.offset, - isShorthandAssignmentProperty: use.isShorthandAssignmentProperty, - }); - binders.push(...use.scope.findBinders(rename)); - } - for (const binder of binders) { - if (binder.definitionKind === 3 ) { - throw new Error(`Cannot avoid capture of '${rename}'`); - } - const newName = getNewName(rename); - for (const use of binder.uses) { - result.push({ - from: rename, - to: newName, - offset: use.offset, - isShorthandAssignmentProperty: use.isShorthandAssignmentProperty, - }); - } - } - } - result.sort((l, r) => l.offset - r.offset); - return result; -} -function applySubstitution(expression, replacements) { - const accumulator = []; - let last = 0; - for (const r of replacements) { - accumulator.push(expression.slice(last, r.offset)); - let replacement = r.to; - if (r.isShorthandAssignmentProperty) { - replacement = `${r.from}: ${r.to}`; - } - accumulator.push(replacement); - last = r.offset + r.from.length; - } - accumulator.push(expression.slice(last)); - return accumulator.join(''); -} - -// Copyright 2011 The Chromium Authors -function createTokenizer(mimeType) { - const mode = CodeMirror.getMode({ indentUnit: 2 }, mimeType); - const state = CodeMirror.startState(mode); - if (!mode || mode.name === 'null') { - throw new Error(`Could not find CodeMirror mode for MimeType: ${mimeType}`); - } - if (!mode.token) { - throw new Error(`Could not find CodeMirror mode with token method: ${mimeType}`); - } - return (line, callback) => { - const stream = new CodeMirror.StringStream(line); - while (!stream.eol()) { - const style = mode.token(stream, state); - const value = stream.current(); - if (callback(value, style, stream.start, stream.start + value.length) === AbortTokenization) { - return; - } - stream.start = stream.pos; - } - }; -} -const AbortTokenization = {}; -function format(mimeType, text, indentString) { - indentString = indentString || ' '; - let result; - const builder = new FormattedContentBuilder(indentString); - const lineEndings = findLineEndingIndexes(text); - try { - switch (mimeType) { - case "text/html" : { - const formatter = new HTMLFormatter(builder); - formatter.format(text, lineEndings); - break; - } - case "text/css" : { - const formatter = new CSSFormatter(builder); - formatter.format(text, lineEndings, 0, text.length); - break; - } - case "application/javascript" : - case "text/javascript" : { - const formatter = new JavaScriptFormatter(builder); - formatter.format(text, lineEndings, 0, text.length); - break; - } - case "application/json" : - case "application/manifest+json" : { - const formatter = new JSONFormatter(builder); - formatter.format(text, lineEndings, 0, text.length); - break; - } - default: { - const formatter = new IdentityFormatter(builder); - formatter.format(text, lineEndings, 0, text.length); - } - } - result = { - mapping: builder.mapping, - content: builder.content(), - }; - } - catch (e) { - console.error(e); - result = { - mapping: { original: [0], formatted: [0] }, - content: text, - }; - } - return result; -} - -// Copyright 2013 The Chromium Authors -const cssTrimEnd = (tokenValue) => { - const re = /(?:\r?\n|[\t\f\r ])+$/g; - return tokenValue.replace(re, ''); -}; -class CSSFormatter { - #builder; - #toOffset; - #fromOffset; - #lineEndings; - #lastLine; - #state; - constructor(builder) { - this.#builder = builder; - this.#lastLine = -1; - this.#state = {}; - } - format(text, lineEndings, fromOffset, toOffset) { - this.#lineEndings = lineEndings; - this.#fromOffset = fromOffset; - this.#toOffset = toOffset; - this.#state = {}; - this.#lastLine = -1; - const tokenize = createTokenizer('text/css'); - const oldEnforce = this.#builder.setEnforceSpaceBetweenWords(false); - tokenize(text.substring(this.#fromOffset, this.#toOffset), this.#tokenCallback.bind(this)); - this.#builder.setEnforceSpaceBetweenWords(oldEnforce); - } - #tokenCallback(token, type, startPosition) { - startPosition += this.#fromOffset; - const startLine = lowerBound(this.#lineEndings, startPosition, DEFAULT_COMPARATOR); - if (startLine !== this.#lastLine) { - this.#state.eatWhitespace = true; - } - if (type && (/^property/.test(type) || /^variable-2/.test(type)) && !this.#state.inPropertyValue) { - this.#state.seenProperty = true; - } - this.#lastLine = startLine; - const isWhitespace = /^(?:\r?\n|[\t\f\r ])+$/.test(token); - if (isWhitespace) { - if (!this.#state.eatWhitespace) { - this.#builder.addSoftSpace(); - } - return; - } - this.#state.eatWhitespace = false; - if (token === '\n') { - return; - } - if (token !== '}') { - if (this.#state.afterClosingBrace) { - this.#builder.addNewLine(true); - } - this.#state.afterClosingBrace = false; - } - if (token === '}') { - if (this.#state.inPropertyValue) { - this.#builder.addNewLine(); - } - this.#builder.decreaseNestingLevel(); - this.#state.afterClosingBrace = true; - this.#state.inPropertyValue = false; - } - else if (token === ':' && !this.#state.inPropertyValue && this.#state.seenProperty) { - this.#builder.addToken(token, startPosition); - this.#builder.addSoftSpace(); - this.#state.eatWhitespace = true; - this.#state.inPropertyValue = true; - this.#state.seenProperty = false; - return; - } - else if (token === '{') { - this.#builder.addSoftSpace(); - this.#builder.addToken(token, startPosition); - this.#builder.addNewLine(); - this.#builder.increaseNestingLevel(); - return; - } - this.#builder.addToken(cssTrimEnd(token), startPosition); - if (type === 'comment' && !this.#state.inPropertyValue && !this.#state.seenProperty) { - this.#builder.addNewLine(); - } - if (token === ';' && this.#state.inPropertyValue) { - this.#state.inPropertyValue = false; - this.#builder.addNewLine(); - } - else if (token === '}') { - this.#builder.addNewLine(); - } - } -} - -// Copyright 2016 The Chromium Authors -const CSSParserStates = { - Initial: 'Initial', - Selector: 'Selector', - Style: 'Style', - PropertyName: 'PropertyName', - PropertyValue: 'PropertyValue', - AtRule: 'AtRule', -}; -function parseCSS(text, chunkCallback) { - const chunkSize = 100000; - const lines = text.split('\n'); - let rules = []; - let processedChunkCharacters = 0; - let state = CSSParserStates.Initial; - let rule; - let property; - const UndefTokenType = new Set(); - let disabledRules = []; - function disabledRulesCallback(chunk) { - disabledRules = disabledRules.concat(chunk.chunk); - } - function cssTrim(tokenValue) { - const re = /^(?:\r?\n|[\t\f\r ])+|(?:\r?\n|[\t\f\r ])+$/g; - return tokenValue.replace(re, ''); - } - function processToken(tokenValue, tokenTypes, column, newColumn) { - const tokenType = tokenTypes ? new Set(tokenTypes.split(' ')) : UndefTokenType; - switch (state) { - case CSSParserStates.Initial: - if (tokenType.has('qualifier') || tokenType.has('builtin') || tokenType.has('tag')) { - rule = { - selectorText: tokenValue, - lineNumber, - columnNumber: column, - properties: [], - }; - state = CSSParserStates.Selector; - } - else if (tokenType.has('def')) { - rule = { - atRule: tokenValue, - lineNumber, - columnNumber: column, - }; - state = CSSParserStates.AtRule; - } - break; - case CSSParserStates.Selector: - if (tokenValue === '{' && tokenType === UndefTokenType) { - rule.selectorText = cssTrim(rule.selectorText); - rule.styleRange = createRange(lineNumber, newColumn); - state = CSSParserStates.Style; - } - else { - rule.selectorText += tokenValue; - } - break; - case CSSParserStates.AtRule: - if ((tokenValue === ';' || tokenValue === '{') && tokenType === UndefTokenType) { - rule.atRule = cssTrim(rule.atRule); - rules.push(rule); - state = CSSParserStates.Initial; - } - else { - rule.atRule += tokenValue; - } - break; - case CSSParserStates.Style: - if (tokenType.has('meta') || tokenType.has('property') || tokenType.has('variable-2')) { - property = { - name: tokenValue, - value: '', - range: createRange(lineNumber, column), - nameRange: createRange(lineNumber, column), - }; - state = CSSParserStates.PropertyName; - } - else if (tokenValue === '}' && tokenType === UndefTokenType) { - rule.styleRange.endLine = lineNumber; - rule.styleRange.endColumn = column; - rules.push(rule); - state = CSSParserStates.Initial; - } - else if (tokenType.has('comment')) { - if (tokenValue.substring(0, 2) !== '/*' || tokenValue.substring(tokenValue.length - 2) !== '*/') { - break; - } - const uncommentedText = tokenValue.substring(2, tokenValue.length - 2); - const fakeRule = 'a{\n' + uncommentedText + '}'; - disabledRules = []; - parseCSS(fakeRule, disabledRulesCallback); - if (disabledRules.length === 1 && disabledRules[0].properties.length === 1) { - const disabledProperty = disabledRules[0].properties[0]; - disabledProperty.disabled = true; - disabledProperty.range = createRange(lineNumber, column); - disabledProperty.range.endColumn = newColumn; - const lineOffset = lineNumber - 1; - const columnOffset = column + 2; - disabledProperty.nameRange.startLine += lineOffset; - disabledProperty.nameRange.startColumn += columnOffset; - disabledProperty.nameRange.endLine += lineOffset; - disabledProperty.nameRange.endColumn += columnOffset; - disabledProperty.valueRange.startLine += lineOffset; - disabledProperty.valueRange.startColumn += columnOffset; - disabledProperty.valueRange.endLine += lineOffset; - disabledProperty.valueRange.endColumn += columnOffset; - rule.properties.push(disabledProperty); - } - } - break; - case CSSParserStates.PropertyName: - if (tokenValue === ':' && tokenType === UndefTokenType) { - property.name = property.name; - property.nameRange.endLine = lineNumber; - property.nameRange.endColumn = column; - property.valueRange = createRange(lineNumber, newColumn); - state = CSSParserStates.PropertyValue; - } - else if (tokenType.has('property')) { - property.name += tokenValue; - } - break; - case CSSParserStates.PropertyValue: - if ((tokenValue === ';' || tokenValue === '}') && tokenType === UndefTokenType) { - property.value = property.value; - property.valueRange.endLine = lineNumber; - property.valueRange.endColumn = column; - property.range.endLine = lineNumber; - property.range.endColumn = tokenValue === ';' ? newColumn : column; - rule.properties.push(property); - if (tokenValue === '}') { - rule.styleRange.endLine = lineNumber; - rule.styleRange.endColumn = column; - rules.push(rule); - state = CSSParserStates.Initial; - } - else { - state = CSSParserStates.Style; - } - } - else if (!tokenType.has('comment')) { - property.value += tokenValue; - } - break; - default: - console.assert(false, 'Unknown CSS parser state.'); - } - processedChunkCharacters += newColumn - column; - if (processedChunkCharacters > chunkSize) { - chunkCallback({ chunk: rules, isLastChunk: false }); - rules = []; - processedChunkCharacters = 0; - } - } - const tokenizer = createTokenizer('text/css'); - let lineNumber; - for (lineNumber = 0; lineNumber < lines.length; ++lineNumber) { - const line = lines[lineNumber]; - tokenizer(line, processToken); - processToken('\n', null, line.length, line.length + 1); - } - chunkCallback({ chunk: rules, isLastChunk: true }); - function createRange(lineNumber, columnNumber) { - return { startLine: lineNumber, startColumn: columnNumber, endLine: lineNumber, endColumn: columnNumber }; - } -} - -// Copyright 2019 The Chromium Authors -HOST_RUNTIME.workerScope.onmessage = function (event) { - const method = event.data.method; - const params = event.data.params; - if (!method) { - return; - } - switch (method) { - case "format" : - HOST_RUNTIME.workerScope.postMessage(format(params.mimeType, params.content, params.indentString)); - break; - case "parseCSS" : - parseCSS(params.content, self.postMessage); - break; - case "javaScriptSubstitute" : { - HOST_RUNTIME.workerScope.postMessage(substituteExpression(params.content, params.mapping)); - break; - } - case "javaScriptScopeTree" : { - HOST_RUNTIME.workerScope.postMessage(parseScopes(params.content, params.sourceType)?.export()); - break; - } - default: - assertNever(method, `Unsupport method name: ${method}`); - } -}; -HOST_RUNTIME.workerScope.postMessage('workerReady'); diff --git a/node_modules/chrome-devtools-mcp/build/src/third_party/index.js b/node_modules/chrome-devtools-mcp/build/src/third_party/index.js deleted file mode 100644 index 24b764f..0000000 --- a/node_modules/chrome-devtools-mcp/build/src/third_party/index.js +++ /dev/null @@ -1,181796 +0,0 @@ -import process$2 from 'node:process'; -import readline from 'node:readline'; -import * as WorkerThreads from 'node:worker_threads'; -import require$$2, { strictEqual, notStrictEqual } from 'assert'; -import require$$0$4, { resolve as resolve$2, dirname, normalize, join, relative, extname, basename } from 'path'; -import require$$0$3, { statSync, readdirSync, readFileSync, writeFile } from 'fs'; -import require$$0$2, { format as format$6, inspect } from 'util'; -import require$$5, { fileURLToPath } from 'url'; -import { createRequire } from 'node:module'; -import fs, { readdirSync as readdirSync$1, readFileSync as readFileSync$1, accessSync, existsSync } from 'node:fs'; -import require$$1 from 'tty'; -import require$$0$1 from 'os'; -import require$$0$5 from 'child_process'; -import { PassThrough } from 'node:stream'; -import { mkdtemp, unlink, rename, readFile } from 'node:fs/promises'; -import os, { tmpdir } from 'node:os'; -import path$1, { join as join$1, dirname as dirname$1 } from 'node:path'; -import childProcess, { execSync, spawnSync, spawn as spawn$1 } from 'node:child_process'; -import { EventEmitter as EventEmitter$1 } from 'node:events'; -import * as http$1 from 'node:http'; -import * as https$1 from 'node:https'; -import { urlToHttpOptions, URL as URL$1 } from 'node:url'; -import require$$0$6 from 'http'; -import require$$1$1 from 'https'; -import require$$0$7 from 'net'; -import require$$1$2 from 'tls'; -import require$$0$8 from 'events'; -import require$$0$9 from 'buffer'; -import require$$1$3 from 'stream'; -import require$$3$3 from 'dns'; -import require$$2$1 from 'crypto'; -import 'node:assert'; -import require$$0$a from 'zlib'; -import { generateReport as generateReport$1, navigation as navigation$1, snapshot as snapshot$1 } from './lighthouse-devtools-mcp-bundle.js'; - -function _mergeNamespaces(n, m) { - m.forEach(function (e) { - e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) { - if (k !== 'default' && !(k in n)) { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - }); - return Object.freeze(n); -} - -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -function getAugmentedNamespace(n) { - if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n; - var f = n.default; - if (typeof f == "function") { - var a = function a () { - var isInstance = false; - try { - isInstance = this instanceof a; - } catch {} - if (isInstance) { - return Reflect.construct(f, arguments, this.constructor); - } - return f.apply(this, arguments); - }; - a.prototype = f.prototype; - } else a = {}; - Object.defineProperty(a, '__esModule', {value: true}); - Object.keys(n).forEach(function (k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { - enumerable: true, - get: function () { - return n[k]; - } - }); - }); - return a; -} - -var es_promise_withResolvers = {}; - -var globalThis_1; -var hasRequiredGlobalThis; - -function requireGlobalThis () { - if (hasRequiredGlobalThis) return globalThis_1; - hasRequiredGlobalThis = 1; - var check = function (it) { - return it && it.Math === Math && it; - }; - globalThis_1 = - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - check(typeof self == 'object' && self) || - check(typeof commonjsGlobal == 'object' && commonjsGlobal) || - check(typeof globalThis_1 == 'object' && globalThis_1) || - (function () { return this; })() || Function('return this')(); - return globalThis_1; -} - -var objectGetOwnPropertyDescriptor = {}; - -var fails; -var hasRequiredFails; - -function requireFails () { - if (hasRequiredFails) return fails; - hasRequiredFails = 1; - fails = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } - }; - return fails; -} - -var descriptors; -var hasRequiredDescriptors; - -function requireDescriptors () { - if (hasRequiredDescriptors) return descriptors; - hasRequiredDescriptors = 1; - var fails = requireFails(); - descriptors = !fails(function () { - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; - }); - return descriptors; -} - -var functionBindNative; -var hasRequiredFunctionBindNative; - -function requireFunctionBindNative () { - if (hasRequiredFunctionBindNative) return functionBindNative; - hasRequiredFunctionBindNative = 1; - var fails = requireFails(); - functionBindNative = !fails(function () { - var test = function () { }.bind(); - return typeof test != 'function' || test.hasOwnProperty('prototype'); - }); - return functionBindNative; -} - -var functionCall; -var hasRequiredFunctionCall; - -function requireFunctionCall () { - if (hasRequiredFunctionCall) return functionCall; - hasRequiredFunctionCall = 1; - var NATIVE_BIND = requireFunctionBindNative(); - var call = Function.prototype.call; - functionCall = NATIVE_BIND ? call.bind(call) : function () { - return call.apply(call, arguments); - }; - return functionCall; -} - -var objectPropertyIsEnumerable = {}; - -var hasRequiredObjectPropertyIsEnumerable; - -function requireObjectPropertyIsEnumerable () { - if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable; - hasRequiredObjectPropertyIsEnumerable = 1; - var $propertyIsEnumerable = {}.propertyIsEnumerable; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); - objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; - } : $propertyIsEnumerable; - return objectPropertyIsEnumerable; -} - -var createPropertyDescriptor; -var hasRequiredCreatePropertyDescriptor; - -function requireCreatePropertyDescriptor () { - if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor; - hasRequiredCreatePropertyDescriptor = 1; - createPropertyDescriptor = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - return createPropertyDescriptor; -} - -var functionUncurryThis; -var hasRequiredFunctionUncurryThis; - -function requireFunctionUncurryThis () { - if (hasRequiredFunctionUncurryThis) return functionUncurryThis; - hasRequiredFunctionUncurryThis = 1; - var NATIVE_BIND = requireFunctionBindNative(); - var FunctionPrototype = Function.prototype; - var call = FunctionPrototype.call; - var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call); - functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) { - return function () { - return call.apply(fn, arguments); - }; - }; - return functionUncurryThis; -} - -var classofRaw; -var hasRequiredClassofRaw; - -function requireClassofRaw () { - if (hasRequiredClassofRaw) return classofRaw; - hasRequiredClassofRaw = 1; - var uncurryThis = requireFunctionUncurryThis(); - var toString = uncurryThis({}.toString); - var stringSlice = uncurryThis(''.slice); - classofRaw = function (it) { - return stringSlice(toString(it), 8, -1); - }; - return classofRaw; -} - -var indexedObject; -var hasRequiredIndexedObject; - -function requireIndexedObject () { - if (hasRequiredIndexedObject) return indexedObject; - hasRequiredIndexedObject = 1; - var uncurryThis = requireFunctionUncurryThis(); - var fails = requireFails(); - var classof = requireClassofRaw(); - var $Object = Object; - var split = uncurryThis(''.split); - indexedObject = fails(function () { - return !$Object('z').propertyIsEnumerable(0); - }) ? function (it) { - return classof(it) === 'String' ? split(it, '') : $Object(it); - } : $Object; - return indexedObject; -} - -var isNullOrUndefined; -var hasRequiredIsNullOrUndefined; - -function requireIsNullOrUndefined () { - if (hasRequiredIsNullOrUndefined) return isNullOrUndefined; - hasRequiredIsNullOrUndefined = 1; - isNullOrUndefined = function (it) { - return it === null || it === undefined; - }; - return isNullOrUndefined; -} - -var requireObjectCoercible; -var hasRequiredRequireObjectCoercible; - -function requireRequireObjectCoercible () { - if (hasRequiredRequireObjectCoercible) return requireObjectCoercible; - hasRequiredRequireObjectCoercible = 1; - var isNullOrUndefined = requireIsNullOrUndefined(); - var $TypeError = TypeError; - requireObjectCoercible = function (it) { - if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it); - return it; - }; - return requireObjectCoercible; -} - -var toIndexedObject; -var hasRequiredToIndexedObject; - -function requireToIndexedObject () { - if (hasRequiredToIndexedObject) return toIndexedObject; - hasRequiredToIndexedObject = 1; - var IndexedObject = requireIndexedObject(); - var requireObjectCoercible = requireRequireObjectCoercible(); - toIndexedObject = function (it) { - return IndexedObject(requireObjectCoercible(it)); - }; - return toIndexedObject; -} - -var isCallable; -var hasRequiredIsCallable; - -function requireIsCallable () { - if (hasRequiredIsCallable) return isCallable; - hasRequiredIsCallable = 1; - var documentAll = typeof document == 'object' && document.all; - isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { - return typeof argument == 'function' || argument === documentAll; - } : function (argument) { - return typeof argument == 'function'; - }; - return isCallable; -} - -var isObject$1; -var hasRequiredIsObject; - -function requireIsObject () { - if (hasRequiredIsObject) return isObject$1; - hasRequiredIsObject = 1; - var isCallable = requireIsCallable(); - isObject$1 = function (it) { - return typeof it == 'object' ? it !== null : isCallable(it); - }; - return isObject$1; -} - -var getBuiltIn; -var hasRequiredGetBuiltIn; - -function requireGetBuiltIn () { - if (hasRequiredGetBuiltIn) return getBuiltIn; - hasRequiredGetBuiltIn = 1; - var globalThis = requireGlobalThis(); - var isCallable = requireIsCallable(); - var aFunction = function (argument) { - return isCallable(argument) ? argument : undefined; - }; - getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method]; - }; - return getBuiltIn; -} - -var objectIsPrototypeOf; -var hasRequiredObjectIsPrototypeOf; - -function requireObjectIsPrototypeOf () { - if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf; - hasRequiredObjectIsPrototypeOf = 1; - var uncurryThis = requireFunctionUncurryThis(); - objectIsPrototypeOf = uncurryThis({}.isPrototypeOf); - return objectIsPrototypeOf; -} - -var environmentUserAgent; -var hasRequiredEnvironmentUserAgent; - -function requireEnvironmentUserAgent () { - if (hasRequiredEnvironmentUserAgent) return environmentUserAgent; - hasRequiredEnvironmentUserAgent = 1; - var globalThis = requireGlobalThis(); - var navigator = globalThis.navigator; - var userAgent = navigator && navigator.userAgent; - environmentUserAgent = userAgent ? String(userAgent) : ''; - return environmentUserAgent; -} - -var environmentV8Version; -var hasRequiredEnvironmentV8Version; - -function requireEnvironmentV8Version () { - if (hasRequiredEnvironmentV8Version) return environmentV8Version; - hasRequiredEnvironmentV8Version = 1; - var globalThis = requireGlobalThis(); - var userAgent = requireEnvironmentUserAgent(); - var process = globalThis.process; - var Deno = globalThis.Deno; - var versions = process && process.versions || Deno && Deno.version; - var v8 = versions && versions.v8; - var match, version; - if (v8) { - match = v8.split('.'); - version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); - } - if (!version && userAgent) { - match = userAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = userAgent.match(/Chrome\/(\d+)/); - if (match) version = +match[1]; - } - } - environmentV8Version = version; - return environmentV8Version; -} - -var symbolConstructorDetection; -var hasRequiredSymbolConstructorDetection; - -function requireSymbolConstructorDetection () { - if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection; - hasRequiredSymbolConstructorDetection = 1; - var V8_VERSION = requireEnvironmentV8Version(); - var fails = requireFails(); - var globalThis = requireGlobalThis(); - var $String = globalThis.String; - symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () { - var symbol = Symbol('symbol detection'); - return !$String(symbol) || !(Object(symbol) instanceof Symbol) || - !Symbol.sham && V8_VERSION && V8_VERSION < 41; - }); - return symbolConstructorDetection; -} - -var useSymbolAsUid; -var hasRequiredUseSymbolAsUid; - -function requireUseSymbolAsUid () { - if (hasRequiredUseSymbolAsUid) return useSymbolAsUid; - hasRequiredUseSymbolAsUid = 1; - var NATIVE_SYMBOL = requireSymbolConstructorDetection(); - useSymbolAsUid = NATIVE_SYMBOL && - !Symbol.sham && - typeof Symbol.iterator == 'symbol'; - return useSymbolAsUid; -} - -var isSymbol; -var hasRequiredIsSymbol; - -function requireIsSymbol () { - if (hasRequiredIsSymbol) return isSymbol; - hasRequiredIsSymbol = 1; - var getBuiltIn = requireGetBuiltIn(); - var isCallable = requireIsCallable(); - var isPrototypeOf = requireObjectIsPrototypeOf(); - var USE_SYMBOL_AS_UID = requireUseSymbolAsUid(); - var $Object = Object; - isSymbol = USE_SYMBOL_AS_UID ? function (it) { - return typeof it == 'symbol'; - } : function (it) { - var $Symbol = getBuiltIn('Symbol'); - return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it)); - }; - return isSymbol; -} - -var tryToString; -var hasRequiredTryToString; - -function requireTryToString () { - if (hasRequiredTryToString) return tryToString; - hasRequiredTryToString = 1; - var $String = String; - tryToString = function (argument) { - try { - return $String(argument); - } catch (error) { - return 'Object'; - } - }; - return tryToString; -} - -var aCallable; -var hasRequiredACallable; - -function requireACallable () { - if (hasRequiredACallable) return aCallable; - hasRequiredACallable = 1; - var isCallable = requireIsCallable(); - var tryToString = requireTryToString(); - var $TypeError = TypeError; - aCallable = function (argument) { - if (isCallable(argument)) return argument; - throw new $TypeError(tryToString(argument) + ' is not a function'); - }; - return aCallable; -} - -var getMethod; -var hasRequiredGetMethod; - -function requireGetMethod () { - if (hasRequiredGetMethod) return getMethod; - hasRequiredGetMethod = 1; - var aCallable = requireACallable(); - var isNullOrUndefined = requireIsNullOrUndefined(); - getMethod = function (V, P) { - var func = V[P]; - return isNullOrUndefined(func) ? undefined : aCallable(func); - }; - return getMethod; -} - -var ordinaryToPrimitive; -var hasRequiredOrdinaryToPrimitive; - -function requireOrdinaryToPrimitive () { - if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive; - hasRequiredOrdinaryToPrimitive = 1; - var call = requireFunctionCall(); - var isCallable = requireIsCallable(); - var isObject = requireIsObject(); - var $TypeError = TypeError; - ordinaryToPrimitive = function (input, pref) { - var fn, val; - if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; - if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; - if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; - throw new $TypeError("Can't convert object to primitive value"); - }; - return ordinaryToPrimitive; -} - -var sharedStore = {exports: {}}; - -var isPure; -var hasRequiredIsPure; - -function requireIsPure () { - if (hasRequiredIsPure) return isPure; - hasRequiredIsPure = 1; - isPure = false; - return isPure; -} - -var defineGlobalProperty; -var hasRequiredDefineGlobalProperty; - -function requireDefineGlobalProperty () { - if (hasRequiredDefineGlobalProperty) return defineGlobalProperty; - hasRequiredDefineGlobalProperty = 1; - var globalThis = requireGlobalThis(); - var defineProperty = Object.defineProperty; - defineGlobalProperty = function (key, value) { - try { - defineProperty(globalThis, key, { value: value, configurable: true, writable: true }); - } catch (error) { - globalThis[key] = value; - } return value; - }; - return defineGlobalProperty; -} - -var hasRequiredSharedStore; - -function requireSharedStore () { - if (hasRequiredSharedStore) return sharedStore.exports; - hasRequiredSharedStore = 1; - var IS_PURE = requireIsPure(); - var globalThis = requireGlobalThis(); - var defineGlobalProperty = requireDefineGlobalProperty(); - var SHARED = '__core-js_shared__'; - var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {}); - (store.versions || (store.versions = [])).push({ - version: '3.49.0', - mode: IS_PURE ? 'pure' : 'global', - copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.', - license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE', - source: 'https://github.com/zloirock/core-js' - }); - return sharedStore.exports; -} - -var shared$1; -var hasRequiredShared$1; - -function requireShared$1 () { - if (hasRequiredShared$1) return shared$1; - hasRequiredShared$1 = 1; - var store = requireSharedStore(); - shared$1 = function (key, value) { - return store[key] || (store[key] = value || {}); - }; - return shared$1; -} - -var toObject; -var hasRequiredToObject; - -function requireToObject () { - if (hasRequiredToObject) return toObject; - hasRequiredToObject = 1; - var requireObjectCoercible = requireRequireObjectCoercible(); - var $Object = Object; - toObject = function (argument) { - return $Object(requireObjectCoercible(argument)); - }; - return toObject; -} - -var hasOwnProperty_1; -var hasRequiredHasOwnProperty; - -function requireHasOwnProperty () { - if (hasRequiredHasOwnProperty) return hasOwnProperty_1; - hasRequiredHasOwnProperty = 1; - var uncurryThis = requireFunctionUncurryThis(); - var toObject = requireToObject(); - var hasOwnProperty = uncurryThis({}.hasOwnProperty); - hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { - return hasOwnProperty(toObject(it), key); - }; - return hasOwnProperty_1; -} - -var uid; -var hasRequiredUid; - -function requireUid () { - if (hasRequiredUid) return uid; - hasRequiredUid = 1; - var uncurryThis = requireFunctionUncurryThis(); - var id = 0; - var postfix = Math.random(); - var toString = uncurryThis(1.1.toString); - uid = function (key) { - return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); - }; - return uid; -} - -var wellKnownSymbol; -var hasRequiredWellKnownSymbol; - -function requireWellKnownSymbol () { - if (hasRequiredWellKnownSymbol) return wellKnownSymbol; - hasRequiredWellKnownSymbol = 1; - var globalThis = requireGlobalThis(); - var shared = requireShared$1(); - var hasOwn = requireHasOwnProperty(); - var uid = requireUid(); - var NATIVE_SYMBOL = requireSymbolConstructorDetection(); - var USE_SYMBOL_AS_UID = requireUseSymbolAsUid(); - var Symbol = globalThis.Symbol; - var WellKnownSymbolsStore = shared('wks'); - var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid; - wellKnownSymbol = function (name) { - if (!hasOwn(WellKnownSymbolsStore, name)) { - WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) - ? Symbol[name] - : createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; - }; - return wellKnownSymbol; -} - -var toPrimitive; -var hasRequiredToPrimitive; - -function requireToPrimitive () { - if (hasRequiredToPrimitive) return toPrimitive; - hasRequiredToPrimitive = 1; - var call = requireFunctionCall(); - var isObject = requireIsObject(); - var isSymbol = requireIsSymbol(); - var getMethod = requireGetMethod(); - var ordinaryToPrimitive = requireOrdinaryToPrimitive(); - var wellKnownSymbol = requireWellKnownSymbol(); - var $TypeError = TypeError; - var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); - toPrimitive = function (input, pref) { - if (!isObject(input) || isSymbol(input)) return input; - var exoticToPrim = getMethod(input, TO_PRIMITIVE); - var result; - if (exoticToPrim) { - if (pref === undefined) pref = 'default'; - result = call(exoticToPrim, input, pref); - if (!isObject(result) || isSymbol(result)) return result; - throw new $TypeError("Can't convert object to primitive value"); - } - if (pref === undefined) pref = 'number'; - return ordinaryToPrimitive(input, pref); - }; - return toPrimitive; -} - -var toPropertyKey; -var hasRequiredToPropertyKey; - -function requireToPropertyKey () { - if (hasRequiredToPropertyKey) return toPropertyKey; - hasRequiredToPropertyKey = 1; - var toPrimitive = requireToPrimitive(); - var isSymbol = requireIsSymbol(); - toPropertyKey = function (argument) { - var key = toPrimitive(argument, 'string'); - return isSymbol(key) ? key : key + ''; - }; - return toPropertyKey; -} - -var documentCreateElement; -var hasRequiredDocumentCreateElement; - -function requireDocumentCreateElement () { - if (hasRequiredDocumentCreateElement) return documentCreateElement; - hasRequiredDocumentCreateElement = 1; - var globalThis = requireGlobalThis(); - var isObject = requireIsObject(); - var document = globalThis.document; - var EXISTS = isObject(document) && isObject(document.createElement); - documentCreateElement = function (it) { - return EXISTS ? document.createElement(it) : {}; - }; - return documentCreateElement; -} - -var ie8DomDefine; -var hasRequiredIe8DomDefine; - -function requireIe8DomDefine () { - if (hasRequiredIe8DomDefine) return ie8DomDefine; - hasRequiredIe8DomDefine = 1; - var DESCRIPTORS = requireDescriptors(); - var fails = requireFails(); - var createElement = requireDocumentCreateElement(); - ie8DomDefine = !DESCRIPTORS && !fails(function () { - return Object.defineProperty(createElement('div'), 'a', { - get: function () { return 7; } - }).a !== 7; - }); - return ie8DomDefine; -} - -var hasRequiredObjectGetOwnPropertyDescriptor; - -function requireObjectGetOwnPropertyDescriptor () { - if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor; - hasRequiredObjectGetOwnPropertyDescriptor = 1; - var DESCRIPTORS = requireDescriptors(); - var call = requireFunctionCall(); - var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable(); - var createPropertyDescriptor = requireCreatePropertyDescriptor(); - var toIndexedObject = requireToIndexedObject(); - var toPropertyKey = requireToPropertyKey(); - var hasOwn = requireHasOwnProperty(); - var IE8_DOM_DEFINE = requireIe8DomDefine(); - var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPropertyKey(P); - if (IE8_DOM_DEFINE) try { - return $getOwnPropertyDescriptor(O, P); - } catch (error) { } - if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); - }; - return objectGetOwnPropertyDescriptor; -} - -var objectDefineProperty = {}; - -var v8PrototypeDefineBug; -var hasRequiredV8PrototypeDefineBug; - -function requireV8PrototypeDefineBug () { - if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug; - hasRequiredV8PrototypeDefineBug = 1; - var DESCRIPTORS = requireDescriptors(); - var fails = requireFails(); - v8PrototypeDefineBug = DESCRIPTORS && fails(function () { - return Object.defineProperty(function () { }, 'prototype', { - value: 42, - writable: false - }).prototype !== 42; - }); - return v8PrototypeDefineBug; -} - -var anObject; -var hasRequiredAnObject; - -function requireAnObject () { - if (hasRequiredAnObject) return anObject; - hasRequiredAnObject = 1; - var isObject = requireIsObject(); - var $String = String; - var $TypeError = TypeError; - anObject = function (argument) { - if (isObject(argument)) return argument; - throw new $TypeError($String(argument) + ' is not an object'); - }; - return anObject; -} - -var hasRequiredObjectDefineProperty; - -function requireObjectDefineProperty () { - if (hasRequiredObjectDefineProperty) return objectDefineProperty; - hasRequiredObjectDefineProperty = 1; - var DESCRIPTORS = requireDescriptors(); - var IE8_DOM_DEFINE = requireIe8DomDefine(); - var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug(); - var anObject = requireAnObject(); - var toPropertyKey = requireToPropertyKey(); - var $TypeError = TypeError; - var $defineProperty = Object.defineProperty; - var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var ENUMERABLE = 'enumerable'; - var CONFIGURABLE = 'configurable'; - var WRITABLE = 'writable'; - objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) { - anObject(O); - P = toPropertyKey(P); - anObject(Attributes); - if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { - var current = $getOwnPropertyDescriptor(O, P); - if (current && current[WRITABLE]) { - O[P] = Attributes.value; - Attributes = { - configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE], - enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], - writable: false - }; - } - } return $defineProperty(O, P, Attributes); - } : $defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPropertyKey(P); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return $defineProperty(O, P, Attributes); - } catch (error) { } - if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; - }; - return objectDefineProperty; -} - -var createNonEnumerableProperty; -var hasRequiredCreateNonEnumerableProperty; - -function requireCreateNonEnumerableProperty () { - if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty; - hasRequiredCreateNonEnumerableProperty = 1; - var DESCRIPTORS = requireDescriptors(); - var definePropertyModule = requireObjectDefineProperty(); - var createPropertyDescriptor = requireCreatePropertyDescriptor(); - createNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) { - return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - return createNonEnumerableProperty; -} - -var makeBuiltIn = {exports: {}}; - -var functionName; -var hasRequiredFunctionName; - -function requireFunctionName () { - if (hasRequiredFunctionName) return functionName; - hasRequiredFunctionName = 1; - var DESCRIPTORS = requireDescriptors(); - var hasOwn = requireHasOwnProperty(); - var FunctionPrototype = Function.prototype; - var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; - var EXISTS = hasOwn(FunctionPrototype, 'name'); - var PROPER = EXISTS && function something() { }.name === 'something'; - var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); - functionName = { - EXISTS: EXISTS, - PROPER: PROPER, - CONFIGURABLE: CONFIGURABLE - }; - return functionName; -} - -var inspectSource; -var hasRequiredInspectSource; - -function requireInspectSource () { - if (hasRequiredInspectSource) return inspectSource; - hasRequiredInspectSource = 1; - var uncurryThis = requireFunctionUncurryThis(); - var isCallable = requireIsCallable(); - var store = requireSharedStore(); - var functionToString = uncurryThis(Function.toString); - if (!isCallable(store.inspectSource)) { - store.inspectSource = function (it) { - return functionToString(it); - }; - } - inspectSource = store.inspectSource; - return inspectSource; -} - -var weakMapBasicDetection; -var hasRequiredWeakMapBasicDetection; - -function requireWeakMapBasicDetection () { - if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection; - hasRequiredWeakMapBasicDetection = 1; - var globalThis = requireGlobalThis(); - var isCallable = requireIsCallable(); - var WeakMap = globalThis.WeakMap; - weakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap)); - return weakMapBasicDetection; -} - -var sharedKey; -var hasRequiredSharedKey; - -function requireSharedKey () { - if (hasRequiredSharedKey) return sharedKey; - hasRequiredSharedKey = 1; - var shared = requireShared$1(); - var uid = requireUid(); - var keys = shared('keys'); - sharedKey = function (key) { - return keys[key] || (keys[key] = uid(key)); - }; - return sharedKey; -} - -var hiddenKeys; -var hasRequiredHiddenKeys; - -function requireHiddenKeys () { - if (hasRequiredHiddenKeys) return hiddenKeys; - hasRequiredHiddenKeys = 1; - hiddenKeys = {}; - return hiddenKeys; -} - -var internalState; -var hasRequiredInternalState; - -function requireInternalState () { - if (hasRequiredInternalState) return internalState; - hasRequiredInternalState = 1; - var NATIVE_WEAK_MAP = requireWeakMapBasicDetection(); - var globalThis = requireGlobalThis(); - var isObject = requireIsObject(); - var createNonEnumerableProperty = requireCreateNonEnumerableProperty(); - var hasOwn = requireHasOwnProperty(); - var shared = requireSharedStore(); - var sharedKey = requireSharedKey(); - var hiddenKeys = requireHiddenKeys(); - var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; - var TypeError = globalThis.TypeError; - var WeakMap = globalThis.WeakMap; - var set, get, has; - var enforce = function (it) { - return has(it) ? get(it) : set(it, {}); - }; - var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw new TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; - }; - if (NATIVE_WEAK_MAP || shared.state) { - var store = shared.state || (shared.state = new WeakMap()); - store.get = store.get; - store.has = store.has; - store.set = store.set; - set = function (it, metadata) { - if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); - metadata.facade = it; - store.set(it, metadata); - return metadata; - }; - get = function (it) { - return store.get(it) || {}; - }; - has = function (it) { - return store.has(it); - }; - } else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); - metadata.facade = it; - createNonEnumerableProperty(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return hasOwn(it, STATE) ? it[STATE] : {}; - }; - has = function (it) { - return hasOwn(it, STATE); - }; - } - internalState = { - set: set, - get: get, - has: has, - enforce: enforce, - getterFor: getterFor - }; - return internalState; -} - -var hasRequiredMakeBuiltIn; - -function requireMakeBuiltIn () { - if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports; - hasRequiredMakeBuiltIn = 1; - var uncurryThis = requireFunctionUncurryThis(); - var fails = requireFails(); - var isCallable = requireIsCallable(); - var hasOwn = requireHasOwnProperty(); - var DESCRIPTORS = requireDescriptors(); - var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE; - var inspectSource = requireInspectSource(); - var InternalStateModule = requireInternalState(); - var enforceInternalState = InternalStateModule.enforce; - var getInternalState = InternalStateModule.get; - var $String = String; - var defineProperty = Object.defineProperty; - var stringSlice = uncurryThis(''.slice); - var replace = uncurryThis(''.replace); - var join = uncurryThis([].join); - var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () { - return defineProperty(function () { }, 'length', { value: 8 }).length !== 8; - }); - var TEMPLATE = String(String).split('String'); - var makeBuiltIn$1 = makeBuiltIn.exports = function (value, name, options) { - if (stringSlice($String(name), 0, 7) === 'Symbol(') { - name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; - } - if (options && options.getter) name = 'get ' + name; - if (options && options.setter) name = 'set ' + name; - if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { - if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true }); - else value.name = name; - } - if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) { - defineProperty(value, 'length', { value: options.arity }); - } - try { - if (options && hasOwn(options, 'constructor') && options.constructor) { - if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false }); - } else if (value.prototype) value.prototype = undefined; - } catch (error) { } - var state = enforceInternalState(value); - if (!hasOwn(state, 'source')) { - state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); - } return value; - }; - Function.prototype.toString = makeBuiltIn$1(function toString() { - return isCallable(this) && getInternalState(this).source || inspectSource(this); - }, 'toString'); - return makeBuiltIn.exports; -} - -var defineBuiltIn; -var hasRequiredDefineBuiltIn; - -function requireDefineBuiltIn () { - if (hasRequiredDefineBuiltIn) return defineBuiltIn; - hasRequiredDefineBuiltIn = 1; - var isCallable = requireIsCallable(); - var definePropertyModule = requireObjectDefineProperty(); - var makeBuiltIn = requireMakeBuiltIn(); - var defineGlobalProperty = requireDefineGlobalProperty(); - defineBuiltIn = function (O, key, value, options) { - if (!options) options = {}; - var simple = options.enumerable; - var name = options.name !== undefined ? options.name : key; - if (isCallable(value)) makeBuiltIn(value, name, options); - if (options.global) { - if (simple) O[key] = value; - else defineGlobalProperty(key, value); - } else { - try { - if (!options.unsafe) delete O[key]; - else if (O[key]) simple = true; - } catch (error) { } - if (simple) O[key] = value; - else definePropertyModule.f(O, key, { - value: value, - enumerable: false, - configurable: !options.nonConfigurable, - writable: !options.nonWritable - }); - } return O; - }; - return defineBuiltIn; -} - -var objectGetOwnPropertyNames = {}; - -var mathTrunc; -var hasRequiredMathTrunc; - -function requireMathTrunc () { - if (hasRequiredMathTrunc) return mathTrunc; - hasRequiredMathTrunc = 1; - var ceil = Math.ceil; - var floor = Math.floor; - mathTrunc = Math.trunc || function trunc(x) { - var n = +x; - return (n > 0 ? floor : ceil)(n); - }; - return mathTrunc; -} - -var toIntegerOrInfinity; -var hasRequiredToIntegerOrInfinity; - -function requireToIntegerOrInfinity () { - if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity; - hasRequiredToIntegerOrInfinity = 1; - var trunc = requireMathTrunc(); - toIntegerOrInfinity = function (argument) { - var number = +argument; - return number !== number || number === 0 ? 0 : trunc(number); - }; - return toIntegerOrInfinity; -} - -var toAbsoluteIndex; -var hasRequiredToAbsoluteIndex; - -function requireToAbsoluteIndex () { - if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex; - hasRequiredToAbsoluteIndex = 1; - var toIntegerOrInfinity = requireToIntegerOrInfinity(); - var max = Math.max; - var min = Math.min; - toAbsoluteIndex = function (index, length) { - var integer = toIntegerOrInfinity(index); - return integer < 0 ? max(integer + length, 0) : min(integer, length); - }; - return toAbsoluteIndex; -} - -var toLength; -var hasRequiredToLength; - -function requireToLength () { - if (hasRequiredToLength) return toLength; - hasRequiredToLength = 1; - var toIntegerOrInfinity = requireToIntegerOrInfinity(); - var min = Math.min; - toLength = function (argument) { - var len = toIntegerOrInfinity(argument); - return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; - }; - return toLength; -} - -var lengthOfArrayLike; -var hasRequiredLengthOfArrayLike; - -function requireLengthOfArrayLike () { - if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike; - hasRequiredLengthOfArrayLike = 1; - var toLength = requireToLength(); - lengthOfArrayLike = function (obj) { - return toLength(obj.length); - }; - return lengthOfArrayLike; -} - -var arrayIncludes; -var hasRequiredArrayIncludes; - -function requireArrayIncludes () { - if (hasRequiredArrayIncludes) return arrayIncludes; - hasRequiredArrayIncludes = 1; - var toIndexedObject = requireToIndexedObject(); - var toAbsoluteIndex = requireToAbsoluteIndex(); - var lengthOfArrayLike = requireLengthOfArrayLike(); - var createMethod = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = lengthOfArrayLike(O); - if (length === 0) return !IS_INCLUDES && -1; - var index = toAbsoluteIndex(fromIndex, length); - var value; - if (IS_INCLUDES && el !== el) while (length > index) { - value = O[index++]; - if (value !== value) return true; - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; - }; - arrayIncludes = { - includes: createMethod(true), - indexOf: createMethod(false) - }; - return arrayIncludes; -} - -var objectKeysInternal; -var hasRequiredObjectKeysInternal; - -function requireObjectKeysInternal () { - if (hasRequiredObjectKeysInternal) return objectKeysInternal; - hasRequiredObjectKeysInternal = 1; - var uncurryThis = requireFunctionUncurryThis(); - var hasOwn = requireHasOwnProperty(); - var toIndexedObject = requireToIndexedObject(); - var indexOf = requireArrayIncludes().indexOf; - var hiddenKeys = requireHiddenKeys(); - var push = uncurryThis([].push); - objectKeysInternal = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); - while (names.length > i) if (hasOwn(O, key = names[i++])) { - ~indexOf(result, key) || push(result, key); - } - return result; - }; - return objectKeysInternal; -} - -var enumBugKeys; -var hasRequiredEnumBugKeys; - -function requireEnumBugKeys () { - if (hasRequiredEnumBugKeys) return enumBugKeys; - hasRequiredEnumBugKeys = 1; - enumBugKeys = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - return enumBugKeys; -} - -var hasRequiredObjectGetOwnPropertyNames; - -function requireObjectGetOwnPropertyNames () { - if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames; - hasRequiredObjectGetOwnPropertyNames = 1; - var internalObjectKeys = requireObjectKeysInternal(); - var enumBugKeys = requireEnumBugKeys(); - var hiddenKeys = enumBugKeys.concat('length', 'prototype'); - objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return internalObjectKeys(O, hiddenKeys); - }; - return objectGetOwnPropertyNames; -} - -var objectGetOwnPropertySymbols = {}; - -var hasRequiredObjectGetOwnPropertySymbols; - -function requireObjectGetOwnPropertySymbols () { - if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols; - hasRequiredObjectGetOwnPropertySymbols = 1; - objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols; - return objectGetOwnPropertySymbols; -} - -var ownKeys$1; -var hasRequiredOwnKeys; - -function requireOwnKeys () { - if (hasRequiredOwnKeys) return ownKeys$1; - hasRequiredOwnKeys = 1; - var getBuiltIn = requireGetBuiltIn(); - var uncurryThis = requireFunctionUncurryThis(); - var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames(); - var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols(); - var anObject = requireAnObject(); - var concat = uncurryThis([].concat); - ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = getOwnPropertyNamesModule.f(anObject(it)); - var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; - return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; - }; - return ownKeys$1; -} - -var copyConstructorProperties; -var hasRequiredCopyConstructorProperties; - -function requireCopyConstructorProperties () { - if (hasRequiredCopyConstructorProperties) return copyConstructorProperties; - hasRequiredCopyConstructorProperties = 1; - var hasOwn = requireHasOwnProperty(); - var ownKeys = requireOwnKeys(); - var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor(); - var definePropertyModule = requireObjectDefineProperty(); - copyConstructorProperties = function (target, source, exceptions) { - var keys = ownKeys(source); - var defineProperty = definePropertyModule.f; - var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) { - defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - } - }; - return copyConstructorProperties; -} - -var isForced_1; -var hasRequiredIsForced; - -function requireIsForced () { - if (hasRequiredIsForced) return isForced_1; - hasRequiredIsForced = 1; - var fails = requireFails(); - var isCallable = requireIsCallable(); - var replacement = /#|\.prototype\./; - var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value === POLYFILL ? true - : value === NATIVE ? false - : isCallable(detection) ? fails(detection) - : !!detection; - }; - var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); - }; - var data = isForced.data = {}; - var NATIVE = isForced.NATIVE = 'N'; - var POLYFILL = isForced.POLYFILL = 'P'; - isForced_1 = isForced; - return isForced_1; -} - -var _export; -var hasRequired_export; - -function require_export () { - if (hasRequired_export) return _export; - hasRequired_export = 1; - var globalThis = requireGlobalThis(); - var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f; - var createNonEnumerableProperty = requireCreateNonEnumerableProperty(); - var defineBuiltIn = requireDefineBuiltIn(); - var defineGlobalProperty = requireDefineGlobalProperty(); - var copyConstructorProperties = requireCopyConstructorProperties(); - var isForced = requireIsForced(); - _export = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = globalThis; - } else if (STATIC) { - target = globalThis[TARGET] || defineGlobalProperty(TARGET, {}); - } else { - target = globalThis[TARGET] && globalThis[TARGET].prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.dontCallGetSet) { - descriptor = getOwnPropertyDescriptor(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty == typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - defineBuiltIn(target, key, sourceProperty, options); - } - }; - return _export; -} - -var newPromiseCapability = {}; - -var hasRequiredNewPromiseCapability; - -function requireNewPromiseCapability () { - if (hasRequiredNewPromiseCapability) return newPromiseCapability; - hasRequiredNewPromiseCapability = 1; - var aCallable = requireACallable(); - var $TypeError = TypeError; - var PromiseCapability = function (C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aCallable(resolve); - this.reject = aCallable(reject); - }; - newPromiseCapability.f = function (C) { - return new PromiseCapability(C); - }; - return newPromiseCapability; -} - -var hasRequiredEs_promise_withResolvers; - -function requireEs_promise_withResolvers () { - if (hasRequiredEs_promise_withResolvers) return es_promise_withResolvers; - hasRequiredEs_promise_withResolvers = 1; - var $ = require_export(); - var newPromiseCapabilityModule = requireNewPromiseCapability(); - $({ target: 'Promise', stat: true }, { - withResolvers: function withResolvers() { - var promiseCapability = newPromiseCapabilityModule.f(this); - return { - promise: promiseCapability.promise, - resolve: promiseCapability.resolve, - reject: promiseCapability.reject - }; - } - }); - return es_promise_withResolvers; -} - -requireEs_promise_withResolvers(); - -var es_set_union_v2 = {}; - -var setHelpers; -var hasRequiredSetHelpers; - -function requireSetHelpers () { - if (hasRequiredSetHelpers) return setHelpers; - hasRequiredSetHelpers = 1; - var uncurryThis = requireFunctionUncurryThis(); - var SetPrototype = Set.prototype; - setHelpers = { - Set: Set, - add: uncurryThis(SetPrototype.add), - has: uncurryThis(SetPrototype.has), - remove: uncurryThis(SetPrototype['delete']), - proto: SetPrototype - }; - return setHelpers; -} - -var aSet; -var hasRequiredASet; - -function requireASet () { - if (hasRequiredASet) return aSet; - hasRequiredASet = 1; - var has = requireSetHelpers().has; - aSet = function (it) { - has(it); - return it; - }; - return aSet; -} - -var iterateSimple; -var hasRequiredIterateSimple; - -function requireIterateSimple () { - if (hasRequiredIterateSimple) return iterateSimple; - hasRequiredIterateSimple = 1; - var call = requireFunctionCall(); - iterateSimple = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) { - var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator; - var next = record.next; - var step, result; - while (!(step = call(next, iterator)).done) { - result = fn(step.value); - if (result !== undefined) return result; - } - }; - return iterateSimple; -} - -var setIterate; -var hasRequiredSetIterate; - -function requireSetIterate () { - if (hasRequiredSetIterate) return setIterate; - hasRequiredSetIterate = 1; - var uncurryThis = requireFunctionUncurryThis(); - var iterateSimple = requireIterateSimple(); - var SetHelpers = requireSetHelpers(); - var Set = SetHelpers.Set; - var SetPrototype = SetHelpers.proto; - var forEach = uncurryThis(SetPrototype.forEach); - var keys = uncurryThis(SetPrototype.keys); - var next = keys(new Set()).next; - setIterate = function (set, fn, interruptible) { - return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn); - }; - return setIterate; -} - -var setClone; -var hasRequiredSetClone; - -function requireSetClone () { - if (hasRequiredSetClone) return setClone; - hasRequiredSetClone = 1; - var SetHelpers = requireSetHelpers(); - var iterate = requireSetIterate(); - var Set = SetHelpers.Set; - var add = SetHelpers.add; - setClone = function (set) { - var result = new Set(); - iterate(set, function (it) { - add(result, it); - }); - return result; - }; - return setClone; -} - -var getIteratorDirect; -var hasRequiredGetIteratorDirect; - -function requireGetIteratorDirect () { - if (hasRequiredGetIteratorDirect) return getIteratorDirect; - hasRequiredGetIteratorDirect = 1; - getIteratorDirect = function (obj) { - return { - iterator: obj, - next: obj.next, - done: false - }; - }; - return getIteratorDirect; -} - -var getSetRecord; -var hasRequiredGetSetRecord; - -function requireGetSetRecord () { - if (hasRequiredGetSetRecord) return getSetRecord; - hasRequiredGetSetRecord = 1; - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var call = requireFunctionCall(); - var toIntegerOrInfinity = requireToIntegerOrInfinity(); - var getIteratorDirect = requireGetIteratorDirect(); - var INVALID_SIZE = 'Invalid size'; - var $RangeError = RangeError; - var $TypeError = TypeError; - var max = Math.max; - var SetRecord = function (set, intSize) { - this.set = set; - this.size = max(intSize, 0); - this.has = aCallable(set.has); - this.keys = aCallable(set.keys); - }; - SetRecord.prototype = { - getIterator: function () { - return getIteratorDirect(anObject(call(this.keys, this.set))); - }, - includes: function (it) { - return call(this.has, this.set, it); - } - }; - getSetRecord = function (obj) { - anObject(obj); - var numSize = +obj.size; - if (numSize !== numSize) throw new $TypeError(INVALID_SIZE); - var intSize = toIntegerOrInfinity(numSize); - if (intSize < 0) throw new $RangeError(INVALID_SIZE); - return new SetRecord(obj, intSize); - }; - return getSetRecord; -} - -var setUnion; -var hasRequiredSetUnion; - -function requireSetUnion () { - if (hasRequiredSetUnion) return setUnion; - hasRequiredSetUnion = 1; - var aSet = requireASet(); - var add = requireSetHelpers().add; - var clone = requireSetClone(); - var getSetRecord = requireGetSetRecord(); - var iterateSimple = requireIterateSimple(); - setUnion = function union(other) { - var O = aSet(this); - var keysIter = getSetRecord(other).getIterator(); - var result = clone(O); - iterateSimple(keysIter, function (it) { - add(result, it); - }); - return result; - }; - return setUnion; -} - -var setMethodGetKeysBeforeCloningDetection; -var hasRequiredSetMethodGetKeysBeforeCloningDetection; - -function requireSetMethodGetKeysBeforeCloningDetection () { - if (hasRequiredSetMethodGetKeysBeforeCloningDetection) return setMethodGetKeysBeforeCloningDetection; - hasRequiredSetMethodGetKeysBeforeCloningDetection = 1; - setMethodGetKeysBeforeCloningDetection = function (METHOD_NAME) { - try { - var baseSet = new Set(); - var setLike = { - size: 0, - has: function () { return true; }, - keys: function () { - return Object.defineProperty({}, 'next', { - get: function () { - baseSet.clear(); - baseSet.add(4); - return function () { - return { done: true }; - }; - } - }); - } - }; - var result = baseSet[METHOD_NAME](setLike); - return result.size === 1 && result.values().next().value === 4; - } catch (error) { - return false; - } - }; - return setMethodGetKeysBeforeCloningDetection; -} - -var setMethodAcceptSetLike; -var hasRequiredSetMethodAcceptSetLike; - -function requireSetMethodAcceptSetLike () { - if (hasRequiredSetMethodAcceptSetLike) return setMethodAcceptSetLike; - hasRequiredSetMethodAcceptSetLike = 1; - var getBuiltIn = requireGetBuiltIn(); - var createSetLike = function (size) { - return { - size: size, - has: function () { - return false; - }, - keys: function () { - return { - next: function () { - return { done: true }; - } - }; - } - }; - }; - var createSetLikeWithInfinitySize = function (size) { - return { - size: size, - has: function () { - return true; - }, - keys: function () { - throw new Error('e'); - } - }; - }; - setMethodAcceptSetLike = function (name, callback) { - var Set = getBuiltIn('Set'); - try { - new Set()[name](createSetLike(0)); - try { - new Set()[name](createSetLike(-1)); - return false; - } catch (error2) { - if (!callback) return true; - try { - new Set()[name](createSetLikeWithInfinitySize(-Infinity)); - return false; - } catch (error) { - var set = new Set([1, 2]); - return callback(set[name](createSetLikeWithInfinitySize(Infinity))); - } - } - } catch (error) { - return false; - } - }; - return setMethodAcceptSetLike; -} - -var hasRequiredEs_set_union_v2; - -function requireEs_set_union_v2 () { - if (hasRequiredEs_set_union_v2) return es_set_union_v2; - hasRequiredEs_set_union_v2 = 1; - var $ = require_export(); - var union = requireSetUnion(); - var setMethodGetKeysBeforeCloning = requireSetMethodGetKeysBeforeCloningDetection(); - var setMethodAcceptSetLike = requireSetMethodAcceptSetLike(); - var FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union'); - $({ target: 'Set', proto: true, real: true, forced: FORCED }, { - union: union - }); - return es_set_union_v2; -} - -requireEs_set_union_v2(); - -var iteratorHelpers = {}; - -var iteratorHelpersStage3 = {}; - -var esnext_asyncIterator_constructor = {}; - -var anInstance; -var hasRequiredAnInstance; - -function requireAnInstance () { - if (hasRequiredAnInstance) return anInstance; - hasRequiredAnInstance = 1; - var isPrototypeOf = requireObjectIsPrototypeOf(); - var $TypeError = TypeError; - anInstance = function (it, Prototype) { - if (isPrototypeOf(Prototype, it)) return it; - throw new $TypeError('Incorrect invocation'); - }; - return anInstance; -} - -var correctPrototypeGetter; -var hasRequiredCorrectPrototypeGetter; - -function requireCorrectPrototypeGetter () { - if (hasRequiredCorrectPrototypeGetter) return correctPrototypeGetter; - hasRequiredCorrectPrototypeGetter = 1; - var fails = requireFails(); - correctPrototypeGetter = !fails(function () { - function F() { } - F.prototype.constructor = null; - return Object.getPrototypeOf(new F()) !== F.prototype; - }); - return correctPrototypeGetter; -} - -var objectGetPrototypeOf; -var hasRequiredObjectGetPrototypeOf; - -function requireObjectGetPrototypeOf () { - if (hasRequiredObjectGetPrototypeOf) return objectGetPrototypeOf; - hasRequiredObjectGetPrototypeOf = 1; - var hasOwn = requireHasOwnProperty(); - var isCallable = requireIsCallable(); - var toObject = requireToObject(); - var sharedKey = requireSharedKey(); - var CORRECT_PROTOTYPE_GETTER = requireCorrectPrototypeGetter(); - var IE_PROTO = sharedKey('IE_PROTO'); - var $Object = Object; - var ObjectPrototype = $Object.prototype; - objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { - var object = toObject(O); - if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; - var constructor = object.constructor; - if (isCallable(constructor) && object instanceof constructor) { - return constructor.prototype; - } return object instanceof $Object ? ObjectPrototype : null; - }; - return objectGetPrototypeOf; -} - -var objectDefineProperties = {}; - -var objectKeys$1; -var hasRequiredObjectKeys; - -function requireObjectKeys () { - if (hasRequiredObjectKeys) return objectKeys$1; - hasRequiredObjectKeys = 1; - var internalObjectKeys = requireObjectKeysInternal(); - var enumBugKeys = requireEnumBugKeys(); - objectKeys$1 = Object.keys || function keys(O) { - return internalObjectKeys(O, enumBugKeys); - }; - return objectKeys$1; -} - -var hasRequiredObjectDefineProperties; - -function requireObjectDefineProperties () { - if (hasRequiredObjectDefineProperties) return objectDefineProperties; - hasRequiredObjectDefineProperties = 1; - var DESCRIPTORS = requireDescriptors(); - var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug(); - var definePropertyModule = requireObjectDefineProperty(); - var anObject = requireAnObject(); - var toIndexedObject = requireToIndexedObject(); - var objectKeys = requireObjectKeys(); - objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var props = toIndexedObject(Properties); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); - return O; - }; - return objectDefineProperties; -} - -var html$1; -var hasRequiredHtml; - -function requireHtml () { - if (hasRequiredHtml) return html$1; - hasRequiredHtml = 1; - var getBuiltIn = requireGetBuiltIn(); - html$1 = getBuiltIn('document', 'documentElement'); - return html$1; -} - -var objectCreate; -var hasRequiredObjectCreate; - -function requireObjectCreate () { - if (hasRequiredObjectCreate) return objectCreate; - hasRequiredObjectCreate = 1; - var anObject = requireAnObject(); - var definePropertiesModule = requireObjectDefineProperties(); - var enumBugKeys = requireEnumBugKeys(); - var hiddenKeys = requireHiddenKeys(); - var html = requireHtml(); - var documentCreateElement = requireDocumentCreateElement(); - var sharedKey = requireSharedKey(); - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO = sharedKey('IE_PROTO'); - var EmptyConstructor = function () { }; - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; - }; - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; - return temp; - }; - var NullProtoObjectViaIFrame = function () { - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - var activeXDocument; - var NullProtoObject = function () { - try { - activeXDocument = new ActiveXObject('htmlfile'); - } catch (error) { } - NullProtoObject = typeof document != 'undefined' - ? document.domain && activeXDocument - ? NullProtoObjectViaActiveX(activeXDocument) - : NullProtoObjectViaIFrame() - : NullProtoObjectViaActiveX(activeXDocument); - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; - hiddenKeys[IE_PROTO] = true; - objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : definePropertiesModule.f(result, Properties); - }; - return objectCreate; -} - -var asyncIteratorPrototype; -var hasRequiredAsyncIteratorPrototype; - -function requireAsyncIteratorPrototype () { - if (hasRequiredAsyncIteratorPrototype) return asyncIteratorPrototype; - hasRequiredAsyncIteratorPrototype = 1; - var globalThis = requireGlobalThis(); - var shared = requireSharedStore(); - var isCallable = requireIsCallable(); - var create = requireObjectCreate(); - var getPrototypeOf = requireObjectGetPrototypeOf(); - var defineBuiltIn = requireDefineBuiltIn(); - var wellKnownSymbol = requireWellKnownSymbol(); - var IS_PURE = requireIsPure(); - var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR'; - var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); - var AsyncIterator = globalThis.AsyncIterator; - var PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype; - var AsyncIteratorPrototype, prototype; - if (PassedAsyncIteratorPrototype) { - AsyncIteratorPrototype = PassedAsyncIteratorPrototype; - } else if (isCallable(AsyncIterator)) { - AsyncIteratorPrototype = AsyncIterator.prototype; - } else if (shared[USE_FUNCTION_CONSTRUCTOR] || globalThis[USE_FUNCTION_CONSTRUCTOR]) { - try { - prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')()))); - if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype; - } catch (error) { } - } - if (!AsyncIteratorPrototype) AsyncIteratorPrototype = {}; - else if (IS_PURE) AsyncIteratorPrototype = create(AsyncIteratorPrototype); - if (!isCallable(AsyncIteratorPrototype[ASYNC_ITERATOR])) { - defineBuiltIn(AsyncIteratorPrototype, ASYNC_ITERATOR, function () { - return this; - }); - } - asyncIteratorPrototype = AsyncIteratorPrototype; - return asyncIteratorPrototype; -} - -var hasRequiredEsnext_asyncIterator_constructor; - -function requireEsnext_asyncIterator_constructor () { - if (hasRequiredEsnext_asyncIterator_constructor) return esnext_asyncIterator_constructor; - hasRequiredEsnext_asyncIterator_constructor = 1; - var $ = require_export(); - var anInstance = requireAnInstance(); - var getPrototypeOf = requireObjectGetPrototypeOf(); - var createNonEnumerableProperty = requireCreateNonEnumerableProperty(); - var hasOwn = requireHasOwnProperty(); - var wellKnownSymbol = requireWellKnownSymbol(); - var AsyncIteratorPrototype = requireAsyncIteratorPrototype(); - var IS_PURE = requireIsPure(); - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var $TypeError = TypeError; - var AsyncIteratorConstructor = function AsyncIterator() { - anInstance(this, AsyncIteratorPrototype); - if (getPrototypeOf(this) === AsyncIteratorPrototype) throw new $TypeError('Abstract class AsyncIterator not directly constructable'); - }; - AsyncIteratorConstructor.prototype = AsyncIteratorPrototype; - if (!hasOwn(AsyncIteratorPrototype, TO_STRING_TAG)) { - createNonEnumerableProperty(AsyncIteratorPrototype, TO_STRING_TAG, 'AsyncIterator'); - } - if (IS_PURE || !hasOwn(AsyncIteratorPrototype, 'constructor') || AsyncIteratorPrototype.constructor === Object) { - createNonEnumerableProperty(AsyncIteratorPrototype, 'constructor', AsyncIteratorConstructor); - } - $({ global: true, constructor: true, forced: IS_PURE }, { - AsyncIterator: AsyncIteratorConstructor - }); - return esnext_asyncIterator_constructor; -} - -var esnext_asyncIterator_drop = {}; - -var notANan; -var hasRequiredNotANan; - -function requireNotANan () { - if (hasRequiredNotANan) return notANan; - hasRequiredNotANan = 1; - var $RangeError = RangeError; - notANan = function (it) { - if (it === it) return it; - throw new $RangeError('NaN is not allowed'); - }; - return notANan; -} - -var toPositiveInteger; -var hasRequiredToPositiveInteger; - -function requireToPositiveInteger () { - if (hasRequiredToPositiveInteger) return toPositiveInteger; - hasRequiredToPositiveInteger = 1; - var toIntegerOrInfinity = requireToIntegerOrInfinity(); - var $RangeError = RangeError; - toPositiveInteger = function (it) { - var result = toIntegerOrInfinity(it); - if (result < 0) throw new $RangeError("The argument can't be less than 0"); - return result; - }; - return toPositiveInteger; -} - -var perform; -var hasRequiredPerform; - -function requirePerform () { - if (hasRequiredPerform) return perform; - hasRequiredPerform = 1; - perform = function (exec) { - try { - return { error: false, value: exec() }; - } catch (error) { - return { error: true, value: error }; - } - }; - return perform; -} - -var defineBuiltIns; -var hasRequiredDefineBuiltIns; - -function requireDefineBuiltIns () { - if (hasRequiredDefineBuiltIns) return defineBuiltIns; - hasRequiredDefineBuiltIns = 1; - var defineBuiltIn = requireDefineBuiltIn(); - defineBuiltIns = function (target, src, options) { - for (var key in src) defineBuiltIn(target, key, src[key], options); - return target; - }; - return defineBuiltIns; -} - -var createIterResultObject; -var hasRequiredCreateIterResultObject; - -function requireCreateIterResultObject () { - if (hasRequiredCreateIterResultObject) return createIterResultObject; - hasRequiredCreateIterResultObject = 1; - createIterResultObject = function (value, done) { - return { value: value, done: done }; - }; - return createIterResultObject; -} - -var asyncIteratorCreateProxy; -var hasRequiredAsyncIteratorCreateProxy; - -function requireAsyncIteratorCreateProxy () { - if (hasRequiredAsyncIteratorCreateProxy) return asyncIteratorCreateProxy; - hasRequiredAsyncIteratorCreateProxy = 1; - var call = requireFunctionCall(); - var perform = requirePerform(); - var anObject = requireAnObject(); - var create = requireObjectCreate(); - var createNonEnumerableProperty = requireCreateNonEnumerableProperty(); - var defineBuiltIns = requireDefineBuiltIns(); - var wellKnownSymbol = requireWellKnownSymbol(); - var InternalStateModule = requireInternalState(); - var getBuiltIn = requireGetBuiltIn(); - var getMethod = requireGetMethod(); - var AsyncIteratorPrototype = requireAsyncIteratorPrototype(); - var createIterResultObject = requireCreateIterResultObject(); - var Promise = getBuiltIn('Promise'); - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var ASYNC_ITERATOR_HELPER = 'AsyncIteratorHelper'; - var WRAP_FOR_VALID_ASYNC_ITERATOR = 'WrapForValidAsyncIterator'; - var setInternalState = InternalStateModule.set; - var createAsyncIteratorProxyPrototype = function (IS_ITERATOR) { - var IS_GENERATOR = !IS_ITERATOR; - var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER); - var getStateOrEarlyExit = function (that) { - var stateCompletion = perform(function () { - return getInternalState(that); - }); - var stateError = stateCompletion.error; - var state = stateCompletion.value; - if (stateError || (IS_GENERATOR && state.done)) { - return { exit: true, value: stateError ? Promise.reject(state) : Promise.resolve(createIterResultObject(undefined, true)) }; - } return { exit: false, value: state }; - }; - return defineBuiltIns(create(AsyncIteratorPrototype), { - next: function next() { - var stateCompletion = getStateOrEarlyExit(this); - var state = stateCompletion.value; - if (stateCompletion.exit) return state; - var handlerCompletion = perform(function () { - return anObject(state.nextHandler(Promise)); - }); - var handlerError = handlerCompletion.error; - var value = handlerCompletion.value; - if (handlerError) state.done = true; - return handlerError ? Promise.reject(value) : Promise.resolve(value); - }, - 'return': function () { - var stateCompletion = getStateOrEarlyExit(this); - var state = stateCompletion.value; - if (stateCompletion.exit) return state; - state.done = true; - var iterator = state.iterator; - var inner = state.inner; - var returnMethod, result; - var closeOuterIterator = function () { - var completion = perform(function () { - return getMethod(iterator, 'return'); - }); - returnMethod = result = completion.value; - if (completion.error) return Promise.reject(result); - if (returnMethod === undefined) return Promise.resolve(createIterResultObject(undefined, true)); - completion = perform(function () { - return call(returnMethod, iterator); - }); - result = completion.value; - if (completion.error) return Promise.reject(result); - return IS_ITERATOR ? Promise.resolve(result) : Promise.resolve(result).then(function (resolved) { - anObject(resolved); - return createIterResultObject(undefined, true); - }); - }; - var closeAndReject = function (error) { - return closeOuterIterator().then(function () { - throw error; - }, function () { - throw error; - }); - }; - if (inner) { - var innerIterator = inner.iterator; - var innerReturn; - var completion = perform(function () { - innerReturn = getMethod(innerIterator, 'return'); - if (innerReturn) return call(innerReturn, innerIterator); - }); - if (completion.error) return closeAndReject(completion.value); - if (innerReturn) { - return Promise.resolve(completion.value).then(function (innerResult) { - try { - anObject(innerResult); - } catch (error) { - return closeAndReject(error); - } - return closeOuterIterator(); - }, closeAndReject); - } - } - return closeOuterIterator(); - } - }); - }; - var WrapForValidAsyncIteratorPrototype = createAsyncIteratorProxyPrototype(true); - var AsyncIteratorHelperPrototype = createAsyncIteratorProxyPrototype(false); - createNonEnumerableProperty(AsyncIteratorHelperPrototype, TO_STRING_TAG, 'Async Iterator Helper'); - asyncIteratorCreateProxy = function (nextHandler, IS_ITERATOR) { - var AsyncIteratorProxy = function AsyncIterator(record, state) { - if (state) { - state.iterator = record.iterator; - state.next = record.next; - } else state = record; - state.type = IS_ITERATOR ? WRAP_FOR_VALID_ASYNC_ITERATOR : ASYNC_ITERATOR_HELPER; - state.nextHandler = nextHandler; - state.counter = 0; - state.done = false; - setInternalState(this, state); - }; - AsyncIteratorProxy.prototype = IS_ITERATOR ? WrapForValidAsyncIteratorPrototype : AsyncIteratorHelperPrototype; - return AsyncIteratorProxy; - }; - return asyncIteratorCreateProxy; -} - -var hasRequiredEsnext_asyncIterator_drop; - -function requireEsnext_asyncIterator_drop () { - if (hasRequiredEsnext_asyncIterator_drop) return esnext_asyncIterator_drop; - hasRequiredEsnext_asyncIterator_drop = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var notANaN = requireNotANan(); - var toPositiveInteger = requireToPositiveInteger(); - var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy(); - var createIterResultObject = requireCreateIterResultObject(); - var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { - var state = this; - return new Promise(function (resolve, reject) { - var doneAndReject = function (error) { - state.done = true; - reject(error); - }; - var loop = function () { - try { - Promise.resolve(anObject(call(state.next, state.iterator))).then(function (step) { - try { - if (anObject(step).done) { - state.done = true; - resolve(createIterResultObject(undefined, true)); - } else if (state.remaining) { - state.remaining--; - loop(); - } else resolve(createIterResultObject(step.value, false)); - } catch (err) { doneAndReject(err); } - }, doneAndReject); - } catch (error) { doneAndReject(error); } - }; - loop(); - }); - }); - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - drop: function drop(limit) { - anObject(this); - var remaining = toPositiveInteger(notANaN(+limit)); - return new AsyncIteratorProxy(getIteratorDirect(this), { - remaining: remaining - }); - } - }); - return esnext_asyncIterator_drop; -} - -var esnext_asyncIterator_every = {}; - -var doesNotExceedSafeInteger; -var hasRequiredDoesNotExceedSafeInteger; - -function requireDoesNotExceedSafeInteger () { - if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger; - hasRequiredDoesNotExceedSafeInteger = 1; - var $TypeError = TypeError; - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; - doesNotExceedSafeInteger = function (it) { - if (it > MAX_SAFE_INTEGER) throw new $TypeError('Maximum allowed index exceeded'); - return it; - }; - return doesNotExceedSafeInteger; -} - -var createProperty; -var hasRequiredCreateProperty; - -function requireCreateProperty () { - if (hasRequiredCreateProperty) return createProperty; - hasRequiredCreateProperty = 1; - var DESCRIPTORS = requireDescriptors(); - var definePropertyModule = requireObjectDefineProperty(); - var createPropertyDescriptor = requireCreatePropertyDescriptor(); - createProperty = function (object, key, value) { - if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value)); - else object[key] = value; - }; - return createProperty; -} - -var isArray$1; -var hasRequiredIsArray; - -function requireIsArray () { - if (hasRequiredIsArray) return isArray$1; - hasRequiredIsArray = 1; - var classof = requireClassofRaw(); - isArray$1 = Array.isArray || function isArray(argument) { - return classof(argument) === 'Array'; - }; - return isArray$1; -} - -var arraySetLength; -var hasRequiredArraySetLength; - -function requireArraySetLength () { - if (hasRequiredArraySetLength) return arraySetLength; - hasRequiredArraySetLength = 1; - var DESCRIPTORS = requireDescriptors(); - var isArray = requireIsArray(); - var $TypeError = TypeError; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () { - if (this !== undefined) return true; - try { - Object.defineProperty([], 'length', { writable: false }).length = 1; - } catch (error) { - return error instanceof TypeError; - } - }(); - arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) { - if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) { - throw new $TypeError('Cannot set read only .length'); - } return O.length = length; - } : function (O, length) { - return O.length = length; - }; - return arraySetLength; -} - -var asyncIteratorClose; -var hasRequiredAsyncIteratorClose; - -function requireAsyncIteratorClose () { - if (hasRequiredAsyncIteratorClose) return asyncIteratorClose; - hasRequiredAsyncIteratorClose = 1; - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getBuiltIn = requireGetBuiltIn(); - var getMethod = requireGetMethod(); - asyncIteratorClose = function (iterator, method, argument, reject) { - try { - var returnMethod = getMethod(iterator, 'return'); - if (returnMethod) { - return getBuiltIn('Promise').resolve(call(returnMethod, iterator)).then(function (result) { - try { - if (method !== reject) anObject(result); - } catch (error3) { - reject(error3); - return; - } - method(argument); - }, function (error) { - method === reject ? method(argument) : reject(error); - }); - } - } catch (error2) { - return method === reject ? reject(argument) : reject(error2); - } method(argument); - }; - return asyncIteratorClose; -} - -var asyncIteratorIteration; -var hasRequiredAsyncIteratorIteration; - -function requireAsyncIteratorIteration () { - if (hasRequiredAsyncIteratorIteration) return asyncIteratorIteration; - hasRequiredAsyncIteratorIteration = 1; - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var isObject = requireIsObject(); - var doesNotExceedSafeInteger = requireDoesNotExceedSafeInteger(); - var getBuiltIn = requireGetBuiltIn(); - var createProperty = requireCreateProperty(); - var setArrayLength = requireArraySetLength(); - var getIteratorDirect = requireGetIteratorDirect(); - var closeAsyncIteration = requireAsyncIteratorClose(); - var createMethod = function (TYPE) { - var IS_TO_ARRAY = TYPE === 0; - var IS_FOR_EACH = TYPE === 1; - var IS_EVERY = TYPE === 2; - var IS_SOME = TYPE === 3; - return function (object, fn, target) { - anObject(object); - var MAPPING = fn !== undefined; - if (MAPPING || !IS_TO_ARRAY) aCallable(fn); - var record = getIteratorDirect(object); - var Promise = getBuiltIn('Promise'); - var iterator = record.iterator; - var next = record.next; - var counter = 0; - return new Promise(function (resolve, reject) { - var ifAbruptCloseAsyncIterator = function (error) { - closeAsyncIteration(iterator, reject, error, reject); - }; - var loop = function () { - try { - try { - doesNotExceedSafeInteger(counter); - } catch (error5) { - return ifAbruptCloseAsyncIterator(error5); - } - Promise.resolve(anObject(call(next, iterator))).then(function (step) { - try { - if (anObject(step).done) { - if (IS_TO_ARRAY) { - setArrayLength(target, counter); - resolve(target); - } else resolve(IS_SOME ? false : IS_EVERY || undefined); - } else { - var value = step.value; - try { - if (MAPPING) { - var index = counter++; - var result = fn(value, index); - var handler = function ($result) { - if (IS_FOR_EACH) { - loop(); - } else if (IS_EVERY) { - $result ? loop() : closeAsyncIteration(iterator, resolve, false, reject); - } else if (IS_TO_ARRAY) { - try { - createProperty(target, index, $result); - loop(); - } catch (error4) { ifAbruptCloseAsyncIterator(error4); } - } else { - $result ? closeAsyncIteration(iterator, resolve, IS_SOME || value, reject) : loop(); - } - }; - if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); - else handler(result); - } else { - createProperty(target, counter++, value); - loop(); - } - } catch (error3) { ifAbruptCloseAsyncIterator(error3); } - } - } catch (error2) { reject(error2); } - }, reject); - } catch (error) { reject(error); } - }; - loop(); - }); - }; - }; - asyncIteratorIteration = { - toArray: createMethod(0), - forEach: createMethod(1), - every: createMethod(2), - some: createMethod(3), - find: createMethod(4) - }; - return asyncIteratorIteration; -} - -var hasRequiredEsnext_asyncIterator_every; - -function requireEsnext_asyncIterator_every () { - if (hasRequiredEsnext_asyncIterator_every) return esnext_asyncIterator_every; - hasRequiredEsnext_asyncIterator_every = 1; - var $ = require_export(); - var $every = requireAsyncIteratorIteration().every; - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - every: function every(predicate) { - return $every(this, predicate); - } - }); - return esnext_asyncIterator_every; -} - -var esnext_asyncIterator_filter = {}; - -var hasRequiredEsnext_asyncIterator_filter; - -function requireEsnext_asyncIterator_filter () { - if (hasRequiredEsnext_asyncIterator_filter) return esnext_asyncIterator_filter; - hasRequiredEsnext_asyncIterator_filter = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var isObject = requireIsObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy(); - var createIterResultObject = requireCreateIterResultObject(); - var closeAsyncIteration = requireAsyncIteratorClose(); - var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { - var state = this; - var iterator = state.iterator; - var predicate = state.predicate; - return new Promise(function (resolve, reject) { - var doneAndReject = function (error) { - state.done = true; - reject(error); - }; - var ifAbruptCloseAsyncIterator = function (error) { - closeAsyncIteration(iterator, doneAndReject, error, doneAndReject); - }; - var loop = function () { - try { - Promise.resolve(anObject(call(state.next, iterator))).then(function (step) { - try { - if (anObject(step).done) { - state.done = true; - resolve(createIterResultObject(undefined, true)); - } else { - var value = step.value; - try { - var result = predicate(value, state.counter++); - var handler = function (selected) { - selected ? resolve(createIterResultObject(value, false)) : loop(); - }; - if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); - else handler(result); - } catch (error3) { ifAbruptCloseAsyncIterator(error3); } - } - } catch (error2) { doneAndReject(error2); } - }, doneAndReject); - } catch (error) { doneAndReject(error); } - }; - loop(); - }); - }); - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - filter: function filter(predicate) { - anObject(this); - aCallable(predicate); - return new AsyncIteratorProxy(getIteratorDirect(this), { - predicate: predicate - }); - } - }); - return esnext_asyncIterator_filter; -} - -var esnext_asyncIterator_find = {}; - -var hasRequiredEsnext_asyncIterator_find; - -function requireEsnext_asyncIterator_find () { - if (hasRequiredEsnext_asyncIterator_find) return esnext_asyncIterator_find; - hasRequiredEsnext_asyncIterator_find = 1; - var $ = require_export(); - var $find = requireAsyncIteratorIteration().find; - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - find: function find(predicate) { - return $find(this, predicate); - } - }); - return esnext_asyncIterator_find; -} - -var esnext_asyncIterator_flatMap = {}; - -var toStringTagSupport; -var hasRequiredToStringTagSupport; - -function requireToStringTagSupport () { - if (hasRequiredToStringTagSupport) return toStringTagSupport; - hasRequiredToStringTagSupport = 1; - var wellKnownSymbol = requireWellKnownSymbol(); - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var test = {}; - test[TO_STRING_TAG] = 'z'; - toStringTagSupport = String(test) === '[object z]'; - return toStringTagSupport; -} - -var classof; -var hasRequiredClassof; - -function requireClassof () { - if (hasRequiredClassof) return classof; - hasRequiredClassof = 1; - var TO_STRING_TAG_SUPPORT = requireToStringTagSupport(); - var isCallable = requireIsCallable(); - var classofRaw = requireClassofRaw(); - var wellKnownSymbol = requireWellKnownSymbol(); - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var $Object = Object; - var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments'; - var tryGet = function (it, key) { - try { - return it[key]; - } catch (error) { } - }; - classof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { - var O, tag, result; - return it === undefined ? 'Undefined' : it === null ? 'Null' - : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag - : CORRECT_ARGUMENTS ? classofRaw(O) - : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result; - }; - return classof; -} - -var iterators; -var hasRequiredIterators; - -function requireIterators () { - if (hasRequiredIterators) return iterators; - hasRequiredIterators = 1; - iterators = {}; - return iterators; -} - -var getIteratorMethod; -var hasRequiredGetIteratorMethod; - -function requireGetIteratorMethod () { - if (hasRequiredGetIteratorMethod) return getIteratorMethod; - hasRequiredGetIteratorMethod = 1; - var classof = requireClassof(); - var getMethod = requireGetMethod(); - var isNullOrUndefined = requireIsNullOrUndefined(); - var Iterators = requireIterators(); - var wellKnownSymbol = requireWellKnownSymbol(); - var ITERATOR = wellKnownSymbol('iterator'); - getIteratorMethod = function (it) { - if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR) - || getMethod(it, '@@iterator') - || Iterators[classof(it)]; - }; - return getIteratorMethod; -} - -var iteratorClose; -var hasRequiredIteratorClose; - -function requireIteratorClose () { - if (hasRequiredIteratorClose) return iteratorClose; - hasRequiredIteratorClose = 1; - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getMethod = requireGetMethod(); - iteratorClose = function (iterator, kind, value) { - var innerResult, innerError; - anObject(iterator); - try { - innerResult = getMethod(iterator, 'return'); - if (!innerResult) { - if (kind === 'throw') throw value; - return value; - } - innerResult = call(innerResult, iterator); - } catch (error) { - innerError = true; - innerResult = error; - } - if (kind === 'throw') throw value; - if (innerError) throw innerResult; - anObject(innerResult); - return value; - }; - return iteratorClose; -} - -var asyncFromSyncIterator; -var hasRequiredAsyncFromSyncIterator; - -function requireAsyncFromSyncIterator () { - if (hasRequiredAsyncFromSyncIterator) return asyncFromSyncIterator; - hasRequiredAsyncFromSyncIterator = 1; - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var create = requireObjectCreate(); - var getMethod = requireGetMethod(); - var defineBuiltIns = requireDefineBuiltIns(); - var InternalStateModule = requireInternalState(); - var iteratorClose = requireIteratorClose(); - var getBuiltIn = requireGetBuiltIn(); - var AsyncIteratorPrototype = requireAsyncIteratorPrototype(); - var createIterResultObject = requireCreateIterResultObject(); - var Promise = getBuiltIn('Promise'); - var ASYNC_FROM_SYNC_ITERATOR = 'AsyncFromSyncIterator'; - var setInternalState = InternalStateModule.set; - var getInternalState = InternalStateModule.getterFor(ASYNC_FROM_SYNC_ITERATOR); - var asyncFromSyncIteratorContinuation = function (result, resolve, reject, syncIterator, closeOnRejection) { - var done = result.done; - Promise.resolve(result.value).then(function (value) { - resolve(createIterResultObject(value, done)); - }, function (error) { - if (!done && closeOnRejection) { - try { - iteratorClose(syncIterator, 'throw', error); - } catch (error2) { - error = error2; - } - } - reject(error); - }); - }; - var AsyncFromSyncIterator = function AsyncIterator(iteratorRecord) { - iteratorRecord.type = ASYNC_FROM_SYNC_ITERATOR; - setInternalState(this, iteratorRecord); - }; - AsyncFromSyncIterator.prototype = defineBuiltIns(create(AsyncIteratorPrototype), { - next: function next() { - var state = getInternalState(this); - var hasValue = arguments.length > 0; - var value = hasValue ? arguments[0] : undefined; - return new Promise(function (resolve, reject) { - var result = anObject(hasValue ? call(state.next, state.iterator, value) : call(state.next, state.iterator)); - asyncFromSyncIteratorContinuation(result, resolve, reject, state.iterator, true); - }); - }, - 'return': function () { - var state = getInternalState(this); - var iterator = state.iterator; - var hasValue = arguments.length > 0; - var value = hasValue ? arguments[0] : undefined; - return new Promise(function (resolve, reject) { - var $return = getMethod(iterator, 'return'); - if ($return === undefined) return resolve(createIterResultObject(value, true)); - var result = anObject(hasValue ? call($return, iterator, value) : call($return, iterator)); - asyncFromSyncIteratorContinuation(result, resolve, reject, iterator); - }); - }, - 'throw': function () { - var state = getInternalState(this); - var iterator = state.iterator; - var hasValue = arguments.length > 0; - var value = hasValue ? arguments[0] : undefined; - return new Promise(function (resolve, reject) { - var $throw = getMethod(iterator, 'throw'); - if ($throw === undefined) { - try { - iteratorClose(iterator, 'normal'); - } catch (error) { - return reject(error); - } - return reject(new TypeError('The iterator does not provide a throw method')); - } - var result = anObject(hasValue ? call($throw, iterator, value) : call($throw, iterator)); - asyncFromSyncIteratorContinuation(result, resolve, reject, iterator, true); - }); - } - }); - asyncFromSyncIterator = AsyncFromSyncIterator; - return asyncFromSyncIterator; -} - -var getAsyncIteratorFlattenable; -var hasRequiredGetAsyncIteratorFlattenable; - -function requireGetAsyncIteratorFlattenable () { - if (hasRequiredGetAsyncIteratorFlattenable) return getAsyncIteratorFlattenable; - hasRequiredGetAsyncIteratorFlattenable = 1; - var call = requireFunctionCall(); - var isCallable = requireIsCallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var getIteratorMethod = requireGetIteratorMethod(); - var getMethod = requireGetMethod(); - var wellKnownSymbol = requireWellKnownSymbol(); - var AsyncFromSyncIterator = requireAsyncFromSyncIterator(); - var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator'); - getAsyncIteratorFlattenable = function (obj) { - var object = anObject(obj); - var alreadyAsync = true; - var method = getMethod(object, ASYNC_ITERATOR); - var iterator; - if (!isCallable(method)) { - method = getIteratorMethod(object); - alreadyAsync = false; - } - if (method !== undefined) { - iterator = call(method, object); - } else { - iterator = object; - alreadyAsync = true; - } - anObject(iterator); - return getIteratorDirect(alreadyAsync ? iterator : new AsyncFromSyncIterator(getIteratorDirect(iterator))); - }; - return getAsyncIteratorFlattenable; -} - -var hasRequiredEsnext_asyncIterator_flatMap; - -function requireEsnext_asyncIterator_flatMap () { - if (hasRequiredEsnext_asyncIterator_flatMap) return esnext_asyncIterator_flatMap; - hasRequiredEsnext_asyncIterator_flatMap = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var isObject = requireIsObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy(); - var createIterResultObject = requireCreateIterResultObject(); - var getAsyncIteratorFlattenable = requireGetAsyncIteratorFlattenable(); - var closeAsyncIteration = requireAsyncIteratorClose(); - var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { - var state = this; - var iterator = state.iterator; - var mapper = state.mapper; - return new Promise(function (resolve, reject) { - var doneAndReject = function (error) { - state.done = true; - reject(error); - }; - var ifAbruptCloseAsyncIterator = function (error) { - closeAsyncIteration(iterator, doneAndReject, error, doneAndReject); - }; - var outerLoop = function () { - try { - Promise.resolve(anObject(call(state.next, iterator))).then(function (step) { - try { - if (anObject(step).done) { - state.done = true; - resolve(createIterResultObject(undefined, true)); - } else { - var value = step.value; - try { - var result = mapper(value, state.counter++); - var handler = function (mapped) { - try { - state.inner = getAsyncIteratorFlattenable(mapped); - innerLoop(); - } catch (error4) { ifAbruptCloseAsyncIterator(error4); } - }; - if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); - else handler(result); - } catch (error3) { ifAbruptCloseAsyncIterator(error3); } - } - } catch (error2) { doneAndReject(error2); } - }, doneAndReject); - } catch (error) { doneAndReject(error); } - }; - var innerLoop = function () { - var inner = state.inner; - if (inner) { - try { - Promise.resolve(anObject(call(inner.next, inner.iterator))).then(function (result) { - try { - if (anObject(result).done) { - state.inner = null; - outerLoop(); - } else resolve(createIterResultObject(result.value, false)); - } catch (error1) { ifAbruptCloseAsyncIterator(error1); } - }, ifAbruptCloseAsyncIterator); - } catch (error) { ifAbruptCloseAsyncIterator(error); } - } else outerLoop(); - }; - innerLoop(); - }); - }); - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - flatMap: function flatMap(mapper) { - anObject(this); - aCallable(mapper); - return new AsyncIteratorProxy(getIteratorDirect(this), { - mapper: mapper, - inner: null - }); - } - }); - return esnext_asyncIterator_flatMap; -} - -var esnext_asyncIterator_forEach = {}; - -var hasRequiredEsnext_asyncIterator_forEach; - -function requireEsnext_asyncIterator_forEach () { - if (hasRequiredEsnext_asyncIterator_forEach) return esnext_asyncIterator_forEach; - hasRequiredEsnext_asyncIterator_forEach = 1; - var $ = require_export(); - var $forEach = requireAsyncIteratorIteration().forEach; - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - forEach: function forEach(fn) { - return $forEach(this, fn); - } - }); - return esnext_asyncIterator_forEach; -} - -var esnext_asyncIterator_from = {}; - -var asyncIteratorWrap; -var hasRequiredAsyncIteratorWrap; - -function requireAsyncIteratorWrap () { - if (hasRequiredAsyncIteratorWrap) return asyncIteratorWrap; - hasRequiredAsyncIteratorWrap = 1; - var call = requireFunctionCall(); - var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy(); - asyncIteratorWrap = createAsyncIteratorProxy(function () { - return call(this.next, this.iterator); - }, true); - return asyncIteratorWrap; -} - -var hasRequiredEsnext_asyncIterator_from; - -function requireEsnext_asyncIterator_from () { - if (hasRequiredEsnext_asyncIterator_from) return esnext_asyncIterator_from; - hasRequiredEsnext_asyncIterator_from = 1; - var $ = require_export(); - var toObject = requireToObject(); - var isPrototypeOf = requireObjectIsPrototypeOf(); - var getAsyncIteratorFlattenable = requireGetAsyncIteratorFlattenable(); - var AsyncIteratorPrototype = requireAsyncIteratorPrototype(); - var WrapAsyncIterator = requireAsyncIteratorWrap(); - $({ target: 'AsyncIterator', stat: true, forced: true }, { - from: function from(O) { - var iteratorRecord = getAsyncIteratorFlattenable(typeof O == 'string' ? toObject(O) : O); - return isPrototypeOf(AsyncIteratorPrototype, iteratorRecord.iterator) - ? iteratorRecord.iterator - : new WrapAsyncIterator(iteratorRecord); - } - }); - return esnext_asyncIterator_from; -} - -var esnext_asyncIterator_map = {}; - -var asyncIteratorMap; -var hasRequiredAsyncIteratorMap; - -function requireAsyncIteratorMap () { - if (hasRequiredAsyncIteratorMap) return asyncIteratorMap; - hasRequiredAsyncIteratorMap = 1; - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var isObject = requireIsObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy(); - var createIterResultObject = requireCreateIterResultObject(); - var closeAsyncIteration = requireAsyncIteratorClose(); - var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { - var state = this; - var iterator = state.iterator; - var mapper = state.mapper; - return new Promise(function (resolve, reject) { - var doneAndReject = function (error) { - state.done = true; - reject(error); - }; - var ifAbruptCloseAsyncIterator = function (error) { - closeAsyncIteration(iterator, doneAndReject, error, doneAndReject); - }; - try { - Promise.resolve(anObject(call(state.next, iterator))).then(function (step) { - try { - if (anObject(step).done) { - state.done = true; - resolve(createIterResultObject(undefined, true)); - } else { - var value = step.value; - try { - var result = mapper(value, state.counter++); - var handler = function (mapped) { - resolve(createIterResultObject(mapped, false)); - }; - if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); - else handler(result); - } catch (error2) { ifAbruptCloseAsyncIterator(error2); } - } - } catch (error) { doneAndReject(error); } - }, doneAndReject); - } catch (error) { doneAndReject(error); } - }); - }); - asyncIteratorMap = function map(mapper) { - anObject(this); - aCallable(mapper); - return new AsyncIteratorProxy(getIteratorDirect(this), { - mapper: mapper - }); - }; - return asyncIteratorMap; -} - -var hasRequiredEsnext_asyncIterator_map; - -function requireEsnext_asyncIterator_map () { - if (hasRequiredEsnext_asyncIterator_map) return esnext_asyncIterator_map; - hasRequiredEsnext_asyncIterator_map = 1; - var $ = require_export(); - var map = requireAsyncIteratorMap(); - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - map: map - }); - return esnext_asyncIterator_map; -} - -var esnext_asyncIterator_reduce = {}; - -var hasRequiredEsnext_asyncIterator_reduce; - -function requireEsnext_asyncIterator_reduce () { - if (hasRequiredEsnext_asyncIterator_reduce) return esnext_asyncIterator_reduce; - hasRequiredEsnext_asyncIterator_reduce = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var isObject = requireIsObject(); - var getBuiltIn = requireGetBuiltIn(); - var getIteratorDirect = requireGetIteratorDirect(); - var closeAsyncIteration = requireAsyncIteratorClose(); - var Promise = getBuiltIn('Promise'); - var $TypeError = TypeError; - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - reduce: function reduce(reducer ) { - anObject(this); - aCallable(reducer); - var record = getIteratorDirect(this); - var iterator = record.iterator; - var next = record.next; - var noInitial = arguments.length < 2; - var accumulator = noInitial ? undefined : arguments[1]; - var counter = 0; - return new Promise(function (resolve, reject) { - var ifAbruptCloseAsyncIterator = function (error) { - closeAsyncIteration(iterator, reject, error, reject); - }; - var loop = function () { - try { - Promise.resolve(anObject(call(next, iterator))).then(function (step) { - try { - if (anObject(step).done) { - noInitial ? reject(new $TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator); - } else { - var value = step.value; - if (noInitial) { - noInitial = false; - accumulator = value; - counter++; - loop(); - } else try { - var result = reducer(accumulator, value, counter++); - var handler = function ($result) { - accumulator = $result; - loop(); - }; - if (isObject(result)) Promise.resolve(result).then(handler, ifAbruptCloseAsyncIterator); - else handler(result); - } catch (error3) { ifAbruptCloseAsyncIterator(error3); } - } - } catch (error2) { reject(error2); } - }, reject); - } catch (error) { reject(error); } - }; - loop(); - }); - } - }); - return esnext_asyncIterator_reduce; -} - -var esnext_asyncIterator_some = {}; - -var hasRequiredEsnext_asyncIterator_some; - -function requireEsnext_asyncIterator_some () { - if (hasRequiredEsnext_asyncIterator_some) return esnext_asyncIterator_some; - hasRequiredEsnext_asyncIterator_some = 1; - var $ = require_export(); - var $some = requireAsyncIteratorIteration().some; - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - some: function some(predicate) { - return $some(this, predicate); - } - }); - return esnext_asyncIterator_some; -} - -var esnext_asyncIterator_take = {}; - -var hasRequiredEsnext_asyncIterator_take; - -function requireEsnext_asyncIterator_take () { - if (hasRequiredEsnext_asyncIterator_take) return esnext_asyncIterator_take; - hasRequiredEsnext_asyncIterator_take = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var getMethod = requireGetMethod(); - var notANaN = requireNotANan(); - var toPositiveInteger = requireToPositiveInteger(); - var createAsyncIteratorProxy = requireAsyncIteratorCreateProxy(); - var createIterResultObject = requireCreateIterResultObject(); - var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { - var state = this; - var iterator = state.iterator; - var returnMethod; - if (!state.remaining--) { - var resultDone = createIterResultObject(undefined, true); - state.done = true; - returnMethod = getMethod(iterator, 'return'); - if (returnMethod !== undefined) { - return Promise.resolve(call(returnMethod, iterator)).then(function (result) { - anObject(result); - return resultDone; - }); - } - return resultDone; - } return Promise.resolve(call(state.next, iterator)).then(function (step) { - if (anObject(step).done) { - state.done = true; - return createIterResultObject(undefined, true); - } return createIterResultObject(step.value, false); - }).then(null, function (error) { - state.done = true; - throw error; - }); - }); - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - take: function take(limit) { - anObject(this); - var remaining = toPositiveInteger(notANaN(+limit)); - return new AsyncIteratorProxy(getIteratorDirect(this), { - remaining: remaining - }); - } - }); - return esnext_asyncIterator_take; -} - -var esnext_asyncIterator_toArray = {}; - -var hasRequiredEsnext_asyncIterator_toArray; - -function requireEsnext_asyncIterator_toArray () { - if (hasRequiredEsnext_asyncIterator_toArray) return esnext_asyncIterator_toArray; - hasRequiredEsnext_asyncIterator_toArray = 1; - var $ = require_export(); - var $toArray = requireAsyncIteratorIteration().toArray; - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - toArray: function toArray() { - return $toArray(this, undefined, []); - } - }); - return esnext_asyncIterator_toArray; -} - -var esnext_iterator_constructor = {}; - -var es_iterator_constructor = {}; - -var defineBuiltInAccessor; -var hasRequiredDefineBuiltInAccessor; - -function requireDefineBuiltInAccessor () { - if (hasRequiredDefineBuiltInAccessor) return defineBuiltInAccessor; - hasRequiredDefineBuiltInAccessor = 1; - var makeBuiltIn = requireMakeBuiltIn(); - var defineProperty = requireObjectDefineProperty(); - defineBuiltInAccessor = function (target, name, descriptor) { - if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true }); - if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true }); - return defineProperty.f(target, name, descriptor); - }; - return defineBuiltInAccessor; -} - -var iteratorsCore; -var hasRequiredIteratorsCore; - -function requireIteratorsCore () { - if (hasRequiredIteratorsCore) return iteratorsCore; - hasRequiredIteratorsCore = 1; - var fails = requireFails(); - var isCallable = requireIsCallable(); - var isObject = requireIsObject(); - var create = requireObjectCreate(); - var getPrototypeOf = requireObjectGetPrototypeOf(); - var defineBuiltIn = requireDefineBuiltIn(); - var wellKnownSymbol = requireWellKnownSymbol(); - var IS_PURE = requireIsPure(); - var ITERATOR = wellKnownSymbol('iterator'); - var BUGGY_SAFARI_ITERATORS = false; - var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; - if ([].keys) { - arrayIterator = [].keys(); - if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; - else { - PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); - if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; - } - } - var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () { - var test = {}; - return IteratorPrototype[ITERATOR].call(test) !== test; - }); - if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; - else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); - if (!isCallable(IteratorPrototype[ITERATOR])) { - defineBuiltIn(IteratorPrototype, ITERATOR, function () { - return this; - }); - } - iteratorsCore = { - IteratorPrototype: IteratorPrototype, - BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS - }; - return iteratorsCore; -} - -var hasRequiredEs_iterator_constructor; - -function requireEs_iterator_constructor () { - if (hasRequiredEs_iterator_constructor) return es_iterator_constructor; - hasRequiredEs_iterator_constructor = 1; - var $ = require_export(); - var globalThis = requireGlobalThis(); - var anInstance = requireAnInstance(); - var anObject = requireAnObject(); - var isCallable = requireIsCallable(); - var getPrototypeOf = requireObjectGetPrototypeOf(); - var defineBuiltInAccessor = requireDefineBuiltInAccessor(); - var createProperty = requireCreateProperty(); - var fails = requireFails(); - var hasOwn = requireHasOwnProperty(); - var wellKnownSymbol = requireWellKnownSymbol(); - var IteratorPrototype = requireIteratorsCore().IteratorPrototype; - var DESCRIPTORS = requireDescriptors(); - var IS_PURE = requireIsPure(); - var CONSTRUCTOR = 'constructor'; - var ITERATOR = 'Iterator'; - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var $TypeError = TypeError; - var NativeIterator = globalThis[ITERATOR]; - var FORCED = IS_PURE - || !isCallable(NativeIterator) - || NativeIterator.prototype !== IteratorPrototype - || !fails(function () { NativeIterator({}); }); - var IteratorConstructor = function Iterator() { - anInstance(this, IteratorPrototype); - if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError('Abstract class Iterator not directly constructable'); - }; - var defineIteratorPrototypeAccessor = function (key, value) { - if (DESCRIPTORS) { - defineBuiltInAccessor(IteratorPrototype, key, { - configurable: true, - get: function () { - return value; - }, - set: function (replacement) { - anObject(this); - if (this === IteratorPrototype) throw new $TypeError("You can't redefine this property"); - if (hasOwn(this, key)) this[key] = replacement; - else createProperty(this, key, replacement); - } - }); - } else IteratorPrototype[key] = value; - }; - if (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR); - if (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) { - defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor); - } - IteratorConstructor.prototype = IteratorPrototype; - $({ global: true, constructor: true, forced: FORCED }, { - Iterator: IteratorConstructor - }); - return es_iterator_constructor; -} - -var hasRequiredEsnext_iterator_constructor; - -function requireEsnext_iterator_constructor () { - if (hasRequiredEsnext_iterator_constructor) return esnext_iterator_constructor; - hasRequiredEsnext_iterator_constructor = 1; - requireEs_iterator_constructor(); - return esnext_iterator_constructor; -} - -var esnext_iterator_drop = {}; - -var es_iterator_drop = {}; - -var iteratorCloseAll; -var hasRequiredIteratorCloseAll; - -function requireIteratorCloseAll () { - if (hasRequiredIteratorCloseAll) return iteratorCloseAll; - hasRequiredIteratorCloseAll = 1; - var iteratorClose = requireIteratorClose(); - iteratorCloseAll = function (iters, kind, value) { - for (var i = iters.length - 1; i >= 0; i--) { - if (iters[i] === undefined) continue; - try { - value = iteratorClose(iters[i].iterator, kind, value); - } catch (error) { - kind = 'throw'; - value = error; - } - } - if (kind === 'throw') throw value; - return value; - }; - return iteratorCloseAll; -} - -var iteratorCreateProxy; -var hasRequiredIteratorCreateProxy; - -function requireIteratorCreateProxy () { - if (hasRequiredIteratorCreateProxy) return iteratorCreateProxy; - hasRequiredIteratorCreateProxy = 1; - var call = requireFunctionCall(); - var create = requireObjectCreate(); - var createNonEnumerableProperty = requireCreateNonEnumerableProperty(); - var defineBuiltIns = requireDefineBuiltIns(); - var wellKnownSymbol = requireWellKnownSymbol(); - var InternalStateModule = requireInternalState(); - var getMethod = requireGetMethod(); - var IteratorPrototype = requireIteratorsCore().IteratorPrototype; - var createIterResultObject = requireCreateIterResultObject(); - var iteratorClose = requireIteratorClose(); - var iteratorCloseAll = requireIteratorCloseAll(); - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var ITERATOR_HELPER = 'IteratorHelper'; - var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator'; - var NORMAL = 'normal'; - var THROW = 'throw'; - var setInternalState = InternalStateModule.set; - var createIteratorProxyPrototype = function (IS_ITERATOR) { - var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER); - return defineBuiltIns(create(IteratorPrototype), { - next: function next() { - var state = getInternalState(this); - if (IS_ITERATOR) return state.nextHandler(); - if (state.done) return createIterResultObject(undefined, true); - try { - var result = state.nextHandler(); - return state.returnHandlerResult ? result : createIterResultObject(result, state.done); - } catch (error) { - state.done = true; - throw error; - } - }, - 'return': function () { - var state = getInternalState(this); - var iterator = state.iterator; - var done = state.done; - state.done = true; - if (IS_ITERATOR) { - var returnMethod = getMethod(iterator, 'return'); - return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true); - } - if (done) return createIterResultObject(undefined, true); - if (state.inner) try { - iteratorClose(state.inner.iterator, NORMAL); - } catch (error) { - return iteratorClose(iterator, THROW, error); - } - if (state.openIters) try { - iteratorCloseAll(state.openIters, NORMAL); - } catch (error) { - if (iterator) return iteratorClose(iterator, THROW, error); - throw error; - } - if (iterator) iteratorClose(iterator, NORMAL); - return createIterResultObject(undefined, true); - } - }); - }; - var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true); - var IteratorHelperPrototype = createIteratorProxyPrototype(false); - createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper'); - iteratorCreateProxy = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) { - var IteratorProxy = function Iterator(record, state) { - if (state) { - state.iterator = record.iterator; - state.next = record.next; - } else state = record; - state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER; - state.returnHandlerResult = !!RETURN_HANDLER_RESULT; - state.nextHandler = nextHandler; - state.counter = 0; - state.done = false; - setInternalState(this, state); - }; - IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype; - return IteratorProxy; - }; - return iteratorCreateProxy; -} - -var iteratorHelperThrowsOnInvalidIterator; -var hasRequiredIteratorHelperThrowsOnInvalidIterator; - -function requireIteratorHelperThrowsOnInvalidIterator () { - if (hasRequiredIteratorHelperThrowsOnInvalidIterator) return iteratorHelperThrowsOnInvalidIterator; - hasRequiredIteratorHelperThrowsOnInvalidIterator = 1; - iteratorHelperThrowsOnInvalidIterator = function (methodName, argument) { - var method = typeof Iterator == 'function' && Iterator.prototype[methodName]; - if (method) try { - method.call({ next: null }, argument).next(); - } catch (error) { - return true; - } - }; - return iteratorHelperThrowsOnInvalidIterator; -} - -var iteratorHelperWithoutClosingOnEarlyError; -var hasRequiredIteratorHelperWithoutClosingOnEarlyError; - -function requireIteratorHelperWithoutClosingOnEarlyError () { - if (hasRequiredIteratorHelperWithoutClosingOnEarlyError) return iteratorHelperWithoutClosingOnEarlyError; - hasRequiredIteratorHelperWithoutClosingOnEarlyError = 1; - var globalThis = requireGlobalThis(); - iteratorHelperWithoutClosingOnEarlyError = function (METHOD_NAME, ExpectedError) { - var Iterator = globalThis.Iterator; - var IteratorPrototype = Iterator && Iterator.prototype; - var method = IteratorPrototype && IteratorPrototype[METHOD_NAME]; - var CLOSED = false; - if (method) try { - method.call({ - next: function () { return { done: true }; }, - 'return': function () { CLOSED = true; } - }, -1); - } catch (error) { - if (!(error instanceof ExpectedError)) CLOSED = false; - } - if (!CLOSED) return method; - }; - return iteratorHelperWithoutClosingOnEarlyError; -} - -var hasRequiredEs_iterator_drop; - -function requireEs_iterator_drop () { - if (hasRequiredEs_iterator_drop) return es_iterator_drop; - hasRequiredEs_iterator_drop = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var notANaN = requireNotANan(); - var toPositiveInteger = requireToPositiveInteger(); - var iteratorClose = requireIteratorClose(); - var createIteratorProxy = requireIteratorCreateProxy(); - var iteratorHelperThrowsOnInvalidIterator = requireIteratorHelperThrowsOnInvalidIterator(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var IS_PURE = requireIsPure(); - var DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('drop', 0); - var dropWithoutClosingOnEarlyError = !IS_PURE && !DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR - && iteratorHelperWithoutClosingOnEarlyError('drop', RangeError); - var FORCED = IS_PURE || DROP_WITHOUT_THROWING_ON_INVALID_ITERATOR || dropWithoutClosingOnEarlyError; - var IteratorProxy = createIteratorProxy(function () { - var iterator = this.iterator; - var next = this.next; - var result, done; - while (this.remaining) { - this.remaining--; - result = anObject(call(next, iterator)); - done = this.done = !!result.done; - if (done) return; - } - result = anObject(call(next, iterator)); - done = this.done = !!result.done; - if (!done) return result.value; - }); - $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, { - drop: function drop(limit) { - anObject(this); - var remaining; - try { - remaining = toPositiveInteger(notANaN(+limit)); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (dropWithoutClosingOnEarlyError) return call(dropWithoutClosingOnEarlyError, this, remaining); - return new IteratorProxy(getIteratorDirect(this), { - remaining: remaining - }); - } - }); - return es_iterator_drop; -} - -var hasRequiredEsnext_iterator_drop; - -function requireEsnext_iterator_drop () { - if (hasRequiredEsnext_iterator_drop) return esnext_iterator_drop; - hasRequiredEsnext_iterator_drop = 1; - requireEs_iterator_drop(); - return esnext_iterator_drop; -} - -var esnext_iterator_every = {}; - -var es_iterator_every = {}; - -var functionUncurryThisClause; -var hasRequiredFunctionUncurryThisClause; - -function requireFunctionUncurryThisClause () { - if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause; - hasRequiredFunctionUncurryThisClause = 1; - var classofRaw = requireClassofRaw(); - var uncurryThis = requireFunctionUncurryThis(); - functionUncurryThisClause = function (fn) { - if (classofRaw(fn) === 'Function') return uncurryThis(fn); - }; - return functionUncurryThisClause; -} - -var functionBindContext; -var hasRequiredFunctionBindContext; - -function requireFunctionBindContext () { - if (hasRequiredFunctionBindContext) return functionBindContext; - hasRequiredFunctionBindContext = 1; - var uncurryThis = requireFunctionUncurryThisClause(); - var aCallable = requireACallable(); - var NATIVE_BIND = requireFunctionBindNative(); - var bind = uncurryThis(uncurryThis.bind); - functionBindContext = function (fn, that) { - aCallable(fn); - return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function () { - return fn.apply(that, arguments); - }; - }; - return functionBindContext; -} - -var isArrayIteratorMethod; -var hasRequiredIsArrayIteratorMethod; - -function requireIsArrayIteratorMethod () { - if (hasRequiredIsArrayIteratorMethod) return isArrayIteratorMethod; - hasRequiredIsArrayIteratorMethod = 1; - var wellKnownSymbol = requireWellKnownSymbol(); - var Iterators = requireIterators(); - var ITERATOR = wellKnownSymbol('iterator'); - var ArrayPrototype = Array.prototype; - isArrayIteratorMethod = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); - }; - return isArrayIteratorMethod; -} - -var getIterator; -var hasRequiredGetIterator; - -function requireGetIterator () { - if (hasRequiredGetIterator) return getIterator; - hasRequiredGetIterator = 1; - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var tryToString = requireTryToString(); - var getIteratorMethod = requireGetIteratorMethod(); - var $TypeError = TypeError; - getIterator = function (argument, usingIterator) { - var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; - if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); - throw new $TypeError(tryToString(argument) + ' is not iterable'); - }; - return getIterator; -} - -var iterate; -var hasRequiredIterate; - -function requireIterate () { - if (hasRequiredIterate) return iterate; - hasRequiredIterate = 1; - var bind = requireFunctionBindContext(); - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var tryToString = requireTryToString(); - var isArrayIteratorMethod = requireIsArrayIteratorMethod(); - var lengthOfArrayLike = requireLengthOfArrayLike(); - var isPrototypeOf = requireObjectIsPrototypeOf(); - var getIterator = requireGetIterator(); - var getIteratorMethod = requireGetIteratorMethod(); - var iteratorClose = requireIteratorClose(); - var $TypeError = TypeError; - var Result = function (stopped, result) { - this.stopped = stopped; - this.result = result; - }; - var ResultPrototype = Result.prototype; - iterate = function (iterable, unboundFunction, options) { - var that = options && options.that; - var AS_ENTRIES = !!(options && options.AS_ENTRIES); - var IS_RECORD = !!(options && options.IS_RECORD); - var IS_ITERATOR = !!(options && options.IS_ITERATOR); - var INTERRUPTED = !!(options && options.INTERRUPTED); - var fn = bind(unboundFunction, that); - var iterator, iterFn, index, length, result, next, step; - var stop = function (condition) { - var $iterator = iterator; - iterator = undefined; - if ($iterator) iteratorClose($iterator, 'normal'); - return new Result(true, condition); - }; - var callFn = function (value) { - if (AS_ENTRIES) { - anObject(value); - return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); - } return INTERRUPTED ? fn(value, stop) : fn(value); - }; - if (IS_RECORD) { - iterator = iterable.iterator; - } else if (IS_ITERATOR) { - iterator = iterable; - } else { - iterFn = getIteratorMethod(iterable); - if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable'); - if (isArrayIteratorMethod(iterFn)) { - for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { - result = callFn(iterable[index]); - if (result && isPrototypeOf(ResultPrototype, result)) return result; - } return new Result(false); - } - iterator = getIterator(iterable, iterFn); - } - next = IS_RECORD ? iterable.next : iterator.next; - while (!(step = call(next, iterator)).done) { - var value = step.value; - try { - result = callFn(value); - } catch (error) { - if (iterator) iteratorClose(iterator, 'throw', error); - else throw error; - } - if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; - } return new Result(false); - }; - return iterate; -} - -var hasRequiredEs_iterator_every; - -function requireEs_iterator_every () { - if (hasRequiredEs_iterator_every) return es_iterator_every; - hasRequiredEs_iterator_every = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var iterate = requireIterate(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var everyWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('every', TypeError); - $({ target: 'Iterator', proto: true, real: true, forced: everyWithoutClosingOnEarlyError }, { - every: function every(predicate) { - anObject(this); - try { - aCallable(predicate); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (everyWithoutClosingOnEarlyError) return call(everyWithoutClosingOnEarlyError, this, predicate); - var record = getIteratorDirect(this); - var counter = 0; - return !iterate(record, function (value, stop) { - if (!predicate(value, counter++)) return stop(); - }, { IS_RECORD: true, INTERRUPTED: true }).stopped; - } - }); - return es_iterator_every; -} - -var hasRequiredEsnext_iterator_every; - -function requireEsnext_iterator_every () { - if (hasRequiredEsnext_iterator_every) return esnext_iterator_every; - hasRequiredEsnext_iterator_every = 1; - requireEs_iterator_every(); - return esnext_iterator_every; -} - -var esnext_iterator_filter = {}; - -var es_iterator_filter = {}; - -var callWithSafeIterationClosing; -var hasRequiredCallWithSafeIterationClosing; - -function requireCallWithSafeIterationClosing () { - if (hasRequiredCallWithSafeIterationClosing) return callWithSafeIterationClosing; - hasRequiredCallWithSafeIterationClosing = 1; - var anObject = requireAnObject(); - var iteratorClose = requireIteratorClose(); - callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) { - try { - return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); - } catch (error) { - iteratorClose(iterator, 'throw', error); - } - }; - return callWithSafeIterationClosing; -} - -var hasRequiredEs_iterator_filter; - -function requireEs_iterator_filter () { - if (hasRequiredEs_iterator_filter) return es_iterator_filter; - hasRequiredEs_iterator_filter = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var createIteratorProxy = requireIteratorCreateProxy(); - var callWithSafeIterationClosing = requireCallWithSafeIterationClosing(); - var IS_PURE = requireIsPure(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperThrowsOnInvalidIterator = requireIteratorHelperThrowsOnInvalidIterator(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('filter', function () { }); - var filterWithoutClosingOnEarlyError = !IS_PURE && !FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR - && iteratorHelperWithoutClosingOnEarlyError('filter', TypeError); - var FORCED = IS_PURE || FILTER_WITHOUT_THROWING_ON_INVALID_ITERATOR || filterWithoutClosingOnEarlyError; - var IteratorProxy = createIteratorProxy(function () { - var iterator = this.iterator; - var predicate = this.predicate; - var next = this.next; - var result, done, value; - while (true) { - result = anObject(call(next, iterator)); - done = this.done = !!result.done; - if (done) return; - value = result.value; - if (callWithSafeIterationClosing(iterator, predicate, [value, this.counter++], true)) return value; - } - }); - $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, { - filter: function filter(predicate) { - anObject(this); - try { - aCallable(predicate); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate); - return new IteratorProxy(getIteratorDirect(this), { - predicate: predicate - }); - } - }); - return es_iterator_filter; -} - -var hasRequiredEsnext_iterator_filter; - -function requireEsnext_iterator_filter () { - if (hasRequiredEsnext_iterator_filter) return esnext_iterator_filter; - hasRequiredEsnext_iterator_filter = 1; - requireEs_iterator_filter(); - return esnext_iterator_filter; -} - -var esnext_iterator_find = {}; - -var es_iterator_find = {}; - -var hasRequiredEs_iterator_find; - -function requireEs_iterator_find () { - if (hasRequiredEs_iterator_find) return es_iterator_find; - hasRequiredEs_iterator_find = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var iterate = requireIterate(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var findWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('find', TypeError); - $({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnEarlyError }, { - find: function find(predicate) { - anObject(this); - try { - aCallable(predicate); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (findWithoutClosingOnEarlyError) return call(findWithoutClosingOnEarlyError, this, predicate); - var record = getIteratorDirect(this); - var counter = 0; - return iterate(record, function (value, stop) { - if (predicate(value, counter++)) return stop(value); - }, { IS_RECORD: true, INTERRUPTED: true }).result; - } - }); - return es_iterator_find; -} - -var hasRequiredEsnext_iterator_find; - -function requireEsnext_iterator_find () { - if (hasRequiredEsnext_iterator_find) return esnext_iterator_find; - hasRequiredEsnext_iterator_find = 1; - requireEs_iterator_find(); - return esnext_iterator_find; -} - -var esnext_iterator_flatMap = {}; - -var es_iterator_flatMap = {}; - -var getIteratorFlattenable; -var hasRequiredGetIteratorFlattenable; - -function requireGetIteratorFlattenable () { - if (hasRequiredGetIteratorFlattenable) return getIteratorFlattenable; - hasRequiredGetIteratorFlattenable = 1; - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var getIteratorMethod = requireGetIteratorMethod(); - getIteratorFlattenable = function (obj, stringHandling) { - if (!stringHandling || typeof obj !== 'string') anObject(obj); - var method = getIteratorMethod(obj); - return getIteratorDirect(anObject(method !== undefined ? call(method, obj) : obj)); - }; - return getIteratorFlattenable; -} - -var hasRequiredEs_iterator_flatMap; - -function requireEs_iterator_flatMap () { - if (hasRequiredEs_iterator_flatMap) return es_iterator_flatMap; - hasRequiredEs_iterator_flatMap = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var getIteratorFlattenable = requireGetIteratorFlattenable(); - var createIteratorProxy = requireIteratorCreateProxy(); - var iteratorClose = requireIteratorClose(); - var IS_PURE = requireIsPure(); - var iteratorHelperThrowsOnInvalidIterator = requireIteratorHelperThrowsOnInvalidIterator(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - function throwsOnIteratorWithoutReturn() { - try { - var it = Iterator.prototype.flatMap.call(new Map([[4, 5]]).entries(), function (v) { return v; }); - it.next(); - it['return'](); - } catch (error) { - return true; - } - } - var FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE - && !iteratorHelperThrowsOnInvalidIterator('flatMap', function () { }); - var flatMapWithoutClosingOnEarlyError = !IS_PURE && !FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR - && iteratorHelperWithoutClosingOnEarlyError('flatMap', TypeError); - var FORCED = IS_PURE || FLAT_MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || flatMapWithoutClosingOnEarlyError - || throwsOnIteratorWithoutReturn(); - var IteratorProxy = createIteratorProxy(function () { - var iterator = this.iterator; - var mapper = this.mapper; - var result, inner; - while (true) { - if (inner = this.inner) try { - result = anObject(call(inner.next, inner.iterator)); - if (!result.done) return result.value; - this.inner = null; - } catch (error) { iteratorClose(iterator, 'throw', error); } - result = anObject(call(this.next, iterator)); - if (this.done = !!result.done) return; - try { - this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false); - } catch (error) { iteratorClose(iterator, 'throw', error); } - } - }); - $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, { - flatMap: function flatMap(mapper) { - anObject(this); - try { - aCallable(mapper); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper); - return new IteratorProxy(getIteratorDirect(this), { - mapper: mapper, - inner: null - }); - } - }); - return es_iterator_flatMap; -} - -var hasRequiredEsnext_iterator_flatMap; - -function requireEsnext_iterator_flatMap () { - if (hasRequiredEsnext_iterator_flatMap) return esnext_iterator_flatMap; - hasRequiredEsnext_iterator_flatMap = 1; - requireEs_iterator_flatMap(); - return esnext_iterator_flatMap; -} - -var esnext_iterator_forEach = {}; - -var es_iterator_forEach = {}; - -var hasRequiredEs_iterator_forEach; - -function requireEs_iterator_forEach () { - if (hasRequiredEs_iterator_forEach) return es_iterator_forEach; - hasRequiredEs_iterator_forEach = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var iterate = requireIterate(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('forEach', TypeError); - $({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, { - forEach: function forEach(fn) { - anObject(this); - try { - aCallable(fn); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (forEachWithoutClosingOnEarlyError) return call(forEachWithoutClosingOnEarlyError, this, fn); - var record = getIteratorDirect(this); - var counter = 0; - iterate(record, function (value) { - fn(value, counter++); - }, { IS_RECORD: true }); - } - }); - return es_iterator_forEach; -} - -var hasRequiredEsnext_iterator_forEach; - -function requireEsnext_iterator_forEach () { - if (hasRequiredEsnext_iterator_forEach) return esnext_iterator_forEach; - hasRequiredEsnext_iterator_forEach = 1; - requireEs_iterator_forEach(); - return esnext_iterator_forEach; -} - -var esnext_iterator_from = {}; - -var es_iterator_from = {}; - -var hasRequiredEs_iterator_from; - -function requireEs_iterator_from () { - if (hasRequiredEs_iterator_from) return es_iterator_from; - hasRequiredEs_iterator_from = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var toObject = requireToObject(); - var isPrototypeOf = requireObjectIsPrototypeOf(); - var IteratorPrototype = requireIteratorsCore().IteratorPrototype; - var createIteratorProxy = requireIteratorCreateProxy(); - var getIteratorFlattenable = requireGetIteratorFlattenable(); - var IS_PURE = requireIsPure(); - var FORCED = IS_PURE || function () { - try { - Iterator.from({ 'return': null })['return'](); - } catch (error) { - return true; - } - }(); - var IteratorProxy = createIteratorProxy(function () { - return call(this.next, this.iterator); - }, true); - $({ target: 'Iterator', stat: true, forced: FORCED }, { - from: function from(O) { - var iteratorRecord = getIteratorFlattenable(typeof O == 'string' ? toObject(O) : O, true); - return isPrototypeOf(IteratorPrototype, iteratorRecord.iterator) - ? iteratorRecord.iterator - : new IteratorProxy(iteratorRecord); - } - }); - return es_iterator_from; -} - -var hasRequiredEsnext_iterator_from; - -function requireEsnext_iterator_from () { - if (hasRequiredEsnext_iterator_from) return esnext_iterator_from; - hasRequiredEsnext_iterator_from = 1; - requireEs_iterator_from(); - return esnext_iterator_from; -} - -var esnext_iterator_map = {}; - -var es_iterator_map = {}; - -var hasRequiredEs_iterator_map; - -function requireEs_iterator_map () { - if (hasRequiredEs_iterator_map) return es_iterator_map; - hasRequiredEs_iterator_map = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var createIteratorProxy = requireIteratorCreateProxy(); - var callWithSafeIterationClosing = requireCallWithSafeIterationClosing(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperThrowsOnInvalidIterator = requireIteratorHelperThrowsOnInvalidIterator(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var IS_PURE = requireIsPure(); - var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { }); - var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR - && iteratorHelperWithoutClosingOnEarlyError('map', TypeError); - var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError; - var IteratorProxy = createIteratorProxy(function () { - var iterator = this.iterator; - var result = anObject(call(this.next, iterator)); - var done = this.done = !!result.done; - if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true); - }); - $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, { - map: function map(mapper) { - anObject(this); - try { - aCallable(mapper); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper); - return new IteratorProxy(getIteratorDirect(this), { - mapper: mapper - }); - } - }); - return es_iterator_map; -} - -var hasRequiredEsnext_iterator_map; - -function requireEsnext_iterator_map () { - if (hasRequiredEsnext_iterator_map) return esnext_iterator_map; - hasRequiredEsnext_iterator_map = 1; - requireEs_iterator_map(); - return esnext_iterator_map; -} - -var esnext_iterator_reduce = {}; - -var es_iterator_reduce = {}; - -var functionApply; -var hasRequiredFunctionApply; - -function requireFunctionApply () { - if (hasRequiredFunctionApply) return functionApply; - hasRequiredFunctionApply = 1; - var NATIVE_BIND = requireFunctionBindNative(); - var FunctionPrototype = Function.prototype; - var apply = FunctionPrototype.apply; - var call = FunctionPrototype.call; - functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () { - return call.apply(apply, arguments); - }); - return functionApply; -} - -var hasRequiredEs_iterator_reduce; - -function requireEs_iterator_reduce () { - if (hasRequiredEs_iterator_reduce) return es_iterator_reduce; - hasRequiredEs_iterator_reduce = 1; - var $ = require_export(); - var iterate = requireIterate(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var apply = requireFunctionApply(); - var fails = requireFails(); - var $TypeError = TypeError; - var FAILS_ON_INITIAL_UNDEFINED = fails(function () { - [].keys().reduce(function () { }, undefined); - }); - var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError); - $({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, { - reduce: function reduce(reducer ) { - anObject(this); - try { - aCallable(reducer); - } catch (error) { - iteratorClose(this, 'throw', error); - } - var noInitial = arguments.length < 2; - var accumulator = noInitial ? undefined : arguments[1]; - if (reduceWithoutClosingOnEarlyError) { - return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]); - } - var record = getIteratorDirect(this); - var counter = 0; - iterate(record, function (value) { - if (noInitial) { - noInitial = false; - accumulator = value; - } else { - accumulator = reducer(accumulator, value, counter); - } - counter++; - }, { IS_RECORD: true }); - if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value'); - return accumulator; - } - }); - return es_iterator_reduce; -} - -var hasRequiredEsnext_iterator_reduce; - -function requireEsnext_iterator_reduce () { - if (hasRequiredEsnext_iterator_reduce) return esnext_iterator_reduce; - hasRequiredEsnext_iterator_reduce = 1; - requireEs_iterator_reduce(); - return esnext_iterator_reduce; -} - -var esnext_iterator_some = {}; - -var es_iterator_some = {}; - -var hasRequiredEs_iterator_some; - -function requireEs_iterator_some () { - if (hasRequiredEs_iterator_some) return es_iterator_some; - hasRequiredEs_iterator_some = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var iterate = requireIterate(); - var aCallable = requireACallable(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('some', TypeError); - $({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, { - some: function some(predicate) { - anObject(this); - try { - aCallable(predicate); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate); - var record = getIteratorDirect(this); - var counter = 0; - return iterate(record, function (value, stop) { - if (predicate(value, counter++)) return stop(); - }, { IS_RECORD: true, INTERRUPTED: true }).stopped; - } - }); - return es_iterator_some; -} - -var hasRequiredEsnext_iterator_some; - -function requireEsnext_iterator_some () { - if (hasRequiredEsnext_iterator_some) return esnext_iterator_some; - hasRequiredEsnext_iterator_some = 1; - requireEs_iterator_some(); - return esnext_iterator_some; -} - -var esnext_iterator_take = {}; - -var es_iterator_take = {}; - -var hasRequiredEs_iterator_take; - -function requireEs_iterator_take () { - if (hasRequiredEs_iterator_take) return es_iterator_take; - hasRequiredEs_iterator_take = 1; - var $ = require_export(); - var call = requireFunctionCall(); - var anObject = requireAnObject(); - var getIteratorDirect = requireGetIteratorDirect(); - var notANaN = requireNotANan(); - var toPositiveInteger = requireToPositiveInteger(); - var createIteratorProxy = requireIteratorCreateProxy(); - var iteratorClose = requireIteratorClose(); - var iteratorHelperThrowsOnInvalidIterator = requireIteratorHelperThrowsOnInvalidIterator(); - var iteratorHelperWithoutClosingOnEarlyError = requireIteratorHelperWithoutClosingOnEarlyError(); - var IS_PURE = requireIsPure(); - var TAKE_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('take', 1); - var takeWithoutClosingOnEarlyError = !IS_PURE && !TAKE_WITHOUT_THROWING_ON_INVALID_ITERATOR - && iteratorHelperWithoutClosingOnEarlyError('take', RangeError); - var FORCED = IS_PURE || TAKE_WITHOUT_THROWING_ON_INVALID_ITERATOR || takeWithoutClosingOnEarlyError; - var IteratorProxy = createIteratorProxy(function () { - var iterator = this.iterator; - if (!this.remaining--) { - this.done = true; - return iteratorClose(iterator, 'normal', undefined); - } - var result = anObject(call(this.next, iterator)); - var done = this.done = !!result.done; - if (!done) return result.value; - }); - $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, { - take: function take(limit) { - anObject(this); - var remaining; - try { - remaining = toPositiveInteger(notANaN(+limit)); - } catch (error) { - iteratorClose(this, 'throw', error); - } - if (takeWithoutClosingOnEarlyError) return call(takeWithoutClosingOnEarlyError, this, remaining); - return new IteratorProxy(getIteratorDirect(this), { - remaining: remaining - }); - } - }); - return es_iterator_take; -} - -var hasRequiredEsnext_iterator_take; - -function requireEsnext_iterator_take () { - if (hasRequiredEsnext_iterator_take) return esnext_iterator_take; - hasRequiredEsnext_iterator_take = 1; - requireEs_iterator_take(); - return esnext_iterator_take; -} - -var esnext_iterator_toArray = {}; - -var es_iterator_toArray = {}; - -var hasRequiredEs_iterator_toArray; - -function requireEs_iterator_toArray () { - if (hasRequiredEs_iterator_toArray) return es_iterator_toArray; - hasRequiredEs_iterator_toArray = 1; - var $ = require_export(); - var anObject = requireAnObject(); - var createProperty = requireCreateProperty(); - var iterate = requireIterate(); - var getIteratorDirect = requireGetIteratorDirect(); - $({ target: 'Iterator', proto: true, real: true }, { - toArray: function toArray() { - var result = []; - var index = 0; - iterate(getIteratorDirect(anObject(this)), function (element) { - createProperty(result, index++, element); - }, { IS_RECORD: true }); - return result; - } - }); - return es_iterator_toArray; -} - -var hasRequiredEsnext_iterator_toArray; - -function requireEsnext_iterator_toArray () { - if (hasRequiredEsnext_iterator_toArray) return esnext_iterator_toArray; - hasRequiredEsnext_iterator_toArray = 1; - requireEs_iterator_toArray(); - return esnext_iterator_toArray; -} - -var esnext_iterator_toAsync = {}; - -var hasRequiredEsnext_iterator_toAsync; - -function requireEsnext_iterator_toAsync () { - if (hasRequiredEsnext_iterator_toAsync) return esnext_iterator_toAsync; - hasRequiredEsnext_iterator_toAsync = 1; - var $ = require_export(); - var anObject = requireAnObject(); - var AsyncFromSyncIterator = requireAsyncFromSyncIterator(); - var WrapAsyncIterator = requireAsyncIteratorWrap(); - var getIteratorDirect = requireGetIteratorDirect(); - $({ target: 'Iterator', proto: true, real: true, forced: true }, { - toAsync: function toAsync() { - return new WrapAsyncIterator(getIteratorDirect(new AsyncFromSyncIterator(getIteratorDirect(anObject(this))))); - } - }); - return esnext_iterator_toAsync; -} - -var hasRequiredIteratorHelpersStage3; - -function requireIteratorHelpersStage3 () { - if (hasRequiredIteratorHelpersStage3) return iteratorHelpersStage3; - hasRequiredIteratorHelpersStage3 = 1; - requireEsnext_asyncIterator_constructor(); - requireEsnext_asyncIterator_drop(); - requireEsnext_asyncIterator_every(); - requireEsnext_asyncIterator_filter(); - requireEsnext_asyncIterator_find(); - requireEsnext_asyncIterator_flatMap(); - requireEsnext_asyncIterator_forEach(); - requireEsnext_asyncIterator_from(); - requireEsnext_asyncIterator_map(); - requireEsnext_asyncIterator_reduce(); - requireEsnext_asyncIterator_some(); - requireEsnext_asyncIterator_take(); - requireEsnext_asyncIterator_toArray(); - requireEsnext_iterator_constructor(); - requireEsnext_iterator_drop(); - requireEsnext_iterator_every(); - requireEsnext_iterator_filter(); - requireEsnext_iterator_find(); - requireEsnext_iterator_flatMap(); - requireEsnext_iterator_forEach(); - requireEsnext_iterator_from(); - requireEsnext_iterator_map(); - requireEsnext_iterator_reduce(); - requireEsnext_iterator_some(); - requireEsnext_iterator_take(); - requireEsnext_iterator_toArray(); - requireEsnext_iterator_toAsync(); - return iteratorHelpersStage3; -} - -var esnext_asyncIterator_asIndexedPairs = {}; - -var asyncIteratorIndexed; -var hasRequiredAsyncIteratorIndexed; - -function requireAsyncIteratorIndexed () { - if (hasRequiredAsyncIteratorIndexed) return asyncIteratorIndexed; - hasRequiredAsyncIteratorIndexed = 1; - var call = requireFunctionCall(); - var map = requireAsyncIteratorMap(); - var callback = function (value, counter) { - return [counter, value]; - }; - asyncIteratorIndexed = function indexed() { - return call(map, this, callback); - }; - return asyncIteratorIndexed; -} - -var hasRequiredEsnext_asyncIterator_asIndexedPairs; - -function requireEsnext_asyncIterator_asIndexedPairs () { - if (hasRequiredEsnext_asyncIterator_asIndexedPairs) return esnext_asyncIterator_asIndexedPairs; - hasRequiredEsnext_asyncIterator_asIndexedPairs = 1; - var $ = require_export(); - var indexed = requireAsyncIteratorIndexed(); - $({ target: 'AsyncIterator', name: 'indexed', proto: true, real: true, forced: true }, { - asIndexedPairs: indexed - }); - return esnext_asyncIterator_asIndexedPairs; -} - -var esnext_asyncIterator_indexed = {}; - -var hasRequiredEsnext_asyncIterator_indexed; - -function requireEsnext_asyncIterator_indexed () { - if (hasRequiredEsnext_asyncIterator_indexed) return esnext_asyncIterator_indexed; - hasRequiredEsnext_asyncIterator_indexed = 1; - var $ = require_export(); - var indexed = requireAsyncIteratorIndexed(); - $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { - indexed: indexed - }); - return esnext_asyncIterator_indexed; -} - -var esnext_iterator_asIndexedPairs = {}; - -var iteratorIndexed; -var hasRequiredIteratorIndexed; - -function requireIteratorIndexed () { - if (hasRequiredIteratorIndexed) return iteratorIndexed; - hasRequiredIteratorIndexed = 1; - requireEs_iterator_map(); - var call = requireFunctionCall(); - var map = requireIteratorsCore().IteratorPrototype.map; - var callback = function (value, counter) { - return [counter, value]; - }; - iteratorIndexed = function indexed() { - return call(map, this, callback); - }; - return iteratorIndexed; -} - -var hasRequiredEsnext_iterator_asIndexedPairs; - -function requireEsnext_iterator_asIndexedPairs () { - if (hasRequiredEsnext_iterator_asIndexedPairs) return esnext_iterator_asIndexedPairs; - hasRequiredEsnext_iterator_asIndexedPairs = 1; - var $ = require_export(); - var indexed = requireIteratorIndexed(); - $({ target: 'Iterator', name: 'indexed', proto: true, real: true, forced: true }, { - asIndexedPairs: indexed - }); - return esnext_iterator_asIndexedPairs; -} - -var esnext_iterator_indexed = {}; - -var hasRequiredEsnext_iterator_indexed; - -function requireEsnext_iterator_indexed () { - if (hasRequiredEsnext_iterator_indexed) return esnext_iterator_indexed; - hasRequiredEsnext_iterator_indexed = 1; - var $ = require_export(); - var indexed = requireIteratorIndexed(); - $({ target: 'Iterator', proto: true, real: true, forced: true }, { - indexed: indexed - }); - return esnext_iterator_indexed; -} - -var hasRequiredIteratorHelpers; - -function requireIteratorHelpers () { - if (hasRequiredIteratorHelpers) return iteratorHelpers; - hasRequiredIteratorHelpers = 1; - requireIteratorHelpersStage3(); - requireEsnext_asyncIterator_asIndexedPairs(); - requireEsnext_asyncIterator_indexed(); - requireEsnext_iterator_asIndexedPairs(); - requireEsnext_iterator_indexed(); - return iteratorHelpers; -} - -requireIteratorHelpers(); - -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -class UI { - constructor(opts) { - var _a; - this.width = opts.width; - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - rows.forEach(columns => { - if (columns.length > 1 && mixin$1.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin$1.stringWidth(columns[0])); - } - }); - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - const noAnsi = mixin$1.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; - const wrapWidth = this.negatePadding(row[c]); - let ts = col; - if (wrapWidth > mixin$1.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin$1.stringWidth(col)); - } - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin$1.stringWidth(ts) < wrapWidth) { - ts += ' '.repeat((width || 0) - mixin$1.stringWidth(ts) - 1); - } - } - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - renderInline(source, previousLine) { - const match = source.match(/^ */); - const leadingWhitespace = match ? match[0].length : 0; - const target = previousLine.text; - const targetTextWidth = mixin$1.stringWidth(target.trimRight()); - if (!previousLine.span) { - return source; - } - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - row.forEach((col, c) => { - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin$1.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - let wrapWidth = col.width || 0; - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin$1.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin$1.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin$1.stringWidth(str); - if (strWidth >= width) { - return str; - } - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin$1; -function cliui(opts, _mixin) { - mixin$1 = _mixin; - return new UI({ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - }); -} - -function ansiRegex({onlyFirst = false} = {}) { - const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'; - const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`; - const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]'; - const pattern = `${osc}|${csi}`; - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -} - -const regex = ansiRegex(); -function stripAnsi(string) { - if (typeof string !== 'string') { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - return string.replace(regex, ''); -} - -function isAmbiguous(x) { - return x === 0xA1 - || x === 0xA4 - || x === 0xA7 - || x === 0xA8 - || x === 0xAA - || x === 0xAD - || x === 0xAE - || x >= 0xB0 && x <= 0xB4 - || x >= 0xB6 && x <= 0xBA - || x >= 0xBC && x <= 0xBF - || x === 0xC6 - || x === 0xD0 - || x === 0xD7 - || x === 0xD8 - || x >= 0xDE && x <= 0xE1 - || x === 0xE6 - || x >= 0xE8 && x <= 0xEA - || x === 0xEC - || x === 0xED - || x === 0xF0 - || x === 0xF2 - || x === 0xF3 - || x >= 0xF7 && x <= 0xFA - || x === 0xFC - || x === 0xFE - || x === 0x101 - || x === 0x111 - || x === 0x113 - || x === 0x11B - || x === 0x126 - || x === 0x127 - || x === 0x12B - || x >= 0x131 && x <= 0x133 - || x === 0x138 - || x >= 0x13F && x <= 0x142 - || x === 0x144 - || x >= 0x148 && x <= 0x14B - || x === 0x14D - || x === 0x152 - || x === 0x153 - || x === 0x166 - || x === 0x167 - || x === 0x16B - || x === 0x1CE - || x === 0x1D0 - || x === 0x1D2 - || x === 0x1D4 - || x === 0x1D6 - || x === 0x1D8 - || x === 0x1DA - || x === 0x1DC - || x === 0x251 - || x === 0x261 - || x === 0x2C4 - || x === 0x2C7 - || x >= 0x2C9 && x <= 0x2CB - || x === 0x2CD - || x === 0x2D0 - || x >= 0x2D8 && x <= 0x2DB - || x === 0x2DD - || x === 0x2DF - || x >= 0x300 && x <= 0x36F - || x >= 0x391 && x <= 0x3A1 - || x >= 0x3A3 && x <= 0x3A9 - || x >= 0x3B1 && x <= 0x3C1 - || x >= 0x3C3 && x <= 0x3C9 - || x === 0x401 - || x >= 0x410 && x <= 0x44F - || x === 0x451 - || x === 0x2010 - || x >= 0x2013 && x <= 0x2016 - || x === 0x2018 - || x === 0x2019 - || x === 0x201C - || x === 0x201D - || x >= 0x2020 && x <= 0x2022 - || x >= 0x2024 && x <= 0x2027 - || x === 0x2030 - || x === 0x2032 - || x === 0x2033 - || x === 0x2035 - || x === 0x203B - || x === 0x203E - || x === 0x2074 - || x === 0x207F - || x >= 0x2081 && x <= 0x2084 - || x === 0x20AC - || x === 0x2103 - || x === 0x2105 - || x === 0x2109 - || x === 0x2113 - || x === 0x2116 - || x === 0x2121 - || x === 0x2122 - || x === 0x2126 - || x === 0x212B - || x === 0x2153 - || x === 0x2154 - || x >= 0x215B && x <= 0x215E - || x >= 0x2160 && x <= 0x216B - || x >= 0x2170 && x <= 0x2179 - || x === 0x2189 - || x >= 0x2190 && x <= 0x2199 - || x === 0x21B8 - || x === 0x21B9 - || x === 0x21D2 - || x === 0x21D4 - || x === 0x21E7 - || x === 0x2200 - || x === 0x2202 - || x === 0x2203 - || x === 0x2207 - || x === 0x2208 - || x === 0x220B - || x === 0x220F - || x === 0x2211 - || x === 0x2215 - || x === 0x221A - || x >= 0x221D && x <= 0x2220 - || x === 0x2223 - || x === 0x2225 - || x >= 0x2227 && x <= 0x222C - || x === 0x222E - || x >= 0x2234 && x <= 0x2237 - || x === 0x223C - || x === 0x223D - || x === 0x2248 - || x === 0x224C - || x === 0x2252 - || x === 0x2260 - || x === 0x2261 - || x >= 0x2264 && x <= 0x2267 - || x === 0x226A - || x === 0x226B - || x === 0x226E - || x === 0x226F - || x === 0x2282 - || x === 0x2283 - || x === 0x2286 - || x === 0x2287 - || x === 0x2295 - || x === 0x2299 - || x === 0x22A5 - || x === 0x22BF - || x === 0x2312 - || x >= 0x2460 && x <= 0x24E9 - || x >= 0x24EB && x <= 0x254B - || x >= 0x2550 && x <= 0x2573 - || x >= 0x2580 && x <= 0x258F - || x >= 0x2592 && x <= 0x2595 - || x === 0x25A0 - || x === 0x25A1 - || x >= 0x25A3 && x <= 0x25A9 - || x === 0x25B2 - || x === 0x25B3 - || x === 0x25B6 - || x === 0x25B7 - || x === 0x25BC - || x === 0x25BD - || x === 0x25C0 - || x === 0x25C1 - || x >= 0x25C6 && x <= 0x25C8 - || x === 0x25CB - || x >= 0x25CE && x <= 0x25D1 - || x >= 0x25E2 && x <= 0x25E5 - || x === 0x25EF - || x === 0x2605 - || x === 0x2606 - || x === 0x2609 - || x === 0x260E - || x === 0x260F - || x === 0x261C - || x === 0x261E - || x === 0x2640 - || x === 0x2642 - || x === 0x2660 - || x === 0x2661 - || x >= 0x2663 && x <= 0x2665 - || x >= 0x2667 && x <= 0x266A - || x === 0x266C - || x === 0x266D - || x === 0x266F - || x === 0x269E - || x === 0x269F - || x === 0x26BF - || x >= 0x26C6 && x <= 0x26CD - || x >= 0x26CF && x <= 0x26D3 - || x >= 0x26D5 && x <= 0x26E1 - || x === 0x26E3 - || x === 0x26E8 - || x === 0x26E9 - || x >= 0x26EB && x <= 0x26F1 - || x === 0x26F4 - || x >= 0x26F6 && x <= 0x26F9 - || x === 0x26FB - || x === 0x26FC - || x === 0x26FE - || x === 0x26FF - || x === 0x273D - || x >= 0x2776 && x <= 0x277F - || x >= 0x2B56 && x <= 0x2B59 - || x >= 0x3248 && x <= 0x324F - || x >= 0xE000 && x <= 0xF8FF - || x >= 0xFE00 && x <= 0xFE0F - || x === 0xFFFD - || x >= 0x1F100 && x <= 0x1F10A - || x >= 0x1F110 && x <= 0x1F12D - || x >= 0x1F130 && x <= 0x1F169 - || x >= 0x1F170 && x <= 0x1F18D - || x === 0x1F18F - || x === 0x1F190 - || x >= 0x1F19B && x <= 0x1F1AC - || x >= 0xE0100 && x <= 0xE01EF - || x >= 0xF0000 && x <= 0xFFFFD - || x >= 0x100000 && x <= 0x10FFFD; -} -function isFullWidth(x) { - return x === 0x3000 - || x >= 0xFF01 && x <= 0xFF60 - || x >= 0xFFE0 && x <= 0xFFE6; -} -function isWide(x) { - return x >= 0x1100 && x <= 0x115F - || x === 0x231A - || x === 0x231B - || x === 0x2329 - || x === 0x232A - || x >= 0x23E9 && x <= 0x23EC - || x === 0x23F0 - || x === 0x23F3 - || x === 0x25FD - || x === 0x25FE - || x === 0x2614 - || x === 0x2615 - || x >= 0x2630 && x <= 0x2637 - || x >= 0x2648 && x <= 0x2653 - || x === 0x267F - || x >= 0x268A && x <= 0x268F - || x === 0x2693 - || x === 0x26A1 - || x === 0x26AA - || x === 0x26AB - || x === 0x26BD - || x === 0x26BE - || x === 0x26C4 - || x === 0x26C5 - || x === 0x26CE - || x === 0x26D4 - || x === 0x26EA - || x === 0x26F2 - || x === 0x26F3 - || x === 0x26F5 - || x === 0x26FA - || x === 0x26FD - || x === 0x2705 - || x === 0x270A - || x === 0x270B - || x === 0x2728 - || x === 0x274C - || x === 0x274E - || x >= 0x2753 && x <= 0x2755 - || x === 0x2757 - || x >= 0x2795 && x <= 0x2797 - || x === 0x27B0 - || x === 0x27BF - || x === 0x2B1B - || x === 0x2B1C - || x === 0x2B50 - || x === 0x2B55 - || x >= 0x2E80 && x <= 0x2E99 - || x >= 0x2E9B && x <= 0x2EF3 - || x >= 0x2F00 && x <= 0x2FD5 - || x >= 0x2FF0 && x <= 0x2FFF - || x >= 0x3001 && x <= 0x303E - || x >= 0x3041 && x <= 0x3096 - || x >= 0x3099 && x <= 0x30FF - || x >= 0x3105 && x <= 0x312F - || x >= 0x3131 && x <= 0x318E - || x >= 0x3190 && x <= 0x31E5 - || x >= 0x31EF && x <= 0x321E - || x >= 0x3220 && x <= 0x3247 - || x >= 0x3250 && x <= 0xA48C - || x >= 0xA490 && x <= 0xA4C6 - || x >= 0xA960 && x <= 0xA97C - || x >= 0xAC00 && x <= 0xD7A3 - || x >= 0xF900 && x <= 0xFAFF - || x >= 0xFE10 && x <= 0xFE19 - || x >= 0xFE30 && x <= 0xFE52 - || x >= 0xFE54 && x <= 0xFE66 - || x >= 0xFE68 && x <= 0xFE6B - || x >= 0x16FE0 && x <= 0x16FE4 - || x >= 0x16FF0 && x <= 0x16FF6 - || x >= 0x17000 && x <= 0x18CD5 - || x >= 0x18CFF && x <= 0x18D1E - || x >= 0x18D80 && x <= 0x18DF2 - || x >= 0x1AFF0 && x <= 0x1AFF3 - || x >= 0x1AFF5 && x <= 0x1AFFB - || x === 0x1AFFD - || x === 0x1AFFE - || x >= 0x1B000 && x <= 0x1B122 - || x === 0x1B132 - || x >= 0x1B150 && x <= 0x1B152 - || x === 0x1B155 - || x >= 0x1B164 && x <= 0x1B167 - || x >= 0x1B170 && x <= 0x1B2FB - || x >= 0x1D300 && x <= 0x1D356 - || x >= 0x1D360 && x <= 0x1D376 - || x === 0x1F004 - || x === 0x1F0CF - || x === 0x1F18E - || x >= 0x1F191 && x <= 0x1F19A - || x >= 0x1F200 && x <= 0x1F202 - || x >= 0x1F210 && x <= 0x1F23B - || x >= 0x1F240 && x <= 0x1F248 - || x === 0x1F250 - || x === 0x1F251 - || x >= 0x1F260 && x <= 0x1F265 - || x >= 0x1F300 && x <= 0x1F320 - || x >= 0x1F32D && x <= 0x1F335 - || x >= 0x1F337 && x <= 0x1F37C - || x >= 0x1F37E && x <= 0x1F393 - || x >= 0x1F3A0 && x <= 0x1F3CA - || x >= 0x1F3CF && x <= 0x1F3D3 - || x >= 0x1F3E0 && x <= 0x1F3F0 - || x === 0x1F3F4 - || x >= 0x1F3F8 && x <= 0x1F43E - || x === 0x1F440 - || x >= 0x1F442 && x <= 0x1F4FC - || x >= 0x1F4FF && x <= 0x1F53D - || x >= 0x1F54B && x <= 0x1F54E - || x >= 0x1F550 && x <= 0x1F567 - || x === 0x1F57A - || x === 0x1F595 - || x === 0x1F596 - || x === 0x1F5A4 - || x >= 0x1F5FB && x <= 0x1F64F - || x >= 0x1F680 && x <= 0x1F6C5 - || x === 0x1F6CC - || x >= 0x1F6D0 && x <= 0x1F6D2 - || x >= 0x1F6D5 && x <= 0x1F6D8 - || x >= 0x1F6DC && x <= 0x1F6DF - || x === 0x1F6EB - || x === 0x1F6EC - || x >= 0x1F6F4 && x <= 0x1F6FC - || x >= 0x1F7E0 && x <= 0x1F7EB - || x === 0x1F7F0 - || x >= 0x1F90C && x <= 0x1F93A - || x >= 0x1F93C && x <= 0x1F945 - || x >= 0x1F947 && x <= 0x1F9FF - || x >= 0x1FA70 && x <= 0x1FA7C - || x >= 0x1FA80 && x <= 0x1FA8A - || x >= 0x1FA8E && x <= 0x1FAC6 - || x === 0x1FAC8 - || x >= 0x1FACD && x <= 0x1FADC - || x >= 0x1FADF && x <= 0x1FAEA - || x >= 0x1FAEF && x <= 0x1FAF8 - || x >= 0x20000 && x <= 0x2FFFD - || x >= 0x30000 && x <= 0x3FFFD; -} - -function validate$3(codePoint) { - if (!Number.isSafeInteger(codePoint)) { - throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`); - } -} -function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) { - validate$3(codePoint); - if ( - isFullWidth(codePoint) - || isWide(codePoint) - || (ambiguousAsWide && isAmbiguous(codePoint)) - ) { - return 2; - } - return 1; -} - -var emojiRegex$2 = () => { - return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uD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EDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; -}; - -const segmenter = new Intl.Segmenter(); -const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u; -function stringWidth(string, options = {}) { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - const { - ambiguousIsNarrow = true, - countAnsiEscapeCodes = false, - } = options; - if (!countAnsiEscapeCodes) { - string = stripAnsi(string); - } - if (string.length === 0) { - return 0; - } - let width = 0; - const eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow}; - for (const {segment: character} of segmenter.segment(string)) { - const codePoint = character.codePointAt(0); - if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { - continue; - } - if ( - (codePoint >= 0x20_0B && codePoint <= 0x20_0F) - || codePoint === 0xFE_FF - ) { - continue; - } - if ( - (codePoint >= 0x3_00 && codePoint <= 0x3_6F) - || (codePoint >= 0x1A_B0 && codePoint <= 0x1A_FF) - || (codePoint >= 0x1D_C0 && codePoint <= 0x1D_FF) - || (codePoint >= 0x20_D0 && codePoint <= 0x20_FF) - || (codePoint >= 0xFE_20 && codePoint <= 0xFE_2F) - ) { - continue; - } - if (codePoint >= 0xD8_00 && codePoint <= 0xDF_FF) { - continue; - } - if (codePoint >= 0xFE_00 && codePoint <= 0xFE_0F) { - continue; - } - if (defaultIgnorableCodePointRegex.test(character)) { - continue; - } - if (emojiRegex$2().test(character)) { - width += 2; - continue; - } - width += eastAsianWidth(codePoint, eastAsianWidthOptions); - } - return width; -} - -const ANSI_BACKGROUND_OFFSET = 10; -const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; -const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; -const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; -const styles = { - modifier: { - reset: [0, 0], - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - overline: [53, 55], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - blackBright: [90, 39], - gray: [90, 39], - grey: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39], - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgBlackBright: [100, 49], - bgGray: [100, 49], - bgGrey: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49], - }, -}; -Object.keys(styles.modifier); -const foregroundColorNames = Object.keys(styles.color); -const backgroundColorNames = Object.keys(styles.bgColor); -[...foregroundColorNames, ...backgroundColorNames]; -function assembleStyles() { - const codes = new Map(); - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m`, - }; - group[styleName] = styles[styleName]; - codes.set(style[0], style[1]); - } - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false, - }); - } - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false, - }); - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - Object.defineProperties(styles, { - rgbToAnsi256: { - value(red, green, blue) { - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - if (red > 248) { - return 231; - } - return Math.round(((red - 8) / 247) * 24) + 232; - } - return 16 - + (36 * Math.round(red / 255 * 5)) - + (6 * Math.round(green / 255 * 5)) - + Math.round(blue / 255 * 5); - }, - enumerable: false, - }, - hexToRgb: { - value(hex) { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - let [colorString] = matches; - if (colorString.length === 3) { - colorString = [...colorString].map(character => character + character).join(''); - } - const integer = Number.parseInt(colorString, 16); - return [ - (integer >> 16) & 0xFF, - (integer >> 8) & 0xFF, - integer & 0xFF, - ]; - }, - enumerable: false, - }, - hexToAnsi256: { - value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false, - }, - ansi256ToAnsi: { - value(code) { - if (code < 8) { - return 30 + code; - } - if (code < 16) { - return 90 + (code - 8); - } - let red; - let green; - let blue; - if (code >= 232) { - red = (((code - 232) * 10) + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - const remainder = code % 36; - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = (remainder % 6) / 5; - } - const value = Math.max(red, green, blue) * 2; - if (value === 0) { - return 30; - } - let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); - if (value === 2) { - result += 60; - } - return result; - }, - enumerable: false, - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false, - }, - hexToAnsi: { - value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false, - }, - }); - return styles; -} -const ansiStyles = assembleStyles(); - -const ESCAPES = new Set([ - '\u001B', - '\u009B', -]); -const END_CODE = 39; -const ANSI_ESCAPE_BELL = '\u0007'; -const ANSI_CSI = '['; -const ANSI_OSC = ']'; -const ANSI_SGR_TERMINATOR = 'm'; -const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; -const wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; -const wrapAnsiHyperlink = url => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`; -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - let isInsideEscape = false; - let isInsideLinkEscape = false; - let visible = stringWidth(stripAnsi(rows.at(-1))); - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - if (ESCAPES.has(character)) { - isInsideEscape = true; - const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join(''); - isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK; - } - if (isInsideEscape) { - if (isInsideLinkEscape) { - if (character === ANSI_ESCAPE_BELL) { - isInsideEscape = false; - isInsideLinkEscape = false; - } - } else if (character === ANSI_SGR_TERMINATOR) { - isInsideEscape = false; - } - continue; - } - visible += characterLength; - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - if (!visible && rows.at(-1).length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; -const stringVisibleTrimSpacesRight = string => { - const words = string.split(' '); - let last = words.length; - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - last--; - } - if (last === words.length) { - return string; - } - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - let returnValue = ''; - let escapeCode; - let escapeUrl; - const lengths = wordLengths(string); - let rows = ['']; - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows.at(-1).trimStart(); - } - let rowLength = stringWidth(rows.at(-1)); - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - rows.push(''); - rowLength = 0; - } - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - wrapWord(rows, word, columns); - continue; - } - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - rows.push(''); - } - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - rows[rows.length - 1] += word; - } - if (options.trim !== false) { - rows = rows.map(row => stringVisibleTrimSpacesRight(row)); - } - const preString = rows.join('\n'); - const pre = [...preString]; - let preStringIndex = 0; - for (const [index, character] of pre.entries()) { - returnValue += character; - if (ESCAPES.has(character)) { - const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || {groups: {}}; - if (groups.code !== undefined) { - const code = Number.parseFloat(groups.code); - escapeCode = code === END_CODE ? undefined : code; - } else if (groups.uri !== undefined) { - escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; - } - } - const code = ansiStyles.codes.get(Number(escapeCode)); - if (pre[index + 1] === '\n') { - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(''); - } - if (escapeCode && code) { - returnValue += wrapAnsiCode(code); - } - } else if (character === '\n') { - if (escapeCode && code) { - returnValue += wrapAnsiCode(escapeCode); - } - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(escapeUrl); - } - } - preStringIndex += character.length; - } - return returnValue; -}; -function wrapAnsi(string, columns, options) { - return String(string) - .normalize() - .replaceAll('\r\n', '\n') - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -} - -function ui (opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap: wrapAnsi - }) -} - -function escalade (start, callback) { - let dir = resolve$2('.', start); - let tmp, stats = statSync(dir); - if (!stats.isDirectory()) { - dir = dirname(dir); - } - while (true) { - tmp = callback(dir, readdirSync(dir)); - if (tmp) return resolve$2(dir, tmp); - dir = dirname(tmp = dir); - if (tmp === dir) break; - } -} - -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -function camelCase(str) { - const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); - if (!isCamelCase) { - str = str.toLowerCase(); - } - if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { - return str; - } - else { - let camelcase = ''; - let nextChrUpper = false; - const leadingHyphens = str.match(/^-+/); - for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { - let chr = str.charAt(i); - if (nextChrUpper) { - nextChrUpper = false; - chr = chr.toUpperCase(); - } - if (i !== 0 && (chr === '-' || chr === '_')) { - nextChrUpper = true; - } - else if (chr !== '-' && chr !== '_') { - camelcase += chr; - } - } - return camelcase; - } -} -function decamelize(str, joinString) { - const lowercase = str.toLowerCase(); - joinString = joinString || '-'; - let notCamelcase = ''; - for (let i = 0; i < str.length; i++) { - const chrLower = lowercase.charAt(i); - const chrString = str.charAt(i); - if (chrLower !== chrString && i > 0) { - notCamelcase += `${joinString}${lowercase.charAt(i)}`; - } - else { - notCamelcase += chrString; - } - } - return notCamelcase; -} -function looksLikeNumber(x) { - if (x === null || x === undefined) - return false; - if (typeof x === 'number') - return true; - if (/^0x[0-9a-f]+$/i.test(x)) - return true; - if (/^0[^.]/.test(x)) - return false; - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -function tokenizeArgString(argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e); - } - argString = argString.trim(); - let i = 0; - let prevC = null; - let c = null; - let opening = null; - const args = []; - for (let ii = 0; ii < argString.length; ii++) { - prevC = c; - c = argString.charAt(ii); - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++; - } - continue; - } - if (c === opening) { - opening = null; - } - else if ((c === "'" || c === '"') && !opening) { - opening = c; - } - if (!args[i]) - args[i] = ''; - args[i] += c; - } - return args; -} - -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -var DefaultValuesForTypeKey; -(function (DefaultValuesForTypeKey) { - DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; - DefaultValuesForTypeKey["STRING"] = "string"; - DefaultValuesForTypeKey["NUMBER"] = "number"; - DefaultValuesForTypeKey["ARRAY"] = "array"; -})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); - -/** - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -let mixin; -class YargsParser { - constructor(_mixin) { - mixin = _mixin; - } - parse(argsInput, options) { - const opts = Object.assign({ - alias: undefined, - array: undefined, - boolean: undefined, - config: undefined, - configObjects: undefined, - configuration: undefined, - coerce: undefined, - count: undefined, - default: undefined, - envPrefix: undefined, - narg: undefined, - normalize: undefined, - string: undefined, - number: undefined, - __: undefined, - key: undefined - }, options); - const args = tokenizeArgString(argsInput); - const inputIsString = typeof argsInput === 'string'; - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'parse-positional-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration); - const defaults = Object.assign(Object.create(null), opts.default); - const configObjects = opts.configObjects || []; - const envPrefix = opts.envPrefix; - const notFlagsOption = configuration['populate--']; - const notFlagsArgv = notFlagsOption ? '--' : '_'; - const newAliases = Object.create(null); - const defaulted = Object.create(null); - const __ = opts.__ || mixin.format; - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - }; - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); - [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { - const key = typeof opt === 'object' ? opt.key : opt; - const assignment = Object.keys(opt).map(function (key) { - const arrayFlagKeys = { - boolean: 'bools', - string: 'strings', - number: 'numbers' - }; - return arrayFlagKeys[key]; - }).filter(Boolean).pop(); - if (assignment) { - flags[assignment][key] = true; - } - flags.arrays[key] = true; - flags.keys.push(key); - }); - [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - flags.keys.push(key); - }); - [].concat(opts.string || []).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - flags.keys.push(key); - }); - [].concat(opts.number || []).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true; - flags.keys.push(key); - }); - [].concat(opts.count || []).filter(Boolean).forEach(function (key) { - flags.counts[key] = true; - flags.keys.push(key); - }); - [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true; - flags.keys.push(key); - }); - if (typeof opts.narg === 'object') { - Object.entries(opts.narg).forEach(([key, value]) => { - if (typeof value === 'number') { - flags.nargs[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.coerce === 'object') { - Object.entries(opts.coerce).forEach(([key, value]) => { - if (typeof value === 'function') { - flags.coercions[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.config !== 'undefined') { - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - [].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true; - }); - } - else if (typeof opts.config === 'object') { - Object.entries(opts.config).forEach(([key, value]) => { - if (typeof value === 'boolean' || typeof value === 'function') { - flags.configs[key] = value; - } - }); - } - } - extendAliases(opts.key, aliases, opts.default, flags.arrays); - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key]; - }); - }); - let error = null; - checkConfiguration(); - let notFlags = []; - const argv = Object.assign(Object.create(null), { _: [] }); - const argvReturn = {}; - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - const truncatedArg = arg.replace(/^-{3,}/, '---'); - let broken; - let key; - let letters; - let m; - let next; - let value; - if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { - pushPositional(arg); - } - else if (truncatedArg.match(/^---+(=|$)/)) { - pushPositional(arg); - continue; - } - else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { - m = arg.match(/^--?([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]); - } - else if (checkAllAliases(m[1], flags.nargs) !== false) { - i = eatNargs(i, m[1], args, m[2]); - } - else { - setArg(m[1], m[2], true); - } - } - } - else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - m = arg.match(negatedBoolean); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); - } - } - else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { - m = arg.match(/^--?(.+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - setArg(m[1], m[2]); - } - } - else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1]; - m = arg.match(/^-(.\..+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split(''); - broken = false; - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3); - key = letters[j]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args, value); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args, value); - } - else { - setArg(key, value); - } - broken = true; - break; - } - if (next === '-') { - setArg(letters[j], next); - continue; - } - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && - checkAllAliases(next, flags.bools) === false) { - setArg(letters[j], next); - broken = true; - break; - } - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next); - broken = true; - break; - } - else { - setArg(letters[j], defaultValue(letters[j])); - } - } - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - key = arg.slice(1); - setArg(key, defaultValue(key)); - } - else if (arg === '--') { - notFlags = args.slice(i + 1); - break; - } - else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i); - break; - } - else { - pushPositional(arg); - } - } - applyEnvVars(argv, true); - applyEnvVars(argv, false); - setConfig(argv); - setConfigObjects(); - applyDefaultsAndAliases(argv, flags.aliases, defaults, true); - applyCoercions(argv); - if (configuration['set-placeholder-key']) - setPlaceholderKeys(argv); - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) - setArg(key, 0); - }); - if (notFlagsOption && notFlags.length) - argv[notFlagsArgv] = []; - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key); - }); - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key]; - }); - } - if (configuration['strip-aliased']) { - [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion'] && alias.includes('-')) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; - } - delete argv[alias]; - }); - } - function pushPositional(arg) { - const maybeCoercedNumber = maybeCoerceNumber('_', arg); - if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { - argv._.push(maybeCoercedNumber); - } - } - function eatNargs(i, key, args, argAfterEqualSign) { - let ii; - let toEat = checkAllAliases(key, flags.nargs); - toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)); - } - setArg(key, defaultValue(key)); - return i; - } - let available = isUndefined(argAfterEqualSign) ? 0 : 1; - if (configuration['nargs-eats-options']) { - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)); - } - available = toEat; - } - else { - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) - available++; - else - break; - } - if (available < toEat) - error = Error(__('Not enough arguments following: %s', key)); - } - let consumed = Math.min(available, toEat); - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign); - consumed--; - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]); - } - return (i + consumed); - } - function eatArray(i, key, args, argAfterEqualSign) { - let argsToSet = []; - let next = argAfterEqualSign || args[i + 1]; - const nargsCount = checkAllAliases(key, flags.nargs); - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true); - } - else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - if (defaults[key] !== undefined) { - const defVal = defaults[key]; - argsToSet = Array.isArray(defVal) ? defVal : [defVal]; - } - } - else { - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign, true)); - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) - break; - next = args[ii]; - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) - break; - i = ii; - argsToSet.push(processValue(key, next, inputIsString)); - } - } - if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0))) { - error = Error(__('Not enough arguments following: %s', key)); - } - setArg(key, argsToSet); - return i; - } - function setArg(key, val, shouldStripQuotes = inputIsString) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop); - }).join('.'); - addNewAlias(key, alias); - } - const value = processValue(key, val, shouldStripQuotes); - const splitKey = key.split('.'); - setKey(argv, splitKey, value); - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - const keyProperties = x.split('.'); - setKey(argv, keyProperties, value); - }); - } - if (splitKey.length > 1 && configuration['dot-notation']) { - (flags.aliases[splitKey[0]] || []).forEach(function (x) { - let keyProperties = x.split('.'); - const a = [].concat(splitKey); - a.shift(); - keyProperties = keyProperties.concat(a); - if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { - setKey(argv, keyProperties, value); - } - }); - } - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []); - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get() { - return val; - }, - set(value) { - val = typeof value === 'string' ? mixin.normalize(value) : value; - } - }); - }); - } - } - function addNewAlias(key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias]; - newAliases[alias] = true; - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key); - } - } - function processValue(key, val, shouldStripQuotes) { - if (shouldStripQuotes) { - val = stripQuotes(val); - } - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') - val = val === 'true'; - } - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v); }) - : maybeCoerceNumber(key, val); - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment(); - } - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) - value = val.map((val) => { return mixin.normalize(val); }); - else - value = mixin.normalize(val); - } - return value; - } - function maybeCoerceNumber(key, value) { - if (!configuration['parse-positional-numbers'] && key === '_') - return value; - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { - value = Number(value); - } - } - return value; - } - function setConfig(argv) { - const configLookup = Object.create(null); - applyDefaultsAndAliases(configLookup, flags.aliases, defaults); - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey]; - if (configPath) { - try { - let config = null; - const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); - const resolveConfig = flags.configs[configKey]; - if (typeof resolveConfig === 'function') { - try { - config = resolveConfig(resolvedConfigPath); - } - catch (e) { - config = e; - } - if (config instanceof Error) { - error = config; - return; - } - } - else { - config = mixin.require(resolvedConfigPath); - } - setConfigObject(config); - } - catch (ex) { - if (ex.name === 'PermissionDenied') - error = ex; - else if (argv[configKey]) - error = Error(__('Invalid JSON config file: %s', configPath)); - } - } - }); - } - function setConfigObject(config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key]; - const fullKey = prev ? prev + '.' + key : key; - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - setConfigObject(value, fullKey); - } - else { - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value); - } - } - }); - } - function setConfigObjects() { - if (typeof configObjects !== 'undefined') { - configObjects.forEach(function (configObject) { - setConfigObject(configObject); - }); - } - } - function applyEnvVars(argv, configOnly) { - if (typeof envPrefix === 'undefined') - return; - const prefix = typeof envPrefix === 'string' ? envPrefix : ''; - const env = mixin.env(); - Object.keys(env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length); - } - return camelCase(key); - }); - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), env[envVar]); - } - } - }); - } - function applyCoercions(argv) { - let coerce; - const applied = new Set(); - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { - coerce = checkAllAliases(key, flags.coercions); - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])); - ([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali); - argv[ali] = value; - }); - } - catch (err) { - error = err; - } - } - } - }); - } - function setPlaceholderKeys(argv) { - flags.keys.forEach((key) => { - if (~key.indexOf('.')) - return; - if (typeof argv[key] === 'undefined') - argv[key] = undefined; - }); - return argv; - } - function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]); - if (canLog) - defaulted[key] = true; - (aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) - return; - setKey(obj, x.split('.'), defaults[key]); - }); - } - }); - } - function hasKey(obj, keys) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}); - }); - const key = keys[keys.length - 1]; - if (typeof o !== 'object') - return false; - else - return key in o; - } - function setKey(obj, keys, value) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - key = sanitizeKey(key); - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {}; - } - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - if (Array.isArray(o[key])) { - o[key].push({}); - } - else { - o[key] = [o[key], {}]; - } - o = o[key][o[key].length - 1]; - } - else { - o = o[key]; - } - }); - const key = sanitizeKey(keys[keys.length - 1]); - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); - const isValueArray = Array.isArray(value); - let duplicate = configuration['duplicate-arguments-array']; - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true; - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined; - } - } - if (value === increment()) { - o[key] = increment(o[key]); - } - else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); - } - else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value; - } - else { - o[key] = o[key].concat([value]); - } - } - else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value]; - } - else if (duplicate && !(o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools))) { - o[key] = [o[key], value]; - } - else { - o[key] = value; - } - } - function extendAliases(...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - if (flags.aliases[key]) - return; - flags.aliases[key] = [].concat(aliases[key] || []); - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-'); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - }); - } - function checkAllAliases(key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key); - const keys = Object.keys(flag); - const setAlias = toCheck.find(key => keys.includes(key)); - return setAlias ? flag[setAlias] : false; - } - function hasAnyFlag(key) { - const flagsKeys = Object.keys(flags); - const toCheck = [].concat(flagsKeys.map(k => flags[k])); - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key]; - }); - } - function hasFlagsMatching(arg, ...patterns) { - const toCheck = [].concat(...patterns); - return toCheck.some(function (pattern) { - const match = arg.match(pattern); - return match && hasAnyFlag(match[1]); - }); - } - function hasAllShortFlags(arg) { - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { - return false; - } - let hasAllFlags = true; - let next; - const letters = arg.slice(1).split(''); - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false; - break; - } - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break; - } - } - return hasAllFlags; - } - function isUnknownOptionAsArg(arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg); - } - function isUnknownOption(arg) { - arg = arg.replace(/^-{3,}/, '--'); - if (arg.match(negative)) { - return false; - } - if (hasAllShortFlags(arg)) { - return false; - } - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; - const normalFlag = /^-+([^=]+?)$/; - const flagEndingInHyphen = /^-+([^=]+?)-$/; - const flagEndingInDigits = /^-+([^=]+?\d+)$/; - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); - } - function defaultValue(key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key]; - } - else { - return defaultForType(guessType(key)); - } - } - function defaultForType(type) { - const def = { - [DefaultValuesForTypeKey.BOOLEAN]: true, - [DefaultValuesForTypeKey.STRING]: '', - [DefaultValuesForTypeKey.NUMBER]: undefined, - [DefaultValuesForTypeKey.ARRAY]: [] - }; - return def[type]; - } - function guessType(key) { - let type = DefaultValuesForTypeKey.BOOLEAN; - if (checkAllAliases(key, flags.strings)) - type = DefaultValuesForTypeKey.STRING; - else if (checkAllAliases(key, flags.numbers)) - type = DefaultValuesForTypeKey.NUMBER; - else if (checkAllAliases(key, flags.bools)) - type = DefaultValuesForTypeKey.BOOLEAN; - else if (checkAllAliases(key, flags.arrays)) - type = DefaultValuesForTypeKey.ARRAY; - return type; - } - function isUndefined(num) { - return num === undefined; - } - function checkConfiguration() { - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); - return true; - } - else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); - return true; - } - return false; - }); - } - return { - aliases: Object.assign({}, flags.aliases), - argv: Object.assign(argvReturn, argv), - configuration: configuration, - defaulted: Object.assign({}, defaulted), - error: error, - newAliases: Object.assign({}, newAliases) - }; - } -} -function combineAliases(aliases) { - const aliasArrays = []; - const combined = Object.create(null); - let change = true; - Object.keys(aliases).forEach(function (key) { - aliasArrays.push([].concat(aliases[key], key)); - }); - while (change) { - change = false; - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1; - }); - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); - aliasArrays.splice(ii, 1); - change = true; - break; - } - } - } - } - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i; - }); - const lastAlias = aliasArray.pop(); - if (lastAlias !== undefined && typeof lastAlias === 'string') { - combined[lastAlias] = aliasArray; - } - }); - return combined; -} -function increment(orig) { - return orig !== undefined ? orig + 1 : 1; -} -function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; -} -function stripQuotes(val) { - return (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0]) - ? val.substring(1, val.length - 1) - : val; -} - -/** - * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js - * - * @license - * Copyright (c) 2016, Contributors - * SPDX-License-Identifier: ISC - */ -var _a$7, _b, _c; -const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 20; -const nodeVersion = (_b = (_a$7 = process === null || process === void 0 ? void 0 : process.versions) === null || _a$7 === void 0 ? void 0 : _a$7.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); -if (nodeVersion) { - const major = Number(nodeVersion.match(/^([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); - } -} -const env = process ? process.env : {}; -const require$2 = createRequire ? createRequire(import.meta.url) : undefined; -const parser$1 = new YargsParser({ - cwd: process.cwd, - env: () => { - return env; - }, - format: format$6, - normalize, - resolve: resolve$2, - require: (path) => { - if (typeof require$2 !== 'undefined') { - return require$2(path); - } - else if (path.match(/\.json$/)) { - return JSON.parse(readFileSync(path, 'utf8')); - } - else { - throw Error('only .json config files are supported in ESM'); - } - } -}); -const yargsParser = function Parser(args, opts) { - const result = parser$1.parse(args.slice(), opts); - return result.argv; -}; -yargsParser.detailed = function (args, opts) { - return parser$1.parse(args.slice(), opts); -}; -yargsParser.camelCase = camelCase; -yargsParser.decamelize = decamelize; -yargsParser.looksLikeNumber = looksLikeNumber; - -function getProcessArgvBinIndex() { - if (isBundledElectronApp()) - return 0; - return 1; -} -function isBundledElectronApp() { - return isElectronApp() && !process.defaultApp; -} -function isElectronApp() { - return !!process.versions.electron; -} -function hideBin(argv) { - return argv.slice(getProcessArgvBinIndex() + 1); -} -function getProcessArgvBin() { - return process.argv[getProcessArgvBinIndex()]; -} - -var shim$3 = { - fs: { - readFileSync, - writeFile - }, - format: format$6, - resolve: resolve$2, - exists: (file) => { - try { - return statSync(file).isFile(); - } - catch (err) { - return false; - } - } -}; - -let shim$2; -class Y18N { - constructor(opts) { - opts = opts || {}; - this.directory = opts.directory || './locales'; - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; - this.locale = opts.locale || 'en'; - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; - this.cache = Object.create(null); - this.writeQueue = []; - } - __(...args) { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral(arguments[0], ...arguments); - } - const str = args.shift(); - let cb = function () { }; - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - cb = cb || function () { }; - if (!this.cache[this.locale]) - this._readLocaleFile(); - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str; - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - return shim$2.format.apply(shim$2.format, [this.cache[this.locale][str] || str].concat(args)); - } - __n() { - const args = Array.prototype.slice.call(arguments); - const singular = args.shift(); - const plural = args.shift(); - const quantity = args.shift(); - let cb = function () { }; - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - if (!this.cache[this.locale]) - this._readLocaleFile(); - let str = quantity === 1 ? singular : plural; - if (this.cache[this.locale][singular]) { - const entry = this.cache[this.locale][singular]; - str = entry[quantity === 1 ? 'one' : 'other']; - } - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - }; - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - const values = [str]; - if (~str.indexOf('%d')) - values.push(quantity); - return shim$2.format.apply(shim$2.format, values.concat(args)); - } - setLocale(locale) { - this.locale = locale; - } - getLocale() { - return this.locale; - } - updateLocale(obj) { - if (!this.cache[this.locale]) - this._readLocaleFile(); - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - this.cache[this.locale][key] = obj[key]; - } - } - } - _taggedLiteral(parts, ...args) { - let str = ''; - parts.forEach(function (part, i) { - const arg = args[i + 1]; - str += part; - if (typeof arg !== 'undefined') { - str += '%s'; - } - }); - return this.__.apply(this, [str].concat([].slice.call(args, 1))); - } - _enqueueWrite(work) { - this.writeQueue.push(work); - if (this.writeQueue.length === 1) - this._processWriteQueue(); - } - _processWriteQueue() { - const _this = this; - const work = this.writeQueue[0]; - const directory = work.directory; - const locale = work.locale; - const cb = work.cb; - const languageFile = this._resolveLocaleFile(directory, locale); - const serializedLocale = JSON.stringify(this.cache[locale], null, 2); - shim$2.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift(); - if (_this.writeQueue.length > 0) - _this._processWriteQueue(); - cb(err); - }); - } - _readLocaleFile() { - let localeLookup = {}; - const languageFile = this._resolveLocaleFile(this.directory, this.locale); - try { - if (shim$2.fs.readFileSync) { - localeLookup = JSON.parse(shim$2.fs.readFileSync(languageFile, 'utf-8')); - } - } - catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile; - } - if (err.code === 'ENOENT') - localeLookup = {}; - else - throw err; - } - this.cache[this.locale] = localeLookup; - } - _resolveLocaleFile(directory, locale) { - let file = shim$2.resolve(directory, './', locale + '.json'); - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - const languageFile = shim$2.resolve(directory, './', locale.split('_')[0] + '.json'); - if (this._fileExistsSync(languageFile)) - file = languageFile; - } - return file; - } - _fileExistsSync(file) { - return shim$2.exists(file); - } -} -function y18n$1(opts, _shim) { - shim$2 = _shim; - const y18n = new Y18N(opts); - return { - __: y18n.__.bind(y18n), - __n: y18n.__n.bind(y18n), - setLocale: y18n.setLocale.bind(y18n), - getLocale: y18n.getLocale.bind(y18n), - updateLocale: y18n.updateLocale.bind(y18n), - locale: y18n.locale - }; -} - -const y18n = (opts) => { - return y18n$1(opts, shim$3) -}; - -var getCallerFile$1; -var hasRequiredGetCallerFile; - -function requireGetCallerFile () { - if (hasRequiredGetCallerFile) return getCallerFile$1; - hasRequiredGetCallerFile = 1; - getCallerFile$1 = function getCallerFile(position) { - if (position === void 0) { position = 2; } - if (position >= Error.stackTraceLimit) { - throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`'); - } - var oldPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = new Error().stack; - Error.prepareStackTrace = oldPrepareStackTrace; - if (stack !== null && typeof stack === 'object') { - return stack[position] ? stack[position].getFileName() : undefined; - } - }; - return getCallerFile$1; -} - -var getCallerFileExports = requireGetCallerFile(); -var getCallerFile = /*@__PURE__*/getDefaultExportFromCjs(getCallerFileExports); - -const __dirname$1 = fileURLToPath(import.meta.url); -const mainFilename = __dirname$1.substring(0, __dirname$1.lastIndexOf('node_modules')); -const require$1 = createRequire(import.meta.url); -var shim$1 = { - assert: { - notStrictEqual, - strictEqual - }, - cliui: ui, - findUp: escalade, - getEnv: (key) => { - return process.env[key] - }, - inspect, - getProcessArgvBin, - mainFilename: mainFilename || process.cwd(), - Parser: yargsParser, - path: { - basename, - dirname, - extname, - relative, - resolve: resolve$2, - join - }, - process: { - argv: () => process.argv, - cwd: process.cwd, - emitWarning: (warning, type) => process.emitWarning(warning, type), - execPath: () => process.execPath, - exit: (code) => { - process.exit(code); - }, - nextTick: process.nextTick, - stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null - }, - readFileSync: readFileSync$1, - readdirSync: readdirSync$1, - require: require$1, - getCallerFile: () => { - const callerFile = getCallerFile(3); - return callerFile.match(/^file:\/\//) ? fileURLToPath(callerFile) : callerFile; - }, - stringWidth, - y18n: y18n({ - directory: resolve$2(__dirname$1, '../../../locales'), - updateFiles: false - }) -}; - -function assertNotStrictEqual(actual, expected, shim, message) { - shim.assert.notStrictEqual(actual, expected, message); -} -function assertSingleKey(actual, shim) { - shim.assert.strictEqual(typeof actual, 'string'); -} -function objectKeys(object) { - return Object.keys(object); -} - -function isPromise$1(maybePromise) { - return (!!maybePromise && - !!maybePromise.then && - typeof maybePromise.then === 'function'); -} - -class YError extends Error { - constructor(msg) { - super(msg || 'yargs error'); - this.name = 'YError'; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, YError); - } - } -} - -function parseCommand(cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); - const bregex = /\.*[\][<>]/g; - const firstCommand = splitCommand.shift(); - if (!firstCommand) - throw new Error(`No command found in: ${cmd}`); - const parsedCommand = { - cmd: firstCommand.replace(bregex, ''), - demanded: [], - optional: [], - }; - splitCommand.forEach((cmd, i) => { - let variadic = false; - cmd = cmd.replace(/\s/g, ''); - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) - variadic = true; - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - }); - return parsedCommand; -} - -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; -function argsert(arg1, arg2, arg3) { - function parseArgs() { - return typeof arg1 === 'object' - ? [{ demanded: [], optional: [] }, arg1, arg2] - : [ - parseCommand(`cmd ${arg1}`), - arg2, - arg3, - ]; - } - try { - let position = 0; - const [parsed, callerArguments, _length] = parseArgs(); - const args = [].slice.call(callerArguments); - while (args.length && args[args.length - 1] === undefined) - args.pop(); - const length = _length || args.length; - if (length < parsed.demanded.length) { - throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); - } - const totalCommands = parsed.demanded.length + parsed.optional.length; - if (length > totalCommands) { - throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); - } - parsed.demanded.forEach(demanded => { - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, demanded.cmd, position); - position += 1; - }); - parsed.optional.forEach(optional => { - if (args.length === 0) - return; - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, optional.cmd, position); - position += 1; - }); - } - catch (err) { - console.warn(err.stack); - } -} -function guessType(arg) { - if (Array.isArray(arg)) { - return 'array'; - } - else if (arg === null) { - return 'null'; - } - return typeof arg; -} -function argumentTypeError(observedType, allowedTypes, position) { - throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); -} - -class GlobalMiddleware { - constructor(yargs) { - this.globalMiddleware = []; - this.frozens = []; - this.yargs = yargs; - } - addMiddleware(callback, applyBeforeValidation, global = true, mutates = false) { - argsert(' [boolean] [boolean] [boolean]', [callback, applyBeforeValidation, global], arguments.length); - if (Array.isArray(callback)) { - for (let i = 0; i < callback.length; i++) { - if (typeof callback[i] !== 'function') { - throw Error('middleware must be a function'); - } - const m = callback[i]; - m.applyBeforeValidation = applyBeforeValidation; - m.global = global; - } - Array.prototype.push.apply(this.globalMiddleware, callback); - } - else if (typeof callback === 'function') { - const m = callback; - m.applyBeforeValidation = applyBeforeValidation; - m.global = global; - m.mutates = mutates; - this.globalMiddleware.push(callback); - } - return this.yargs; - } - addCoerceMiddleware(callback, option) { - const aliases = this.yargs.getAliases(); - this.globalMiddleware = this.globalMiddleware.filter(m => { - const toCheck = [...(aliases[option] || []), option]; - if (!m.option) - return true; - else - return !toCheck.includes(m.option); - }); - callback.option = option; - return this.addMiddleware(callback, true, true, true); - } - getMiddleware() { - return this.globalMiddleware; - } - freeze() { - this.frozens.push([...this.globalMiddleware]); - } - unfreeze() { - const frozen = this.frozens.pop(); - if (frozen !== undefined) - this.globalMiddleware = frozen; - } - reset() { - this.globalMiddleware = this.globalMiddleware.filter(m => m.global); - } -} -function commandMiddlewareFactory(commandMiddleware) { - if (!commandMiddleware) - return []; - return commandMiddleware.map(middleware => { - middleware.applyBeforeValidation = false; - return middleware; - }); -} -function applyMiddleware(argv, yargs, middlewares, beforeValidation) { - return middlewares.reduce((acc, middleware) => { - if (middleware.applyBeforeValidation !== beforeValidation) { - return acc; - } - if (middleware.mutates) { - if (middleware.applied) - return acc; - middleware.applied = true; - } - if (isPromise$1(acc)) { - return acc - .then(initialObj => Promise.all([initialObj, middleware(initialObj, yargs)])) - .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); - } - else { - const result = middleware(acc, yargs); - return isPromise$1(result) - ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) - : Object.assign(acc, result); - } - }, argv); -} - -function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => { - throw err; -}) { - try { - const result = isFunction$1(getResult) ? getResult() : getResult; - return isPromise$1(result) - ? result.then((result) => resultHandler(result)) - : resultHandler(result); - } - catch (err) { - return errorHandler(err); - } -} -function isFunction$1(arg) { - return typeof arg === 'function'; -} - -const DEFAULT_MARKER = /(^\*)|(^\$0)/; -class CommandInstance { - constructor(usage, validation, globalMiddleware, shim) { - this.requireCache = new Set(); - this.handlers = {}; - this.aliasMap = {}; - this.frozens = []; - this.shim = shim; - this.usage = usage; - this.globalMiddleware = globalMiddleware; - this.validation = validation; - } - addDirectory(dir, req, callerFile, opts) { - opts = opts || {}; - this.requireCache.add(callerFile); - const fullDirPath = this.shim.path.resolve(this.shim.path.dirname(callerFile), dir); - const files = this.shim.readdirSync(fullDirPath, { - recursive: opts.recurse ? true : false, - }); - if (!Array.isArray(opts.extensions)) - opts.extensions = ['js']; - const visit = typeof opts.visit === 'function' ? opts.visit : (o) => o; - for (const fileb of files) { - const file = fileb.toString(); - if (opts.exclude) { - let exclude = false; - if (typeof opts.exclude === 'function') { - exclude = opts.exclude(file); - } - else { - exclude = opts.exclude.test(file); - } - if (exclude) - continue; - } - if (opts.include) { - let include = false; - if (typeof opts.include === 'function') { - include = opts.include(file); - } - else { - include = opts.include.test(file); - } - if (!include) - continue; - } - let supportedExtension = false; - for (const ext of opts.extensions) { - if (file.endsWith(ext)) - supportedExtension = true; - } - if (supportedExtension) { - const joined = this.shim.path.join(fullDirPath, file); - const module = req(joined); - const extendableModule = Object.create(null, Object.getOwnPropertyDescriptors({ ...module })); - const visited = visit(extendableModule, joined, file); - if (visited) { - if (this.requireCache.has(joined)) - continue; - else - this.requireCache.add(joined); - if (!extendableModule.command) { - extendableModule.command = this.shim.path.basename(joined, this.shim.path.extname(joined)); - } - this.addHandler(extendableModule); - } - } - } - } - addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { - let aliases = []; - const middlewares = commandMiddlewareFactory(commandMiddleware); - handler = handler || (() => { }); - if (Array.isArray(cmd)) { - if (isCommandAndAliases(cmd)) { - [cmd, ...aliases] = cmd; - } - else { - for (const command of cmd) { - this.addHandler(command); - } - } - } - else if (isCommandHandlerDefinition(cmd)) { - let command = Array.isArray(cmd.command) || typeof cmd.command === 'string' - ? cmd.command - : null; - if (command === null) { - throw new Error(`No command name given for module: ${this.shim.inspect(cmd)}`); - } - if (cmd.aliases) - command = [].concat(command).concat(cmd.aliases); - this.addHandler(command, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); - return; - } - else if (isCommandBuilderDefinition(builder)) { - this.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); - return; - } - if (typeof cmd === 'string') { - const parsedCommand = parseCommand(cmd); - aliases = aliases.map(alias => parseCommand(alias).cmd); - let isDefault = false; - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true; - return false; - } - return true; - }); - if (parsedAliases.length === 0 && isDefault) - parsedAliases.push('$0'); - if (isDefault) { - parsedCommand.cmd = parsedAliases[0]; - aliases = parsedAliases.slice(1); - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); - } - aliases.forEach(alias => { - this.aliasMap[alias] = parsedCommand.cmd; - }); - if (description !== false) { - this.usage.command(cmd, description, isDefault, aliases, deprecated); - } - this.handlers[parsedCommand.cmd] = { - original: cmd, - description, - handler, - builder: builder || {}, - middlewares, - deprecated, - demanded: parsedCommand.demanded, - optional: parsedCommand.optional, - }; - if (isDefault) - this.defaultCommand = this.handlers[parsedCommand.cmd]; - } - } - getCommandHandlers() { - return this.handlers; - } - getCommands() { - return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); - } - hasDefaultCommand() { - return !!this.defaultCommand; - } - runCommand(command, yargs, parsed, commandIndex, helpOnly, helpOrVersionSet) { - const commandHandler = this.handlers[command] || - this.handlers[this.aliasMap[command]] || - this.defaultCommand; - const currentContext = yargs.getInternalMethods().getContext(); - const parentCommands = currentContext.commands.slice(); - const isDefaultCommand = !command; - if (command) { - currentContext.commands.push(command); - currentContext.fullCommands.push(commandHandler.original); - } - const builderResult = this.applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, parsed.aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet); - return isPromise$1(builderResult) - ? builderResult.then(result => this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, result.innerArgv, currentContext, helpOnly, result.aliases, yargs)) - : this.applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, builderResult.innerArgv, currentContext, helpOnly, builderResult.aliases, yargs); - } - applyBuilderUpdateUsageAndParse(isDefaultCommand, commandHandler, yargs, aliases, parentCommands, commandIndex, helpOnly, helpOrVersionSet) { - const builder = commandHandler.builder; - let innerYargs = yargs; - if (isCommandBuilderCallback(builder)) { - yargs.getInternalMethods().getUsageInstance().freeze(); - const builderOutput = builder(yargs.getInternalMethods().reset(aliases), helpOrVersionSet); - if (isPromise$1(builderOutput)) { - return builderOutput.then(output => { - innerYargs = isYargsInstance(output) ? output : yargs; - return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); - }); - } - } - else if (isCommandBuilderOptionDefinitions(builder)) { - yargs.getInternalMethods().getUsageInstance().freeze(); - innerYargs = yargs.getInternalMethods().reset(aliases); - Object.keys(commandHandler.builder).forEach(key => { - innerYargs.option(key, builder[key]); - }); - } - return this.parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly); - } - parseAndUpdateUsage(isDefaultCommand, commandHandler, innerYargs, parentCommands, commandIndex, helpOnly) { - if (isDefaultCommand) - innerYargs.getInternalMethods().getUsageInstance().unfreeze(true); - if (this.shouldUpdateUsage(innerYargs)) { - innerYargs - .getInternalMethods() - .getUsageInstance() - .usage(this.usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - const innerArgv = innerYargs - .getInternalMethods() - .runYargsParserAndExecuteCommands(null, undefined, true, commandIndex, helpOnly); - return isPromise$1(innerArgv) - ? innerArgv.then(argv => ({ - aliases: innerYargs.parsed.aliases, - innerArgv: argv, - })) - : { - aliases: innerYargs.parsed.aliases, - innerArgv: innerArgv, - }; - } - shouldUpdateUsage(yargs) { - return (!yargs.getInternalMethods().getUsageInstance().getUsageDisabled() && - yargs.getInternalMethods().getUsageInstance().getUsage().length === 0); - } - usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) - ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() - : commandHandler.original; - const pc = parentCommands.filter(c => { - return !DEFAULT_MARKER.test(c); - }); - pc.push(c); - return `$0 ${pc.join(' ')}`; - } - handleValidationAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, aliases, yargs, middlewares, positionalMap) { - if (!yargs.getInternalMethods().getHasOutput()) { - const validation = yargs - .getInternalMethods() - .runValidation(aliases, positionalMap, yargs.parsed.error, isDefaultCommand); - innerArgv = maybeAsyncResult(innerArgv, result => { - validation(result); - return result; - }); - } - if (commandHandler.handler && !yargs.getInternalMethods().getHasOutput()) { - yargs.getInternalMethods().setHasOutput(); - const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; - yargs - .getInternalMethods() - .postProcess(innerArgv, populateDoubleDash, false, false); - innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false); - innerArgv = maybeAsyncResult(innerArgv, result => { - const handlerResult = commandHandler.handler(result); - return isPromise$1(handlerResult) - ? handlerResult.then(() => result) - : result; - }); - if (!isDefaultCommand) { - yargs.getInternalMethods().getUsageInstance().cacheHelpMessage(); - } - if (isPromise$1(innerArgv) && - !yargs.getInternalMethods().hasParseCallback()) { - innerArgv.catch(error => { - try { - yargs.getInternalMethods().getUsageInstance().fail(null, error); - } - catch (_err) { - } - }); - } - } - if (!isDefaultCommand) { - currentContext.commands.pop(); - currentContext.fullCommands.pop(); - } - return innerArgv; - } - applyMiddlewareAndGetResult(isDefaultCommand, commandHandler, innerArgv, currentContext, helpOnly, aliases, yargs) { - let positionalMap = {}; - if (helpOnly) - return innerArgv; - if (!yargs.getInternalMethods().getHasOutput()) { - positionalMap = this.populatePositionals(commandHandler, innerArgv, currentContext, yargs); - } - const middlewares = this.globalMiddleware - .getMiddleware() - .slice(0) - .concat(commandHandler.middlewares); - const maybePromiseArgv = applyMiddleware(innerArgv, yargs, middlewares, true); - return isPromise$1(maybePromiseArgv) - ? maybePromiseArgv.then(resolvedInnerArgv => this.handleValidationAndGetResult(isDefaultCommand, commandHandler, resolvedInnerArgv, currentContext, aliases, yargs, middlewares, positionalMap)) - : this.handleValidationAndGetResult(isDefaultCommand, commandHandler, maybePromiseArgv, currentContext, aliases, yargs, middlewares, positionalMap); - } - populatePositionals(commandHandler, argv, context, yargs) { - argv._ = argv._.slice(context.commands.length); - const demanded = commandHandler.demanded.slice(0); - const optional = commandHandler.optional.slice(0); - const positionalMap = {}; - this.validation.positionalCount(demanded.length, argv._.length); - while (demanded.length) { - const demand = demanded.shift(); - this.populatePositional(demand, argv, positionalMap); - } - while (optional.length) { - const maybe = optional.shift(); - this.populatePositional(maybe, argv, positionalMap); - } - argv._ = context.commands.concat(argv._.map(a => '' + a)); - this.postProcessPositionals(argv, positionalMap, this.cmdToParseOptions(commandHandler.original), yargs); - return positionalMap; - } - populatePositional(positional, argv, positionalMap) { - const cmd = positional.cmd[0]; - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String); - } - else { - if (argv._.length) - positionalMap[cmd] = [String(argv._.shift())]; - } - } - cmdToParseOptions(cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {}, - }; - const parsed = parseCommand(cmdString); - parsed.demanded.forEach(d => { - const [cmd, ...aliases] = d.cmd; - if (d.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - parseOptions.demand[cmd] = true; - }); - parsed.optional.forEach(o => { - const [cmd, ...aliases] = o.cmd; - if (o.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - }); - return parseOptions; - } - postProcessPositionals(argv, positionalMap, parseOptions, yargs) { - const options = Object.assign({}, yargs.getOptions()); - options.default = Object.assign(parseOptions.default, options.default); - for (const key of Object.keys(parseOptions.alias)) { - options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); - } - options.array = options.array.concat(parseOptions.array); - options.config = {}; - const unparsed = []; - Object.keys(positionalMap).forEach(key => { - positionalMap[key].map(value => { - if (options.configuration['unknown-options-as-args']) - options.key[key] = true; - unparsed.push(`--${key}`); - unparsed.push(value); - }); - }); - if (!unparsed.length) - return; - const config = Object.assign({}, options.configuration, { - 'populate--': false, - }); - const parsed = this.shim.Parser.detailed(unparsed, Object.assign({}, options, { - configuration: config, - })); - if (parsed.error) { - yargs - .getInternalMethods() - .getUsageInstance() - .fail(parsed.error.message, parsed.error); - } - else { - const positionalKeys = Object.keys(positionalMap); - Object.keys(positionalMap).forEach(key => { - positionalKeys.push(...parsed.aliases[key]); - }); - Object.keys(parsed.argv).forEach(key => { - if (positionalKeys.includes(key)) { - if (!positionalMap[key]) - positionalMap[key] = parsed.argv[key]; - if (!this.isInConfigs(yargs, key) && - !this.isDefaulted(yargs, key) && - Object.prototype.hasOwnProperty.call(argv, key) && - Object.prototype.hasOwnProperty.call(parsed.argv, key) && - (Array.isArray(argv[key]) || Array.isArray(parsed.argv[key]))) { - argv[key] = [].concat(argv[key], parsed.argv[key]); - } - else { - argv[key] = parsed.argv[key]; - } - } - }); - } - } - isDefaulted(yargs, key) { - const { default: defaults } = yargs.getOptions(); - return (Object.prototype.hasOwnProperty.call(defaults, key) || - Object.prototype.hasOwnProperty.call(defaults, this.shim.Parser.camelCase(key))); - } - isInConfigs(yargs, key) { - const { configObjects } = yargs.getOptions(); - return (configObjects.some(c => Object.prototype.hasOwnProperty.call(c, key)) || - configObjects.some(c => Object.prototype.hasOwnProperty.call(c, this.shim.Parser.camelCase(key)))); - } - runDefaultBuilderOn(yargs) { - if (!this.defaultCommand) - return; - if (this.shouldUpdateUsage(yargs)) { - const commandString = DEFAULT_MARKER.test(this.defaultCommand.original) - ? this.defaultCommand.original - : this.defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); - yargs - .getInternalMethods() - .getUsageInstance() - .usage(commandString, this.defaultCommand.description); - } - const builder = this.defaultCommand.builder; - if (isCommandBuilderCallback(builder)) { - return builder(yargs, true); - } - else if (!isCommandBuilderDefinition(builder)) { - Object.keys(builder).forEach(key => { - yargs.option(key, builder[key]); - }); - } - return undefined; - } - extractDesc({ describe, description, desc }) { - for (const test of [describe, description, desc]) { - if (typeof test === 'string' || test === false) - return test; - assertNotStrictEqual(test, true, this.shim); - } - return false; - } - freeze() { - this.frozens.push({ - handlers: this.handlers, - aliasMap: this.aliasMap, - defaultCommand: this.defaultCommand, - }); - } - unfreeze() { - const frozen = this.frozens.pop(); - assertNotStrictEqual(frozen, undefined, this.shim); - ({ - handlers: this.handlers, - aliasMap: this.aliasMap, - defaultCommand: this.defaultCommand, - } = frozen); - } - reset() { - this.handlers = {}; - this.aliasMap = {}; - this.defaultCommand = undefined; - this.requireCache = new Set(); - return this; - } -} -function command(usage, validation, globalMiddleware, shim) { - return new CommandInstance(usage, validation, globalMiddleware, shim); -} -function isCommandBuilderDefinition(builder) { - return (typeof builder === 'object' && - !!builder.builder && - typeof builder.handler === 'function'); -} -function isCommandAndAliases(cmd) { - return cmd.every(c => typeof c === 'string'); -} -function isCommandBuilderCallback(builder) { - return typeof builder === 'function'; -} -function isCommandBuilderOptionDefinitions(builder) { - return typeof builder === 'object'; -} -function isCommandHandlerDefinition(cmd) { - return typeof cmd === 'object' && !Array.isArray(cmd); -} - -function objFilter(original = {}, filter = () => true) { - const obj = {}; - objectKeys(original).forEach(key => { - if (filter(key, original[key])) { - obj[key] = original[key]; - } - }); - return obj; -} - -function setBlocking(blocking) { - if (typeof process === 'undefined') - return; - [process.stdout, process.stderr].forEach(_stream => { - const stream = _stream; - if (stream._handle && - stream.isTTY && - typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking); - } - }); -} - -function isBoolean(fail) { - return typeof fail === 'boolean'; -} -function usage(yargs, shim) { - const __ = shim.y18n.__; - const self = {}; - const fails = []; - self.failFn = function failFn(f) { - fails.push(f); - }; - let failMessage = null; - let globalFailMessage = null; - let showHelpOnFail = true; - self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { - const [enabled, message] = typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; - if (yargs.getInternalMethods().isGlobalContext()) { - globalFailMessage = message; - } - failMessage = message; - showHelpOnFail = enabled; - return self; - }; - let failureOutput = false; - self.fail = function fail(msg, err) { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - const fail = fails[i]; - if (isBoolean(fail)) { - if (err) - throw err; - else if (msg) - throw Error(msg); - } - else { - fail(msg, err, self); - } - } - } - else { - if (yargs.getExitProcess()) - setBlocking(true); - if (!failureOutput) { - failureOutput = true; - if (showHelpOnFail) { - yargs.showHelp('error'); - logger.error(); - } - if (msg || err) - logger.error(msg || err); - const globalOrCommandFailMessage = failMessage || globalFailMessage; - if (globalOrCommandFailMessage) { - if (msg || err) - logger.error(''); - logger.error(globalOrCommandFailMessage); - } - } - err = err || new YError(msg); - if (yargs.getExitProcess()) { - return yargs.exit(1); - } - else if (yargs.getInternalMethods().hasParseCallback()) { - return yargs.exit(1, err); - } - else { - throw err; - } - } - }; - let usages = []; - let usageDisabled = false; - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true; - usages = []; - return self; - } - usageDisabled = false; - usages.push([msg, description || '']); - return self; - }; - self.getUsage = () => { - return usages; - }; - self.getUsageDisabled = () => { - return usageDisabled; - }; - self.getPositionalGroupName = () => { - return __('Positionals:'); - }; - let examples = []; - self.example = (cmd, description) => { - examples.push([cmd, description || '']); - }; - let commands = []; - self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { - if (isDefault) { - commands = commands.map(cmdArray => { - cmdArray[2] = false; - return cmdArray; - }); - } - commands.push([cmd, description || '', isDefault, aliases, deprecated]); - }; - self.getCommands = () => commands; - let descriptions = {}; - self.describe = function describe(keyOrKeys, desc) { - if (Array.isArray(keyOrKeys)) { - keyOrKeys.forEach(k => { - self.describe(k, desc); - }); - } - else if (typeof keyOrKeys === 'object') { - Object.keys(keyOrKeys).forEach(k => { - self.describe(k, keyOrKeys[k]); - }); - } - else { - descriptions[keyOrKeys] = desc; - } - }; - self.getDescriptions = () => descriptions; - let epilogs = []; - self.epilog = msg => { - epilogs.push(msg); - }; - let wrapSet = false; - let wrap; - self.wrap = cols => { - wrapSet = true; - wrap = cols; - }; - self.getWrap = () => { - if (shim.getEnv('YARGS_DISABLE_WRAP')) { - return null; - } - if (!wrapSet) { - wrap = windowWidth(); - wrapSet = true; - } - return wrap; - }; - const deferY18nLookupPrefix = '__yargsString__:'; - self.deferY18nLookup = str => deferY18nLookupPrefix + str; - self.help = function help() { - if (cachedHelpMessage) - return cachedHelpMessage; - normalizeAliases(); - const base$0 = yargs.customScriptName - ? yargs.$0 - : shim.path.basename(yargs.$0); - const demandedOptions = yargs.getDemandedOptions(); - const demandedCommands = yargs.getDemandedCommands(); - const deprecatedOptions = yargs.getDeprecatedOptions(); - const groups = yargs.getGroups(); - const options = yargs.getOptions(); - let keys = []; - keys = keys.concat(Object.keys(descriptions)); - keys = keys.concat(Object.keys(demandedOptions)); - keys = keys.concat(Object.keys(demandedCommands)); - keys = keys.concat(Object.keys(options.default)); - keys = keys.filter(filterHiddenOptions); - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') - acc[key] = true; - return acc; - }, {})); - const theWrap = self.getWrap(); - const ui = shim.cliui({ - width: theWrap, - wrap: !!theWrap, - }); - if (!usageDisabled) { - if (usages.length) { - usages.forEach(usage => { - ui.div({ text: `${usage[0].replace(/\$0/g, base$0)}` }); - if (usage[1]) { - ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); - } - }); - ui.div(); - } - else if (commands.length) { - let u = null; - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n`; - } - else { - u = `${base$0} [${__('command')}]\n`; - } - ui.div(`${u}`); - } - } - if (commands.length > 1 || (commands.length === 1 && !commands[0][2])) { - ui.div(__('Commands:')); - const context = yargs.getInternalMethods().getContext(); - const parentCommands = context.commands.length - ? `${context.commands.join(' ')} ` - : ''; - if (yargs.getInternalMethods().getParserConfiguration()['sort-commands'] === - true) { - commands = commands.sort((a, b) => a[0].localeCompare(b[0])); - } - const prefix = base$0 ? `${base$0} ` : ''; - commands.forEach(command => { - const commandString = `${prefix}${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; - ui.span({ - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4, - }, { text: command[1] }); - const hints = []; - if (command[2]) - hints.push(`[${__('default')}]`); - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); - } - if (command[4]) { - if (typeof command[4] === 'string') { - hints.push(`[${__('deprecated: %s', command[4])}]`); - } - else { - hints.push(`[${__('deprecated')}]`); - } - } - if (hints.length) { - ui.div({ - text: hints.join(' '), - padding: [0, 0, 0, 2], - align: 'right', - }); - } - else { - ui.div(); - } - }); - ui.div(); - } - const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []); - keys = keys.filter(key => !yargs.parsed.newAliases[key] && - aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); - const defaultGroup = __('Options:'); - if (!groups[defaultGroup]) - groups[defaultGroup] = []; - addUngroupedKeys(keys, options.alias, groups, defaultGroup); - const isLongSwitch = (sw) => /^--/.test(getText$1(sw)); - const displayedGroups = Object.keys(groups) - .filter(groupName => groups[groupName].length > 0) - .map(groupName => { - const normalizedKeys = groups[groupName] - .filter(filterHiddenOptions) - .map(key => { - if (aliasKeys.includes(key)) - return key; - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if ((options.alias[aliasKey] || []).includes(key)) - return aliasKey; - } - return key; - }); - return { groupName, normalizedKeys }; - }) - .filter(({ normalizedKeys }) => normalizedKeys.length > 0) - .map(({ groupName, normalizedKeys }) => { - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [key] - .concat(options.alias[key] || []) - .map(sw => { - if (groupName === self.getPositionalGroupName()) - return sw; - else { - return ((/^[0-9]$/.test(sw) - ? options.boolean.includes(key) - ? '-' - : '--' - : sw.length > 1 - ? '--' - : '-') + sw); - } - }) - .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) - ? 0 - : isLongSwitch(sw1) - ? 1 - : -1) - .join(', '); - return acc; - }, {}); - return { groupName, normalizedKeys, switches }; - }); - const shortSwitchesUsed = displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key]))); - if (shortSwitchesUsed) { - displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .forEach(({ normalizedKeys, switches }) => { - normalizedKeys.forEach(key => { - if (isLongSwitch(switches[key])) { - switches[key] = addIndentation(switches[key], '-x, '.length); - } - }); - }); - } - displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => { - ui.div(groupName); - normalizedKeys.forEach(key => { - const kswitch = switches[key]; - let desc = descriptions[key] || ''; - let type = null; - if (desc.includes(deferY18nLookupPrefix)) - desc = __(desc.substring(deferY18nLookupPrefix.length)); - if (options.boolean.includes(key)) - type = `[${__('boolean')}]`; - if (options.count.includes(key)) - type = `[${__('count')}]`; - if (options.string.includes(key)) - type = `[${__('string')}]`; - if (options.normalize.includes(key)) - type = `[${__('string')}]`; - if (options.array.includes(key)) - type = `[${__('array')}]`; - if (options.number.includes(key)) - type = `[${__('number')}]`; - const deprecatedExtra = (deprecated) => typeof deprecated === 'string' - ? `[${__('deprecated: %s', deprecated)}]` - : `[${__('deprecated')}]`; - const extra = [ - key in deprecatedOptions - ? deprecatedExtra(deprecatedOptions[key]) - : null, - type, - key in demandedOptions ? `[${__('required')}]` : null, - options.choices && options.choices[key] - ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` - : null, - defaultString(options.default[key], options.defaultDescription[key]), - ] - .filter(Boolean) - .join(' '); - ui.span({ - text: getText$1(kswitch), - padding: [0, 2, 0, 2 + getIndentation(kswitch)], - width: maxWidth(switches, theWrap) + 4, - }, desc); - const shouldHideOptionExtras = yargs.getInternalMethods().getUsageConfiguration()['hide-types'] === - true; - if (extra && !shouldHideOptionExtras) - ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); - else - ui.div(); - }); - ui.div(); - }); - if (examples.length) { - ui.div(__('Examples:')); - examples.forEach(example => { - example[0] = example[0].replace(/\$0/g, base$0); - }); - examples.forEach(example => { - if (example[1] === '') { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - }); - } - else { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4, - }, { - text: example[1], - }); - } - }); - ui.div(); - } - if (epilogs.length > 0) { - const e = epilogs - .map(epilog => epilog.replace(/\$0/g, base$0)) - .join('\n'); - ui.div(`${e}\n`); - } - return ui.toString().replace(/\s*$/, ''); - }; - function maxWidth(table, theWrap, modifier) { - let width = 0; - if (!Array.isArray(table)) { - table = Object.values(table).map(v => [v]); - } - table.forEach(v => { - width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText$1(v[0])}` : getText$1(v[0])) + getIndentation(v[0]), width); - }); - if (theWrap) - width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); - return width; - } - function normalizeAliases() { - const demandedOptions = yargs.getDemandedOptions(); - const options = yargs.getOptions(); - (Object.keys(options.alias) || []).forEach(key => { - options.alias[key].forEach(alias => { - if (descriptions[alias]) - self.describe(key, descriptions[alias]); - if (alias in demandedOptions) - yargs.demandOption(key, demandedOptions[alias]); - if (options.boolean.includes(alias)) - yargs.boolean(key); - if (options.count.includes(alias)) - yargs.count(key); - if (options.string.includes(alias)) - yargs.string(key); - if (options.normalize.includes(alias)) - yargs.normalize(key); - if (options.array.includes(alias)) - yargs.array(key); - if (options.number.includes(alias)) - yargs.number(key); - }); - }); - } - let cachedHelpMessage; - self.cacheHelpMessage = function () { - cachedHelpMessage = this.help(); - }; - self.clearCachedHelpMessage = function () { - cachedHelpMessage = undefined; - }; - self.hasCachedHelpMessage = function () { - return !!cachedHelpMessage; - }; - function addUngroupedKeys(keys, aliases, groups, defaultGroup) { - let groupedKeys = []; - let toCheck = null; - Object.keys(groups).forEach(group => { - groupedKeys = groupedKeys.concat(groups[group]); - }); - keys.forEach(key => { - toCheck = [key].concat(aliases[key]); - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key); - } - }); - return groupedKeys; - } - function filterHiddenOptions(key) { - return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 || - yargs.parsed.argv[yargs.getOptions().showHiddenOpt]); - } - self.showHelp = (level) => { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(self.help()); - }; - self.functionDescription = fn => { - const description = fn.name - ? shim.Parser.decamelize(fn.name, '-') - : __('generated-value'); - return ['(', description, ')'].join(''); - }; - self.stringifiedValues = function stringifiedValues(values, separator) { - let string = ''; - const sep = separator || ', '; - const array = [].concat(values); - if (!values || !array.length) - return string; - array.forEach(value => { - if (string.length) - string += sep; - string += JSON.stringify(value); - }); - return string; - }; - function defaultString(value, defaultDescription) { - let string = `[${__('default:')} `; - if (value === undefined && !defaultDescription) - return null; - if (defaultDescription) { - string += defaultDescription; - } - else { - switch (typeof value) { - case 'string': - string += `"${value}"`; - break; - case 'object': - string += JSON.stringify(value); - break; - default: - string += value; - } - } - return `${string}]`; - } - function windowWidth() { - const maxWidth = 80; - if (shim.process.stdColumns) { - return Math.min(maxWidth, shim.process.stdColumns); - } - else { - return maxWidth; - } - } - let version = null; - self.version = ver => { - version = ver; - }; - self.showVersion = level => { - const logger = yargs.getInternalMethods().getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(version); - }; - self.reset = function reset(localLookup) { - failMessage = null; - failureOutput = false; - usages = []; - usageDisabled = false; - epilogs = []; - examples = []; - commands = []; - descriptions = objFilter(descriptions, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - }); - }; - self.unfreeze = function unfreeze(defaultCommand = false) { - const frozen = frozens.pop(); - if (!frozen) - return; - if (defaultCommand) { - descriptions = { ...frozen.descriptions, ...descriptions }; - commands = [...frozen.commands, ...commands]; - usages = [...frozen.usages, ...usages]; - examples = [...frozen.examples, ...examples]; - epilogs = [...frozen.epilogs, ...epilogs]; - } - else { - ({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - } = frozen); - } - }; - return self; -} -function isIndentedText(text) { - return typeof text === 'object'; -} -function addIndentation(text, indent) { - return isIndentedText(text) - ? { text: text.text, indentation: text.indentation + indent } - : { text, indentation: indent }; -} -function getIndentation(text) { - return isIndentedText(text) ? text.indentation : 0; -} -function getText$1(text) { - return isIndentedText(text) ? text.text : text; -} - -const completionShTemplate = `###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local cur_word args type_list - - cur_word="\${COMP_WORDS[COMP_CWORD]}" - args=("\${COMP_WORDS[@]}") - - # ask yargs to generate completions. - # see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk - mapfile -t type_list < <({{app_path}} --get-yargs-completions "\${args[@]}") - mapfile -t COMPREPLY < <(compgen -W "$( printf '%q ' "\${type_list[@]}" )" -- "\${cur_word}" | - awk '/ / { print "\\""$0"\\"" } /^[^ ]+$/ { print $0 }') - - # if no match was found, fall back to filename completion - if [ \${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=() - fi - - return 0 -} -complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -`; -const completionZshTemplate = `#compdef {{app_name}} -###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc -# or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local reply - local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) - IFS=$si - if [[ \${#reply} -gt 0 ]]; then - _describe 'values' reply - else - _default - fi -} -if [[ "'\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then - _{{app_name}}_yargs_completions "$@" -else - compdef _{{app_name}}_yargs_completions {{app_name}} -fi -###-end-{{app_name}}-completions-### -`; - -class Completion { - constructor(yargs, usage, command, shim) { - var _a, _b, _c; - this.yargs = yargs; - this.usage = usage; - this.command = command; - this.shim = shim; - this.completionKey = 'get-yargs-completions'; - this.aliases = null; - this.customCompletionFunction = null; - this.indexAfterLastReset = 0; - this.zshShell = - (_c = (((_a = this.shim.getEnv('SHELL')) === null || _a === void 0 ? void 0 : _a.includes('zsh')) || - ((_b = this.shim.getEnv('ZSH_NAME')) === null || _b === void 0 ? void 0 : _b.includes('zsh')))) !== null && _c !== void 0 ? _c : false; - } - defaultCompletion(args, argv, current, done) { - const handlers = this.command.getCommandHandlers(); - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder; - if (isCommandBuilderCallback(builder)) { - this.indexAfterLastReset = i + 1; - const y = this.yargs.getInternalMethods().reset(); - builder(y, true); - return y.argv; - } - } - } - const completions = []; - this.commandCompletions(completions, args, current); - this.optionCompletions(completions, args, argv, current); - this.choicesFromOptionsCompletions(completions, args, argv, current); - this.choicesFromPositionalsCompletions(completions, args, argv, current); - done(null, completions); - } - commandCompletions(completions, args, current) { - const parentCommands = this.yargs - .getInternalMethods() - .getContext().commands; - if (!current.match(/^-/) && - parentCommands[parentCommands.length - 1] !== current && - !this.previousArgHasChoices(args)) { - this.usage.getCommands().forEach(usageCommand => { - const commandName = parseCommand(usageCommand[0]).cmd; - if (args.indexOf(commandName) === -1) { - if (!this.zshShell) { - completions.push(commandName); - } - else { - const desc = usageCommand[1] || ''; - completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); - } - } - }); - } - } - optionCompletions(completions, args, argv, current) { - if ((current.match(/^-/) || (current === '' && completions.length === 0)) && - !this.previousArgHasChoices(args)) { - const options = this.yargs.getOptions(); - const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; - Object.keys(options.key).forEach(key => { - const negable = !!options.configuration['boolean-negation'] && - options.boolean.includes(key); - const isPositionalKey = positionalKeys.includes(key); - if (!isPositionalKey && - !options.hiddenOptions.includes(key) && - !this.argsContainKey(args, key, negable)) { - this.completeOptionKey(key, completions, current, negable && !!options.default[key]); - } - }); - } - } - choicesFromOptionsCompletions(completions, args, argv, current) { - if (this.previousArgHasChoices(args)) { - const choices = this.getPreviousArgChoices(args); - if (choices && choices.length > 0) { - completions.push(...choices.map(c => c.replace(/:/g, '\\:'))); - } - } - } - choicesFromPositionalsCompletions(completions, args, argv, current) { - if (current === '' && - completions.length > 0 && - this.previousArgHasChoices(args)) { - return; - } - const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; - const offset = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + - 1); - const positionalKey = positionalKeys[argv._.length - offset - 1]; - if (!positionalKey) { - return; - } - const choices = this.yargs.getOptions().choices[positionalKey] || []; - for (const choice of choices) { - if (choice.startsWith(current)) { - completions.push(choice.replace(/:/g, '\\:')); - } - } - } - getPreviousArgChoices(args) { - if (args.length < 1) - return; - let previousArg = args[args.length - 1]; - let filter = ''; - if (!previousArg.startsWith('-') && args.length > 1) { - filter = previousArg; - previousArg = args[args.length - 2]; - } - if (!previousArg.startsWith('-')) - return; - const previousArgKey = previousArg.replace(/^-+/, ''); - const options = this.yargs.getOptions(); - const possibleAliases = [ - previousArgKey, - ...(this.yargs.getAliases()[previousArgKey] || []), - ]; - let choices; - for (const possibleAlias of possibleAliases) { - if (Object.prototype.hasOwnProperty.call(options.key, possibleAlias) && - Array.isArray(options.choices[possibleAlias])) { - choices = options.choices[possibleAlias]; - break; - } - } - if (choices) { - return choices.filter(choice => !filter || choice.startsWith(filter)); - } - } - previousArgHasChoices(args) { - const choices = this.getPreviousArgChoices(args); - return choices !== undefined && choices.length > 0; - } - argsContainKey(args, key, negable) { - const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? '-' : '--') + s) !== -1; - if (argsContains(key)) - return true; - if (negable && argsContains(`no-${key}`)) - return true; - if (this.aliases) { - for (const alias of this.aliases[key]) { - if (argsContains(alias)) - return true; - } - } - return false; - } - completeOptionKey(key, completions, current, negable) { - var _a, _b, _c, _d; - let keyWithDesc = key; - if (this.zshShell) { - const descs = this.usage.getDescriptions(); - const aliasKey = (_b = (_a = this === null || this === void 0 ? void 0 : this.aliases) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.find(alias => { - const desc = descs[alias]; - return typeof desc === 'string' && desc.length > 0; - }); - const descFromAlias = aliasKey ? descs[aliasKey] : undefined; - const desc = (_d = (_c = descs[key]) !== null && _c !== void 0 ? _c : descFromAlias) !== null && _d !== void 0 ? _d : ''; - keyWithDesc = `${key.replace(/:/g, '\\:')}:${desc - .replace('__yargsString__:', '') - .replace(/(\r\n|\n|\r)/gm, ' ')}`; - } - const startsByTwoDashes = (s) => /^--/.test(s); - const isShortOption = (s) => /^[^0-9]$/.test(s); - const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; - completions.push(dashes + keyWithDesc); - if (negable) { - completions.push(dashes + 'no-' + keyWithDesc); - } - } - customCompletion(args, argv, current, done) { - assertNotStrictEqual(this.customCompletionFunction, null, this.shim); - if (isSyncCompletionFunction(this.customCompletionFunction)) { - const result = this.customCompletionFunction(current, argv); - if (isPromise$1(result)) { - return result - .then(list => { - this.shim.process.nextTick(() => { - done(null, list); - }); - }) - .catch(err => { - this.shim.process.nextTick(() => { - done(err, undefined); - }); - }); - } - return done(null, result); - } - else if (isFallbackCompletionFunction(this.customCompletionFunction)) { - return this.customCompletionFunction(current, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current, onCompleted), completions => { - done(null, completions); - }); - } - else { - return this.customCompletionFunction(current, argv, completions => { - done(null, completions); - }); - } - } - getCompletion(args, done) { - const current = args.length ? args[args.length - 1] : ''; - const argv = this.yargs.parse(args, true); - const completionFunction = this.customCompletionFunction - ? (argv) => this.customCompletion(args, argv, current, done) - : (argv) => this.defaultCompletion(args, argv, current, done); - return isPromise$1(argv) - ? argv.then(completionFunction) - : completionFunction(argv); - } - generateCompletionScript($0, cmd) { - let script = this.zshShell - ? completionZshTemplate - : completionShTemplate; - const name = this.shim.path.basename($0); - if ($0.match(/\.js$/)) - $0 = `./${$0}`; - script = script.replace(/{{app_name}}/g, name); - script = script.replace(/{{completion_command}}/g, cmd); - return script.replace(/{{app_path}}/g, $0); - } - registerFunction(fn) { - this.customCompletionFunction = fn; - } - setParsed(parsed) { - this.aliases = parsed.aliases; - } -} -function completion(yargs, usage, command, shim) { - return new Completion(yargs, usage, command, shim); -} -function isSyncCompletionFunction(completionFunction) { - return completionFunction.length < 3; -} -function isFallbackCompletionFunction(completionFunction) { - return completionFunction.length > 3; -} - -function levenshtein(a, b) { - if (a.length === 0) - return b.length; - if (b.length === 0) - return a.length; - const matrix = []; - let i; - for (i = 0; i <= b.length; i++) { - matrix[i] = [i]; - } - let j; - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j; - } - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1]; - } - else { - if (i > 1 && - j > 1 && - b.charAt(i - 2) === a.charAt(j - 1) && - b.charAt(i - 1) === a.charAt(j - 2)) { - matrix[i][j] = matrix[i - 2][j - 2] + 1; - } - else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); - } - } - } - } - return matrix[b.length][a.length]; -} - -const specialKeys = ['$0', '--', '_']; -function validation$3(yargs, usage, shim) { - const __ = shim.y18n.__; - const __n = shim.y18n.__n; - const self = {}; - self.nonOptionCount = function nonOptionCount(argv) { - const demandedCommands = yargs.getDemandedCommands(); - const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0); - const _s = positionalCount - yargs.getInternalMethods().getContext().commands.length; - if (demandedCommands._ && - (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail(demandedCommands._.minMsg - ? demandedCommands._.minMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.min.toString()) - : null); - } - else { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString())); - } - } - else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail(demandedCommands._.maxMsg - ? demandedCommands._.maxMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.max.toString()) - : null); - } - else { - usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString())); - } - } - } - }; - self.positionalCount = function positionalCount(required, observed) { - if (observed < required) { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + '')); - } - }; - self.requiredArguments = function requiredArguments(argv, demandedOptions) { - let missing = null; - for (const key of Object.keys(demandedOptions)) { - if (!Object.prototype.hasOwnProperty.call(argv, key) || - typeof argv[key] === 'undefined') { - missing = missing || {}; - missing[key] = demandedOptions[key]; - } - } - if (missing) { - const customMsgs = []; - for (const key of Object.keys(missing)) { - const msg = missing[key]; - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg); - } - } - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; - usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); - } - }; - self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) { - var _a; - const commandKeys = yargs - .getInternalMethods() - .getCommandInstance() - .getCommands(); - const unknown = []; - const currentContext = yargs.getInternalMethods().getContext(); - Object.keys(argv).forEach(key => { - if (!specialKeys.includes(key) && - !Object.prototype.hasOwnProperty.call(positionalMap, key) && - !Object.prototype.hasOwnProperty.call(yargs.getInternalMethods().getParseContext(), key) && - !self.isValidAndSomeAliasIsNotNew(key, aliases)) { - unknown.push(key); - } - }); - if (checkPositionals && - (currentContext.commands.length > 0 || - commandKeys.length > 0 || - isDefaultCommand)) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (!commandKeys.includes('' + key)) { - unknown.push('' + key); - } - }); - } - if (checkPositionals) { - const demandedCommands = yargs.getDemandedCommands(); - const maxNonOptDemanded = ((_a = demandedCommands._) === null || _a === void 0 ? void 0 : _a.max) || 0; - const expected = currentContext.commands.length + maxNonOptDemanded; - if (expected < argv._.length) { - argv._.slice(expected).forEach(key => { - key = String(key); - if (!currentContext.commands.includes(key) && - !unknown.includes(key)) { - unknown.push(key); - } - }); - } - } - if (unknown.length) { - usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.map(s => (s.trim() ? s : `"${s}"`)).join(', '))); - } - }; - self.unknownCommands = function unknownCommands(argv) { - const commandKeys = yargs - .getInternalMethods() - .getCommandInstance() - .getCommands(); - const unknown = []; - const currentContext = yargs.getInternalMethods().getContext(); - if (currentContext.commands.length > 0 || commandKeys.length > 0) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (!commandKeys.includes('' + key)) { - unknown.push('' + key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); - return true; - } - else { - return false; - } - }; - self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { - if (!Object.prototype.hasOwnProperty.call(aliases, key)) { - return false; - } - const newAliases = yargs.parsed.newAliases; - return [key, ...aliases[key]].some(a => !Object.prototype.hasOwnProperty.call(newAliases, a) || !newAliases[key]); - }; - self.limitedChoices = function limitedChoices(argv) { - const options = yargs.getOptions(); - const invalid = {}; - if (!Object.keys(options.choices).length) - return; - Object.keys(argv).forEach(key => { - if (specialKeys.indexOf(key) === -1 && - Object.prototype.hasOwnProperty.call(options.choices, key)) { - [].concat(argv[key]).forEach(value => { - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value); - } - }); - } - }); - const invalidKeys = Object.keys(invalid); - if (!invalidKeys.length) - return; - let msg = __('Invalid values:'); - invalidKeys.forEach(key => { - msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; - }); - usage.fail(msg); - }; - let implied = {}; - self.implies = function implies(key, value) { - argsert(' [array|number|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.implies(k, key[k]); - }); - } - else { - yargs.global(key); - if (!implied[key]) { - implied[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.implies(key, i)); - } - else { - assertNotStrictEqual(value, undefined, shim); - implied[key].push(value); - } - } - }; - self.getImplied = function getImplied() { - return implied; - }; - function keyExists(argv, val) { - const num = Number(val); - val = isNaN(num) ? val : num; - if (typeof val === 'number') { - val = argv._.length >= val; - } - else if (val.match(/^--no-.+/)) { - val = val.match(/^--no-(.+)/)[1]; - val = !Object.prototype.hasOwnProperty.call(argv, val); - } - else { - val = Object.prototype.hasOwnProperty.call(argv, val); - } - return val; - } - self.implications = function implications(argv) { - const implyFail = []; - Object.keys(implied).forEach(key => { - const origKey = key; - (implied[key] || []).forEach(value => { - let key = origKey; - const origValue = value; - key = keyExists(argv, key); - value = keyExists(argv, value); - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`); - } - }); - }); - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n`; - implyFail.forEach(value => { - msg += value; - }); - usage.fail(msg); - } - }; - let conflicting = {}; - self.conflicts = function conflicts(key, value) { - argsert(' [array|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.conflicts(k, key[k]); - }); - } - else { - yargs.global(key); - if (!conflicting[key]) { - conflicting[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.conflicts(key, i)); - } - else { - conflicting[key].push(value); - } - } - }; - self.getConflicting = () => conflicting; - self.conflicting = function conflictingFn(argv) { - Object.keys(argv).forEach(key => { - if (conflicting[key]) { - conflicting[key].forEach(value => { - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - } - }); - if (yargs.getInternalMethods().getParserConfiguration()['strip-dashed']) { - Object.keys(conflicting).forEach(key => { - conflicting[key].forEach(value => { - if (value && - argv[shim.Parser.camelCase(key)] !== undefined && - argv[shim.Parser.camelCase(value)] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - }); - } - }; - self.recommendCommands = function recommendCommands(cmd, potentialCommands) { - const threshold = 3; - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); - let recommended = null; - let bestDistance = Infinity; - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = levenshtein(cmd, candidate); - if (d <= threshold && d < bestDistance) { - bestDistance = d; - recommended = candidate; - } - } - if (recommended) - usage.fail(__('Did you mean %s?', recommended)); - }; - self.reset = function reset(localLookup) { - implied = objFilter(implied, k => !localLookup[k]); - conflicting = objFilter(conflicting, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - implied, - conflicting, - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim); - ({ implied, conflicting } = frozen); - }; - return self; -} - -let previouslyVisitedConfigs = []; -let shim; -function applyExtends(config, cwd, mergeExtends, _shim) { - shim = _shim; - let defaultConfig = {}; - if (Object.prototype.hasOwnProperty.call(config, 'extends')) { - if (typeof config.extends !== 'string') - return defaultConfig; - const isPath = /\.json|\..*rc$/.test(config.extends); - let pathToDefault = null; - if (!isPath) { - try { - pathToDefault = import.meta.resolve(config.extends); - } - catch (_err) { - return config; - } - } - else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends); - } - checkForCircularExtends(pathToDefault); - previouslyVisitedConfigs.push(pathToDefault); - defaultConfig = isPath - ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8')) - : _shim.require(config.extends); - delete config.extends; - defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim); - } - previouslyVisitedConfigs = []; - return mergeExtends - ? mergeDeep(defaultConfig, config) - : Object.assign({}, defaultConfig, config); -} -function checkForCircularExtends(cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new YError(`Circular extended configurations: '${cfgPath}'.`); - } -} -function getPathToDefaultConfig(cwd, pathToExtend) { - return shim.path.resolve(cwd, pathToExtend); -} -function mergeDeep(config1, config2) { - const target = {}; - function isObject(obj) { - return obj && typeof obj === 'object' && !Array.isArray(obj); - } - Object.assign(target, config1); - for (const key of Object.keys(config2)) { - if (isObject(config2[key]) && isObject(target[key])) { - target[key] = mergeDeep(config1[key], config2[key]); - } - else { - target[key] = config2[key]; - } - } - return target; -} - -var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - 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"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet$1 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - 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"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_usageConfig, _YargsInstance_versionOpt, _YargsInstance_validation; -function YargsFactory(_shim) { - return (processArgs = [], cwd = _shim.process.cwd(), parentRequire) => { - const yargs = new YargsInstance(processArgs, cwd, parentRequire, _shim); - Object.defineProperty(yargs, 'argv', { - get: () => { - return yargs.parse(); - }, - enumerable: true, - }); - yargs.help(); - yargs.version(); - return yargs; - }; -} -const kCopyDoubleDash = Symbol('copyDoubleDash'); -const kCreateLogger = Symbol('copyDoubleDash'); -const kDeleteFromParserHintObject = Symbol('deleteFromParserHintObject'); -const kEmitWarning = Symbol('emitWarning'); -const kFreeze = Symbol('freeze'); -const kGetDollarZero = Symbol('getDollarZero'); -const kGetParserConfiguration = Symbol('getParserConfiguration'); -const kGetUsageConfiguration = Symbol('getUsageConfiguration'); -const kGuessLocale = Symbol('guessLocale'); -const kGuessVersion = Symbol('guessVersion'); -const kParsePositionalNumbers = Symbol('parsePositionalNumbers'); -const kPkgUp = Symbol('pkgUp'); -const kPopulateParserHintArray = Symbol('populateParserHintArray'); -const kPopulateParserHintSingleValueDictionary = Symbol('populateParserHintSingleValueDictionary'); -const kPopulateParserHintArrayDictionary = Symbol('populateParserHintArrayDictionary'); -const kPopulateParserHintDictionary = Symbol('populateParserHintDictionary'); -const kSanitizeKey = Symbol('sanitizeKey'); -const kSetKey = Symbol('setKey'); -const kUnfreeze = Symbol('unfreeze'); -const kValidateAsync = Symbol('validateAsync'); -const kGetCommandInstance = Symbol('getCommandInstance'); -const kGetContext = Symbol('getContext'); -const kGetHasOutput = Symbol('getHasOutput'); -const kGetLoggerInstance = Symbol('getLoggerInstance'); -const kGetParseContext = Symbol('getParseContext'); -const kGetUsageInstance = Symbol('getUsageInstance'); -const kGetValidationInstance = Symbol('getValidationInstance'); -const kHasParseCallback = Symbol('hasParseCallback'); -const kIsGlobalContext = Symbol('isGlobalContext'); -const kPostProcess = Symbol('postProcess'); -const kRebase = Symbol('rebase'); -const kReset = Symbol('reset'); -const kRunYargsParserAndExecuteCommands = Symbol('runYargsParserAndExecuteCommands'); -const kRunValidation = Symbol('runValidation'); -const kSetHasOutput = Symbol('setHasOutput'); -const kTrackManuallySetKeys = Symbol('kTrackManuallySetKeys'); -const DEFAULT_LOCALE$1 = 'en_US'; -class YargsInstance { - constructor(processArgs = [], cwd, parentRequire, shim) { - this.customScriptName = false; - this.parsed = false; - _YargsInstance_command.set(this, void 0); - _YargsInstance_cwd.set(this, void 0); - _YargsInstance_context.set(this, { commands: [], fullCommands: [] }); - _YargsInstance_completion.set(this, null); - _YargsInstance_completionCommand.set(this, null); - _YargsInstance_defaultShowHiddenOpt.set(this, 'show-hidden'); - _YargsInstance_exitError.set(this, null); - _YargsInstance_detectLocale.set(this, true); - _YargsInstance_emittedWarnings.set(this, {}); - _YargsInstance_exitProcess.set(this, true); - _YargsInstance_frozens.set(this, []); - _YargsInstance_globalMiddleware.set(this, void 0); - _YargsInstance_groups.set(this, {}); - _YargsInstance_hasOutput.set(this, false); - _YargsInstance_helpOpt.set(this, null); - _YargsInstance_isGlobalContext.set(this, true); - _YargsInstance_logger.set(this, void 0); - _YargsInstance_output.set(this, ''); - _YargsInstance_options.set(this, void 0); - _YargsInstance_parentRequire.set(this, void 0); - _YargsInstance_parserConfig.set(this, {}); - _YargsInstance_parseFn.set(this, null); - _YargsInstance_parseContext.set(this, null); - _YargsInstance_pkgs.set(this, {}); - _YargsInstance_preservedGroups.set(this, {}); - _YargsInstance_processArgs.set(this, void 0); - _YargsInstance_recommendCommands.set(this, false); - _YargsInstance_shim.set(this, void 0); - _YargsInstance_strict.set(this, false); - _YargsInstance_strictCommands.set(this, false); - _YargsInstance_strictOptions.set(this, false); - _YargsInstance_usage.set(this, void 0); - _YargsInstance_usageConfig.set(this, {}); - _YargsInstance_versionOpt.set(this, null); - _YargsInstance_validation.set(this, void 0); - __classPrivateFieldSet$1(this, _YargsInstance_shim, shim, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_processArgs, processArgs, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_cwd, cwd, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_parentRequire, parentRequire, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_globalMiddleware, new GlobalMiddleware(this), "f"); - this.$0 = this[kGetDollarZero](); - this[kReset](); - __classPrivateFieldSet$1(this, _YargsInstance_command, __classPrivateFieldGet$1(this, _YargsInstance_command, "f"), "f"); - __classPrivateFieldSet$1(this, _YargsInstance_usage, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), "f"); - __classPrivateFieldSet$1(this, _YargsInstance_validation, __classPrivateFieldGet$1(this, _YargsInstance_validation, "f"), "f"); - __classPrivateFieldSet$1(this, _YargsInstance_options, __classPrivateFieldGet$1(this, _YargsInstance_options, "f"), "f"); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").showHiddenOpt = __classPrivateFieldGet$1(this, _YargsInstance_defaultShowHiddenOpt, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_logger, this[kCreateLogger](), "f"); - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.setLocale(DEFAULT_LOCALE$1); - } - addHelpOpt(opt, msg) { - const defaultHelpOpt = 'help'; - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")) { - this[kDeleteFromParserHintObject](__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")); - __classPrivateFieldSet$1(this, _YargsInstance_helpOpt, null, "f"); - } - if (opt === false && msg === undefined) - return this; - __classPrivateFieldSet$1(this, _YargsInstance_helpOpt, typeof opt === 'string' ? opt : defaultHelpOpt, "f"); - this.boolean(__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")); - this.describe(__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f"), msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup('Show help')); - return this; - } - help(opt, msg) { - return this.addHelpOpt(opt, msg); - } - addShowHiddenOpt(opt, msg) { - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (opt === false && msg === undefined) - return this; - const showHiddenOpt = typeof opt === 'string' ? opt : __classPrivateFieldGet$1(this, _YargsInstance_defaultShowHiddenOpt, "f"); - this.boolean(showHiddenOpt); - this.describe(showHiddenOpt, msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup('Show hidden options')); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").showHiddenOpt = showHiddenOpt; - return this; - } - showHidden(opt, msg) { - return this.addShowHiddenOpt(opt, msg); - } - alias(key, value) { - argsert(' [string|array]', [key, value], arguments.length); - this[kPopulateParserHintArrayDictionary](this.alias.bind(this), 'alias', key, value); - return this; - } - array(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('array', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - boolean(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('boolean', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - check(f, global) { - argsert(' [boolean]', [f, global], arguments.length); - this.middleware((argv, _yargs) => { - return maybeAsyncResult(() => { - return f(argv, _yargs.getOptions()); - }, (result) => { - if (!result) { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.__('Argument check failed: %s', f.toString())); - } - else if (typeof result === 'string' || result instanceof Error) { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(result.toString(), result); - } - return argv; - }, (err) => { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err); - return argv; - }); - }, false, global); - return this; - } - choices(key, value) { - argsert(' [string|array]', [key, value], arguments.length); - this[kPopulateParserHintArrayDictionary](this.choices.bind(this), 'choices', key, value); - return this; - } - coerce(keys, value) { - argsert(' [function]', [keys, value], arguments.length); - if (Array.isArray(keys)) { - if (!value) { - throw new YError('coerce callback must be provided'); - } - for (const key of keys) { - this.coerce(key, value); - } - return this; - } - else if (typeof keys === 'object') { - for (const key of Object.keys(keys)) { - this.coerce(key, keys[key]); - } - return this; - } - if (!value) { - throw new YError('coerce callback must be provided'); - } - const coerceKey = keys; - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[coerceKey] = true; - __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => { - var _a; - const coerceKeyAliases = (_a = yargs.getAliases()[coerceKey]) !== null && _a !== void 0 ? _a : []; - const argvKeys = [coerceKey, ...coerceKeyAliases].filter(key => Object.prototype.hasOwnProperty.call(argv, key)); - if (argvKeys.length === 0) { - return argv; - } - return maybeAsyncResult(() => { - return value(argv[argvKeys[0]]); - }, (result) => { - argvKeys.forEach(key => { - argv[key] = result; - }); - return argv; - }, (err) => { - throw new YError(err.message); - }); - }, coerceKey); - return this; - } - conflicts(key1, key2) { - argsert(' [string|array]', [key1, key2], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").conflicts(key1, key2); - return this; - } - config(key = 'config', msg, parseFn) { - argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); - if (typeof key === 'object' && !Array.isArray(key)) { - key = applyExtends(key, __classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects || []).concat(key); - return this; - } - if (typeof msg === 'function') { - parseFn = msg; - msg = undefined; - } - this.describe(key, msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup('Path to JSON config file')); - (Array.isArray(key) ? key : [key]).forEach(k => { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").config[k] = parseFn || true; - }); - return this; - } - completion(cmd, desc, fn) { - argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); - if (typeof desc === 'function') { - fn = desc; - desc = undefined; - } - __classPrivateFieldSet$1(this, _YargsInstance_completionCommand, cmd || __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f") || 'completion', "f"); - if (!desc && desc !== false) { - desc = 'generate completion script'; - } - this.command(__classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f"), desc); - if (fn) - __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").registerFunction(fn); - return this; - } - command(cmd, description, builder, handler, middlewares, deprecated) { - argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_command, "f").addHandler(cmd, description, builder, handler, middlewares, deprecated); - return this; - } - commands(cmd, description, builder, handler, middlewares, deprecated) { - return this.command(cmd, description, builder, handler, middlewares, deprecated); - } - commandDir(dir, opts) { - argsert(' [object]', [dir, opts], arguments.length); - const req = __classPrivateFieldGet$1(this, _YargsInstance_parentRequire, "f") || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").require; - __classPrivateFieldGet$1(this, _YargsInstance_command, "f").addDirectory(dir, req, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getCallerFile(), opts); - return this; - } - count(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('count', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - default(key, value, defaultDescription) { - argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); - if (defaultDescription) { - assertSingleKey(key, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key] = defaultDescription; - } - if (typeof value === 'function') { - assertSingleKey(key, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - if (!__classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key]) - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key] = - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").functionDescription(value); - value = value.call(); - } - this[kPopulateParserHintSingleValueDictionary](this.default.bind(this), 'default', key, value); - return this; - } - defaults(key, value, defaultDescription) { - return this.default(key, value, defaultDescription); - } - demandCommand(min = 1, max, minMsg, maxMsg) { - argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); - if (typeof max !== 'number') { - minMsg = max; - max = Infinity; - } - this.global('_', false); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").demandedCommands._ = { - min, - max, - minMsg, - maxMsg, - }; - return this; - } - demand(keys, max, msg) { - if (Array.isArray(max)) { - max.forEach(key => { - assertNotStrictEqual(msg, true, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - this.demandOption(key, msg); - }); - max = Infinity; - } - else if (typeof max !== 'number') { - msg = max; - max = Infinity; - } - if (typeof keys === 'number') { - assertNotStrictEqual(msg, true, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - this.demandCommand(keys, max, msg, msg); - } - else if (Array.isArray(keys)) { - keys.forEach(key => { - assertNotStrictEqual(msg, true, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - this.demandOption(key, msg); - }); - } - else { - if (typeof msg === 'string') { - this.demandOption(keys, msg); - } - else if (msg === true || typeof msg === 'undefined') { - this.demandOption(keys); - } - } - return this; - } - demandOption(keys, msg) { - argsert(' [string]', [keys, msg], arguments.length); - this[kPopulateParserHintSingleValueDictionary](this.demandOption.bind(this), 'demandedOptions', keys, msg); - return this; - } - deprecateOption(option, message) { - argsert(' [string|boolean]', [option, message], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").deprecatedOptions[option] = message; - return this; - } - describe(keys, description) { - argsert(' [string]', [keys, description], arguments.length); - this[kSetKey](keys, true); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").describe(keys, description); - return this; - } - detectLocale(detect) { - argsert('', [detect], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_detectLocale, detect, "f"); - return this; - } - env(prefix) { - argsert('[string|boolean]', [prefix], arguments.length); - if (prefix === false) - delete __classPrivateFieldGet$1(this, _YargsInstance_options, "f").envPrefix; - else - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").envPrefix = prefix || ''; - return this; - } - epilogue(msg) { - argsert('', [msg], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").epilog(msg); - return this; - } - epilog(msg) { - return this.epilogue(msg); - } - example(cmd, description) { - argsert(' [string]', [cmd, description], arguments.length); - if (Array.isArray(cmd)) { - cmd.forEach(exampleParams => this.example(...exampleParams)); - } - else { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").example(cmd, description); - } - return this; - } - exit(code, err) { - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_exitError, err, "f"); - if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f")) - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.exit(code); - } - exitProcess(enabled = true) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_exitProcess, enabled, "f"); - return this; - } - fail(f) { - argsert('', [f], arguments.length); - if (typeof f === 'boolean' && f !== false) { - throw new YError("Invalid first argument. Expected function or boolean 'false'"); - } - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").failFn(f); - return this; - } - getAliases() { - return this.parsed ? this.parsed.aliases : {}; - } - async getCompletion(args, done) { - argsert(' [function]', [args, done], arguments.length); - if (!done) { - return new Promise((resolve, reject) => { - __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => { - if (err) - reject(err); - else - resolve(completions); - }); - }); - } - else { - return __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").getCompletion(args, done); - } - } - getDemandedOptions() { - argsert([], 0); - return __classPrivateFieldGet$1(this, _YargsInstance_options, "f").demandedOptions; - } - getDemandedCommands() { - argsert([], 0); - return __classPrivateFieldGet$1(this, _YargsInstance_options, "f").demandedCommands; - } - getDeprecatedOptions() { - argsert([], 0); - return __classPrivateFieldGet$1(this, _YargsInstance_options, "f").deprecatedOptions; - } - getDetectLocale() { - return __classPrivateFieldGet$1(this, _YargsInstance_detectLocale, "f"); - } - getExitProcess() { - return __classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"); - } - getGroups() { - return Object.assign({}, __classPrivateFieldGet$1(this, _YargsInstance_groups, "f"), __classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")); - } - getHelp() { - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f"); - if (!__classPrivateFieldGet$1(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { - if (!this.parsed) { - const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); - if (isPromise$1(parse)) { - return parse.then(() => { - return __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").help(); - }); - } - } - const builderResponse = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); - if (isPromise$1(builderResponse)) { - return builderResponse.then(() => { - return __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").help(); - }); - } - } - return Promise.resolve(__classPrivateFieldGet$1(this, _YargsInstance_usage, "f").help()); - } - getOptions() { - return __classPrivateFieldGet$1(this, _YargsInstance_options, "f"); - } - getStrict() { - return __classPrivateFieldGet$1(this, _YargsInstance_strict, "f"); - } - getStrictCommands() { - return __classPrivateFieldGet$1(this, _YargsInstance_strictCommands, "f"); - } - getStrictOptions() { - return __classPrivateFieldGet$1(this, _YargsInstance_strictOptions, "f"); - } - global(globals, global) { - argsert(' [boolean]', [globals, global], arguments.length); - globals = [].concat(globals); - if (global !== false) { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local.filter(l => globals.indexOf(l) === -1); - } - else { - globals.forEach(g => { - if (!__classPrivateFieldGet$1(this, _YargsInstance_options, "f").local.includes(g)) - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local.push(g); - }); - } - return this; - } - group(opts, groupName) { - argsert(' ', [opts, groupName], arguments.length); - const existing = __classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")[groupName] || __classPrivateFieldGet$1(this, _YargsInstance_groups, "f")[groupName]; - if (__classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")[groupName]) { - delete __classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f")[groupName]; - } - const seen = {}; - __classPrivateFieldGet$1(this, _YargsInstance_groups, "f")[groupName] = (existing || []).concat(opts).filter(key => { - if (seen[key]) - return false; - return (seen[key] = true); - }); - return this; - } - hide(key) { - argsert('', [key], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").hiddenOptions.push(key); - return this; - } - implies(key, value) { - argsert(' [number|string|array]', [key, value], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").implies(key, value); - return this; - } - locale(locale) { - argsert('[string]', [locale], arguments.length); - if (locale === undefined) { - this[kGuessLocale](); - return __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.getLocale(); - } - __classPrivateFieldSet$1(this, _YargsInstance_detectLocale, false, "f"); - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.setLocale(locale); - return this; - } - middleware(callback, applyBeforeValidation, global) { - return __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global); - } - nargs(key, value) { - argsert(' [number]', [key, value], arguments.length); - this[kPopulateParserHintSingleValueDictionary](this.nargs.bind(this), 'narg', key, value); - return this; - } - normalize(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('normalize', keys); - return this; - } - number(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('number', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - option(key, opt) { - argsert(' [object]', [key, opt], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - this.options(k, key[k]); - }); - } - else { - if (typeof opt !== 'object') { - opt = {}; - } - this[kTrackManuallySetKeys](key); - if (__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f") && (key === 'version' || (opt === null || opt === void 0 ? void 0 : opt.alias) === 'version')) { - this[kEmitWarning]([ - '"version" is a reserved word.', - 'Please do one of the following:', - '- Disable version with `yargs.version(false)` if using "version" as an option', - '- Use the built-in `yargs.version` method instead (if applicable)', - '- Use a different option key', - 'https://yargs.js.org/docs/#api-reference-version', - ].join('\n'), undefined, 'versionWarning'); - } - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[key] = true; - if (opt.alias) - this.alias(key, opt.alias); - const deprecate = opt.deprecate || opt.deprecated; - if (deprecate) { - this.deprecateOption(key, deprecate); - } - const demand = opt.demand || opt.required || opt.require; - if (demand) { - this.demand(key, demand); - } - if (opt.demandOption) { - this.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); - } - if (opt.conflicts) { - this.conflicts(key, opt.conflicts); - } - if ('default' in opt) { - this.default(key, opt.default); - } - if (opt.implies !== undefined) { - this.implies(key, opt.implies); - } - if (opt.nargs !== undefined) { - this.nargs(key, opt.nargs); - } - if (opt.config) { - this.config(key, opt.configParser); - } - if (opt.normalize) { - this.normalize(key); - } - if (opt.choices) { - this.choices(key, opt.choices); - } - if (opt.coerce) { - this.coerce(key, opt.coerce); - } - if (opt.group) { - this.group(key, opt.group); - } - if (opt.boolean || opt.type === 'boolean') { - this.boolean(key); - if (opt.alias) - this.boolean(opt.alias); - } - if (opt.array || opt.type === 'array') { - this.array(key); - if (opt.alias) - this.array(opt.alias); - } - if (opt.number || opt.type === 'number') { - this.number(key); - if (opt.alias) - this.number(opt.alias); - } - if (opt.string || opt.type === 'string') { - this.string(key); - if (opt.alias) - this.string(opt.alias); - } - if (opt.count || opt.type === 'count') { - this.count(key); - } - if (typeof opt.global === 'boolean') { - this.global(key, opt.global); - } - if (opt.defaultDescription) { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").defaultDescription[key] = opt.defaultDescription; - } - if (opt.skipValidation) { - this.skipValidation(key); - } - const desc = opt.describe || opt.description || opt.desc; - const descriptions = __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").getDescriptions(); - if (!Object.prototype.hasOwnProperty.call(descriptions, key) || - typeof desc === 'string') { - this.describe(key, desc); - } - if (opt.hidden) { - this.hide(key); - } - if (opt.requiresArg) { - this.requiresArg(key); - } - } - return this; - } - options(key, opt) { - return this.option(key, opt); - } - parse(args, shortCircuit, _parseFn) { - argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); - this[kFreeze](); - if (typeof args === 'undefined') { - args = __classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f"); - } - if (typeof shortCircuit === 'object') { - __classPrivateFieldSet$1(this, _YargsInstance_parseContext, shortCircuit, "f"); - shortCircuit = _parseFn; - } - if (typeof shortCircuit === 'function') { - __classPrivateFieldSet$1(this, _YargsInstance_parseFn, shortCircuit, "f"); - shortCircuit = false; - } - if (!shortCircuit) - __classPrivateFieldSet$1(this, _YargsInstance_processArgs, args, "f"); - if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldSet$1(this, _YargsInstance_exitProcess, false, "f"); - const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit); - const tmpParsed = this.parsed; - __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").setParsed(this.parsed); - if (isPromise$1(parsed)) { - return parsed - .then(argv => { - if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet$1(this, _YargsInstance_exitError, "f"), argv, __classPrivateFieldGet$1(this, _YargsInstance_output, "f")); - return argv; - }) - .catch(err => { - if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")) { - __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")(err, this.parsed.argv, __classPrivateFieldGet$1(this, _YargsInstance_output, "f")); - } - throw err; - }) - .finally(() => { - this[kUnfreeze](); - this.parsed = tmpParsed; - }); - } - else { - if (__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f")) - __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f").call(this, __classPrivateFieldGet$1(this, _YargsInstance_exitError, "f"), parsed, __classPrivateFieldGet$1(this, _YargsInstance_output, "f")); - this[kUnfreeze](); - this.parsed = tmpParsed; - } - return parsed; - } - parseAsync(args, shortCircuit, _parseFn) { - const maybePromise = this.parse(args, shortCircuit, _parseFn); - return !isPromise$1(maybePromise) - ? Promise.resolve(maybePromise) - : maybePromise; - } - parseSync(args, shortCircuit, _parseFn) { - const maybePromise = this.parse(args, shortCircuit, _parseFn); - if (isPromise$1(maybePromise)) { - throw new YError('.parseSync() must not be used with asynchronous builders, handlers, or middleware'); - } - return maybePromise; - } - parserConfiguration(config) { - argsert('', [config], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_parserConfig, config, "f"); - return this; - } - pkgConf(key, rootPath) { - argsert(' [string]', [key, rootPath], arguments.length); - let conf = null; - const obj = this[kPkgUp](rootPath || __classPrivateFieldGet$1(this, _YargsInstance_cwd, "f")); - if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || __classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"), this[kGetParserConfiguration]()['deep-merge-config'] || false, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects || []).concat(conf); - } - return this; - } - positional(key, opts) { - argsert(' ', [key, opts], arguments.length); - const supportedOpts = [ - 'default', - 'defaultDescription', - 'implies', - 'normalize', - 'choices', - 'conflicts', - 'coerce', - 'type', - 'describe', - 'desc', - 'description', - 'alias', - ]; - opts = objFilter(opts, (k, v) => { - if (k === 'type' && !['string', 'number', 'boolean'].includes(v)) - return false; - return supportedOpts.includes(k); - }); - const fullCommand = __classPrivateFieldGet$1(this, _YargsInstance_context, "f").fullCommands[__classPrivateFieldGet$1(this, _YargsInstance_context, "f").fullCommands.length - 1]; - const parseOptions = fullCommand - ? __classPrivateFieldGet$1(this, _YargsInstance_command, "f").cmdToParseOptions(fullCommand) - : { - array: [], - alias: {}, - default: {}, - demand: {}, - }; - objectKeys(parseOptions).forEach(pk => { - const parseOption = parseOptions[pk]; - if (Array.isArray(parseOption)) { - if (parseOption.indexOf(key) !== -1) - opts[pk] = true; - } - else { - if (parseOption[key] && !(pk in opts)) - opts[pk] = parseOption[key]; - } - }); - this.group(key, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").getPositionalGroupName()); - return this.option(key, opts); - } - recommendCommands(recommend = true) { - argsert('[boolean]', [recommend], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_recommendCommands, recommend, "f"); - return this; - } - required(keys, max, msg) { - return this.demand(keys, max, msg); - } - require(keys, max, msg) { - return this.demand(keys, max, msg); - } - requiresArg(keys) { - argsert(' [number]', [keys], arguments.length); - if (typeof keys === 'string' && __classPrivateFieldGet$1(this, _YargsInstance_options, "f").narg[keys]) { - return this; - } - else { - this[kPopulateParserHintSingleValueDictionary](this.requiresArg.bind(this), 'narg', keys, NaN); - } - return this; - } - showCompletionScript($0, cmd) { - argsert('[string] [string]', [$0, cmd], arguments.length); - $0 = $0 || this.$0; - __classPrivateFieldGet$1(this, _YargsInstance_logger, "f").log(__classPrivateFieldGet$1(this, _YargsInstance_completion, "f").generateCompletionScript($0, cmd || __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f") || 'completion')); - return this; - } - showHelp(level) { - argsert('[string|function]', [level], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f"); - if (!__classPrivateFieldGet$1(this, _YargsInstance_usage, "f").hasCachedHelpMessage()) { - if (!this.parsed) { - const parse = this[kRunYargsParserAndExecuteCommands](__classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f"), undefined, undefined, 0, true); - if (isPromise$1(parse)) { - parse.then(() => { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelp(level); - }); - return this; - } - } - const builderResponse = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runDefaultBuilderOn(this); - if (isPromise$1(builderResponse)) { - builderResponse.then(() => { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelp(level); - }); - return this; - } - } - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelp(level); - return this; - } - scriptName(scriptName) { - this.customScriptName = true; - this.$0 = scriptName; - return this; - } - showHelpOnFail(enabled, message) { - argsert('[boolean|string] [string]', [enabled, message], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showHelpOnFail(enabled, message); - return this; - } - showVersion(level) { - argsert('[string|function]', [level], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showVersion(level); - return this; - } - skipValidation(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('skipValidation', keys); - return this; - } - strict(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_strict, enabled !== false, "f"); - return this; - } - strictCommands(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_strictCommands, enabled !== false, "f"); - return this; - } - strictOptions(enabled) { - argsert('[boolean]', [enabled], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_strictOptions, enabled !== false, "f"); - return this; - } - string(keys) { - argsert('', [keys], arguments.length); - this[kPopulateParserHintArray]('string', keys); - this[kTrackManuallySetKeys](keys); - return this; - } - terminalWidth() { - argsert([], 0); - return __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.stdColumns; - } - updateLocale(obj) { - return this.updateStrings(obj); - } - updateStrings(obj) { - argsert('', [obj], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_detectLocale, false, "f"); - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.updateLocale(obj); - return this; - } - usage(msg, description, builder, handler) { - argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); - if (description !== undefined) { - assertNotStrictEqual(msg, null, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - if ((msg || '').match(/^\$0( |$)/)) { - return this.command(msg, description, builder, handler); - } - else { - throw new YError('.usage() description must start with $0 if being used as alias for .command()'); - } - } - else { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").usage(msg); - return this; - } - } - usageConfiguration(config) { - argsert('', [config], arguments.length); - __classPrivateFieldSet$1(this, _YargsInstance_usageConfig, config, "f"); - return this; - } - version(opt, msg, ver) { - const defaultVersionOpt = 'version'; - argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); - if (__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f")) { - this[kDeleteFromParserHintObject](__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f")); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").version(undefined); - __classPrivateFieldSet$1(this, _YargsInstance_versionOpt, null, "f"); - } - if (arguments.length === 0) { - ver = this[kGuessVersion](); - opt = defaultVersionOpt; - } - else if (arguments.length === 1) { - if (opt === false) { - return this; - } - ver = opt; - opt = defaultVersionOpt; - } - else if (arguments.length === 2) { - ver = msg; - msg = undefined; - } - __classPrivateFieldSet$1(this, _YargsInstance_versionOpt, typeof opt === 'string' ? opt : defaultVersionOpt, "f"); - msg = msg || __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").deferY18nLookup('Show version number'); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").version(ver || undefined); - this.boolean(__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f")); - this.describe(__classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f"), msg); - return this; - } - wrap(cols) { - argsert('', [cols], arguments.length); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").wrap(cols); - return this; - } - [(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_usageConfig = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) { - if (!argv._ || !argv['--']) - return argv; - argv._.push.apply(argv._, argv['--']); - try { - delete argv['--']; - } - catch (_err) { } - return argv; - } - [kCreateLogger]() { - return { - log: (...args) => { - if (!this[kHasParseCallback]()) - console.log(...args); - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f"); - if (__classPrivateFieldGet$1(this, _YargsInstance_output, "f").length) - __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + '\n', "f"); - __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + args.join(' '), "f"); - }, - error: (...args) => { - if (!this[kHasParseCallback]()) - console.error(...args); - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f"); - if (__classPrivateFieldGet$1(this, _YargsInstance_output, "f").length) - __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + '\n', "f"); - __classPrivateFieldSet$1(this, _YargsInstance_output, __classPrivateFieldGet$1(this, _YargsInstance_output, "f") + args.join(' '), "f"); - }, - }; - } - [kDeleteFromParserHintObject](optionKey) { - objectKeys(__classPrivateFieldGet$1(this, _YargsInstance_options, "f")).forEach((hintKey) => { - if (((key) => key === 'configObjects')(hintKey)) - return; - const hint = __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[hintKey]; - if (Array.isArray(hint)) { - if (hint.includes(optionKey)) - hint.splice(hint.indexOf(optionKey), 1); - } - else if (typeof hint === 'object') { - delete hint[optionKey]; - } - }); - delete __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").getDescriptions()[optionKey]; - } - [kEmitWarning](warning, type, deduplicationId) { - if (!__classPrivateFieldGet$1(this, _YargsInstance_emittedWarnings, "f")[deduplicationId]) { - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.emitWarning(warning, type); - __classPrivateFieldGet$1(this, _YargsInstance_emittedWarnings, "f")[deduplicationId] = true; - } - } - [kFreeze]() { - __classPrivateFieldGet$1(this, _YargsInstance_frozens, "f").push({ - options: __classPrivateFieldGet$1(this, _YargsInstance_options, "f"), - configObjects: __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects.slice(0), - exitProcess: __classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f"), - groups: __classPrivateFieldGet$1(this, _YargsInstance_groups, "f"), - strict: __classPrivateFieldGet$1(this, _YargsInstance_strict, "f"), - strictCommands: __classPrivateFieldGet$1(this, _YargsInstance_strictCommands, "f"), - strictOptions: __classPrivateFieldGet$1(this, _YargsInstance_strictOptions, "f"), - completionCommand: __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f"), - output: __classPrivateFieldGet$1(this, _YargsInstance_output, "f"), - exitError: __classPrivateFieldGet$1(this, _YargsInstance_exitError, "f"), - hasOutput: __classPrivateFieldGet$1(this, _YargsInstance_hasOutput, "f"), - parsed: this.parsed, - parseFn: __classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f"), - parseContext: __classPrivateFieldGet$1(this, _YargsInstance_parseContext, "f"), - }); - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").freeze(); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").freeze(); - __classPrivateFieldGet$1(this, _YargsInstance_command, "f").freeze(); - __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").freeze(); - } - [kGetDollarZero]() { - let $0 = ''; - let default$0; - if (/\b(node|iojs|electron)(\.exe)?$/.test(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.argv()[0])) { - default$0 = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.argv().slice(1, 2); - } - else { - default$0 = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.argv().slice(0, 1); - } - $0 = default$0 - .map(x => { - const b = this[kRebase](__classPrivateFieldGet$1(this, _YargsInstance_cwd, "f"), x); - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; - }) - .join(' ') - .trim(); - if (__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv('_') && - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getProcessArgvBin() === __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv('_')) { - $0 = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f") - .getEnv('_') - .replace(`${__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.dirname(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").process.execPath())}/`, ''); - } - return $0; - } - [kGetParserConfiguration]() { - return __classPrivateFieldGet$1(this, _YargsInstance_parserConfig, "f"); - } - [kGetUsageConfiguration]() { - return __classPrivateFieldGet$1(this, _YargsInstance_usageConfig, "f"); - } - [kGuessLocale]() { - if (!__classPrivateFieldGet$1(this, _YargsInstance_detectLocale, "f")) - return; - const locale = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv('LC_ALL') || - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv('LC_MESSAGES') || - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv('LANG') || - __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").getEnv('LANGUAGE') || - 'en_US'; - this.locale(locale.replace(/[.:].*/, '')); - } - [kGuessVersion]() { - const obj = this[kPkgUp](); - return obj.version || 'unknown'; - } - [kParsePositionalNumbers](argv) { - const args = argv['--'] ? argv['--'] : argv._; - for (let i = 0, arg; (arg = args[i]) !== undefined; i++) { - if (__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && - Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) { - args[i] = Number(arg); - } - } - return argv; - } - [kPkgUp](rootPath) { - const npath = rootPath || '*'; - if (__classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath]) - return __classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath]; - let obj = {}; - try { - let startDir = rootPath || __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").mainFilename; - if (__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.extname(startDir)) { - startDir = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.dirname(startDir); - } - const pkgJsonPath = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").findUp(startDir, (dir, names) => { - if (names.includes('package.json')) { - return 'package.json'; - } - else { - return undefined; - } - }); - assertNotStrictEqual(pkgJsonPath, undefined, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - obj = JSON.parse(__classPrivateFieldGet$1(this, _YargsInstance_shim, "f").readFileSync(pkgJsonPath, 'utf8')); - } - catch (_noop) { } - __classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath] = obj || {}; - return __classPrivateFieldGet$1(this, _YargsInstance_pkgs, "f")[npath]; - } - [kPopulateParserHintArray](type, keys) { - keys = [].concat(keys); - keys.forEach(key => { - key = this[kSanitizeKey](key); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type].push(key); - }); - } - [kPopulateParserHintSingleValueDictionary](builder, type, key, value) { - this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type][key] = value; - }); - } - [kPopulateParserHintArrayDictionary](builder, type, key, value) { - this[kPopulateParserHintDictionary](builder, type, key, value, (type, key, value) => { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type][key] = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f")[type][key] || []).concat(value); - }); - } - [kPopulateParserHintDictionary](builder, type, key, value, singleKeyHandler) { - if (Array.isArray(key)) { - key.forEach(k => { - builder(k, value); - }); - } - else if (((key) => typeof key === 'object')(key)) { - for (const k of objectKeys(key)) { - builder(k, key[k]); - } - } - else { - singleKeyHandler(type, this[kSanitizeKey](key), value); - } - } - [kSanitizeKey](key) { - if (key === '__proto__') - return '___proto___'; - return key; - } - [kSetKey](key, set) { - this[kPopulateParserHintSingleValueDictionary](this[kSetKey].bind(this), 'key', key, set); - return this; - } - [kUnfreeze]() { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - const frozen = __classPrivateFieldGet$1(this, _YargsInstance_frozens, "f").pop(); - assertNotStrictEqual(frozen, undefined, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")); - let configObjects; - (_a = this, _b = this, _c = this, _d = this, _e = this, _f = this, _g = this, _h = this, _j = this, _k = this, _l = this, _m = this, { - options: ({ set value(_o) { __classPrivateFieldSet$1(_a, _YargsInstance_options, _o, "f"); } }).value, - configObjects, - exitProcess: ({ set value(_o) { __classPrivateFieldSet$1(_b, _YargsInstance_exitProcess, _o, "f"); } }).value, - groups: ({ set value(_o) { __classPrivateFieldSet$1(_c, _YargsInstance_groups, _o, "f"); } }).value, - output: ({ set value(_o) { __classPrivateFieldSet$1(_d, _YargsInstance_output, _o, "f"); } }).value, - exitError: ({ set value(_o) { __classPrivateFieldSet$1(_e, _YargsInstance_exitError, _o, "f"); } }).value, - hasOutput: ({ set value(_o) { __classPrivateFieldSet$1(_f, _YargsInstance_hasOutput, _o, "f"); } }).value, - parsed: this.parsed, - strict: ({ set value(_o) { __classPrivateFieldSet$1(_g, _YargsInstance_strict, _o, "f"); } }).value, - strictCommands: ({ set value(_o) { __classPrivateFieldSet$1(_h, _YargsInstance_strictCommands, _o, "f"); } }).value, - strictOptions: ({ set value(_o) { __classPrivateFieldSet$1(_j, _YargsInstance_strictOptions, _o, "f"); } }).value, - completionCommand: ({ set value(_o) { __classPrivateFieldSet$1(_k, _YargsInstance_completionCommand, _o, "f"); } }).value, - parseFn: ({ set value(_o) { __classPrivateFieldSet$1(_l, _YargsInstance_parseFn, _o, "f"); } }).value, - parseContext: ({ set value(_o) { __classPrivateFieldSet$1(_m, _YargsInstance_parseContext, _o, "f"); } }).value, - } = frozen); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects = configObjects; - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").unfreeze(); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unfreeze(); - __classPrivateFieldGet$1(this, _YargsInstance_command, "f").unfreeze(); - __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").unfreeze(); - } - [kValidateAsync](validation, argv) { - return maybeAsyncResult(argv, result => { - validation(result); - return result; - }); - } - getInternalMethods() { - return { - getCommandInstance: this[kGetCommandInstance].bind(this), - getContext: this[kGetContext].bind(this), - getHasOutput: this[kGetHasOutput].bind(this), - getLoggerInstance: this[kGetLoggerInstance].bind(this), - getParseContext: this[kGetParseContext].bind(this), - getParserConfiguration: this[kGetParserConfiguration].bind(this), - getUsageConfiguration: this[kGetUsageConfiguration].bind(this), - getUsageInstance: this[kGetUsageInstance].bind(this), - getValidationInstance: this[kGetValidationInstance].bind(this), - hasParseCallback: this[kHasParseCallback].bind(this), - isGlobalContext: this[kIsGlobalContext].bind(this), - postProcess: this[kPostProcess].bind(this), - reset: this[kReset].bind(this), - runValidation: this[kRunValidation].bind(this), - runYargsParserAndExecuteCommands: this[kRunYargsParserAndExecuteCommands].bind(this), - setHasOutput: this[kSetHasOutput].bind(this), - }; - } - [kGetCommandInstance]() { - return __classPrivateFieldGet$1(this, _YargsInstance_command, "f"); - } - [kGetContext]() { - return __classPrivateFieldGet$1(this, _YargsInstance_context, "f"); - } - [kGetHasOutput]() { - return __classPrivateFieldGet$1(this, _YargsInstance_hasOutput, "f"); - } - [kGetLoggerInstance]() { - return __classPrivateFieldGet$1(this, _YargsInstance_logger, "f"); - } - [kGetParseContext]() { - return __classPrivateFieldGet$1(this, _YargsInstance_parseContext, "f") || {}; - } - [kGetUsageInstance]() { - return __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"); - } - [kGetValidationInstance]() { - return __classPrivateFieldGet$1(this, _YargsInstance_validation, "f"); - } - [kHasParseCallback]() { - return !!__classPrivateFieldGet$1(this, _YargsInstance_parseFn, "f"); - } - [kIsGlobalContext]() { - return __classPrivateFieldGet$1(this, _YargsInstance_isGlobalContext, "f"); - } - [kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) { - if (calledFromCommand) - return argv; - if (isPromise$1(argv)) - return argv; - if (!populateDoubleDash) { - argv = this[kCopyDoubleDash](argv); - } - const parsePositionalNumbers = this[kGetParserConfiguration]()['parse-positional-numbers'] || - this[kGetParserConfiguration]()['parse-positional-numbers'] === undefined; - if (parsePositionalNumbers) { - argv = this[kParsePositionalNumbers](argv); - } - if (runGlobalMiddleware) { - argv = applyMiddleware(argv, this, __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); - } - return argv; - } - [kReset](aliases = {}) { - __classPrivateFieldSet$1(this, _YargsInstance_options, __classPrivateFieldGet$1(this, _YargsInstance_options, "f") || {}, "f"); - const tmpOptions = {}; - tmpOptions.local = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").local || []; - tmpOptions.configObjects = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configObjects || []; - const localLookup = {}; - tmpOptions.local.forEach(l => { - localLookup[l] = true; - (aliases[l] || []).forEach(a => { - localLookup[a] = true; - }); - }); - Object.assign(__classPrivateFieldGet$1(this, _YargsInstance_preservedGroups, "f"), Object.keys(__classPrivateFieldGet$1(this, _YargsInstance_groups, "f")).reduce((acc, groupName) => { - const keys = __classPrivateFieldGet$1(this, _YargsInstance_groups, "f")[groupName].filter(key => !(key in localLookup)); - if (keys.length > 0) { - acc[groupName] = keys; - } - return acc; - }, {})); - __classPrivateFieldSet$1(this, _YargsInstance_groups, {}, "f"); - const arrayOptions = [ - 'array', - 'boolean', - 'string', - 'skipValidation', - 'count', - 'normalize', - 'number', - 'hiddenOptions', - ]; - const objectOptions = [ - 'narg', - 'key', - 'alias', - 'default', - 'defaultDescription', - 'config', - 'choices', - 'demandedOptions', - 'demandedCommands', - 'deprecatedOptions', - ]; - arrayOptions.forEach(k => { - tmpOptions[k] = (__classPrivateFieldGet$1(this, _YargsInstance_options, "f")[k] || []).filter((k) => !localLookup[k]); - }); - objectOptions.forEach((k) => { - tmpOptions[k] = objFilter(__classPrivateFieldGet$1(this, _YargsInstance_options, "f")[k], k => !localLookup[k]); - }); - tmpOptions.envPrefix = __classPrivateFieldGet$1(this, _YargsInstance_options, "f").envPrefix; - __classPrivateFieldSet$1(this, _YargsInstance_options, tmpOptions, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_usage, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f") - ? __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").reset(localLookup) - : usage(this, __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldSet$1(this, _YargsInstance_validation, __classPrivateFieldGet$1(this, _YargsInstance_validation, "f") - ? __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").reset(localLookup) - : validation$3(this, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldSet$1(this, _YargsInstance_command, __classPrivateFieldGet$1(this, _YargsInstance_command, "f") - ? __classPrivateFieldGet$1(this, _YargsInstance_command, "f").reset() - : command(__classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), __classPrivateFieldGet$1(this, _YargsInstance_validation, "f"), __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f"), __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f"); - if (!__classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) - __classPrivateFieldSet$1(this, _YargsInstance_completion, completion(this, __classPrivateFieldGet$1(this, _YargsInstance_usage, "f"), __classPrivateFieldGet$1(this, _YargsInstance_command, "f"), __classPrivateFieldGet$1(this, _YargsInstance_shim, "f")), "f"); - __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").reset(); - __classPrivateFieldSet$1(this, _YargsInstance_completionCommand, null, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_output, '', "f"); - __classPrivateFieldSet$1(this, _YargsInstance_exitError, null, "f"); - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, false, "f"); - this.parsed = false; - return this; - } - [kRebase](base, dir) { - return __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").path.relative(base, dir); - } - [kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) { - var _a, _b, _c, _d; - let skipValidation = !!calledFromCommand || helpOnly; - args = args || __classPrivateFieldGet$1(this, _YargsInstance_processArgs, "f"); - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").y18n.__; - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration](); - const populateDoubleDash = !!__classPrivateFieldGet$1(this, _YargsInstance_options, "f").configuration['populate--']; - const config = Object.assign({}, __classPrivateFieldGet$1(this, _YargsInstance_options, "f").configuration, { - 'populate--': true, - }); - const parsed = __classPrivateFieldGet$1(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet$1(this, _YargsInstance_options, "f"), { - configuration: { 'parse-positional-numbers': false, ...config }, - })); - const argv = Object.assign(parsed.argv, __classPrivateFieldGet$1(this, _YargsInstance_parseContext, "f")); - let argvPromise = undefined; - const aliases = parsed.aliases; - let helpOptSet = false; - let versionOptSet = false; - Object.keys(argv).forEach(key => { - if (key === __classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f") && argv[key]) { - helpOptSet = true; - } - else if (key === __classPrivateFieldGet$1(this, _YargsInstance_versionOpt, "f") && argv[key]) { - versionOptSet = true; - } - }); - argv.$0 = this.$0; - this.parsed = parsed; - if (commandIndex === 0) { - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").clearCachedHelpMessage(); - } - try { - this[kGuessLocale](); - if (shortCircuit) { - return this[kPostProcess](argv, populateDoubleDash, !!calledFromCommand, false); - } - if (__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")) { - const helpCmds = [__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")] - .concat(aliases[__classPrivateFieldGet$1(this, _YargsInstance_helpOpt, "f")] || []) - .filter(k => k.length > 1); - if (helpCmds.includes('' + argv._[argv._.length - 1])) { - argv._.pop(); - helpOptSet = true; - } - } - __classPrivateFieldSet$1(this, _YargsInstance_isGlobalContext, false, "f"); - const handlerKeys = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").getCommands(); - const requestCompletions = ((_a = __classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) === null || _a === void 0 ? void 0 : _a.completionKey) - ? [ - (_b = __classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) === null || _b === void 0 ? void 0 : _b.completionKey, - ...((_d = this.getAliases()[(_c = __classPrivateFieldGet$1(this, _YargsInstance_completion, "f")) === null || _c === void 0 ? void 0 : _c.completionKey]) !== null && _d !== void 0 ? _d : []), - ].some((key) => Object.prototype.hasOwnProperty.call(argv, key)) - : false; - const skipRecommendation = helpOptSet || requestCompletions || helpOnly; - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand; - for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]); - if (handlerKeys.includes(cmd) && cmd !== __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f")) { - const innerArgv = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runCommand(cmd, this, parsed, i + 1, helpOnly, helpOptSet || versionOptSet || helpOnly); - return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); - } - else if (!firstUnknownCommand && - cmd !== __classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f")) { - firstUnknownCommand = cmd; - break; - } - } - if (!__classPrivateFieldGet$1(this, _YargsInstance_command, "f").hasDefaultCommand() && - __classPrivateFieldGet$1(this, _YargsInstance_recommendCommands, "f") && - firstUnknownCommand && - !skipRecommendation) { - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").recommendCommands(firstUnknownCommand, handlerKeys); - } - } - if (__classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f") && - argv._.includes(__classPrivateFieldGet$1(this, _YargsInstance_completionCommand, "f")) && - !requestCompletions) { - if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - this.showCompletionScript(); - this.exit(0); - } - } - if (__classPrivateFieldGet$1(this, _YargsInstance_command, "f").hasDefaultCommand() && !skipRecommendation) { - const innerArgv = __classPrivateFieldGet$1(this, _YargsInstance_command, "f").runCommand(null, this, parsed, 0, helpOnly, helpOptSet || versionOptSet || helpOnly); - return this[kPostProcess](innerArgv, populateDoubleDash, !!calledFromCommand, false); - } - if (requestCompletions) { - if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - args = [].concat(args); - const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet$1(this, _YargsInstance_completion, "f").completionKey}`) + 1); - __classPrivateFieldGet$1(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => { - if (err) - throw new YError(err.message); - (completions || []).forEach(completion => { - __classPrivateFieldGet$1(this, _YargsInstance_logger, "f").log(completion); - }); - this.exit(0); - }); - return this[kPostProcess](argv, !populateDoubleDash, !!calledFromCommand, false); - } - if (!__classPrivateFieldGet$1(this, _YargsInstance_hasOutput, "f")) { - if (helpOptSet) { - if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - skipValidation = true; - this.showHelp(message => { - __classPrivateFieldGet$1(this, _YargsInstance_logger, "f").log(message); - this.exit(0); - }); - } - else if (versionOptSet) { - if (__classPrivateFieldGet$1(this, _YargsInstance_exitProcess, "f")) - setBlocking(true); - skipValidation = true; - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").showVersion('log'); - this.exit(0); - } - } - if (!skipValidation && __classPrivateFieldGet$1(this, _YargsInstance_options, "f").skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => __classPrivateFieldGet$1(this, _YargsInstance_options, "f").skipValidation.indexOf(key) >= 0 && argv[key] === true); - } - if (!skipValidation) { - if (parsed.error) - throw new YError(parsed.error.message); - if (!requestCompletions) { - const validation = this[kRunValidation](aliases, {}, parsed.error); - if (!calledFromCommand) { - argvPromise = applyMiddleware(argv, this, __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), true); - } - argvPromise = this[kValidateAsync](validation, argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv); - if (isPromise$1(argvPromise) && !calledFromCommand) { - argvPromise = argvPromise.then(() => { - return applyMiddleware(argv, this, __classPrivateFieldGet$1(this, _YargsInstance_globalMiddleware, "f").getMiddleware(), false); - }); - } - } - } - } - catch (err) { - if (err instanceof YError) - __classPrivateFieldGet$1(this, _YargsInstance_usage, "f").fail(err.message, err); - else - throw err; - } - return this[kPostProcess](argvPromise !== null && argvPromise !== void 0 ? argvPromise : argv, populateDoubleDash, !!calledFromCommand, true); - } - [kRunValidation](aliases, positionalMap, parseErrors, isDefaultCommand) { - const demandedOptions = { ...this.getDemandedOptions() }; - return (argv) => { - if (parseErrors) - throw new YError(parseErrors.message); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").nonOptionCount(argv); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").requiredArguments(argv, demandedOptions); - let failedStrictCommands = false; - if (__classPrivateFieldGet$1(this, _YargsInstance_strictCommands, "f")) { - failedStrictCommands = __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unknownCommands(argv); - } - if (__classPrivateFieldGet$1(this, _YargsInstance_strict, "f") && !failedStrictCommands) { - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, positionalMap, !!isDefaultCommand); - } - else if (__classPrivateFieldGet$1(this, _YargsInstance_strictOptions, "f")) { - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").unknownArguments(argv, aliases, {}, false, false); - } - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").limitedChoices(argv); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").implications(argv); - __classPrivateFieldGet$1(this, _YargsInstance_validation, "f").conflicting(argv); - }; - } - [kSetHasOutput]() { - __classPrivateFieldSet$1(this, _YargsInstance_hasOutput, true, "f"); - } - [kTrackManuallySetKeys](keys) { - if (typeof keys === 'string') { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[keys] = true; - } - else { - for (const k of keys) { - __classPrivateFieldGet$1(this, _YargsInstance_options, "f").key[k] = true; - } - } - } -} -function isYargsInstance(y) { - return !!y && typeof y.getInternalMethods === 'function'; -} - -const Yargs = YargsFactory(shim$1); - -var src = {exports: {}}; - -var browser$1 = {exports: {}}; - -var ms; -var hasRequiredMs; - -function requireMs () { - if (hasRequiredMs) return ms; - hasRequiredMs = 1; - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - ms = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); - }; - function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } - } - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; - } - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; - } - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - return ms; -} - -var common$3; -var hasRequiredCommon$2; - -function requireCommon$2 () { - if (hasRequiredCommon$2) return common$3; - hasRequiredCommon$2 = 1; - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = requireMs(); - createDebug.destroy = destroy; - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; - } - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug(...args) { - if (!debug.enabled) { - return; - } - const self = debug; - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== 'string') { - args.unshift('%O'); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self, args); - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - return debug; - } - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; - } - } - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - return templateIndex === template.length; - } - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - return false; - } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - createDebug.enable(createDebug.load()); - return createDebug; - } - common$3 = setup; - return common$3; -} - -var hasRequiredBrowser; - -function requireBrowser () { - if (hasRequiredBrowser) return browser$1.exports; - hasRequiredBrowser = 1; - (function (module, exports$1) { - exports$1.formatArgs = formatArgs; - exports$1.save = save; - exports$1.load = load; - exports$1.useColors = useColors; - exports$1.storage = localstorage(); - exports$1.destroy = (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; - })(); - exports$1.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' - ]; - function useColors() { - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - let m; - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); - } - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - if (!this.useColors) { - return; - } - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - exports$1.log = console.debug || console.log || (() => {}); - function save(namespaces) { - try { - if (namespaces) { - exports$1.storage.setItem('debug', namespaces); - } else { - exports$1.storage.removeItem('debug'); - } - } catch (error) { - } - } - function load() { - let r; - try { - r = exports$1.storage.getItem('debug') || exports$1.storage.getItem('DEBUG') ; - } catch (error) { - } - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - return r; - } - function localstorage() { - try { - return localStorage; - } catch (error) { - } - } - module.exports = requireCommon$2()(exports$1); - const {formatters} = module.exports; - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - } (browser$1, browser$1.exports)); - return browser$1.exports; -} - -var node$1 = {exports: {}}; - -var hasFlag; -var hasRequiredHasFlag; - -function requireHasFlag () { - if (hasRequiredHasFlag) return hasFlag; - hasRequiredHasFlag = 1; - hasFlag = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); - }; - return hasFlag; -} - -var supportsColor_1; -var hasRequiredSupportsColor; - -function requireSupportsColor () { - if (hasRequiredSupportsColor) return supportsColor_1; - hasRequiredSupportsColor = 1; - const os = require$$0$1; - const tty = require$$1; - const hasFlag = requireHasFlag(); - const {env} = process; - let forceColor; - if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; - } else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; - } - if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } - } - function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - if (hasFlag('color=256')) { - return 2; - } - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === 'dumb') { - return min; - } - if (process.platform === 'win32') { - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - return min; - } - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if (env.COLORTERM === 'truecolor') { - return 3; - } - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ('COLORTERM' in env) { - return 1; - } - return min; - } - function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); - } - supportsColor_1 = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) - }; - return supportsColor_1; -} - -var hasRequiredNode; - -function requireNode () { - if (hasRequiredNode) return node$1.exports; - hasRequiredNode = 1; - (function (module, exports$1) { - const tty = require$$1; - const util = require$$0$2; - exports$1.init = init; - exports$1.log = log; - exports$1.formatArgs = formatArgs; - exports$1.save = save; - exports$1.load = load; - exports$1.useColors = useColors; - exports$1.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' - ); - exports$1.colors = [6, 2, 3, 4, 5, 1]; - try { - const supportsColor = requireSupportsColor(); - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports$1.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } - } catch (error) { - } - exports$1.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); - }).reduce((obj, key) => { - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - obj[prop] = val; - return obj; - }, {}); - function useColors() { - return 'colors' in exports$1.inspectOpts ? - Boolean(exports$1.inspectOpts.colors) : - tty.isatty(process.stderr.fd); - } - function formatArgs(args) { - const {namespace: name, useColors} = this; - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } - } - function getDate() { - if (exports$1.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; - } - function log(...args) { - return process.stderr.write(util.formatWithOptions(exports$1.inspectOpts, ...args) + '\n'); - } - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - delete process.env.DEBUG; - } - } - function load() { - return process.env.DEBUG; - } - function init(debug) { - debug.inspectOpts = {}; - const keys = Object.keys(exports$1.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports$1.inspectOpts[keys[i]]; - } - } - module.exports = requireCommon$2()(exports$1); - const {formatters} = module.exports; - formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); - }; - formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); - }; - } (node$1, node$1.exports)); - return node$1.exports; -} - -var hasRequiredSrc; - -function requireSrc () { - if (hasRequiredSrc) return src.exports; - hasRequiredSrc = 1; - if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - src.exports = requireBrowser(); - } else { - src.exports = requireNode(); - } - return src.exports; -} - -var srcExports = requireSrc(); -var debug$2 = /*@__PURE__*/getDefaultExportFromCjs(srcExports); - -var index = /*#__PURE__*/_mergeNamespaces({ - __proto__: null, - default: debug$2 -}, [srcExports]); - -var util$6; -(function (util) { - util.assertEqual = (_) => { }; - function assertIs(_arg) { } - util.assertIs = assertIs; - function assertNever(_x) { - throw new Error(); - } - util.assertNever = assertNever; - util.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) { - obj[item] = item; - } - return obj; - }; - util.getValidEnumValues = (obj) => { - const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); - const filtered = {}; - for (const k of validKeys) { - filtered[k] = obj[k]; - } - return util.objectValues(filtered); - }; - util.objectValues = (obj) => { - return util.objectKeys(obj).map(function (e) { - return obj[e]; - }); - }; - util.objectKeys = typeof Object.keys === "function" - ? (obj) => Object.keys(obj) - : (object) => { - const keys = []; - for (const key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - keys.push(key); - } - } - return keys; - }; - util.find = (arr, checker) => { - for (const item of arr) { - if (checker(item)) - return item; - } - return undefined; - }; - util.isInteger = typeof Number.isInteger === "function" - ? (val) => Number.isInteger(val) - : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues(array, separator = " | ") { - return array.map((val) => (typeof val === "string" ? `'${val}'` : val)).join(separator); - } - util.joinValues = joinValues; - util.jsonStringifyReplacer = (_, value) => { - if (typeof value === "bigint") { - return value.toString(); - } - return value; - }; -})(util$6 || (util$6 = {})); -var objectUtil; -(function (objectUtil) { - objectUtil.mergeShapes = (first, second) => { - return { - ...first, - ...second, - }; - }; -})(objectUtil || (objectUtil = {})); -const ZodParsedType = util$6.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set", -]); -const getParsedType = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return ZodParsedType.undefined; - case "string": - return ZodParsedType.string; - case "number": - return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; - case "boolean": - return ZodParsedType.boolean; - case "function": - return ZodParsedType.function; - case "bigint": - return ZodParsedType.bigint; - case "symbol": - return ZodParsedType.symbol; - case "object": - if (Array.isArray(data)) { - return ZodParsedType.array; - } - if (data === null) { - return ZodParsedType.null; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return ZodParsedType.promise; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return ZodParsedType.map; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return ZodParsedType.set; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return ZodParsedType.date; - } - return ZodParsedType.object; - default: - return ZodParsedType.unknown; - } -}; - -const ZodIssueCode = util$6.arrayToEnum([ - "invalid_type", - "invalid_literal", - "custom", - "invalid_union", - "invalid_union_discriminator", - "invalid_enum_value", - "unrecognized_keys", - "invalid_arguments", - "invalid_return_type", - "invalid_date", - "invalid_string", - "too_small", - "too_big", - "invalid_intersection_types", - "not_multiple_of", - "not_finite", -]); -const quotelessJson = (obj) => { - const json = JSON.stringify(obj, null, 2); - return json.replace(/"([^"]+)":/g, "$1:"); -}; -class ZodError extends Error { - get errors() { - return this.issues; - } - constructor(issues) { - super(); - this.issues = []; - this.addIssue = (sub) => { - this.issues = [...this.issues, sub]; - }; - this.addIssues = (subs = []) => { - this.issues = [...this.issues, ...subs]; - }; - const actualProto = new.target.prototype; - if (Object.setPrototypeOf) { - Object.setPrototypeOf(this, actualProto); - } - else { - this.__proto__ = actualProto; - } - this.name = "ZodError"; - this.issues = issues; - } - format(_mapper) { - const mapper = _mapper || - function (issue) { - return issue.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error) => { - for (const issue of error.issues) { - if (issue.code === "invalid_union") { - issue.unionErrors.map(processError); - } - else if (issue.code === "invalid_return_type") { - processError(issue.returnTypeError); - } - else if (issue.code === "invalid_arguments") { - processError(issue.argumentsError); - } - else if (issue.path.length === 0) { - fieldErrors._errors.push(mapper(issue)); - } - else { - let curr = fieldErrors; - let i = 0; - while (i < issue.path.length) { - const el = issue.path[i]; - const terminal = i === issue.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } - else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value) { - if (!(value instanceof ZodError)) { - throw new Error(`Not a ZodError: ${value}`); - } - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util$6.jsonStringifyReplacer, 2); - } - get isEmpty() { - return this.issues.length === 0; - } - flatten(mapper = (issue) => issue.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of this.issues) { - if (sub.path.length > 0) { - const firstEl = sub.path[0]; - fieldErrors[firstEl] = fieldErrors[firstEl] || []; - fieldErrors[firstEl].push(mapper(sub)); - } - else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; - } - get formErrors() { - return this.flatten(); - } -} -ZodError.create = (issues) => { - const error = new ZodError(issues); - return error; -}; - -const errorMap = (issue, _ctx) => { - let message; - switch (issue.code) { - case ZodIssueCode.invalid_type: - if (issue.received === ZodParsedType.undefined) { - message = "Required"; - } - else { - message = `Expected ${issue.expected}, received ${issue.received}`; - } - break; - case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util$6.jsonStringifyReplacer)}`; - break; - case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util$6.joinValues(issue.keys, ", ")}`; - break; - case ZodIssueCode.invalid_union: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util$6.joinValues(issue.options)}`; - break; - case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util$6.joinValues(issue.options)}, received '${issue.received}'`; - break; - case ZodIssueCode.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode.invalid_date: - message = `Invalid date`; - break; - case ZodIssueCode.invalid_string: - if (typeof issue.validation === "object") { - if ("includes" in issue.validation) { - message = `Invalid input: must include "${issue.validation.includes}"`; - if (typeof issue.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`; - } - } - else if ("startsWith" in issue.validation) { - message = `Invalid input: must start with "${issue.validation.startsWith}"`; - } - else if ("endsWith" in issue.validation) { - message = `Invalid input: must end with "${issue.validation.endsWith}"`; - } - else { - util$6.assertNever(issue.validation); - } - } - else if (issue.validation !== "regex") { - message = `Invalid ${issue.validation}`; - } - else { - message = "Invalid"; - } - break; - case ZodIssueCode.too_small: - if (issue.type === "array") - message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`; - else if (issue.type === "string") - message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`; - else if (issue.type === "number") - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`; - else if (issue.type === "bigint") - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`; - else if (issue.type === "date") - message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.too_big: - if (issue.type === "array") - message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`; - else if (issue.type === "string") - message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`; - else if (issue.type === "number") - message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`; - else if (issue.type === "bigint") - message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`; - else if (issue.type === "date") - message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode.custom: - message = `Invalid input`; - break; - case ZodIssueCode.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue.multipleOf}`; - break; - case ZodIssueCode.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util$6.assertNever(issue); - } - return { message }; -}; - -let overrideErrorMap = errorMap; -function setErrorMap(map) { - overrideErrorMap = map; -} -function getErrorMap() { - return overrideErrorMap; -} - -const makeIssue = (params) => { - const { data, path, errorMaps, issueData } = params; - const fullPath = [...path, ...(issueData.path || [])]; - const fullIssue = { - ...issueData, - path: fullPath, - }; - if (issueData.message !== undefined) { - return { - ...issueData, - path: fullPath, - message: issueData.message, - }; - } - let errorMessage = ""; - const maps = errorMaps - .filter((m) => !!m) - .slice() - .reverse(); - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; - } - return { - ...issueData, - path: fullPath, - message: errorMessage, - }; -}; -const EMPTY_PATH = []; -function addIssueToContext(ctx, issueData) { - const overrideMap = getErrorMap(); - const issue = makeIssue({ - issueData: issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, - ctx.schemaErrorMap, - overrideMap, - overrideMap === errorMap ? undefined : errorMap, - ].filter((x) => !!x), - }); - ctx.common.issues.push(issue); -} -class ParseStatus { - constructor() { - this.value = "valid"; - } - dirty() { - if (this.value === "valid") - this.value = "dirty"; - } - abort() { - if (this.value !== "aborted") - this.value = "aborted"; - } - static mergeArray(status, results) { - const arrayValue = []; - for (const s of results) { - if (s.status === "aborted") - return INVALID; - if (s.status === "dirty") - status.dirty(); - arrayValue.push(s.value); - } - return { status: status.value, value: arrayValue }; - } - static async mergeObjectAsync(status, pairs) { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - syncPairs.push({ - key, - value, - }); - } - return ParseStatus.mergeObjectSync(status, syncPairs); - } - static mergeObjectSync(status, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key, value } = pair; - if (key.status === "aborted") - return INVALID; - if (value.status === "aborted") - return INVALID; - if (key.status === "dirty") - status.dirty(); - if (value.status === "dirty") - status.dirty(); - if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) { - finalObject[key.value] = value.value; - } - } - return { status: status.value, value: finalObject }; - } -} -const INVALID = Object.freeze({ - status: "aborted", -}); -const DIRTY = (value) => ({ status: "dirty", value }); -const OK = (value) => ({ status: "valid", value }); -const isAborted = (x) => x.status === "aborted"; -const isDirty = (x) => x.status === "dirty"; -const isValid$1 = (x) => x.status === "valid"; -const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise; - -var errorUtil; -(function (errorUtil) { - errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil.toString = (message) => typeof message === "string" ? message : message?.message; -})(errorUtil || (errorUtil = {})); - -class ParseInputLazyPath { - constructor(parent, value, path, key) { - this._cachedPath = []; - this.parent = parent; - this.data = value; - this._path = path; - this._key = key; - } - get path() { - if (!this._cachedPath.length) { - if (Array.isArray(this._key)) { - this._cachedPath.push(...this._path, ...this._key); - } - else { - this._cachedPath.push(...this._path, this._key); - } - } - return this._cachedPath; - } -} -const handleResult = (ctx, result) => { - if (isValid$1(result)) { - return { success: true, data: result.value }; - } - else { - if (!ctx.common.issues.length) { - throw new Error("Validation failed but no issues detected."); - } - return { - success: false, - get error() { - if (this._error) - return this._error; - const error = new ZodError(ctx.common.issues); - this._error = error; - return this._error; - }, - }; - } -}; -function processCreateParams(params) { - if (!params) - return {}; - const { errorMap, invalid_type_error, required_error, description } = params; - if (errorMap && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap) - return { errorMap: errorMap, description }; - const customMap = (iss, ctx) => { - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message ?? ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: message ?? required_error ?? ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: message ?? invalid_type_error ?? ctx.defaultError }; - }; - return { errorMap: customMap, description }; -} -let ZodType$1 = class ZodType { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType(input.data); - } - _getOrReturnCtx(input, ctx) { - return (ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent, - }); - } - _processInputParams(input) { - return { - status: new ParseStatus(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent, - }, - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync(result)) { - throw new Error("Synchronous parse encountered promise."); - } - return result; - } - _parseAsync(input) { - const result = this._parse(input); - return Promise.resolve(result); - } - parse(data, params) { - const result = this.safeParse(data, params); - if (result.success) - return result.data; - throw result.error; - } - safeParse(data, params) { - const ctx = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap, - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data), - }; - const result = this._parseSync({ data, path: ctx.path, parent: ctx }); - return handleResult(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async, - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data), - }; - if (!this["~standard"].async) { - try { - const result = this._parseSync({ data, path: [], parent: ctx }); - return isValid$1(result) - ? { - value: result.value, - } - : { - issues: ctx.common.issues, - }; - } - catch (err) { - if (err?.message?.toLowerCase()?.includes("encountered")) { - this["~standard"].async = true; - } - ctx.common = { - issues: [], - async: true, - }; - } - } - return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid$1(result) - ? { - value: result.value, - } - : { - issues: ctx.common.issues, - }); - } - async parseAsync(data, params) { - const result = await this.safeParseAsync(data, params); - if (result.success) - return result.data; - throw result.error; - } - async safeParseAsync(data, params) { - const ctx = { - common: { - issues: [], - contextualErrorMap: params?.errorMap, - async: true, - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data), - }; - const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); - const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult(ctx, result); - } - refine(check, message) { - const getIssueProperties = (val) => { - if (typeof message === "string" || typeof message === "undefined") { - return { message }; - } - else if (typeof message === "function") { - return message(val); - } - else { - return message; - } - }; - return this._refinement((val, ctx) => { - const result = check(val); - const setError = () => ctx.addIssue({ - code: ZodIssueCode.custom, - ...getIssueProperties(val), - }); - if (typeof Promise !== "undefined" && result instanceof Promise) { - return result.then((data) => { - if (!data) { - setError(); - return false; - } - else { - return true; - } - }); - } - if (!result) { - setError(); - return false; - } - else { - return true; - } - }); - } - refinement(check, refinementData) { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); - return false; - } - else { - return true; - } - }); - } - _refinement(refinement) { - return new ZodEffects({ - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "refinement", refinement }, - }); - } - superRefine(refinement) { - return this._refinement(refinement); - } - constructor(def) { - this.spa = this.safeParseAsync; - this._def = def; - this.parse = this.parse.bind(this); - this.safeParse = this.safeParse.bind(this); - this.parseAsync = this.parseAsync.bind(this); - this.safeParseAsync = this.safeParseAsync.bind(this); - this.spa = this.spa.bind(this); - this.refine = this.refine.bind(this); - this.refinement = this.refinement.bind(this); - this.superRefine = this.superRefine.bind(this); - this.optional = this.optional.bind(this); - this.nullable = this.nullable.bind(this); - this.nullish = this.nullish.bind(this); - this.array = this.array.bind(this); - this.promise = this.promise.bind(this); - this.or = this.or.bind(this); - this.and = this.and.bind(this); - this.transform = this.transform.bind(this); - this.brand = this.brand.bind(this); - this.default = this.default.bind(this); - this.catch = this.catch.bind(this); - this.describe = this.describe.bind(this); - this.pipe = this.pipe.bind(this); - this.readonly = this.readonly.bind(this); - this.isNullable = this.isNullable.bind(this); - this.isOptional = this.isOptional.bind(this); - this["~standard"] = { - version: 1, - vendor: "zod", - validate: (data) => this["~validate"](data), - }; - } - optional() { - return ZodOptional$1.create(this, this._def); - } - nullable() { - return ZodNullable$1.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray$1.create(this); - } - promise() { - return ZodPromise.create(this, this._def); - } - or(option) { - return ZodUnion$1.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection$1.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects({ - ...processCreateParams(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: "transform", transform }, - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault$1({ - ...processCreateParams(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind.ZodDefault, - }); - } - brand() { - return new ZodBranded({ - typeName: ZodFirstPartyTypeKind.ZodBranded, - type: this, - ...processCreateParams(this._def), - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch$1({ - ...processCreateParams(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind.ZodCatch, - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description, - }); - } - pipe(target) { - return ZodPipeline.create(this, target); - } - readonly() { - return ZodReadonly$1.create(this); - } - isOptional() { - return this.safeParse(undefined).success; - } - isNullable() { - return this.safeParse(null).success; - } -}; -const cuidRegex = /^c[^\s-]{8,}$/i; -const cuid2Regex = /^[0-9a-z]+$/; -const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; -const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; -const nanoidRegex = /^[a-z0-9_-]{21}$/i; -const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; -const durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; -const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; -const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -let emojiRegex$1; -const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; -const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; -const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-f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}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; -const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; -const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; -const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; -const dateRegex = new RegExp(`^${dateRegexSource}$`); -function timeRegexSource(args) { - let secondsRegexSource = `[0-5]\\d`; - if (args.precision) { - secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`; - } - else if (args.precision == null) { - secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; - } - const secondsQuantifier = args.precision ? "+" : "?"; - return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; -} -function timeRegex(args) { - return new RegExp(`^${timeRegexSource(args)}$`); -} -function datetimeRegex(args) { - let regex = `${dateRegexSource}T${timeRegexSource(args)}`; - const opts = []; - opts.push(args.local ? `Z?` : `Z`); - if (args.offset) - opts.push(`([+-]\\d{2}:?\\d{2})`); - regex = `${regex}(${opts.join("|")})`; - return new RegExp(`^${regex}$`); -} -function isValidIP(ip, version) { - if ((version === "v4" || !version) && ipv4Regex.test(ip)) { - return true; - } - if ((version === "v6" || !version) && ipv6Regex.test(ip)) { - return true; - } - return false; -} -function isValidJWT$1(jwt, alg) { - if (!jwtRegex.test(jwt)) - return false; - try { - const [header] = jwt.split("."); - if (!header) - return false; - const base64 = header - .replace(/-/g, "+") - .replace(/_/g, "/") - .padEnd(header.length + ((4 - (header.length % 4)) % 4), "="); - const decoded = JSON.parse(atob(base64)); - if (typeof decoded !== "object" || decoded === null) - return false; - if ("typ" in decoded && decoded?.typ !== "JWT") - return false; - if (!decoded.alg) - return false; - if (alg && decoded.alg !== alg) - return false; - return true; - } - catch { - return false; - } -} -function isValidCidr(ip, version) { - if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) { - return true; - } - if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) { - return true; - } - return false; -} -let ZodString$1 = class ZodString extends ZodType$1 { - _parse(input) { - if (this._def.coerce) { - input.data = String(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.string) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.string, - received: ctx.parsedType, - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = undefined; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - if (tooBig) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message, - }); - } - else if (tooSmall) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message, - }); - } - status.dirty(); - } - } - else if (check.kind === "email") { - if (!emailRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "email", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "emoji") { - if (!emojiRegex$1) { - emojiRegex$1 = new RegExp(_emojiRegex, "u"); - } - if (!emojiRegex$1.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "emoji", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "uuid") { - if (!uuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "uuid", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "nanoid") { - if (!nanoidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "nanoid", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "cuid") { - if (!cuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "cuid2") { - if (!cuid2Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cuid2", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "ulid") { - if (!ulidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ulid", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "url") { - try { - new URL(input.data); - } - catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "url", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "regex", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "trim") { - input.data = input.data.trim(); - } - else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "toLowerCase") { - input.data = input.data.toLowerCase(); - } - else if (check.kind === "toUpperCase") { - input.data = input.data.toUpperCase(); - } - else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { startsWith: check.value }, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { endsWith: check.value }, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "datetime") { - const regex = datetimeRegex(check); - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "datetime", - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "date") { - const regex = dateRegex; - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "date", - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "time") { - const regex = timeRegex(check); - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: "time", - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "duration") { - if (!durationRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "duration", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "ip") { - if (!isValidIP(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "ip", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "jwt") { - if (!isValidJWT$1(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "jwt", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "cidr") { - if (!isValidCidr(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "cidr", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "base64") { - if (!base64Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "base64url") { - if (!base64urlRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - validation: "base64url", - code: ZodIssueCode.invalid_string, - message: check.message, - }); - status.dirty(); - } - } - else { - util$6.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _regex(regex, validation, message) { - return this.refinement((data) => regex.test(data), { - validation, - code: ZodIssueCode.invalid_string, - ...errorUtil.errToObj(message), - }); - } - _addCheck(check) { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, check], - }); - } - email(message) { - return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); - } - url(message) { - return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); - } - emoji(message) { - return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); - } - uuid(message) { - return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); - } - nanoid(message) { - return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) }); - } - cuid(message) { - return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); - } - cuid2(message) { - return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); - } - ulid(message) { - return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); - } - base64(message) { - return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil.errToObj(message), - }); - } - jwt(options) { - return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) }); - } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); - } - cidr(options) { - return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) }); - } - datetime(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "datetime", - precision: null, - offset: false, - local: false, - message: options, - }); - } - return this._addCheck({ - kind: "datetime", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil.errToObj(options?.message), - }); - } - date(message) { - return this._addCheck({ kind: "date", message }); - } - time(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "time", - precision: null, - message: options, - }); - } - return this._addCheck({ - kind: "time", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - ...errorUtil.errToObj(options?.message), - }); - } - duration(message) { - return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) }); - } - regex(regex, message) { - return this._addCheck({ - kind: "regex", - regex: regex, - ...errorUtil.errToObj(message), - }); - } - includes(value, options) { - return this._addCheck({ - kind: "includes", - value: value, - position: options?.position, - ...errorUtil.errToObj(options?.message), - }); - } - startsWith(value, message) { - return this._addCheck({ - kind: "startsWith", - value: value, - ...errorUtil.errToObj(message), - }); - } - endsWith(value, message) { - return this._addCheck({ - kind: "endsWith", - value: value, - ...errorUtil.errToObj(message), - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil.errToObj(message), - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil.errToObj(message), - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil.errToObj(message), - }); - } - nonempty(message) { - return this.min(1, errorUtil.errToObj(message)); - } - trim() { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }], - }); - } - toLowerCase() { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }], - }); - } - toUpperCase() { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toUpperCase" }], - }); - } - get isDatetime() { - return !!this._def.checks.find((ch) => ch.kind === "datetime"); - } - get isDate() { - return !!this._def.checks.find((ch) => ch.kind === "date"); - } - get isTime() { - return !!this._def.checks.find((ch) => ch.kind === "time"); - } - get isDuration() { - return !!this._def.checks.find((ch) => ch.kind === "duration"); - } - get isEmail() { - return !!this._def.checks.find((ch) => ch.kind === "email"); - } - get isURL() { - return !!this._def.checks.find((ch) => ch.kind === "url"); - } - get isEmoji() { - return !!this._def.checks.find((ch) => ch.kind === "emoji"); - } - get isUUID() { - return !!this._def.checks.find((ch) => ch.kind === "uuid"); - } - get isNANOID() { - return !!this._def.checks.find((ch) => ch.kind === "nanoid"); - } - get isCUID() { - return !!this._def.checks.find((ch) => ch.kind === "cuid"); - } - get isCUID2() { - return !!this._def.checks.find((ch) => ch.kind === "cuid2"); - } - get isULID() { - return !!this._def.checks.find((ch) => ch.kind === "ulid"); - } - get isIP() { - return !!this._def.checks.find((ch) => ch.kind === "ip"); - } - get isCIDR() { - return !!this._def.checks.find((ch) => ch.kind === "cidr"); - } - get isBase64() { - return !!this._def.checks.find((ch) => ch.kind === "base64"); - } - get isBase64url() { - return !!this._def.checks.find((ch) => ch.kind === "base64url"); - } - get minLength() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxLength() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } -}; -ZodString$1.create = (params) => { - return new ZodString$1({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams(params), - }); -}; -function floatSafeRemainder$1(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return (valInt % stepInt) / 10 ** decCount; -} -let ZodNumber$1 = class ZodNumber extends ZodType$1 { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - this.step = this.multipleOf; - } - _parse(input) { - if (this._def.coerce) { - input.data = Number(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.number) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.number, - received: ctx.parsedType, - }); - return INVALID; - } - let ctx = undefined; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "int") { - if (!util$6.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: "integer", - received: "float", - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "multipleOf") { - if (floatSafeRemainder$1(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_finite, - message: check.message, - }); - status.dirty(); - } - } - else { - util$6.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - gte(value, message) { - return this.setLimit("min", value, true, errorUtil.toString(message)); - } - gt(value, message) { - return this.setLimit("min", value, false, errorUtil.toString(message)); - } - lte(value, message) { - return this.setLimit("max", value, true, errorUtil.toString(message)); - } - lt(value, message) { - return this.setLimit("max", value, false, errorUtil.toString(message)); - } - setLimit(kind, value, inclusive, message) { - return new ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message), - }, - ], - }); - } - _addCheck(check) { - return new ZodNumber({ - ...this._def, - checks: [...this._def.checks, check], - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil.toString(message), - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil.toString(message), - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil.toString(message), - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil.toString(message), - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil.toString(message), - }); - } - multipleOf(value, message) { - return this._addCheck({ - kind: "multipleOf", - value: value, - message: errorUtil.toString(message), - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil.toString(message), - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil.toString(message), - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil.toString(message), - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } - get isInt() { - return !!this._def.checks.find((ch) => ch.kind === "int" || (ch.kind === "multipleOf" && util$6.isInteger(ch.value))); - } - get isFinite() { - let max = null; - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { - return true; - } - else if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - else if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return Number.isFinite(min) && Number.isFinite(max); - } -}; -ZodNumber$1.create = (params) => { - return new ZodNumber$1({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams(params), - }); -}; -let ZodBigInt$1 = class ZodBigInt extends ZodType$1 { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - } - _parse(input) { - if (this._def.coerce) { - try { - input.data = BigInt(input.data); - } - catch { - return this._getInvalidInput(input); - } - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.bigint) { - return this._getInvalidInput(input); - } - let ctx = undefined; - const status = new ParseStatus(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message, - }); - status.dirty(); - } - } - else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message, - }); - status.dirty(); - } - } - else { - util$6.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.bigint, - received: ctx.parsedType, - }); - return INVALID; - } - gte(value, message) { - return this.setLimit("min", value, true, errorUtil.toString(message)); - } - gt(value, message) { - return this.setLimit("min", value, false, errorUtil.toString(message)); - } - lte(value, message) { - return this.setLimit("max", value, true, errorUtil.toString(message)); - } - lt(value, message) { - return this.setLimit("max", value, false, errorUtil.toString(message)); - } - setLimit(kind, value, inclusive, message) { - return new ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message), - }, - ], - }); - } - _addCheck(check) { - return new ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check], - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message), - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message), - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message), - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message), - }); - } - multipleOf(value, message) { - return this._addCheck({ - kind: "multipleOf", - value, - message: errorUtil.toString(message), - }); - } - get minValue() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min; - } - get maxValue() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max; - } -}; -ZodBigInt$1.create = (params) => { - return new ZodBigInt$1({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams(params), - }); -}; -let ZodBoolean$1 = class ZodBoolean extends ZodType$1 { - _parse(input) { - if (this._def.coerce) { - input.data = Boolean(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.boolean, - received: ctx.parsedType, - }); - return INVALID; - } - return OK(input.data); - } -}; -ZodBoolean$1.create = (params) => { - return new ZodBoolean$1({ - typeName: ZodFirstPartyTypeKind.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams(params), - }); -}; -class ZodDate extends ZodType$1 { - _parse(input) { - if (this._def.coerce) { - input.data = new Date(input.data); - } - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.date) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.date, - received: ctx.parsedType, - }); - return INVALID; - } - if (Number.isNaN(input.data.getTime())) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_date, - }); - return INVALID; - } - const status = new ParseStatus(); - let ctx = undefined; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date", - }); - status.dirty(); - } - } - else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date", - }); - status.dirty(); - } - } - else { - util$6.assertNever(check); - } - } - return { - status: status.value, - value: new Date(input.data.getTime()), - }; - } - _addCheck(check) { - return new ZodDate({ - ...this._def, - checks: [...this._def.checks, check], - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil.toString(message), - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil.toString(message), - }); - } - get minDate() { - let min = null; - for (const ch of this._def.checks) { - if (ch.kind === "min") { - if (min === null || ch.value > min) - min = ch.value; - } - } - return min != null ? new Date(min) : null; - } - get maxDate() { - let max = null; - for (const ch of this._def.checks) { - if (ch.kind === "max") { - if (max === null || ch.value < max) - max = ch.value; - } - } - return max != null ? new Date(max) : null; - } -} -ZodDate.create = (params) => { - return new ZodDate({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind.ZodDate, - ...processCreateParams(params), - }); -}; -class ZodSymbol extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.symbol, - received: ctx.parsedType, - }); - return INVALID; - } - return OK(input.data); - } -} -ZodSymbol.create = (params) => { - return new ZodSymbol({ - typeName: ZodFirstPartyTypeKind.ZodSymbol, - ...processCreateParams(params), - }); -}; -class ZodUndefined extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.undefined, - received: ctx.parsedType, - }); - return INVALID; - } - return OK(input.data); - } -} -ZodUndefined.create = (params) => { - return new ZodUndefined({ - typeName: ZodFirstPartyTypeKind.ZodUndefined, - ...processCreateParams(params), - }); -}; -let ZodNull$1 = class ZodNull extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.null, - received: ctx.parsedType, - }); - return INVALID; - } - return OK(input.data); - } -}; -ZodNull$1.create = (params) => { - return new ZodNull$1({ - typeName: ZodFirstPartyTypeKind.ZodNull, - ...processCreateParams(params), - }); -}; -class ZodAny extends ZodType$1 { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK(input.data); - } -} -ZodAny.create = (params) => { - return new ZodAny({ - typeName: ZodFirstPartyTypeKind.ZodAny, - ...processCreateParams(params), - }); -}; -let ZodUnknown$1 = class ZodUnknown extends ZodType$1 { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK(input.data); - } -}; -ZodUnknown$1.create = (params) => { - return new ZodUnknown$1({ - typeName: ZodFirstPartyTypeKind.ZodUnknown, - ...processCreateParams(params), - }); -}; -let ZodNever$1 = class ZodNever extends ZodType$1 { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.never, - received: ctx.parsedType, - }); - return INVALID; - } -}; -ZodNever$1.create = (params) => { - return new ZodNever$1({ - typeName: ZodFirstPartyTypeKind.ZodNever, - ...processCreateParams(params), - }); -}; -class ZodVoid extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.void, - received: ctx.parsedType, - }); - return INVALID; - } - return OK(input.data); - } -} -ZodVoid.create = (params) => { - return new ZodVoid({ - typeName: ZodFirstPartyTypeKind.ZodVoid, - ...processCreateParams(params), - }); -}; -let ZodArray$1 = class ZodArray extends ZodType$1 { - _parse(input) { - const { ctx, status } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType, - }); - return INVALID; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext(ctx, { - code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, - minimum: (tooSmall ? def.exactLength.value : undefined), - maximum: (tooBig ? def.exactLength.value : undefined), - type: "array", - inclusive: true, - exact: true, - message: def.exactLength.message, - }); - status.dirty(); - } - } - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.minLength.message, - }); - status.dirty(); - } - } - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxLength.value, - type: "array", - inclusive: true, - exact: false, - message: def.maxLength.message, - }); - status.dirty(); - } - } - if (ctx.common.async) { - return Promise.all([...ctx.data].map((item, i) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i)); - })).then((result) => { - return ParseStatus.mergeArray(status, result); - }); - } - const result = [...ctx.data].map((item, i) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i)); - }); - return ParseStatus.mergeArray(status, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil.toString(message) }, - }); - } - max(maxLength, message) { - return new ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil.toString(message) }, - }); - } - length(len, message) { - return new ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil.toString(message) }, - }); - } - nonempty(message) { - return this.min(1, message); - } -}; -ZodArray$1.create = (schema, params) => { - return new ZodArray$1({ - type: schema, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind.ZodArray, - ...processCreateParams(params), - }); -}; -function deepPartialify(schema) { - if (schema instanceof ZodObject$1) { - const newShape = {}; - for (const key in schema.shape) { - const fieldSchema = schema.shape[key]; - newShape[key] = ZodOptional$1.create(deepPartialify(fieldSchema)); - } - return new ZodObject$1({ - ...schema._def, - shape: () => newShape, - }); - } - else if (schema instanceof ZodArray$1) { - return new ZodArray$1({ - ...schema._def, - type: deepPartialify(schema.element), - }); - } - else if (schema instanceof ZodOptional$1) { - return ZodOptional$1.create(deepPartialify(schema.unwrap())); - } - else if (schema instanceof ZodNullable$1) { - return ZodNullable$1.create(deepPartialify(schema.unwrap())); - } - else if (schema instanceof ZodTuple) { - return ZodTuple.create(schema.items.map((item) => deepPartialify(item))); - } - else { - return schema; - } -} -let ZodObject$1 = class ZodObject extends ZodType$1 { - constructor() { - super(...arguments); - this._cached = null; - this.nonstrict = this.passthrough; - this.augment = this.extend; - } - _getCached() { - if (this._cached !== null) - return this._cached; - const shape = this._def.shape(); - const keys = util$6.objectKeys(shape); - this._cached = { shape, keys }; - return this._cached; - } - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.object) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType, - }); - return INVALID; - } - const { status, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever$1 && this._def.unknownKeys === "strip")) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key); - } - } - } - const pairs = []; - for (const key of shapeKeys) { - const keyValidator = shape[key]; - const value = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)), - alwaysSet: key in ctx.data, - }); - } - if (this._def.catchall instanceof ZodNever$1) { - const unknownKeys = this._def.unknownKeys; - if (unknownKeys === "passthrough") { - for (const key of extraKeys) { - pairs.push({ - key: { status: "valid", value: key }, - value: { status: "valid", value: ctx.data[key] }, - }); - } - } - else if (unknownKeys === "strict") { - if (extraKeys.length > 0) { - addIssueToContext(ctx, { - code: ZodIssueCode.unrecognized_keys, - keys: extraKeys, - }); - status.dirty(); - } - } - else if (unknownKeys === "strip") ; - else { - throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); - } - } - else { - const catchall = this._def.catchall; - for (const key of extraKeys) { - const value = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) - ), - alwaysSet: key in ctx.data, - }); - } - } - if (ctx.common.async) { - return Promise.resolve() - .then(async () => { - const syncPairs = []; - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - syncPairs.push({ - key, - value, - alwaysSet: pair.alwaysSet, - }); - } - return syncPairs; - }) - .then((syncPairs) => { - return ParseStatus.mergeObjectSync(status, syncPairs); - }); - } - else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil.errToObj; - return new ZodObject({ - ...this._def, - unknownKeys: "strict", - ...(message !== undefined - ? { - errorMap: (issue, ctx) => { - const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError; - if (issue.code === "unrecognized_keys") - return { - message: errorUtil.errToObj(message).message ?? defaultError, - }; - return { - message: defaultError, - }; - }, - } - : {}), - }); - } - strip() { - return new ZodObject({ - ...this._def, - unknownKeys: "strip", - }); - } - passthrough() { - return new ZodObject({ - ...this._def, - unknownKeys: "passthrough", - }); - } - extend(augmentation) { - return new ZodObject({ - ...this._def, - shape: () => ({ - ...this._def.shape(), - ...augmentation, - }), - }); - } - merge(merging) { - const merged = new ZodObject({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape(), - }), - typeName: ZodFirstPartyTypeKind.ZodObject, - }); - return merged; - } - setKey(key, schema) { - return this.augment({ [key]: schema }); - } - catchall(index) { - return new ZodObject({ - ...this._def, - catchall: index, - }); - } - pick(mask) { - const shape = {}; - for (const key of util$6.objectKeys(mask)) { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key]; - } - } - return new ZodObject({ - ...this._def, - shape: () => shape, - }); - } - omit(mask) { - const shape = {}; - for (const key of util$6.objectKeys(this.shape)) { - if (!mask[key]) { - shape[key] = this.shape[key]; - } - } - return new ZodObject({ - ...this._def, - shape: () => shape, - }); - } - deepPartial() { - return deepPartialify(this); - } - partial(mask) { - const newShape = {}; - for (const key of util$6.objectKeys(this.shape)) { - const fieldSchema = this.shape[key]; - if (mask && !mask[key]) { - newShape[key] = fieldSchema; - } - else { - newShape[key] = fieldSchema.optional(); - } - } - return new ZodObject({ - ...this._def, - shape: () => newShape, - }); - } - required(mask) { - const newShape = {}; - for (const key of util$6.objectKeys(this.shape)) { - if (mask && !mask[key]) { - newShape[key] = this.shape[key]; - } - else { - const fieldSchema = this.shape[key]; - let newField = fieldSchema; - while (newField instanceof ZodOptional$1) { - newField = newField._def.innerType; - } - newShape[key] = newField; - } - } - return new ZodObject({ - ...this._def, - shape: () => newShape, - }); - } - keyof() { - return createZodEnum(util$6.objectKeys(this.shape)); - } -}; -ZodObject$1.create = (shape, params) => { - return new ZodObject$1({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever$1.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params), - }); -}; -ZodObject$1.strictCreate = (shape, params) => { - return new ZodObject$1({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever$1.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params), - }); -}; -ZodObject$1.lazycreate = (shape, params) => { - return new ZodObject$1({ - shape, - unknownKeys: "strip", - catchall: ZodNever$1.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params), - }); -}; -let ZodUnion$1 = class ZodUnion extends ZodType$1 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const options = this._def.options; - function handleResults(results) { - for (const result of results) { - if (result.result.status === "valid") { - return result.result; - } - } - for (const result of results) { - if (result.result.status === "dirty") { - ctx.common.issues.push(...result.ctx.common.issues); - return result.result; - } - } - const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors, - }); - return INVALID; - } - if (ctx.common.async) { - return Promise.all(options.map(async (option) => { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [], - }, - parent: null, - }; - return { - result: await option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: childCtx, - }), - ctx: childCtx, - }; - })).then(handleResults); - } - else { - let dirty = undefined; - const issues = []; - for (const option of options) { - const childCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [], - }, - parent: null, - }; - const result = option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: childCtx, - }); - if (result.status === "valid") { - return result; - } - else if (result.status === "dirty" && !dirty) { - dirty = { result, ctx: childCtx }; - } - if (childCtx.common.issues.length) { - issues.push(childCtx.common.issues); - } - } - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues); - return dirty.result; - } - const unionErrors = issues.map((issues) => new ZodError(issues)); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors, - }); - return INVALID; - } - } - get options() { - return this._def.options; - } -}; -ZodUnion$1.create = (types, params) => { - return new ZodUnion$1({ - options: types, - typeName: ZodFirstPartyTypeKind.ZodUnion, - ...processCreateParams(params), - }); -}; -const getDiscriminator = (type) => { - if (type instanceof ZodLazy) { - return getDiscriminator(type.schema); - } - else if (type instanceof ZodEffects) { - return getDiscriminator(type.innerType()); - } - else if (type instanceof ZodLiteral$1) { - return [type.value]; - } - else if (type instanceof ZodEnum$1) { - return type.options; - } - else if (type instanceof ZodNativeEnum) { - return util$6.objectValues(type.enum); - } - else if (type instanceof ZodDefault$1) { - return getDiscriminator(type._def.innerType); - } - else if (type instanceof ZodUndefined) { - return [undefined]; - } - else if (type instanceof ZodNull$1) { - return [null]; - } - else if (type instanceof ZodOptional$1) { - return [undefined, ...getDiscriminator(type.unwrap())]; - } - else if (type instanceof ZodNullable$1) { - return [null, ...getDiscriminator(type.unwrap())]; - } - else if (type instanceof ZodBranded) { - return getDiscriminator(type.unwrap()); - } - else if (type instanceof ZodReadonly$1) { - return getDiscriminator(type.unwrap()); - } - else if (type instanceof ZodCatch$1) { - return getDiscriminator(type._def.innerType); - } - else { - return []; - } -}; -let ZodDiscriminatedUnion$1 = class ZodDiscriminatedUnion extends ZodType$1 { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType, - }); - return INVALID; - } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator], - }); - return INVALID; - } - if (ctx.common.async) { - return option._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }); - } - else { - return option._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }); - } - } - get discriminator() { - return this._def.discriminator; - } - get options() { - return this._def.options; - } - get optionsMap() { - return this._def.optionsMap; - } - static create(discriminator, options, params) { - const optionsMap = new Map(); - for (const type of options) { - const discriminatorValues = getDiscriminator(type.shape[discriminator]); - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); - } - for (const value of discriminatorValues) { - if (optionsMap.has(value)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`); - } - optionsMap.set(value, type); - } - } - return new ZodDiscriminatedUnion({ - typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams(params), - }); - } -}; -function mergeValues$1(a, b) { - const aType = getParsedType(a); - const bType = getParsedType(b); - if (a === b) { - return { valid: true, data: a }; - } - else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { - const bKeys = util$6.objectKeys(b); - const sharedKeys = util$6.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues$1(a[key], b[key]); - if (!sharedValue.valid) { - return { valid: false }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } - else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { - if (a.length !== b.length) { - return { valid: false }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues$1(itemA, itemB); - if (!sharedValue.valid) { - return { valid: false }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } - else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) { - return { valid: true, data: a }; - } - else { - return { valid: false }; - } -} -let ZodIntersection$1 = class ZodIntersection extends ZodType$1 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted(parsedLeft) || isAborted(parsedRight)) { - return INVALID; - } - const merged = mergeValues$1(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_intersection_types, - }); - return INVALID; - } - if (isDirty(parsedLeft) || isDirty(parsedRight)) { - status.dirty(); - } - return { status: status.value, value: merged.data }; - }; - if (ctx.common.async) { - return Promise.all([ - this._def.left._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }), - this._def.right._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }), - ]).then(([left, right]) => handleParsed(left, right)); - } - else { - return handleParsed(this._def.left._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }), this._def.right._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - })); - } - } -}; -ZodIntersection$1.create = (left, right, params) => { - return new ZodIntersection$1({ - left: left, - right: right, - typeName: ZodFirstPartyTypeKind.ZodIntersection, - ...processCreateParams(params), - }); -}; -class ZodTuple extends ZodType$1 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType, - }); - return INVALID; - } - if (ctx.data.length < this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array", - }); - return INVALID; - } - const rest = this._def.rest; - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array", - }); - status.dirty(); - } - const items = [...ctx.data] - .map((item, itemIndex) => { - const schema = this._def.items[itemIndex] || this._def.rest; - if (!schema) - return null; - return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); - }) - .filter((x) => !!x); - if (ctx.common.async) { - return Promise.all(items).then((results) => { - return ParseStatus.mergeArray(status, results); - }); - } - else { - return ParseStatus.mergeArray(status, items); - } - } - get items() { - return this._def.items; - } - rest(rest) { - return new ZodTuple({ - ...this._def, - rest, - }); - } -} -ZodTuple.create = (schemas, params) => { - if (!Array.isArray(schemas)) { - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - } - return new ZodTuple({ - items: schemas, - typeName: ZodFirstPartyTypeKind.ZodTuple, - rest: null, - ...processCreateParams(params), - }); -}; -let ZodRecord$1 = class ZodRecord extends ZodType$1 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType, - }); - return INVALID; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), - value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)), - alwaysSet: key in ctx.data, - }); - } - if (ctx.common.async) { - return ParseStatus.mergeObjectAsync(status, pairs); - } - else { - return ParseStatus.mergeObjectSync(status, pairs); - } - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType$1) { - return new ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(third), - }); - } - return new ZodRecord({ - keyType: ZodString$1.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(second), - }); - } -}; -class ZodMap extends ZodType$1 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.map) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.map, - received: ctx.parsedType, - }); - return INVALID; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key, value], index) => { - return { - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])), - }; - }); - if (ctx.common.async) { - const finalMap = new Map(); - return Promise.resolve().then(async () => { - for (const pair of pairs) { - const key = await pair.key; - const value = await pair.value; - if (key.status === "aborted" || value.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value.value); - } - return { status: status.value, value: finalMap }; - }); - } - else { - const finalMap = new Map(); - for (const pair of pairs) { - const key = pair.key; - const value = pair.value; - if (key.status === "aborted" || value.status === "aborted") { - return INVALID; - } - if (key.status === "dirty" || value.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value.value); - } - return { status: status.value, value: finalMap }; - } - } -} -ZodMap.create = (keyType, valueType, params) => { - return new ZodMap({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind.ZodMap, - ...processCreateParams(params), - }); -}; -class ZodSet extends ZodType$1 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.set) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.set, - received: ctx.parsedType, - }); - return INVALID; - } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.minSize.message, - }); - status.dirty(); - } - } - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxSize.value, - type: "set", - inclusive: true, - exact: false, - message: def.maxSize.message, - }); - status.dirty(); - } - } - const valueType = this._def.valueType; - function finalizeSet(elements) { - const parsedSet = new Set(); - for (const element of elements) { - if (element.status === "aborted") - return INVALID; - if (element.status === "dirty") - status.dirty(); - parsedSet.add(element.value); - } - return { status: status.value, value: parsedSet }; - } - const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i))); - if (ctx.common.async) { - return Promise.all(elements).then((elements) => finalizeSet(elements)); - } - else { - return finalizeSet(elements); - } - } - min(minSize, message) { - return new ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil.toString(message) }, - }); - } - max(maxSize, message) { - return new ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil.toString(message) }, - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } -} -ZodSet.create = (valueType, params) => { - return new ZodSet({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind.ZodSet, - ...processCreateParams(params), - }); -}; -class ZodFunction extends ZodType$1 { - constructor() { - super(...arguments); - this.validate = this.implement; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.function) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.function, - received: ctx.parsedType, - }); - return INVALID; - } - function makeArgsIssue(args, error) { - return makeIssue({ - data: args, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), errorMap].filter((x) => !!x), - issueData: { - code: ZodIssueCode.invalid_arguments, - argumentsError: error, - }, - }); - } - function makeReturnsIssue(returns, error) { - return makeIssue({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), errorMap].filter((x) => !!x), - issueData: { - code: ZodIssueCode.invalid_return_type, - returnTypeError: error, - }, - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn = ctx.data; - if (this._def.returns instanceof ZodPromise) { - const me = this; - return OK(async function (...args) { - const error = new ZodError([]); - const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => { - error.addIssue(makeArgsIssue(args, e)); - throw error; - }); - const result = await Reflect.apply(fn, this, parsedArgs); - const parsedReturns = await me._def.returns._def.type - .parseAsync(result, params) - .catch((e) => { - error.addIssue(makeReturnsIssue(result, e)); - throw error; - }); - return parsedReturns; - }); - } - else { - const me = this; - return OK(function (...args) { - const parsedArgs = me._def.args.safeParse(args, params); - if (!parsedArgs.success) { - throw new ZodError([makeArgsIssue(args, parsedArgs.error)]); - } - const result = Reflect.apply(fn, this, parsedArgs.data); - const parsedReturns = me._def.returns.safeParse(result, params); - if (!parsedReturns.success) { - throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); - } - return parsedReturns.data; - }); - } - } - parameters() { - return this._def.args; - } - returnType() { - return this._def.returns; - } - args(...items) { - return new ZodFunction({ - ...this._def, - args: ZodTuple.create(items).rest(ZodUnknown$1.create()), - }); - } - returns(returnType) { - return new ZodFunction({ - ...this._def, - returns: returnType, - }); - } - implement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - strictImplement(func) { - const validatedFunc = this.parse(func); - return validatedFunc; - } - static create(args, returns, params) { - return new ZodFunction({ - args: (args ? args : ZodTuple.create([]).rest(ZodUnknown$1.create())), - returns: returns || ZodUnknown$1.create(), - typeName: ZodFirstPartyTypeKind.ZodFunction, - ...processCreateParams(params), - }); - } -} -class ZodLazy extends ZodType$1 { - get schema() { - return this._def.getter(); - } - _parse(input) { - const { ctx } = this._processInputParams(input); - const lazySchema = this._def.getter(); - return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); - } -} -ZodLazy.create = (getter, params) => { - return new ZodLazy({ - getter: getter, - typeName: ZodFirstPartyTypeKind.ZodLazy, - ...processCreateParams(params), - }); -}; -let ZodLiteral$1 = class ZodLiteral extends ZodType$1 { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_literal, - expected: this._def.value, - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } - get value() { - return this._def.value; - } -}; -ZodLiteral$1.create = (value, params) => { - return new ZodLiteral$1({ - value: value, - typeName: ZodFirstPartyTypeKind.ZodLiteral, - ...processCreateParams(params), - }); -}; -function createZodEnum(values, params) { - return new ZodEnum$1({ - values, - typeName: ZodFirstPartyTypeKind.ZodEnum, - ...processCreateParams(params), - }); -} -let ZodEnum$1 = class ZodEnum extends ZodType$1 { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - expected: util$6.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type, - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(this._def.values); - } - if (!this._cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues, - }); - return INVALID; - } - return OK(input.data); - } - get options() { - return this._def.values; - } - get enum() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - get Values() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - get Enum() { - const enumValues = {}; - for (const val of this._def.values) { - enumValues[val] = val; - } - return enumValues; - } - extract(values, newDef = this._def) { - return ZodEnum.create(values, { - ...this._def, - ...newDef, - }); - } - exclude(values, newDef = this._def) { - return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { - ...this._def, - ...newDef, - }); - } -}; -ZodEnum$1.create = createZodEnum; -class ZodNativeEnum extends ZodType$1 { - _parse(input) { - const nativeEnumValues = util$6.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { - const expectedValues = util$6.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - expected: util$6.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode.invalid_type, - }); - return INVALID; - } - if (!this._cache) { - this._cache = new Set(util$6.getValidEnumValues(this._def.values)); - } - if (!this._cache.has(input.data)) { - const expectedValues = util$6.objectValues(nativeEnumValues); - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues, - }); - return INVALID; - } - return OK(input.data); - } - get enum() { - return this._def.values; - } -} -ZodNativeEnum.create = (values, params) => { - return new ZodNativeEnum({ - values: values, - typeName: ZodFirstPartyTypeKind.ZodNativeEnum, - ...processCreateParams(params), - }); -}; -class ZodPromise extends ZodType$1 { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.promise, - received: ctx.parsedType, - }); - return INVALID; - } - const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); - return OK(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap, - }); - })); - } -} -ZodPromise.create = (schema, params) => { - return new ZodPromise({ - type: schema, - typeName: ZodFirstPartyTypeKind.ZodPromise, - ...processCreateParams(params), - }); -}; -class ZodEffects extends ZodType$1 { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects - ? this._def.schema.sourceType() - : this._def.schema; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const effect = this._def.effect || null; - const checkCtx = { - addIssue: (arg) => { - addIssueToContext(ctx, arg); - if (arg.fatal) { - status.abort(); - } - else { - status.dirty(); - } - }, - get path() { - return ctx.path; - }, - }; - checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); - if (effect.type === "preprocess") { - const processed = effect.transform(ctx.data, checkCtx); - if (ctx.common.async) { - return Promise.resolve(processed).then(async (processed) => { - if (status.value === "aborted") - return INVALID; - const result = await this._def.schema._parseAsync({ - data: processed, - path: ctx.path, - parent: ctx, - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - }); - } - else { - if (status.value === "aborted") - return INVALID; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx, - }); - if (result.status === "aborted") - return INVALID; - if (result.status === "dirty") - return DIRTY(result.value); - if (status.value === "dirty") - return DIRTY(result.value); - return result; - } - } - if (effect.type === "refinement") { - const executeRefinement = (acc) => { - const result = effect.refinement(acc, checkCtx); - if (ctx.common.async) { - return Promise.resolve(result); - } - if (result instanceof Promise) { - throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); - } - return acc; - }; - if (ctx.common.async === false) { - const inner = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }); - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - executeRefinement(inner.value); - return { status: status.value, value: inner.value }; - } - else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { - if (inner.status === "aborted") - return INVALID; - if (inner.status === "dirty") - status.dirty(); - return executeRefinement(inner.value).then(() => { - return { status: status.value, value: inner.value }; - }); - }); - } - } - if (effect.type === "transform") { - if (ctx.common.async === false) { - const base = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }); - if (!isValid$1(base)) - return INVALID; - const result = effect.transform(base.value, checkCtx); - if (result instanceof Promise) { - throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); - } - return { status: status.value, value: result }; - } - else { - return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { - if (!isValid$1(base)) - return INVALID; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status.value, - value: result, - })); - }); - } - } - util$6.assertNever(effect); - } -} -ZodEffects.create = (schema, effect, params) => { - return new ZodEffects({ - schema, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect, - ...processCreateParams(params), - }); -}; -ZodEffects.createWithPreprocess = (preprocess, schema, params) => { - return new ZodEffects({ - schema, - effect: { type: "preprocess", transform: preprocess }, - typeName: ZodFirstPartyTypeKind.ZodEffects, - ...processCreateParams(params), - }); -}; -let ZodOptional$1 = class ZodOptional extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType === ZodParsedType.undefined) { - return OK(undefined); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } -}; -ZodOptional$1.create = (type, params) => { - return new ZodOptional$1({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodOptional, - ...processCreateParams(params), - }); -}; -let ZodNullable$1 = class ZodNullable extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType === ZodParsedType.null) { - return OK(null); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } -}; -ZodNullable$1.create = (type, params) => { - return new ZodNullable$1({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodNullable, - ...processCreateParams(params), - }); -}; -let ZodDefault$1 = class ZodDefault extends ZodType$1 { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType.undefined) { - data = this._def.defaultValue(); - } - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx, - }); - } - removeDefault() { - return this._def.innerType; - } -}; -ZodDefault$1.create = (type, params) => { - return new ZodDefault$1({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams(params), - }); -}; -let ZodCatch$1 = class ZodCatch extends ZodType$1 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const newCtx = { - ...ctx, - common: { - ...ctx.common, - issues: [], - }, - }; - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - parent: { - ...newCtx, - }, - }); - if (isAsync(result)) { - return result.then((result) => { - return { - status: "valid", - value: result.status === "valid" - ? result.value - : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data, - }), - }; - }); - } - else { - return { - status: "valid", - value: result.status === "valid" - ? result.value - : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues); - }, - input: newCtx.data, - }), - }; - } - } - removeCatch() { - return this._def.innerType; - } -}; -ZodCatch$1.create = (type, params) => { - return new ZodCatch$1({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams(params), - }); -}; -class ZodNaN extends ZodType$1 { - _parse(input) { - const parsedType = this._getType(input); - if (parsedType !== ZodParsedType.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.nan, - received: ctx.parsedType, - }); - return INVALID; - } - return { status: "valid", value: input.data }; - } -} -ZodNaN.create = (params) => { - return new ZodNaN({ - typeName: ZodFirstPartyTypeKind.ZodNaN, - ...processCreateParams(params), - }); -}; -const BRAND = Symbol("zod_brand"); -class ZodBranded extends ZodType$1 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const data = ctx.data; - return this._def.type._parse({ - data, - path: ctx.path, - parent: ctx, - }); - } - unwrap() { - return this._def.type; - } -} -class ZodPipeline extends ZodType$1 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.common.async) { - const handleAsync = async () => { - const inResult = await this._def.in._parseAsync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return DIRTY(inResult.value); - } - else { - return this._def.out._parseAsync({ - data: inResult.value, - path: ctx.path, - parent: ctx, - }); - } - }; - return handleAsync(); - } - else { - const inResult = this._def.in._parseSync({ - data: ctx.data, - path: ctx.path, - parent: ctx, - }); - if (inResult.status === "aborted") - return INVALID; - if (inResult.status === "dirty") { - status.dirty(); - return { - status: "dirty", - value: inResult.value, - }; - } - else { - return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - parent: ctx, - }); - } - } - } - static create(a, b) { - return new ZodPipeline({ - in: a, - out: b, - typeName: ZodFirstPartyTypeKind.ZodPipeline, - }); - } -} -let ZodReadonly$1 = class ZodReadonly extends ZodType$1 { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid$1(data)) { - data.value = Object.freeze(data.value); - } - return data; - }; - return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } -}; -ZodReadonly$1.create = (type, params) => { - return new ZodReadonly$1({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodReadonly, - ...processCreateParams(params), - }); -}; -function cleanParams(params, data) { - const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; - const p2 = typeof p === "string" ? { message: p } : p; - return p2; -} -function custom$2(check, _params = {}, -fatal) { - if (check) - return ZodAny.create().superRefine((data, ctx) => { - const r = check(data); - if (r instanceof Promise) { - return r.then((r) => { - if (!r) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r) { - const params = cleanParams(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny.create(); -} -const late = { - object: ZodObject$1.lazycreate, -}; -var ZodFirstPartyTypeKind; -(function (ZodFirstPartyTypeKind) { - ZodFirstPartyTypeKind["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly"; -})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); -const instanceOfType = ( -cls, params = { - message: `Input not instance of ${cls.name}`, -}) => custom$2((data) => data instanceof cls, params); -const stringType = ZodString$1.create; -const numberType = ZodNumber$1.create; -const nanType = ZodNaN.create; -const bigIntType = ZodBigInt$1.create; -const booleanType = ZodBoolean$1.create; -const dateType = ZodDate.create; -const symbolType = ZodSymbol.create; -const undefinedType = ZodUndefined.create; -const nullType = ZodNull$1.create; -const anyType = ZodAny.create; -const unknownType = ZodUnknown$1.create; -const neverType = ZodNever$1.create; -const voidType = ZodVoid.create; -const arrayType = ZodArray$1.create; -const objectType = ZodObject$1.create; -const strictObjectType = ZodObject$1.strictCreate; -const unionType = ZodUnion$1.create; -const discriminatedUnionType = ZodDiscriminatedUnion$1.create; -const intersectionType = ZodIntersection$1.create; -const tupleType = ZodTuple.create; -const recordType = ZodRecord$1.create; -const mapType = ZodMap.create; -const setType = ZodSet.create; -const functionType = ZodFunction.create; -const lazyType = ZodLazy.create; -const literalType = ZodLiteral$1.create; -const enumType = ZodEnum$1.create; -const nativeEnumType = ZodNativeEnum.create; -const promiseType = ZodPromise.create; -const effectsType = ZodEffects.create; -const optionalType = ZodOptional$1.create; -const nullableType = ZodNullable$1.create; -const preprocessType = ZodEffects.createWithPreprocess; -const pipelineType = ZodPipeline.create; -const ostring = () => stringType().optional(); -const onumber = () => numberType().optional(); -const oboolean = () => booleanType().optional(); -const coerce = { - string: ((arg) => ZodString$1.create({ ...arg, coerce: true })), - number: ((arg) => ZodNumber$1.create({ ...arg, coerce: true })), - boolean: ((arg) => ZodBoolean$1.create({ - ...arg, - coerce: true, - })), - bigint: ((arg) => ZodBigInt$1.create({ ...arg, coerce: true })), - date: ((arg) => ZodDate.create({ ...arg, coerce: true })), -}; -const NEVER$1 = INVALID; - -var z = /*#__PURE__*/Object.freeze({ - __proto__: null, - BRAND: BRAND, - DIRTY: DIRTY, - EMPTY_PATH: EMPTY_PATH, - INVALID: INVALID, - NEVER: NEVER$1, - OK: OK, - ParseStatus: ParseStatus, - Schema: ZodType$1, - ZodAny: ZodAny, - ZodArray: ZodArray$1, - ZodBigInt: ZodBigInt$1, - ZodBoolean: ZodBoolean$1, - ZodBranded: ZodBranded, - ZodCatch: ZodCatch$1, - ZodDate: ZodDate, - ZodDefault: ZodDefault$1, - ZodDiscriminatedUnion: ZodDiscriminatedUnion$1, - ZodEffects: ZodEffects, - ZodEnum: ZodEnum$1, - ZodError: ZodError, - get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; }, - ZodFunction: ZodFunction, - ZodIntersection: ZodIntersection$1, - ZodIssueCode: ZodIssueCode, - ZodLazy: ZodLazy, - ZodLiteral: ZodLiteral$1, - ZodMap: ZodMap, - ZodNaN: ZodNaN, - ZodNativeEnum: ZodNativeEnum, - ZodNever: ZodNever$1, - ZodNull: ZodNull$1, - ZodNullable: ZodNullable$1, - ZodNumber: ZodNumber$1, - ZodObject: ZodObject$1, - ZodOptional: ZodOptional$1, - ZodParsedType: ZodParsedType, - ZodPipeline: ZodPipeline, - ZodPromise: ZodPromise, - ZodReadonly: ZodReadonly$1, - ZodRecord: ZodRecord$1, - ZodSchema: ZodType$1, - ZodSet: ZodSet, - ZodString: ZodString$1, - ZodSymbol: ZodSymbol, - ZodTransformer: ZodEffects, - ZodTuple: ZodTuple, - ZodType: ZodType$1, - ZodUndefined: ZodUndefined, - ZodUnion: ZodUnion$1, - ZodUnknown: ZodUnknown$1, - ZodVoid: ZodVoid, - addIssueToContext: addIssueToContext, - any: anyType, - array: arrayType, - bigint: bigIntType, - boolean: booleanType, - coerce: coerce, - custom: custom$2, - date: dateType, - datetimeRegex: datetimeRegex, - defaultErrorMap: errorMap, - discriminatedUnion: discriminatedUnionType, - effect: effectsType, - enum: enumType, - function: functionType, - getErrorMap: getErrorMap, - getParsedType: getParsedType, - instanceof: instanceOfType, - intersection: intersectionType, - isAborted: isAborted, - isAsync: isAsync, - isDirty: isDirty, - isValid: isValid$1, - late: late, - lazy: lazyType, - literal: literalType, - makeIssue: makeIssue, - map: mapType, - nan: nanType, - nativeEnum: nativeEnumType, - never: neverType, - null: nullType, - nullable: nullableType, - number: numberType, - object: objectType, - get objectUtil () { return objectUtil; }, - oboolean: oboolean, - onumber: onumber, - optional: optionalType, - ostring: ostring, - pipeline: pipelineType, - preprocess: preprocessType, - promise: promiseType, - quotelessJson: quotelessJson, - record: recordType, - set: setType, - setErrorMap: setErrorMap, - strictObject: strictObjectType, - string: stringType, - symbol: symbolType, - transformer: effectsType, - tuple: tupleType, - undefined: undefinedType, - union: unionType, - unknown: unknownType, - get util () { return util$6; }, - void: voidType -}); - -function $constructor(name, initializer, params) { - function init(inst, def) { - var _a; - Object.defineProperty(inst, "_zod", { - value: inst._zod ?? {}, - enumerable: false, - }); - (_a = inst._zod).traits ?? (_a.traits = new Set()); - inst._zod.traits.add(name); - initializer(inst, def); - for (const k in _.prototype) { - if (!(k in inst)) - Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); - } - inst._zod.constr = _; - inst._zod.def = def; - } - const Parent = params?.Parent ?? Object; - class Definition extends Parent { - } - Object.defineProperty(Definition, "name", { value: name }); - function _(def) { - var _a; - const inst = params?.Parent ? new Definition() : this; - init(inst, def); - (_a = inst._zod).deferred ?? (_a.deferred = []); - for (const fn of inst._zod.deferred) { - fn(); - } - return inst; - } - Object.defineProperty(_, "init", { value: init }); - Object.defineProperty(_, Symbol.hasInstance, { - value: (inst) => { - if (params?.Parent && inst instanceof params.Parent) - return true; - return inst?._zod?.traits?.has(name); - }, - }); - Object.defineProperty(_, "name", { value: name }); - return _; -} -class $ZodAsyncError extends Error { - constructor() { - super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); - } -} -const globalConfig = {}; -function config$3(newConfig) { - return globalConfig; -} - -function getEnumValues(entries) { - const numericValues = Object.values(entries).filter((v) => typeof v === "number"); - const values = Object.entries(entries) - .filter(([k, _]) => numericValues.indexOf(+k) === -1) - .map(([_, v]) => v); - return values; -} -function jsonStringifyReplacer(_, value) { - if (typeof value === "bigint") - return value.toString(); - return value; -} -function cached(getter) { - return { - get value() { - { - const value = getter(); - Object.defineProperty(this, "value", { value }); - return value; - } - }, - }; -} -function nullish(input) { - return input === null || input === undefined; -} -function cleanRegex(source) { - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - return source.slice(start, end); -} -function floatSafeRemainder(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return (valInt % stepInt) / 10 ** decCount; -} -function defineLazy(object, key, getter) { - Object.defineProperty(object, key, { - get() { - { - const value = getter(); - object[key] = value; - return value; - } - }, - set(v) { - Object.defineProperty(object, key, { - value: v, - }); - }, - configurable: true, - }); -} -function assignProp(target, prop, value) { - Object.defineProperty(target, prop, { - value, - writable: true, - enumerable: true, - configurable: true, - }); -} -function esc(str) { - return JSON.stringify(str); -} -const captureStackTrace = Error.captureStackTrace - ? Error.captureStackTrace - : (..._args) => { }; -function isObject(data) { - return typeof data === "object" && data !== null && !Array.isArray(data); -} -const allowsEval = cached(() => { - if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { - return false; - } - try { - const F = Function; - new F(""); - return true; - } - catch (_) { - return false; - } -}); -function isPlainObject$1(o) { - if (isObject(o) === false) - return false; - const ctor = o.constructor; - if (ctor === undefined) - return true; - const prot = ctor.prototype; - if (isObject(prot) === false) - return false; - if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { - return false; - } - return true; -} -const propertyKeyTypes = new Set(["string", "number", "symbol"]); -const primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); -function escapeRegex(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -} -function clone(inst, def, params) { - const cl = new inst._zod.constr(def ?? inst._zod.def); - if (!def || params?.parent) - cl._zod.parent = inst; - return cl; -} -function normalizeParams(_params) { - const params = _params; - if (!params) - return {}; - if (typeof params === "string") - return { error: () => params }; - if (params?.message !== undefined) { - if (params?.error !== undefined) - throw new Error("Cannot specify both `message` and `error` params"); - params.error = params.message; - } - delete params.message; - if (typeof params.error === "string") - return { ...params, error: () => params.error }; - return params; -} -function optionalKeys(shape) { - return Object.keys(shape).filter((k) => { - return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; - }); -} -const NUMBER_FORMAT_RANGES = { - safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], - int32: [-2147483648, 2147483647], - uint32: [0, 4294967295], - float32: [-34028234663852886e22, 3.4028234663852886e38], - float64: [-Number.MAX_VALUE, Number.MAX_VALUE], -}; -const BIGINT_FORMAT_RANGES = { - int64: [ BigInt("-9223372036854775808"), BigInt("9223372036854775807")], - uint64: [ BigInt(0), BigInt("18446744073709551615")], -}; -function pick(schema, mask) { - const newShape = {}; - const currDef = schema._zod.def; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - newShape[key] = currDef.shape[key]; - } - return clone(schema, { - ...schema._zod.def, - shape: newShape, - checks: [], - }); -} -function omit(schema, mask) { - const newShape = { ...schema._zod.def.shape }; - const currDef = schema._zod.def; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - delete newShape[key]; - } - return clone(schema, { - ...schema._zod.def, - shape: newShape, - checks: [], - }); -} -function extend(schema, shape) { - if (!isPlainObject$1(shape)) { - throw new Error("Invalid input to extend: expected a plain object"); - } - const def = { - ...schema._zod.def, - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp(this, "shape", _shape); - return _shape; - }, - checks: [], - }; - return clone(schema, def); -} -function merge$1(a, b) { - return clone(a, { - ...a._zod.def, - get shape() { - const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; - assignProp(this, "shape", _shape); - return _shape; - }, - catchall: b._zod.def.catchall, - checks: [], - }); -} -function partial(Class, schema, mask) { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in oldShape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = Class - ? new Class({ - type: "optional", - innerType: oldShape[key], - }) - : oldShape[key]; - } - } - else { - for (const key in oldShape) { - shape[key] = Class - ? new Class({ - type: "optional", - innerType: oldShape[key], - }) - : oldShape[key]; - } - } - return clone(schema, { - ...schema._zod.def, - shape, - checks: [], - }); -} -function required$6(Class, schema, mask) { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = new Class({ - type: "nonoptional", - innerType: oldShape[key], - }); - } - } - else { - for (const key in oldShape) { - shape[key] = new Class({ - type: "nonoptional", - innerType: oldShape[key], - }); - } - } - return clone(schema, { - ...schema._zod.def, - shape, - checks: [], - }); -} -function aborted(x, startIndex = 0) { - for (let i = startIndex; i < x.issues.length; i++) { - if (x.issues[i]?.continue !== true) - return true; - } - return false; -} -function prefixIssues(path, issues) { - return issues.map((iss) => { - var _a; - (_a = iss).path ?? (_a.path = []); - iss.path.unshift(path); - return iss; - }); -} -function unwrapMessage(message) { - return typeof message === "string" ? message : message?.message; -} -function finalizeIssue(iss, ctx, config) { - const full = { ...iss, path: iss.path ?? [] }; - if (!iss.message) { - const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? - unwrapMessage(ctx?.error?.(iss)) ?? - unwrapMessage(config.customError?.(iss)) ?? - unwrapMessage(config.localeError?.(iss)) ?? - "Invalid input"; - full.message = message; - } - delete full.inst; - delete full.continue; - if (!ctx?.reportInput) { - delete full.input; - } - return full; -} -function getSizableOrigin(input) { - if (input instanceof Set) - return "set"; - if (input instanceof Map) - return "map"; - if (input instanceof File) - return "file"; - return "unknown"; -} -function getLengthableOrigin(input) { - if (Array.isArray(input)) - return "array"; - if (typeof input === "string") - return "string"; - return "unknown"; -} -function issue(...args) { - const [iss, input, inst] = args; - if (typeof iss === "string") { - return { - message: iss, - code: "custom", - input, - inst, - }; - } - return { ...iss }; -} - -const initializer$1 = (inst, def) => { - inst.name = "$ZodError"; - Object.defineProperty(inst, "_zod", { - value: inst._zod, - enumerable: false, - }); - Object.defineProperty(inst, "issues", { - value: def, - enumerable: false, - }); - Object.defineProperty(inst, "message", { - get() { - return JSON.stringify(def, jsonStringifyReplacer, 2); - }, - enumerable: true, - }); - Object.defineProperty(inst, "toString", { - value: () => inst.message, - enumerable: false, - }); -}; -const $ZodError = $constructor("$ZodError", initializer$1); -const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error }); -function flattenError(error, mapper = (issue) => issue.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of error.issues) { - if (sub.path.length > 0) { - fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; - fieldErrors[sub.path[0]].push(mapper(sub)); - } - else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; -} -function formatError(error, _mapper) { - const mapper = _mapper || - function (issue) { - return issue.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error) => { - for (const issue of error.issues) { - if (issue.code === "invalid_union" && issue.errors.length) { - issue.errors.map((issues) => processError({ issues })); - } - else if (issue.code === "invalid_key") { - processError({ issues: issue.issues }); - } - else if (issue.code === "invalid_element") { - processError({ issues: issue.issues }); - } - else if (issue.path.length === 0) { - fieldErrors._errors.push(mapper(issue)); - } - else { - let curr = fieldErrors; - let i = 0; - while (i < issue.path.length) { - const el = issue.path[i]; - const terminal = i === issue.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } - else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(error); - return fieldErrors; -} - -const _parse = (_Err) => (schema, value, _ctx, _params) => { - const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; - const result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) { - throw new $ZodAsyncError(); - } - if (result.issues.length) { - const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))); - captureStackTrace(e, _params?.callee); - throw e; - } - return result.value; -}; -const parse$4 = _parse($ZodRealError); -const _parseAsync = (_Err) => async (schema, value, _ctx, params) => { - const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; - let result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) - result = await result; - if (result.issues.length) { - const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))); - captureStackTrace(e, params?.callee); - throw e; - } - return result.value; -}; -const parseAsync$1 = _parseAsync($ZodRealError); -const _safeParse = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? { ..._ctx, async: false } : { async: false }; - const result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) { - throw new $ZodAsyncError(); - } - return result.issues.length - ? { - success: false, - error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))), - } - : { success: true, data: result.value }; -}; -const safeParse$2 = _safeParse($ZodRealError); -const _safeParseAsync = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; - let result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) - result = await result; - return result.issues.length - ? { - success: false, - error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))), - } - : { success: true, data: result.value }; -}; -const safeParseAsync$2 = _safeParseAsync($ZodRealError); - -const cuid = /^[cC][^\s-]{8,}$/; -const cuid2 = /^[0-9a-z]+$/; -const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; -const xid = /^[0-9a-vA-V]{20}$/; -const ksuid = /^[A-Za-z0-9]{27}$/; -const nanoid = /^[a-zA-Z0-9_-]{21}$/; -const duration$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; -const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; -const uuid = (version) => { - if (!version) - return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); -}; -const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; -const _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -function emoji() { - return new RegExp(_emoji$1, "u"); -} -const ipv4$1 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; -const ipv6$1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/; -const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; -const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; -const base64$1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; -const base64url = /^[A-Za-z0-9_-]*$/; -const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/; -const e164 = /^\+(?:[0-9]){6,14}[0-9]$/; -const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; -const date$1 = new RegExp(`^${dateSource}$`); -function timeSource(args) { - const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; - const regex = typeof args.precision === "number" - ? args.precision === -1 - ? `${hhmm}` - : args.precision === 0 - ? `${hhmm}:[0-5]\\d` - : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` - : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; - return regex; -} -function time$1(args) { - return new RegExp(`^${timeSource(args)}$`); -} -function datetime$1(args) { - const time = timeSource({ precision: args.precision }); - const opts = ["Z"]; - if (args.local) - opts.push(""); - if (args.offset) - opts.push(`([+-]\\d{2}:\\d{2})`); - const timeRegex = `${time}(?:${opts.join("|")})`; - return new RegExp(`^${dateSource}T(?:${timeRegex})$`); -} -const string$1 = (params) => { - const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; - return new RegExp(`^${regex}$`); -}; -const bigint = /^\d+n?$/; -const integer = /^\d+$/; -const number$1 = /^-?\d+(?:\.\d+)?/i; -const boolean$1 = /true|false/i; -const _null$2 = /null/i; -const _undefined = /undefined/i; -const lowercase = /^[^A-Z]*$/; -const uppercase = /^[^a-z]*$/; - -const $ZodCheck = $constructor("$ZodCheck", (inst, def) => { - var _a; - inst._zod ?? (inst._zod = {}); - inst._zod.def = def; - (_a = inst._zod).onattach ?? (_a.onattach = []); -}); -const numericOriginMap = { - number: "number", - bigint: "bigint", - object: "date", -}; -const $ZodCheckLessThan = $constructor("$ZodCheckLessThan", (inst, def) => { - $ZodCheck.init(inst, def); - const origin = numericOriginMap[typeof def.value]; - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; - if (def.value < curr) { - if (def.inclusive) - bag.maximum = def.value; - else - bag.exclusiveMaximum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { - return; - } - payload.issues.push({ - origin, - code: "too_big", - maximum: def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckGreaterThan = $constructor("$ZodCheckGreaterThan", (inst, def) => { - $ZodCheck.init(inst, def); - const origin = numericOriginMap[typeof def.value]; - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; - if (def.value > curr) { - if (def.inclusive) - bag.minimum = def.value; - else - bag.exclusiveMinimum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { - return; - } - payload.issues.push({ - origin, - code: "too_small", - minimum: def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckMultipleOf = - $constructor("$ZodCheckMultipleOf", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.onattach.push((inst) => { - var _a; - (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value); - }); - inst._zod.check = (payload) => { - if (typeof payload.value !== typeof def.value) - throw new Error("Cannot mix number and bigint in multiple_of check."); - const isMultiple = typeof payload.value === "bigint" - ? payload.value % def.value === BigInt(0) - : floatSafeRemainder(payload.value, def.value) === 0; - if (isMultiple) - return; - payload.issues.push({ - origin: typeof payload.value, - code: "not_multiple_of", - divisor: def.value, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckNumberFormat = $constructor("$ZodCheckNumberFormat", (inst, def) => { - $ZodCheck.init(inst, def); - def.format = def.format || "float64"; - const isInt = def.format?.includes("int"); - const origin = isInt ? "int" : "number"; - const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - if (isInt) - bag.pattern = integer; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (isInt) { - if (!Number.isInteger(input)) { - payload.issues.push({ - expected: origin, - format: def.format, - code: "invalid_type", - input, - inst, - }); - return; - } - if (!Number.isSafeInteger(input)) { - if (input > 0) { - payload.issues.push({ - input, - code: "too_big", - maximum: Number.MAX_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin, - continue: !def.abort, - }); - } - else { - payload.issues.push({ - input, - code: "too_small", - minimum: Number.MIN_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin, - continue: !def.abort, - }); - } - return; - } - } - if (input < minimum) { - payload.issues.push({ - origin: "number", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort, - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "number", - input, - code: "too_big", - maximum, - inst, - }); - } - }; -}); -const $ZodCheckBigIntFormat = $constructor("$ZodCheckBigIntFormat", (inst, def) => { - $ZodCheck.init(inst, def); - const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (input < minimum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_small", - minimum: minimum, - inclusive: true, - inst, - continue: !def.abort, - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_big", - maximum, - inst, - }); - } - }; -}); -const $ZodCheckMaxSize = $constructor("$ZodCheckMaxSize", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== undefined; - }); - inst._zod.onattach.push((inst) => { - const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY); - if (def.maximum < curr) - inst._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size <= def.maximum) - return; - payload.issues.push({ - origin: getSizableOrigin(input), - code: "too_big", - maximum: def.maximum, - input, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckMinSize = $constructor("$ZodCheckMinSize", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== undefined; - }); - inst._zod.onattach.push((inst) => { - const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY); - if (def.minimum > curr) - inst._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size >= def.minimum) - return; - payload.issues.push({ - origin: getSizableOrigin(input), - code: "too_small", - minimum: def.minimum, - input, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckSizeEquals = $constructor("$ZodCheckSizeEquals", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== undefined; - }); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.minimum = def.size; - bag.maximum = def.size; - bag.size = def.size; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size === def.size) - return; - const tooBig = size > def.size; - payload.issues.push({ - origin: getSizableOrigin(input), - ...(tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }), - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckMaxLength = $constructor("$ZodCheckMaxLength", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== undefined; - }); - inst._zod.onattach.push((inst) => { - const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY); - if (def.maximum < curr) - inst._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length <= def.maximum) - return; - const origin = getLengthableOrigin(input); - payload.issues.push({ - origin, - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckMinLength = $constructor("$ZodCheckMinLength", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== undefined; - }); - inst._zod.onattach.push((inst) => { - const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY); - if (def.minimum > curr) - inst._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length >= def.minimum) - return; - const origin = getLengthableOrigin(input); - payload.issues.push({ - origin, - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckLengthEquals = $constructor("$ZodCheckLengthEquals", (inst, def) => { - var _a; - $ZodCheck.init(inst, def); - (_a = inst._zod.def).when ?? (_a.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== undefined; - }); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.minimum = def.length; - bag.maximum = def.length; - bag.length = def.length; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length === def.length) - return; - const origin = getLengthableOrigin(input); - const tooBig = length > def.length; - payload.issues.push({ - origin, - ...(tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }), - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckStringFormat = $constructor("$ZodCheckStringFormat", (inst, def) => { - var _a, _b; - $ZodCheck.init(inst, def); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.format = def.format; - if (def.pattern) { - bag.patterns ?? (bag.patterns = new Set()); - bag.patterns.add(def.pattern); - } - }); - if (def.pattern) - (_a = inst._zod).check ?? (_a.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: def.format, - input: payload.value, - ...(def.pattern ? { pattern: def.pattern.toString() } : {}), - inst, - continue: !def.abort, - }); - }); - else - (_b = inst._zod).check ?? (_b.check = () => { }); -}); -const $ZodCheckRegex = $constructor("$ZodCheckRegex", (inst, def) => { - $ZodCheckStringFormat.init(inst, def); - inst._zod.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "regex", - input: payload.value, - pattern: def.pattern.toString(), - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckLowerCase = $constructor("$ZodCheckLowerCase", (inst, def) => { - def.pattern ?? (def.pattern = lowercase); - $ZodCheckStringFormat.init(inst, def); -}); -const $ZodCheckUpperCase = $constructor("$ZodCheckUpperCase", (inst, def) => { - def.pattern ?? (def.pattern = uppercase); - $ZodCheckStringFormat.init(inst, def); -}); -const $ZodCheckIncludes = $constructor("$ZodCheckIncludes", (inst, def) => { - $ZodCheck.init(inst, def); - const escapedRegex = escapeRegex(def.includes); - const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); - def.pattern = pattern; - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.patterns ?? (bag.patterns = new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.includes(def.includes, def.position)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "includes", - includes: def.includes, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckStartsWith = $constructor("$ZodCheckStartsWith", (inst, def) => { - $ZodCheck.init(inst, def); - const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.patterns ?? (bag.patterns = new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.startsWith(def.prefix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "starts_with", - prefix: def.prefix, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCheckEndsWith = $constructor("$ZodCheckEndsWith", (inst, def) => { - $ZodCheck.init(inst, def); - const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.patterns ?? (bag.patterns = new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.endsWith(def.suffix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "ends_with", - suffix: def.suffix, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -function handleCheckPropertyResult(result, payload, property) { - if (result.issues.length) { - payload.issues.push(...prefixIssues(property, result.issues)); - } -} -$constructor("$ZodCheckProperty", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.check = (payload) => { - const result = def.schema._zod.run({ - value: payload.value[def.property], - issues: [], - }, {}); - if (result instanceof Promise) { - return result.then((result) => handleCheckPropertyResult(result, payload, def.property)); - } - handleCheckPropertyResult(result, payload, def.property); - return; - }; -}); -const $ZodCheckMimeType = $constructor("$ZodCheckMimeType", (inst, def) => { - $ZodCheck.init(inst, def); - const mimeSet = new Set(def.mime); - inst._zod.onattach.push((inst) => { - inst._zod.bag.mime = def.mime; - }); - inst._zod.check = (payload) => { - if (mimeSet.has(payload.value.type)) - return; - payload.issues.push({ - code: "invalid_value", - values: def.mime, - input: payload.value.type, - inst, - }); - }; -}); -const $ZodCheckOverwrite = $constructor("$ZodCheckOverwrite", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.check = (payload) => { - payload.value = def.tx(payload.value); - }; -}); - -class Doc { - constructor(args = []) { - this.content = []; - this.indent = 0; - if (this) - this.args = args; - } - indented(fn) { - this.indent += 1; - fn(this); - this.indent -= 1; - } - write(arg) { - if (typeof arg === "function") { - arg(this, { execution: "sync" }); - arg(this, { execution: "async" }); - return; - } - const content = arg; - const lines = content.split("\n").filter((x) => x); - const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); - const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); - for (const line of dedented) { - this.content.push(line); - } - } - compile() { - const F = Function; - const args = this?.args; - const content = this?.content ?? [``]; - const lines = [...content.map((x) => ` ${x}`)]; - return new F(...args, lines.join("\n")); - } -} - -const version$1 = { - major: 4, - minor: 0, - patch: 0, -}; - -const $ZodType = $constructor("$ZodType", (inst, def) => { - var _a; - inst ?? (inst = {}); - inst._zod.def = def; - inst._zod.bag = inst._zod.bag || {}; - inst._zod.version = version$1; - const checks = [...(inst._zod.def.checks ?? [])]; - if (inst._zod.traits.has("$ZodCheck")) { - checks.unshift(inst); - } - for (const ch of checks) { - for (const fn of ch._zod.onattach) { - fn(inst); - } - } - if (checks.length === 0) { - (_a = inst._zod).deferred ?? (_a.deferred = []); - inst._zod.deferred?.push(() => { - inst._zod.run = inst._zod.parse; - }); - } - else { - const runChecks = (payload, checks, ctx) => { - let isAborted = aborted(payload); - let asyncResult; - for (const ch of checks) { - if (ch._zod.def.when) { - const shouldRun = ch._zod.def.when(payload); - if (!shouldRun) - continue; - } - else if (isAborted) { - continue; - } - const currLen = payload.issues.length; - const _ = ch._zod.check(payload); - if (_ instanceof Promise && ctx?.async === false) { - throw new $ZodAsyncError(); - } - if (asyncResult || _ instanceof Promise) { - asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { - await _; - const nextLen = payload.issues.length; - if (nextLen === currLen) - return; - if (!isAborted) - isAborted = aborted(payload, currLen); - }); - } - else { - const nextLen = payload.issues.length; - if (nextLen === currLen) - continue; - if (!isAborted) - isAborted = aborted(payload, currLen); - } - } - if (asyncResult) { - return asyncResult.then(() => { - return payload; - }); - } - return payload; - }; - inst._zod.run = (payload, ctx) => { - const result = inst._zod.parse(payload, ctx); - if (result instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError(); - return result.then((result) => runChecks(result, checks, ctx)); - } - return runChecks(result, checks, ctx); - }; - } - inst["~standard"] = { - validate: (value) => { - try { - const r = safeParse$2(inst, value); - return r.success ? { value: r.data } : { issues: r.error?.issues }; - } - catch (_) { - return safeParseAsync$2(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues })); - } - }, - vendor: "zod", - version: 1, - }; -}); -const $ZodString = $constructor("$ZodString", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? string$1(inst._zod.bag); - inst._zod.parse = (payload, _) => { - if (def.coerce) - try { - payload.value = String(payload.value); - } - catch (_) { } - if (typeof payload.value === "string") - return payload; - payload.issues.push({ - expected: "string", - code: "invalid_type", - input: payload.value, - inst, - }); - return payload; - }; -}); -const $ZodStringFormat = $constructor("$ZodStringFormat", (inst, def) => { - $ZodCheckStringFormat.init(inst, def); - $ZodString.init(inst, def); -}); -const $ZodGUID = $constructor("$ZodGUID", (inst, def) => { - def.pattern ?? (def.pattern = guid); - $ZodStringFormat.init(inst, def); -}); -const $ZodUUID = $constructor("$ZodUUID", (inst, def) => { - if (def.version) { - const versionMap = { - v1: 1, - v2: 2, - v3: 3, - v4: 4, - v5: 5, - v6: 6, - v7: 7, - v8: 8, - }; - const v = versionMap[def.version]; - if (v === undefined) - throw new Error(`Invalid UUID version: "${def.version}"`); - def.pattern ?? (def.pattern = uuid(v)); - } - else - def.pattern ?? (def.pattern = uuid()); - $ZodStringFormat.init(inst, def); -}); -const $ZodEmail = $constructor("$ZodEmail", (inst, def) => { - def.pattern ?? (def.pattern = email); - $ZodStringFormat.init(inst, def); -}); -const $ZodURL = $constructor("$ZodURL", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - try { - const orig = payload.value; - const url = new URL(orig); - const href = url.href; - if (def.hostname) { - def.hostname.lastIndex = 0; - if (!def.hostname.test(url.hostname)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid hostname", - pattern: hostname.source, - input: payload.value, - inst, - continue: !def.abort, - }); - } - } - if (def.protocol) { - def.protocol.lastIndex = 0; - if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid protocol", - pattern: def.protocol.source, - input: payload.value, - inst, - continue: !def.abort, - }); - } - } - if (!orig.endsWith("/") && href.endsWith("/")) { - payload.value = href.slice(0, -1); - } - else { - payload.value = href; - } - return; - } - catch (_) { - payload.issues.push({ - code: "invalid_format", - format: "url", - input: payload.value, - inst, - continue: !def.abort, - }); - } - }; -}); -const $ZodEmoji = $constructor("$ZodEmoji", (inst, def) => { - def.pattern ?? (def.pattern = emoji()); - $ZodStringFormat.init(inst, def); -}); -const $ZodNanoID = $constructor("$ZodNanoID", (inst, def) => { - def.pattern ?? (def.pattern = nanoid); - $ZodStringFormat.init(inst, def); -}); -const $ZodCUID = $constructor("$ZodCUID", (inst, def) => { - def.pattern ?? (def.pattern = cuid); - $ZodStringFormat.init(inst, def); -}); -const $ZodCUID2 = $constructor("$ZodCUID2", (inst, def) => { - def.pattern ?? (def.pattern = cuid2); - $ZodStringFormat.init(inst, def); -}); -const $ZodULID = $constructor("$ZodULID", (inst, def) => { - def.pattern ?? (def.pattern = ulid); - $ZodStringFormat.init(inst, def); -}); -const $ZodXID = $constructor("$ZodXID", (inst, def) => { - def.pattern ?? (def.pattern = xid); - $ZodStringFormat.init(inst, def); -}); -const $ZodKSUID = $constructor("$ZodKSUID", (inst, def) => { - def.pattern ?? (def.pattern = ksuid); - $ZodStringFormat.init(inst, def); -}); -const $ZodISODateTime = $constructor("$ZodISODateTime", (inst, def) => { - def.pattern ?? (def.pattern = datetime$1(def)); - $ZodStringFormat.init(inst, def); -}); -const $ZodISODate = $constructor("$ZodISODate", (inst, def) => { - def.pattern ?? (def.pattern = date$1); - $ZodStringFormat.init(inst, def); -}); -const $ZodISOTime = $constructor("$ZodISOTime", (inst, def) => { - def.pattern ?? (def.pattern = time$1(def)); - $ZodStringFormat.init(inst, def); -}); -const $ZodISODuration = $constructor("$ZodISODuration", (inst, def) => { - def.pattern ?? (def.pattern = duration$1); - $ZodStringFormat.init(inst, def); -}); -const $ZodIPv4 = $constructor("$ZodIPv4", (inst, def) => { - def.pattern ?? (def.pattern = ipv4$1); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.format = `ipv4`; - }); -}); -const $ZodIPv6 = $constructor("$ZodIPv6", (inst, def) => { - def.pattern ?? (def.pattern = ipv6$1); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst) => { - const bag = inst._zod.bag; - bag.format = `ipv6`; - }); - inst._zod.check = (payload) => { - try { - new URL(`http://[${payload.value}]`); - } - catch { - payload.issues.push({ - code: "invalid_format", - format: "ipv6", - input: payload.value, - inst, - continue: !def.abort, - }); - } - }; -}); -const $ZodCIDRv4 = $constructor("$ZodCIDRv4", (inst, def) => { - def.pattern ?? (def.pattern = cidrv4); - $ZodStringFormat.init(inst, def); -}); -const $ZodCIDRv6 = $constructor("$ZodCIDRv6", (inst, def) => { - def.pattern ?? (def.pattern = cidrv6); - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - const [address, prefix] = payload.value.split("/"); - try { - if (!prefix) - throw new Error(); - const prefixNum = Number(prefix); - if (`${prefixNum}` !== prefix) - throw new Error(); - if (prefixNum < 0 || prefixNum > 128) - throw new Error(); - new URL(`http://[${address}]`); - } - catch { - payload.issues.push({ - code: "invalid_format", - format: "cidrv6", - input: payload.value, - inst, - continue: !def.abort, - }); - } - }; -}); -function isValidBase64(data) { - if (data === "") - return true; - if (data.length % 4 !== 0) - return false; - try { - atob(data); - return true; - } - catch { - return false; - } -} -const $ZodBase64 = $constructor("$ZodBase64", (inst, def) => { - def.pattern ?? (def.pattern = base64$1); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst) => { - inst._zod.bag.contentEncoding = "base64"; - }); - inst._zod.check = (payload) => { - if (isValidBase64(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64", - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -function isValidBase64URL(data) { - if (!base64url.test(data)) - return false; - const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/")); - const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "="); - return isValidBase64(padded); -} -const $ZodBase64URL = $constructor("$ZodBase64URL", (inst, def) => { - def.pattern ?? (def.pattern = base64url); - $ZodStringFormat.init(inst, def); - inst._zod.onattach.push((inst) => { - inst._zod.bag.contentEncoding = "base64url"; - }); - inst._zod.check = (payload) => { - if (isValidBase64URL(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64url", - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodE164 = $constructor("$ZodE164", (inst, def) => { - def.pattern ?? (def.pattern = e164); - $ZodStringFormat.init(inst, def); -}); -function isValidJWT(token, algorithm = null) { - try { - const tokensParts = token.split("."); - if (tokensParts.length !== 3) - return false; - const [header] = tokensParts; - if (!header) - return false; - const parsedHeader = JSON.parse(atob(header)); - if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") - return false; - if (!parsedHeader.alg) - return false; - if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) - return false; - return true; - } - catch { - return false; - } -} -const $ZodJWT = $constructor("$ZodJWT", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - if (isValidJWT(payload.value, def.alg)) - return; - payload.issues.push({ - code: "invalid_format", - format: "jwt", - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodCustomStringFormat = $constructor("$ZodCustomStringFormat", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - if (def.fn(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: def.format, - input: payload.value, - inst, - continue: !def.abort, - }); - }; -}); -const $ZodNumber = $constructor("$ZodNumber", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = inst._zod.bag.pattern ?? number$1; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Number(payload.value); - } - catch (_) { } - const input = payload.value; - if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) { - return payload; - } - const received = typeof input === "number" - ? Number.isNaN(input) - ? "NaN" - : !Number.isFinite(input) - ? "Infinity" - : undefined - : undefined; - payload.issues.push({ - expected: "number", - code: "invalid_type", - input, - inst, - ...(received ? { received } : {}), - }); - return payload; - }; -}); -const $ZodNumberFormat = $constructor("$ZodNumber", (inst, def) => { - $ZodCheckNumberFormat.init(inst, def); - $ZodNumber.init(inst, def); -}); -const $ZodBoolean = $constructor("$ZodBoolean", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = boolean$1; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Boolean(payload.value); - } - catch (_) { } - const input = payload.value; - if (typeof input === "boolean") - return payload; - payload.issues.push({ - expected: "boolean", - code: "invalid_type", - input, - inst, - }); - return payload; - }; -}); -const $ZodBigInt = $constructor("$ZodBigInt", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = bigint; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = BigInt(payload.value); - } - catch (_) { } - if (typeof payload.value === "bigint") - return payload; - payload.issues.push({ - expected: "bigint", - code: "invalid_type", - input: payload.value, - inst, - }); - return payload; - }; -}); -const $ZodBigIntFormat = $constructor("$ZodBigInt", (inst, def) => { - $ZodCheckBigIntFormat.init(inst, def); - $ZodBigInt.init(inst, def); -}); -const $ZodSymbol = $constructor("$ZodSymbol", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "symbol") - return payload; - payload.issues.push({ - expected: "symbol", - code: "invalid_type", - input, - inst, - }); - return payload; - }; -}); -const $ZodUndefined = $constructor("$ZodUndefined", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = _undefined; - inst._zod.values = new Set([undefined]); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "undefined", - code: "invalid_type", - input, - inst, - }); - return payload; - }; -}); -const $ZodNull = $constructor("$ZodNull", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = _null$2; - inst._zod.values = new Set([null]); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input === null) - return payload; - payload.issues.push({ - expected: "null", - code: "invalid_type", - input, - inst, - }); - return payload; - }; -}); -const $ZodAny = $constructor("$ZodAny", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload) => payload; -}); -const $ZodUnknown = $constructor("$ZodUnknown", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload) => payload; -}); -const $ZodNever = $constructor("$ZodNever", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - payload.issues.push({ - expected: "never", - code: "invalid_type", - input: payload.value, - inst, - }); - return payload; - }; -}); -const $ZodVoid = $constructor("$ZodVoid", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "void", - code: "invalid_type", - input, - inst, - }); - return payload; - }; -}); -const $ZodDate = $constructor("$ZodDate", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) { - try { - payload.value = new Date(payload.value); - } - catch (_err) { } - } - const input = payload.value; - const isDate = input instanceof Date; - const isValidDate = isDate && !Number.isNaN(input.getTime()); - if (isValidDate) - return payload; - payload.issues.push({ - expected: "date", - code: "invalid_type", - input, - ...(isDate ? { received: "Invalid Date" } : {}), - inst, - }); - return payload; - }; -}); -function handleArrayResult(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues(index, result.issues)); - } - final.value[index] = result.value; -} -const $ZodArray = $constructor("$ZodArray", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - expected: "array", - code: "invalid_type", - input, - inst, - }); - return payload; - } - payload.value = Array(input.length); - const proms = []; - for (let i = 0; i < input.length; i++) { - const item = input[i]; - const result = def.element._zod.run({ - value: item, - issues: [], - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result) => handleArrayResult(result, payload, i))); - } - else { - handleArrayResult(result, payload, i); - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; -}); -function handleObjectResult(result, final, key) { - if (result.issues.length) { - final.issues.push(...prefixIssues(key, result.issues)); - } - final.value[key] = result.value; -} -function handleOptionalObjectResult(result, final, key, input) { - if (result.issues.length) { - if (input[key] === undefined) { - if (key in input) { - final.value[key] = undefined; - } - else { - final.value[key] = result.value; - } - } - else { - final.issues.push(...prefixIssues(key, result.issues)); - } - } - else if (result.value === undefined) { - if (key in input) - final.value[key] = undefined; - } - else { - final.value[key] = result.value; - } -} -const $ZodObject = $constructor("$ZodObject", (inst, def) => { - $ZodType.init(inst, def); - const _normalized = cached(() => { - const keys = Object.keys(def.shape); - for (const k of keys) { - if (!(def.shape[k] instanceof $ZodType)) { - throw new Error(`Invalid element at key "${k}": expected a Zod schema`); - } - } - const okeys = optionalKeys(def.shape); - return { - shape: def.shape, - keys, - keySet: new Set(keys), - numKeys: keys.length, - optionalKeys: new Set(okeys), - }; - }); - defineLazy(inst._zod, "propValues", () => { - const shape = def.shape; - const propValues = {}; - for (const key in shape) { - const field = shape[key]._zod; - if (field.values) { - propValues[key] ?? (propValues[key] = new Set()); - for (const v of field.values) - propValues[key].add(v); - } - } - return propValues; - }); - const generateFastpass = (shape) => { - const doc = new Doc(["shape", "payload", "ctx"]); - const normalized = _normalized.value; - const parseStr = (key) => { - const k = esc(key); - return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; - }; - doc.write(`const input = payload.value;`); - const ids = Object.create(null); - let counter = 0; - for (const key of normalized.keys) { - ids[key] = `key_${counter++}`; - } - doc.write(`const newResult = {}`); - for (const key of normalized.keys) { - if (normalized.optionalKeys.has(key)) { - const id = ids[key]; - doc.write(`const ${id} = ${parseStr(key)};`); - const k = esc(key); - doc.write(` - if (${id}.issues.length) { - if (input[${k}] === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - payload.issues = payload.issues.concat( - ${id}.issues.map((iss) => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}], - })) - ); - } - } else if (${id}.value === undefined) { - if (${k} in input) newResult[${k}] = undefined; - } else { - newResult[${k}] = ${id}.value; - } - `); - } - else { - const id = ids[key]; - doc.write(`const ${id} = ${parseStr(key)};`); - doc.write(` - if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}] - })));`); - doc.write(`newResult[${esc(key)}] = ${id}.value`); - } - } - doc.write(`payload.value = newResult;`); - doc.write(`return payload;`); - const fn = doc.compile(); - return (payload, ctx) => fn(shape, payload, ctx); - }; - let fastpass; - const isObject$1 = isObject; - const jit = !globalConfig.jitless; - const allowsEval$1 = allowsEval; - const fastEnabled = jit && allowsEval$1.value; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject$1(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst, - }); - return payload; - } - const proms = []; - if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { - if (!fastpass) - fastpass = generateFastpass(def.shape); - payload = fastpass(payload, ctx); - } - else { - payload.value = {}; - const shape = value.shape; - for (const key of value.keys) { - const el = shape[key]; - const r = el._zod.run({ value: input[key], issues: [] }, ctx); - const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional"; - if (r instanceof Promise) { - proms.push(r.then((r) => isOptional ? handleOptionalObjectResult(r, payload, key, input) : handleObjectResult(r, payload, key))); - } - else if (isOptional) { - handleOptionalObjectResult(r, payload, key, input); - } - else { - handleObjectResult(r, payload, key); - } - } - } - if (!catchall) { - return proms.length ? Promise.all(proms).then(() => payload) : payload; - } - const unrecognized = []; - const keySet = value.keySet; - const _catchall = catchall._zod; - const t = _catchall.def.type; - for (const key of Object.keys(input)) { - if (keySet.has(key)) - continue; - if (t === "never") { - unrecognized.push(key); - continue; - } - const r = _catchall.run({ value: input[key], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((r) => handleObjectResult(r, payload, key))); - } - else { - handleObjectResult(r, payload, key); - } - } - if (unrecognized.length) { - payload.issues.push({ - code: "unrecognized_keys", - keys: unrecognized, - input, - inst, - }); - } - if (!proms.length) - return payload; - return Promise.all(proms).then(() => { - return payload; - }); - }; -}); -function handleUnionResults(results, final, inst, ctx) { - for (const result of results) { - if (result.issues.length === 0) { - final.value = result.value; - return final; - } - } - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config$3()))), - }); - return final; -} -const $ZodUnion = $constructor("$ZodUnion", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined); - defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined); - defineLazy(inst._zod, "values", () => { - if (def.options.every((o) => o._zod.values)) { - return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); - } - return undefined; - }); - defineLazy(inst._zod, "pattern", () => { - if (def.options.every((o) => o._zod.pattern)) { - const patterns = def.options.map((o) => o._zod.pattern); - return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`); - } - return undefined; - }); - inst._zod.parse = (payload, ctx) => { - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [], - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } - else { - if (result.issues.length === 0) - return result; - results.push(result); - } - } - if (!async) - return handleUnionResults(results, payload, inst, ctx); - return Promise.all(results).then((results) => { - return handleUnionResults(results, payload, inst, ctx); - }); - }; -}); -const $ZodDiscriminatedUnion = -$constructor("$ZodDiscriminatedUnion", (inst, def) => { - $ZodUnion.init(inst, def); - const _super = inst._zod.parse; - defineLazy(inst._zod, "propValues", () => { - const propValues = {}; - for (const option of def.options) { - const pv = option._zod.propValues; - if (!pv || Object.keys(pv).length === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); - for (const [k, v] of Object.entries(pv)) { - if (!propValues[k]) - propValues[k] = new Set(); - for (const val of v) { - propValues[k].add(val); - } - } - } - return propValues; - }); - const disc = cached(() => { - const opts = def.options; - const map = new Map(); - for (const o of opts) { - const values = o._zod.propValues[def.discriminator]; - if (!values || values.size === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); - for (const v of values) { - if (map.has(v)) { - throw new Error(`Duplicate discriminator value "${String(v)}"`); - } - map.set(v, o); - } - } - return map; - }); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isObject(input)) { - payload.issues.push({ - code: "invalid_type", - expected: "object", - input, - inst, - }); - return payload; - } - const opt = disc.value.get(input?.[def.discriminator]); - if (opt) { - return opt._zod.run(payload, ctx); - } - if (def.unionFallback) { - return _super(payload, ctx); - } - payload.issues.push({ - code: "invalid_union", - errors: [], - note: "No matching discriminator", - input, - path: [def.discriminator], - inst, - }); - return payload; - }; -}); -const $ZodIntersection = $constructor("$ZodIntersection", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - const left = def.left._zod.run({ value: input, issues: [] }, ctx); - const right = def.right._zod.run({ value: input, issues: [] }, ctx); - const async = left instanceof Promise || right instanceof Promise; - if (async) { - return Promise.all([left, right]).then(([left, right]) => { - return handleIntersectionResults(payload, left, right); - }); - } - return handleIntersectionResults(payload, left, right); - }; -}); -function mergeValues(a, b) { - if (a === b) { - return { valid: true, data: a }; - } - if (a instanceof Date && b instanceof Date && +a === +b) { - return { valid: true, data: a }; - } - if (isPlainObject$1(a) && isPlainObject$1(b)) { - const bKeys = Object.keys(b); - const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues(a[key], b[key]); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [key, ...sharedValue.mergeErrorPath], - }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return { valid: false, mergeErrorPath: [] }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues(itemA, itemB); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [index, ...sharedValue.mergeErrorPath], - }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } - return { valid: false, mergeErrorPath: [] }; -} -function handleIntersectionResults(result, left, right) { - if (left.issues.length) { - result.issues.push(...left.issues); - } - if (right.issues.length) { - result.issues.push(...right.issues); - } - if (aborted(result)) - return result; - const merged = mergeValues(left.value, right.value); - if (!merged.valid) { - throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`); - } - result.value = merged.data; - return result; -} -const $ZodTuple = $constructor("$ZodTuple", (inst, def) => { - $ZodType.init(inst, def); - const items = def.items; - const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - input, - inst, - expected: "tuple", - code: "invalid_type", - }); - return payload; - } - payload.value = []; - const proms = []; - if (!def.rest) { - const tooBig = input.length > items.length; - const tooSmall = input.length < optStart - 1; - if (tooBig || tooSmall) { - payload.issues.push({ - input, - inst, - origin: "array", - ...(tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }), - }); - return payload; - } - } - let i = -1; - for (const item of items) { - i++; - if (i >= input.length) - if (i >= optStart) - continue; - const result = item._zod.run({ - value: input[i], - issues: [], - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result) => handleTupleResult(result, payload, i))); - } - else { - handleTupleResult(result, payload, i); - } - } - if (def.rest) { - const rest = input.slice(items.length); - for (const el of rest) { - i++; - const result = def.rest._zod.run({ - value: el, - issues: [], - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result) => handleTupleResult(result, payload, i))); - } - else { - handleTupleResult(result, payload, i); - } - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleTupleResult(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues(index, result.issues)); - } - final.value[index] = result.value; -} -const $ZodRecord = $constructor("$ZodRecord", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isPlainObject$1(input)) { - payload.issues.push({ - expected: "record", - code: "invalid_type", - input, - inst, - }); - return payload; - } - const proms = []; - if (def.keyType._zod.values) { - const values = def.keyType._zod.values; - payload.value = {}; - for (const key of values) { - if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result) => { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[key] = result.value; - })); - } - else { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[key] = result.value; - } - } - } - let unrecognized; - for (const key in input) { - if (!values.has(key)) { - unrecognized = unrecognized ?? []; - unrecognized.push(key); - } - } - if (unrecognized && unrecognized.length > 0) { - payload.issues.push({ - code: "unrecognized_keys", - input, - inst, - keys: unrecognized, - }); - } - } - else { - payload.value = {}; - for (const key of Reflect.ownKeys(input)) { - if (key === "__proto__") - continue; - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - if (keyResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - if (keyResult.issues.length) { - payload.issues.push({ - origin: "record", - code: "invalid_key", - issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config$3())), - input: key, - path: [key], - inst, - }); - payload.value[keyResult.value] = keyResult.value; - continue; - } - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result) => { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[keyResult.value] = result.value; - })); - } - else { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[keyResult.value] = result.value; - } - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; -}); -const $ZodMap = $constructor("$ZodMap", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Map)) { - payload.issues.push({ - expected: "map", - code: "invalid_type", - input, - inst, - }); - return payload; - } - const proms = []; - payload.value = new Map(); - for (const [key, value] of input) { - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx); - if (keyResult instanceof Promise || valueResult instanceof Promise) { - proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => { - handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); - })); - } - else { - handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { - if (keyResult.issues.length) { - if (propertyKeyTypes.has(typeof key)) { - final.issues.push(...prefixIssues(key, keyResult.issues)); - } - else { - final.issues.push({ - origin: "map", - code: "invalid_key", - input, - inst, - issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config$3())), - }); - } - } - if (valueResult.issues.length) { - if (propertyKeyTypes.has(typeof key)) { - final.issues.push(...prefixIssues(key, valueResult.issues)); - } - else { - final.issues.push({ - origin: "map", - code: "invalid_element", - input, - inst, - key: key, - issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config$3())), - }); - } - } - final.value.set(keyResult.value, valueResult.value); -} -const $ZodSet = $constructor("$ZodSet", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Set)) { - payload.issues.push({ - input, - inst, - expected: "set", - code: "invalid_type", - }); - return payload; - } - const proms = []; - payload.value = new Set(); - for (const item of input) { - const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result) => handleSetResult(result, payload))); - } - else - handleSetResult(result, payload); - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleSetResult(result, final) { - if (result.issues.length) { - final.issues.push(...result.issues); - } - final.value.add(result.value); -} -const $ZodEnum = $constructor("$ZodEnum", (inst, def) => { - $ZodType.init(inst, def); - const values = getEnumValues(def.entries); - inst._zod.values = new Set(values); - inst._zod.pattern = new RegExp(`^(${values - .filter((k) => propertyKeyTypes.has(typeof k)) - .map((o) => (typeof o === "string" ? escapeRegex(o) : o.toString())) - .join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (inst._zod.values.has(input)) { - return payload; - } - payload.issues.push({ - code: "invalid_value", - values, - input, - inst, - }); - return payload; - }; -}); -const $ZodLiteral = $constructor("$ZodLiteral", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.values = new Set(def.values); - inst._zod.pattern = new RegExp(`^(${def.values - .map((o) => (typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o))) - .join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (inst._zod.values.has(input)) { - return payload; - } - payload.issues.push({ - code: "invalid_value", - values: def.values, - input, - inst, - }); - return payload; - }; -}); -const $ZodFile = $constructor("$ZodFile", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input instanceof File) - return payload; - payload.issues.push({ - expected: "file", - code: "invalid_type", - input, - inst, - }); - return payload; - }; -}); -const $ZodTransform = $constructor("$ZodTransform", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const _out = def.transform(payload.value, payload); - if (_ctx.async) { - const output = _out instanceof Promise ? _out : Promise.resolve(_out); - return output.then((output) => { - payload.value = output; - return payload; - }); - } - if (_out instanceof Promise) { - throw new $ZodAsyncError(); - } - payload.value = _out; - return payload; - }; -}); -const $ZodOptional = $constructor("$ZodOptional", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - defineLazy(inst._zod, "values", () => { - return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined; - }); - defineLazy(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined; - }); - inst._zod.parse = (payload, ctx) => { - if (def.innerType._zod.optin === "optional") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === undefined) { - return payload; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -const $ZodNullable = $constructor("$ZodNullable", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : undefined; - }); - defineLazy(inst._zod, "values", () => { - return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined; - }); - inst._zod.parse = (payload, ctx) => { - if (payload.value === null) - return payload; - return def.innerType._zod.run(payload, ctx); - }; -}); -const $ZodDefault = $constructor("$ZodDefault", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (payload.value === undefined) { - payload.value = def.defaultValue; - return payload; - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result) => handleDefaultResult(result, def)); - } - return handleDefaultResult(result, def); - }; -}); -function handleDefaultResult(payload, def) { - if (payload.value === undefined) { - payload.value = def.defaultValue; - } - return payload; -} -const $ZodPrefault = $constructor("$ZodPrefault", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (payload.value === undefined) { - payload.value = def.defaultValue; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -const $ZodNonOptional = $constructor("$ZodNonOptional", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => { - const v = def.innerType._zod.values; - return v ? new Set([...v].filter((x) => x !== undefined)) : undefined; - }); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result) => handleNonOptionalResult(result, inst)); - } - return handleNonOptionalResult(result, inst); - }; -}); -function handleNonOptionalResult(payload, inst) { - if (!payload.issues.length && payload.value === undefined) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: payload.value, - inst, - }); - } - return payload; -} -const $ZodSuccess = $constructor("$ZodSuccess", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result) => { - payload.value = result.issues.length === 0; - return payload; - }); - } - payload.value = result.issues.length === 0; - return payload; - }; -}); -const $ZodCatch = $constructor("$ZodCatch", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result) => { - payload.value = result.value; - if (result.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())), - }, - input: payload.value, - }); - payload.issues = []; - } - return payload; - }); - } - payload.value = result.value; - if (result.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config$3())), - }, - input: payload.value, - }); - payload.issues = []; - } - return payload; - }; -}); -const $ZodNaN = $constructor("$ZodNaN", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - expected: "nan", - code: "invalid_type", - }); - return payload; - } - return payload; - }; -}); -const $ZodPipe = $constructor("$ZodPipe", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => def.in._zod.values); - defineLazy(inst._zod, "optin", () => def.in._zod.optin); - defineLazy(inst._zod, "optout", () => def.out._zod.optout); - inst._zod.parse = (payload, ctx) => { - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left) => handlePipeResult(left, def, ctx)); - } - return handlePipeResult(left, def, ctx); - }; -}); -function handlePipeResult(left, def, ctx) { - if (aborted(left)) { - return left; - } - return def.out._zod.run({ value: left.value, issues: left.issues }, ctx); -} -const $ZodReadonly = $constructor("$ZodReadonly", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then(handleReadonlyResult); - } - return handleReadonlyResult(result); - }; -}); -function handleReadonlyResult(payload) { - payload.value = Object.freeze(payload.value); - return payload; -} -const $ZodTemplateLiteral = $constructor("$ZodTemplateLiteral", (inst, def) => { - $ZodType.init(inst, def); - const regexParts = []; - for (const part of def.parts) { - if (part instanceof $ZodType) { - if (!part._zod.pattern) { - throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); - } - const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; - if (!source) - throw new Error(`Invalid template literal part: ${part._zod.traits}`); - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - regexParts.push(source.slice(start, end)); - } - else if (part === null || primitiveTypes.has(typeof part)) { - regexParts.push(escapeRegex(`${part}`)); - } - else { - throw new Error(`Invalid template literal part: ${part}`); - } - } - inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "string") { - payload.issues.push({ - input: payload.value, - inst, - expected: "template_literal", - code: "invalid_type", - }); - return payload; - } - inst._zod.pattern.lastIndex = 0; - if (!inst._zod.pattern.test(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - code: "invalid_format", - format: "template_literal", - pattern: inst._zod.pattern.source, - }); - return payload; - } - return payload; - }; -}); -const $ZodPromise = $constructor("$ZodPromise", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); - }; -}); -const $ZodLazy = $constructor("$ZodLazy", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "innerType", () => def.getter()); - defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern); - defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues); - defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout); - inst._zod.parse = (payload, ctx) => { - const inner = inst._zod.innerType; - return inner._zod.run(payload, ctx); - }; -}); -const $ZodCustom = $constructor("$ZodCustom", (inst, def) => { - $ZodCheck.init(inst, def); - $ZodType.init(inst, def); - inst._zod.parse = (payload, _) => { - return payload; - }; - inst._zod.check = (payload) => { - const input = payload.value; - const r = def.fn(input); - if (r instanceof Promise) { - return r.then((r) => handleRefineResult(r, payload, input, inst)); - } - handleRefineResult(r, payload, input, inst); - return; - }; -}); -function handleRefineResult(result, payload, input, inst) { - if (!result) { - const _iss = { - code: "custom", - input, - inst, - path: [...(inst._zod.def.path ?? [])], - continue: !inst._zod.def.abort, - }; - if (inst._zod.def.params) - _iss.params = inst._zod.def.params; - payload.issues.push(issue(_iss)); - } -} - -class $ZodRegistry { - constructor() { - this._map = new Map(); - this._idmap = new Map(); - } - add(schema, ..._meta) { - const meta = _meta[0]; - this._map.set(schema, meta); - if (meta && typeof meta === "object" && "id" in meta) { - if (this._idmap.has(meta.id)) { - throw new Error(`ID ${meta.id} already exists in the registry`); - } - this._idmap.set(meta.id, schema); - } - return this; - } - clear() { - this._map = new Map(); - this._idmap = new Map(); - return this; - } - remove(schema) { - const meta = this._map.get(schema); - if (meta && typeof meta === "object" && "id" in meta) { - this._idmap.delete(meta.id); - } - this._map.delete(schema); - return this; - } - get(schema) { - const p = schema._zod.parent; - if (p) { - const pm = { ...(this.get(p) ?? {}) }; - delete pm.id; - return { ...pm, ...this._map.get(schema) }; - } - return this._map.get(schema); - } - has(schema) { - return this._map.has(schema); - } -} -function registry() { - return new $ZodRegistry(); -} -const globalRegistry = registry(); - -function _string(Class, params) { - return new Class({ - type: "string", - ...normalizeParams(params), - }); -} -function _email(Class, params) { - return new Class({ - type: "string", - format: "email", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _guid(Class, params) { - return new Class({ - type: "string", - format: "guid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _uuid(Class, params) { - return new Class({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _uuidv4(Class, params) { - return new Class({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v4", - ...normalizeParams(params), - }); -} -function _uuidv6(Class, params) { - return new Class({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v6", - ...normalizeParams(params), - }); -} -function _uuidv7(Class, params) { - return new Class({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v7", - ...normalizeParams(params), - }); -} -function _url(Class, params) { - return new Class({ - type: "string", - format: "url", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _emoji(Class, params) { - return new Class({ - type: "string", - format: "emoji", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _nanoid(Class, params) { - return new Class({ - type: "string", - format: "nanoid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _cuid(Class, params) { - return new Class({ - type: "string", - format: "cuid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _cuid2(Class, params) { - return new Class({ - type: "string", - format: "cuid2", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _ulid(Class, params) { - return new Class({ - type: "string", - format: "ulid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _xid(Class, params) { - return new Class({ - type: "string", - format: "xid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _ksuid(Class, params) { - return new Class({ - type: "string", - format: "ksuid", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _ipv4(Class, params) { - return new Class({ - type: "string", - format: "ipv4", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _ipv6(Class, params) { - return new Class({ - type: "string", - format: "ipv6", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _cidrv4(Class, params) { - return new Class({ - type: "string", - format: "cidrv4", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _cidrv6(Class, params) { - return new Class({ - type: "string", - format: "cidrv6", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _base64(Class, params) { - return new Class({ - type: "string", - format: "base64", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _base64url(Class, params) { - return new Class({ - type: "string", - format: "base64url", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _e164(Class, params) { - return new Class({ - type: "string", - format: "e164", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _jwt(Class, params) { - return new Class({ - type: "string", - format: "jwt", - check: "string_format", - abort: false, - ...normalizeParams(params), - }); -} -function _isoDateTime(Class, params) { - return new Class({ - type: "string", - format: "datetime", - check: "string_format", - offset: false, - local: false, - precision: null, - ...normalizeParams(params), - }); -} -function _isoDate(Class, params) { - return new Class({ - type: "string", - format: "date", - check: "string_format", - ...normalizeParams(params), - }); -} -function _isoTime(Class, params) { - return new Class({ - type: "string", - format: "time", - check: "string_format", - precision: null, - ...normalizeParams(params), - }); -} -function _isoDuration(Class, params) { - return new Class({ - type: "string", - format: "duration", - check: "string_format", - ...normalizeParams(params), - }); -} -function _number(Class, params) { - return new Class({ - type: "number", - checks: [], - ...normalizeParams(params), - }); -} -function _int(Class, params) { - return new Class({ - type: "number", - check: "number_format", - abort: false, - format: "safeint", - ...normalizeParams(params), - }); -} -function _boolean(Class, params) { - return new Class({ - type: "boolean", - ...normalizeParams(params), - }); -} -function _null$1(Class, params) { - return new Class({ - type: "null", - ...normalizeParams(params), - }); -} -function _unknown(Class) { - return new Class({ - type: "unknown", - }); -} -function _never(Class, params) { - return new Class({ - type: "never", - ...normalizeParams(params), - }); -} -function _lt(value, params) { - return new $ZodCheckLessThan({ - check: "less_than", - ...normalizeParams(params), - value, - inclusive: false, - }); -} -function _lte(value, params) { - return new $ZodCheckLessThan({ - check: "less_than", - ...normalizeParams(params), - value, - inclusive: true, - }); -} -function _gt(value, params) { - return new $ZodCheckGreaterThan({ - check: "greater_than", - ...normalizeParams(params), - value, - inclusive: false, - }); -} -function _gte(value, params) { - return new $ZodCheckGreaterThan({ - check: "greater_than", - ...normalizeParams(params), - value, - inclusive: true, - }); -} -function _multipleOf(value, params) { - return new $ZodCheckMultipleOf({ - check: "multiple_of", - ...normalizeParams(params), - value, - }); -} -function _maxSize(maximum, params) { - return new $ZodCheckMaxSize({ - check: "max_size", - ...normalizeParams(params), - maximum, - }); -} -function _minSize(minimum, params) { - return new $ZodCheckMinSize({ - check: "min_size", - ...normalizeParams(params), - minimum, - }); -} -function _size(size, params) { - return new $ZodCheckSizeEquals({ - check: "size_equals", - ...normalizeParams(params), - size, - }); -} -function _maxLength(maximum, params) { - const ch = new $ZodCheckMaxLength({ - check: "max_length", - ...normalizeParams(params), - maximum, - }); - return ch; -} -function _minLength(minimum, params) { - return new $ZodCheckMinLength({ - check: "min_length", - ...normalizeParams(params), - minimum, - }); -} -function _length(length, params) { - return new $ZodCheckLengthEquals({ - check: "length_equals", - ...normalizeParams(params), - length, - }); -} -function _regex(pattern, params) { - return new $ZodCheckRegex({ - check: "string_format", - format: "regex", - ...normalizeParams(params), - pattern, - }); -} -function _lowercase(params) { - return new $ZodCheckLowerCase({ - check: "string_format", - format: "lowercase", - ...normalizeParams(params), - }); -} -function _uppercase(params) { - return new $ZodCheckUpperCase({ - check: "string_format", - format: "uppercase", - ...normalizeParams(params), - }); -} -function _includes(includes, params) { - return new $ZodCheckIncludes({ - check: "string_format", - format: "includes", - ...normalizeParams(params), - includes, - }); -} -function _startsWith(prefix, params) { - return new $ZodCheckStartsWith({ - check: "string_format", - format: "starts_with", - ...normalizeParams(params), - prefix, - }); -} -function _endsWith(suffix, params) { - return new $ZodCheckEndsWith({ - check: "string_format", - format: "ends_with", - ...normalizeParams(params), - suffix, - }); -} -function _mime(types, params) { - return new $ZodCheckMimeType({ - check: "mime_type", - mime: types, - ...normalizeParams(params), - }); -} -function _overwrite(tx) { - return new $ZodCheckOverwrite({ - check: "overwrite", - tx, - }); -} -function _normalize(form) { - return _overwrite((input) => input.normalize(form)); -} -function _trim() { - return _overwrite((input) => input.trim()); -} -function _toLowerCase() { - return _overwrite((input) => input.toLowerCase()); -} -function _toUpperCase() { - return _overwrite((input) => input.toUpperCase()); -} -function _array(Class, element, params) { - return new Class({ - type: "array", - element, - ...normalizeParams(params), - }); -} -function _custom(Class, fn, _params) { - const norm = normalizeParams(_params); - norm.abort ?? (norm.abort = true); - const schema = new Class({ - type: "custom", - check: "custom", - fn: fn, - ...norm, - }); - return schema; -} -function _refine(Class, fn, _params) { - const schema = new Class({ - type: "custom", - check: "custom", - fn: fn, - ...normalizeParams(_params), - }); - return schema; -} - -class JSONSchemaGenerator { - constructor(params) { - this.counter = 0; - this.metadataRegistry = params?.metadata ?? globalRegistry; - this.target = params?.target ?? "draft-2020-12"; - this.unrepresentable = params?.unrepresentable ?? "throw"; - this.override = params?.override ?? (() => { }); - this.io = params?.io ?? "output"; - this.seen = new Map(); - } - process(schema, _params = { path: [], schemaPath: [] }) { - var _a; - const def = schema._zod.def; - const formatMap = { - guid: "uuid", - url: "uri", - datetime: "date-time", - json_string: "json-string", - regex: "", - }; - const seen = this.seen.get(schema); - if (seen) { - seen.count++; - const isCycle = _params.schemaPath.includes(schema); - if (isCycle) { - seen.cycle = _params.path; - } - return seen.schema; - } - const result = { schema: {}, count: 1, cycle: undefined, path: _params.path }; - this.seen.set(schema, result); - const overrideSchema = schema._zod.toJSONSchema?.(); - if (overrideSchema) { - result.schema = overrideSchema; - } - else { - const params = { - ..._params, - schemaPath: [..._params.schemaPath, schema], - path: _params.path, - }; - const parent = schema._zod.parent; - if (parent) { - result.ref = parent; - this.process(parent, params); - this.seen.get(parent).isParent = true; - } - else { - const _json = result.schema; - switch (def.type) { - case "string": { - const json = _json; - json.type = "string"; - const { minimum, maximum, format, patterns, contentEncoding } = schema._zod - .bag; - if (typeof minimum === "number") - json.minLength = minimum; - if (typeof maximum === "number") - json.maxLength = maximum; - if (format) { - json.format = formatMap[format] ?? format; - if (json.format === "") - delete json.format; - } - if (contentEncoding) - json.contentEncoding = contentEncoding; - if (patterns && patterns.size > 0) { - const regexes = [...patterns]; - if (regexes.length === 1) - json.pattern = regexes[0].source; - else if (regexes.length > 1) { - result.schema.allOf = [ - ...regexes.map((regex) => ({ - ...(this.target === "draft-7" ? { type: "string" } : {}), - pattern: regex.source, - })), - ]; - } - } - break; - } - case "number": { - const json = _json; - const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; - if (typeof format === "string" && format.includes("int")) - json.type = "integer"; - else - json.type = "number"; - if (typeof exclusiveMinimum === "number") - json.exclusiveMinimum = exclusiveMinimum; - if (typeof minimum === "number") { - json.minimum = minimum; - if (typeof exclusiveMinimum === "number") { - if (exclusiveMinimum >= minimum) - delete json.minimum; - else - delete json.exclusiveMinimum; - } - } - if (typeof exclusiveMaximum === "number") - json.exclusiveMaximum = exclusiveMaximum; - if (typeof maximum === "number") { - json.maximum = maximum; - if (typeof exclusiveMaximum === "number") { - if (exclusiveMaximum <= maximum) - delete json.maximum; - else - delete json.exclusiveMaximum; - } - } - if (typeof multipleOf === "number") - json.multipleOf = multipleOf; - break; - } - case "boolean": { - const json = _json; - json.type = "boolean"; - break; - } - case "bigint": { - if (this.unrepresentable === "throw") { - throw new Error("BigInt cannot be represented in JSON Schema"); - } - break; - } - case "symbol": { - if (this.unrepresentable === "throw") { - throw new Error("Symbols cannot be represented in JSON Schema"); - } - break; - } - case "null": { - _json.type = "null"; - break; - } - case "any": { - break; - } - case "unknown": { - break; - } - case "undefined": { - if (this.unrepresentable === "throw") { - throw new Error("Undefined cannot be represented in JSON Schema"); - } - break; - } - case "void": { - if (this.unrepresentable === "throw") { - throw new Error("Void cannot be represented in JSON Schema"); - } - break; - } - case "never": { - _json.not = {}; - break; - } - case "date": { - if (this.unrepresentable === "throw") { - throw new Error("Date cannot be represented in JSON Schema"); - } - break; - } - case "array": { - const json = _json; - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json.minItems = minimum; - if (typeof maximum === "number") - json.maxItems = maximum; - json.type = "array"; - json.items = this.process(def.element, { ...params, path: [...params.path, "items"] }); - break; - } - case "object": { - const json = _json; - json.type = "object"; - json.properties = {}; - const shape = def.shape; - for (const key in shape) { - json.properties[key] = this.process(shape[key], { - ...params, - path: [...params.path, "properties", key], - }); - } - const allKeys = new Set(Object.keys(shape)); - const requiredKeys = new Set([...allKeys].filter((key) => { - const v = def.shape[key]._zod; - if (this.io === "input") { - return v.optin === undefined; - } - else { - return v.optout === undefined; - } - })); - if (requiredKeys.size > 0) { - json.required = Array.from(requiredKeys); - } - if (def.catchall?._zod.def.type === "never") { - json.additionalProperties = false; - } - else if (!def.catchall) { - if (this.io === "output") - json.additionalProperties = false; - } - else if (def.catchall) { - json.additionalProperties = this.process(def.catchall, { - ...params, - path: [...params.path, "additionalProperties"], - }); - } - break; - } - case "union": { - const json = _json; - json.anyOf = def.options.map((x, i) => this.process(x, { - ...params, - path: [...params.path, "anyOf", i], - })); - break; - } - case "intersection": { - const json = _json; - const a = this.process(def.left, { - ...params, - path: [...params.path, "allOf", 0], - }); - const b = this.process(def.right, { - ...params, - path: [...params.path, "allOf", 1], - }); - const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; - const allOf = [ - ...(isSimpleIntersection(a) ? a.allOf : [a]), - ...(isSimpleIntersection(b) ? b.allOf : [b]), - ]; - json.allOf = allOf; - break; - } - case "tuple": { - const json = _json; - json.type = "array"; - const prefixItems = def.items.map((x, i) => this.process(x, { ...params, path: [...params.path, "prefixItems", i] })); - if (this.target === "draft-2020-12") { - json.prefixItems = prefixItems; - } - else { - json.items = prefixItems; - } - if (def.rest) { - const rest = this.process(def.rest, { - ...params, - path: [...params.path, "items"], - }); - if (this.target === "draft-2020-12") { - json.items = rest; - } - else { - json.additionalItems = rest; - } - } - if (def.rest) { - json.items = this.process(def.rest, { - ...params, - path: [...params.path, "items"], - }); - } - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json.minItems = minimum; - if (typeof maximum === "number") - json.maxItems = maximum; - break; - } - case "record": { - const json = _json; - json.type = "object"; - json.propertyNames = this.process(def.keyType, { ...params, path: [...params.path, "propertyNames"] }); - json.additionalProperties = this.process(def.valueType, { - ...params, - path: [...params.path, "additionalProperties"], - }); - break; - } - case "map": { - if (this.unrepresentable === "throw") { - throw new Error("Map cannot be represented in JSON Schema"); - } - break; - } - case "set": { - if (this.unrepresentable === "throw") { - throw new Error("Set cannot be represented in JSON Schema"); - } - break; - } - case "enum": { - const json = _json; - const values = getEnumValues(def.entries); - if (values.every((v) => typeof v === "number")) - json.type = "number"; - if (values.every((v) => typeof v === "string")) - json.type = "string"; - json.enum = values; - break; - } - case "literal": { - const json = _json; - const vals = []; - for (const val of def.values) { - if (val === undefined) { - if (this.unrepresentable === "throw") { - throw new Error("Literal `undefined` cannot be represented in JSON Schema"); - } - } - else if (typeof val === "bigint") { - if (this.unrepresentable === "throw") { - throw new Error("BigInt literals cannot be represented in JSON Schema"); - } - else { - vals.push(Number(val)); - } - } - else { - vals.push(val); - } - } - if (vals.length === 0) ; - else if (vals.length === 1) { - const val = vals[0]; - json.type = val === null ? "null" : typeof val; - json.const = val; - } - else { - if (vals.every((v) => typeof v === "number")) - json.type = "number"; - if (vals.every((v) => typeof v === "string")) - json.type = "string"; - if (vals.every((v) => typeof v === "boolean")) - json.type = "string"; - if (vals.every((v) => v === null)) - json.type = "null"; - json.enum = vals; - } - break; - } - case "file": { - const json = _json; - const file = { - type: "string", - format: "binary", - contentEncoding: "binary", - }; - const { minimum, maximum, mime } = schema._zod.bag; - if (minimum !== undefined) - file.minLength = minimum; - if (maximum !== undefined) - file.maxLength = maximum; - if (mime) { - if (mime.length === 1) { - file.contentMediaType = mime[0]; - Object.assign(json, file); - } - else { - json.anyOf = mime.map((m) => { - const mFile = { ...file, contentMediaType: m }; - return mFile; - }); - } - } - else { - Object.assign(json, file); - } - break; - } - case "transform": { - if (this.unrepresentable === "throw") { - throw new Error("Transforms cannot be represented in JSON Schema"); - } - break; - } - case "nullable": { - const inner = this.process(def.innerType, params); - _json.anyOf = [inner, { type: "null" }]; - break; - } - case "nonoptional": { - this.process(def.innerType, params); - result.ref = def.innerType; - break; - } - case "success": { - const json = _json; - json.type = "boolean"; - break; - } - case "default": { - this.process(def.innerType, params); - result.ref = def.innerType; - _json.default = JSON.parse(JSON.stringify(def.defaultValue)); - break; - } - case "prefault": { - this.process(def.innerType, params); - result.ref = def.innerType; - if (this.io === "input") - _json._prefault = JSON.parse(JSON.stringify(def.defaultValue)); - break; - } - case "catch": { - this.process(def.innerType, params); - result.ref = def.innerType; - let catchValue; - try { - catchValue = def.catchValue(undefined); - } - catch { - throw new Error("Dynamic catch values are not supported in JSON Schema"); - } - _json.default = catchValue; - break; - } - case "nan": { - if (this.unrepresentable === "throw") { - throw new Error("NaN cannot be represented in JSON Schema"); - } - break; - } - case "template_literal": { - const json = _json; - const pattern = schema._zod.pattern; - if (!pattern) - throw new Error("Pattern not found in template literal"); - json.type = "string"; - json.pattern = pattern.source; - break; - } - case "pipe": { - const innerType = this.io === "input" ? (def.in._zod.def.type === "transform" ? def.out : def.in) : def.out; - this.process(innerType, params); - result.ref = innerType; - break; - } - case "readonly": { - this.process(def.innerType, params); - result.ref = def.innerType; - _json.readOnly = true; - break; - } - case "promise": { - this.process(def.innerType, params); - result.ref = def.innerType; - break; - } - case "optional": { - this.process(def.innerType, params); - result.ref = def.innerType; - break; - } - case "lazy": { - const innerType = schema._zod.innerType; - this.process(innerType, params); - result.ref = innerType; - break; - } - case "custom": { - if (this.unrepresentable === "throw") { - throw new Error("Custom types cannot be represented in JSON Schema"); - } - break; - } - } - } - } - const meta = this.metadataRegistry.get(schema); - if (meta) - Object.assign(result.schema, meta); - if (this.io === "input" && isTransforming(schema)) { - delete result.schema.examples; - delete result.schema.default; - } - if (this.io === "input" && result.schema._prefault) - (_a = result.schema).default ?? (_a.default = result.schema._prefault); - delete result.schema._prefault; - const _result = this.seen.get(schema); - return _result.schema; - } - emit(schema, _params) { - const params = { - cycles: _params?.cycles ?? "ref", - reused: _params?.reused ?? "inline", - external: _params?.external ?? undefined, - }; - const root = this.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const makeURI = (entry) => { - const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions"; - if (params.external) { - const externalId = params.external.registry.get(entry[0])?.id; - const uriGenerator = params.external.uri ?? ((id) => id); - if (externalId) { - return { ref: uriGenerator(externalId) }; - } - const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`; - entry[1].defId = id; - return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; - } - if (entry[1] === root) { - return { ref: "#" }; - } - const uriPrefix = `#`; - const defUriPrefix = `${uriPrefix}/${defsSegment}/`; - const defId = entry[1].schema.id ?? `__schema${this.counter++}`; - return { defId, ref: defUriPrefix + defId }; - }; - const extractToDef = (entry) => { - if (entry[1].schema.$ref) { - return; - } - const seen = entry[1]; - const { ref, defId } = makeURI(entry); - seen.def = { ...seen.schema }; - if (defId) - seen.defId = defId; - const schema = seen.schema; - for (const key in schema) { - delete schema[key]; - } - schema.$ref = ref; - }; - if (params.cycles === "throw") { - for (const entry of this.seen.entries()) { - const seen = entry[1]; - if (seen.cycle) { - throw new Error("Cycle detected: " + - `#/${seen.cycle?.join("/")}/` + - '\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.'); - } - } - } - for (const entry of this.seen.entries()) { - const seen = entry[1]; - if (schema === entry[0]) { - extractToDef(entry); - continue; - } - if (params.external) { - const ext = params.external.registry.get(entry[0])?.id; - if (schema !== entry[0] && ext) { - extractToDef(entry); - continue; - } - } - const id = this.metadataRegistry.get(entry[0])?.id; - if (id) { - extractToDef(entry); - continue; - } - if (seen.cycle) { - extractToDef(entry); - continue; - } - if (seen.count > 1) { - if (params.reused === "ref") { - extractToDef(entry); - continue; - } - } - } - const flattenRef = (zodSchema, params) => { - const seen = this.seen.get(zodSchema); - const schema = seen.def ?? seen.schema; - const _cached = { ...schema }; - if (seen.ref === null) { - return; - } - const ref = seen.ref; - seen.ref = null; - if (ref) { - flattenRef(ref, params); - const refSchema = this.seen.get(ref).schema; - if (refSchema.$ref && params.target === "draft-7") { - schema.allOf = schema.allOf ?? []; - schema.allOf.push(refSchema); - } - else { - Object.assign(schema, refSchema); - Object.assign(schema, _cached); - } - } - if (!seen.isParent) - this.override({ - zodSchema: zodSchema, - jsonSchema: schema, - path: seen.path ?? [], - }); - }; - for (const entry of [...this.seen.entries()].reverse()) { - flattenRef(entry[0], { target: this.target }); - } - const result = {}; - if (this.target === "draft-2020-12") { - result.$schema = "https://json-schema.org/draft/2020-12/schema"; - } - else if (this.target === "draft-7") { - result.$schema = "http://json-schema.org/draft-07/schema#"; - } - else { - console.warn(`Invalid target: ${this.target}`); - } - if (params.external?.uri) { - const id = params.external.registry.get(schema)?.id; - if (!id) - throw new Error("Schema is missing an `id` property"); - result.$id = params.external.uri(id); - } - Object.assign(result, root.def); - const defs = params.external?.defs ?? {}; - for (const entry of this.seen.entries()) { - const seen = entry[1]; - if (seen.def && seen.defId) { - defs[seen.defId] = seen.def; - } - } - if (params.external) ; - else { - if (Object.keys(defs).length > 0) { - if (this.target === "draft-2020-12") { - result.$defs = defs; - } - else { - result.definitions = defs; - } - } - } - try { - return JSON.parse(JSON.stringify(result)); - } - catch (_err) { - throw new Error("Error converting schema to JSON."); - } - } -} -function toJSONSchema(input, _params) { - if (input instanceof $ZodRegistry) { - const gen = new JSONSchemaGenerator(_params); - const defs = {}; - for (const entry of input._idmap.entries()) { - const [_, schema] = entry; - gen.process(schema); - } - const schemas = {}; - const external = { - registry: input, - uri: _params?.uri, - defs, - }; - for (const entry of input._idmap.entries()) { - const [key, schema] = entry; - schemas[key] = gen.emit(schema, { - ..._params, - external, - }); - } - if (Object.keys(defs).length > 0) { - const defsSegment = gen.target === "draft-2020-12" ? "$defs" : "definitions"; - schemas.__shared = { - [defsSegment]: defs, - }; - } - return { schemas }; - } - const gen = new JSONSchemaGenerator(_params); - gen.process(input); - return gen.emit(input, _params); -} -function isTransforming(_schema, _ctx) { - const ctx = _ctx ?? { seen: new Set() }; - if (ctx.seen.has(_schema)) - return false; - ctx.seen.add(_schema); - const schema = _schema; - const def = schema._zod.def; - switch (def.type) { - case "string": - case "number": - case "bigint": - case "boolean": - case "date": - case "symbol": - case "undefined": - case "null": - case "any": - case "unknown": - case "never": - case "void": - case "literal": - case "enum": - case "nan": - case "file": - case "template_literal": - return false; - case "array": { - return isTransforming(def.element, ctx); - } - case "object": { - for (const key in def.shape) { - if (isTransforming(def.shape[key], ctx)) - return true; - } - return false; - } - case "union": { - for (const option of def.options) { - if (isTransforming(option, ctx)) - return true; - } - return false; - } - case "intersection": { - return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); - } - case "tuple": { - for (const item of def.items) { - if (isTransforming(item, ctx)) - return true; - } - if (def.rest && isTransforming(def.rest, ctx)) - return true; - return false; - } - case "record": { - return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); - } - case "map": { - return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); - } - case "set": { - return isTransforming(def.valueType, ctx); - } - case "promise": - case "optional": - case "nonoptional": - case "nullable": - case "readonly": - return isTransforming(def.innerType, ctx); - case "lazy": - return isTransforming(def.getter(), ctx); - case "default": { - return isTransforming(def.innerType, ctx); - } - case "prefault": { - return isTransforming(def.innerType, ctx); - } - case "custom": { - return false; - } - case "transform": { - return true; - } - case "pipe": { - return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); - } - case "success": { - return false; - } - case "catch": { - return false; - } - } - throw new Error(`Unknown schema type: ${def.type}`); -} - -const ZodMiniType = $constructor("ZodMiniType", (inst, def) => { - if (!inst._zod) - throw new Error("Uninitialized schema in ZodMiniType."); - $ZodType.init(inst, def); - inst.def = def; - inst.parse = (data, params) => parse$4(inst, data, params, { callee: inst.parse }); - inst.safeParse = (data, params) => safeParse$2(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync$1(inst, data, params, { callee: inst.parseAsync }); - inst.safeParseAsync = async (data, params) => safeParseAsync$2(inst, data, params); - inst.check = (...checks) => { - return inst.clone({ - ...def, - checks: [ - ...(def.checks ?? []), - ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch), - ], - } - ); - }; - inst.clone = (_def, params) => clone(inst, _def, params); - inst.brand = () => inst; - inst.register = ((reg, meta) => { - reg.add(inst, meta); - return inst; - }); -}); -const ZodMiniString = $constructor("ZodMiniString", (inst, def) => { - $ZodString.init(inst, def); - ZodMiniType.init(inst, def); -}); -const ZodMiniStringFormat = $constructor("ZodMiniStringFormat", (inst, def) => { - $ZodStringFormat.init(inst, def); - ZodMiniString.init(inst, def); -}); -$constructor("ZodMiniEmail", (inst, def) => { - $ZodEmail.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniGUID", (inst, def) => { - $ZodGUID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniUUID", (inst, def) => { - $ZodUUID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniURL", (inst, def) => { - $ZodURL.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniEmoji", (inst, def) => { - $ZodEmoji.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniNanoID", (inst, def) => { - $ZodNanoID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniCUID", (inst, def) => { - $ZodCUID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniCUID2", (inst, def) => { - $ZodCUID2.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniULID", (inst, def) => { - $ZodULID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniXID", (inst, def) => { - $ZodXID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniKSUID", (inst, def) => { - $ZodKSUID.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniIPv4", (inst, def) => { - $ZodIPv4.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniIPv6", (inst, def) => { - $ZodIPv6.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniCIDRv4", (inst, def) => { - $ZodCIDRv4.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniCIDRv6", (inst, def) => { - $ZodCIDRv6.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniBase64", (inst, def) => { - $ZodBase64.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniBase64URL", (inst, def) => { - $ZodBase64URL.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniE164", (inst, def) => { - $ZodE164.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniJWT", (inst, def) => { - $ZodJWT.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -$constructor("ZodMiniCustomStringFormat", (inst, def) => { - $ZodCustomStringFormat.init(inst, def); - ZodMiniStringFormat.init(inst, def); -}); -const ZodMiniNumber = $constructor("ZodMiniNumber", (inst, def) => { - $ZodNumber.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniNumberFormat", (inst, def) => { - $ZodNumberFormat.init(inst, def); - ZodMiniNumber.init(inst, def); -}); -$constructor("ZodMiniBoolean", (inst, def) => { - $ZodBoolean.init(inst, def); - ZodMiniType.init(inst, def); -}); -const ZodMiniBigInt = $constructor("ZodMiniBigInt", (inst, def) => { - $ZodBigInt.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniBigIntFormat", (inst, def) => { - $ZodBigIntFormat.init(inst, def); - ZodMiniBigInt.init(inst, def); -}); -$constructor("ZodMiniSymbol", (inst, def) => { - $ZodSymbol.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniUndefined", (inst, def) => { - $ZodUndefined.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniNull", (inst, def) => { - $ZodNull.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniAny", (inst, def) => { - $ZodAny.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniUnknown", (inst, def) => { - $ZodUnknown.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniNever", (inst, def) => { - $ZodNever.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniVoid", (inst, def) => { - $ZodVoid.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniDate", (inst, def) => { - $ZodDate.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniArray", (inst, def) => { - $ZodArray.init(inst, def); - ZodMiniType.init(inst, def); -}); -const ZodMiniObject = $constructor("ZodMiniObject", (inst, def) => { - $ZodObject.init(inst, def); - ZodMiniType.init(inst, def); - defineLazy(inst, "shape", () => def.shape); -}); -function object$1(shape, params) { - const def = { - type: "object", - get shape() { - assignProp(this, "shape", { ...shape }); - return this.shape; - }, - ...normalizeParams(params), - }; - return new ZodMiniObject(def); -} -$constructor("ZodMiniUnion", (inst, def) => { - $ZodUnion.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniDiscriminatedUnion", (inst, def) => { - $ZodDiscriminatedUnion.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniIntersection", (inst, def) => { - $ZodIntersection.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniTuple", (inst, def) => { - $ZodTuple.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniRecord", (inst, def) => { - $ZodRecord.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniMap", (inst, def) => { - $ZodMap.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniSet", (inst, def) => { - $ZodSet.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniEnum", (inst, def) => { - $ZodEnum.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniLiteral", (inst, def) => { - $ZodLiteral.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniFile", (inst, def) => { - $ZodFile.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniTransform", (inst, def) => { - $ZodTransform.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniOptional", (inst, def) => { - $ZodOptional.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniNullable", (inst, def) => { - $ZodNullable.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniDefault", (inst, def) => { - $ZodDefault.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniPrefault", (inst, def) => { - $ZodPrefault.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniNonOptional", (inst, def) => { - $ZodNonOptional.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniSuccess", (inst, def) => { - $ZodSuccess.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniCatch", (inst, def) => { - $ZodCatch.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniNaN", (inst, def) => { - $ZodNaN.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniPipe", (inst, def) => { - $ZodPipe.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniReadonly", (inst, def) => { - $ZodReadonly.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniTemplateLiteral", (inst, def) => { - $ZodTemplateLiteral.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniLazy", (inst, def) => { - $ZodLazy.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniPromise", (inst, def) => { - $ZodPromise.init(inst, def); - ZodMiniType.init(inst, def); -}); -$constructor("ZodMiniCustom", (inst, def) => { - $ZodCustom.init(inst, def); - ZodMiniType.init(inst, def); -}); - -function isZ4Schema(s) { - const schema = s; - return !!schema._zod; -} -function objectFromShape(shape) { - const values = Object.values(shape); - if (values.length === 0) - return object$1({}); - const allV4 = values.every(isZ4Schema); - const allV3 = values.every(s => !isZ4Schema(s)); - if (allV4) - return object$1(shape); - if (allV3) - return objectType(shape); - throw new Error('Mixed Zod versions detected in object shape.'); -} -function safeParse$1(schema, data) { - if (isZ4Schema(schema)) { - const result = safeParse$2(schema, data); - return result; - } - const v3Schema = schema; - const result = v3Schema.safeParse(data); - return result; -} -async function safeParseAsync$1(schema, data) { - if (isZ4Schema(schema)) { - const result = await safeParseAsync$2(schema, data); - return result; - } - const v3Schema = schema; - const result = await v3Schema.safeParseAsync(data); - return result; -} -function getObjectShape(schema) { - if (!schema) - return undefined; - let rawShape; - if (isZ4Schema(schema)) { - const v4Schema = schema; - rawShape = v4Schema._zod?.def?.shape; - } - else { - const v3Schema = schema; - rawShape = v3Schema.shape; - } - if (!rawShape) - return undefined; - if (typeof rawShape === 'function') { - try { - return rawShape(); - } - catch { - return undefined; - } - } - return rawShape; -} -function normalizeObjectSchema(schema) { - if (!schema) - return undefined; - if (typeof schema === 'object') { - const asV3 = schema; - const asV4 = schema; - if (!asV3._def && !asV4._zod) { - const values = Object.values(schema); - if (values.length > 0 && - values.every(v => typeof v === 'object' && - v !== null && - (v._def !== undefined || - v._zod !== undefined || - typeof v.parse === 'function'))) { - return objectFromShape(schema); - } - } - } - if (isZ4Schema(schema)) { - const v4Schema = schema; - const def = v4Schema._zod?.def; - if (def && (def.type === 'object' || def.shape !== undefined)) { - return schema; - } - } - else { - const v3Schema = schema; - if (v3Schema.shape !== undefined) { - return schema; - } - } - return undefined; -} -function getParseErrorMessage(error) { - if (error && typeof error === 'object') { - if ('message' in error && typeof error.message === 'string') { - return error.message; - } - if ('issues' in error && Array.isArray(error.issues) && error.issues.length > 0) { - const firstIssue = error.issues[0]; - if (firstIssue && typeof firstIssue === 'object' && 'message' in firstIssue) { - return String(firstIssue.message); - } - } - try { - return JSON.stringify(error); - } - catch { - return String(error); - } - } - return String(error); -} -function getSchemaDescription(schema) { - return schema.description; -} -function isSchemaOptional(schema) { - if (isZ4Schema(schema)) { - const v4Schema = schema; - return v4Schema._zod?.def?.type === 'optional'; - } - const v3Schema = schema; - if (typeof schema.isOptional === 'function') { - return schema.isOptional(); - } - return v3Schema._def?.typeName === 'ZodOptional'; -} -function getLiteralValue(schema) { - if (isZ4Schema(schema)) { - const v4Schema = schema; - const def = v4Schema._zod?.def; - if (def) { - if (def.value !== undefined) - return def.value; - if (Array.isArray(def.values) && def.values.length > 0) { - return def.values[0]; - } - } - } - const v3Schema = schema; - const def = v3Schema._def; - if (def) { - if (def.value !== undefined) - return def.value; - if (Array.isArray(def.values) && def.values.length > 0) { - return def.values[0]; - } - } - const directValue = schema.value; - if (directValue !== undefined) - return directValue; - return undefined; -} - -const ZodISODateTime = $constructor("ZodISODateTime", (inst, def) => { - $ZodISODateTime.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function datetime(params) { - return _isoDateTime(ZodISODateTime, params); -} -const ZodISODate = $constructor("ZodISODate", (inst, def) => { - $ZodISODate.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function date(params) { - return _isoDate(ZodISODate, params); -} -const ZodISOTime = $constructor("ZodISOTime", (inst, def) => { - $ZodISOTime.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function time(params) { - return _isoTime(ZodISOTime, params); -} -const ZodISODuration = $constructor("ZodISODuration", (inst, def) => { - $ZodISODuration.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function duration(params) { - return _isoDuration(ZodISODuration, params); -} - -const initializer = (inst, issues) => { - $ZodError.init(inst, issues); - inst.name = "ZodError"; - Object.defineProperties(inst, { - format: { - value: (mapper) => formatError(inst, mapper), - }, - flatten: { - value: (mapper) => flattenError(inst, mapper), - }, - addIssue: { - value: (issue) => inst.issues.push(issue), - }, - addIssues: { - value: (issues) => inst.issues.push(...issues), - }, - isEmpty: { - get() { - return inst.issues.length === 0; - }, - }, - }); -}; -$constructor("ZodError", initializer); -const ZodRealError = $constructor("ZodError", initializer, { - Parent: Error, -}); - -const parse$3 = _parse(ZodRealError); -const parseAsync = _parseAsync(ZodRealError); -const safeParse = _safeParse(ZodRealError); -const safeParseAsync = _safeParseAsync(ZodRealError); - -const ZodType = $constructor("ZodType", (inst, def) => { - $ZodType.init(inst, def); - inst.def = def; - Object.defineProperty(inst, "_def", { value: def }); - inst.check = (...checks) => { - return inst.clone({ - ...def, - checks: [ - ...(def.checks ?? []), - ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch), - ], - } - ); - }; - inst.clone = (def, params) => clone(inst, def, params); - inst.brand = () => inst; - inst.register = ((reg, meta) => { - reg.add(inst, meta); - return inst; - }); - inst.parse = (data, params) => parse$3(inst, data, params, { callee: inst.parse }); - inst.safeParse = (data, params) => safeParse(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync }); - inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params); - inst.spa = inst.safeParseAsync; - inst.refine = (check, params) => inst.check(refine(check, params)); - inst.superRefine = (refinement) => inst.check(superRefine(refinement)); - inst.overwrite = (fn) => inst.check(_overwrite(fn)); - inst.optional = () => optional(inst); - inst.nullable = () => nullable(inst); - inst.nullish = () => optional(nullable(inst)); - inst.nonoptional = (params) => nonoptional(inst, params); - inst.array = () => array(inst); - inst.or = (arg) => union([inst, arg]); - inst.and = (arg) => intersection(inst, arg); - inst.transform = (tx) => pipe$1(inst, transform(tx)); - inst.default = (def) => _default(inst, def); - inst.prefault = (def) => prefault(inst, def); - inst.catch = (params) => _catch(inst, params); - inst.pipe = (target) => pipe$1(inst, target); - inst.readonly = () => readonly(inst); - inst.describe = (description) => { - const cl = inst.clone(); - globalRegistry.add(cl, { description }); - return cl; - }; - Object.defineProperty(inst, "description", { - get() { - return globalRegistry.get(inst)?.description; - }, - configurable: true, - }); - inst.meta = (...args) => { - if (args.length === 0) { - return globalRegistry.get(inst); - } - const cl = inst.clone(); - globalRegistry.add(cl, args[0]); - return cl; - }; - inst.isOptional = () => inst.safeParse(undefined).success; - inst.isNullable = () => inst.safeParse(null).success; - return inst; -}); -const _ZodString = $constructor("_ZodString", (inst, def) => { - $ZodString.init(inst, def); - ZodType.init(inst, def); - const bag = inst._zod.bag; - inst.format = bag.format ?? null; - inst.minLength = bag.minimum ?? null; - inst.maxLength = bag.maximum ?? null; - inst.regex = (...args) => inst.check(_regex(...args)); - inst.includes = (...args) => inst.check(_includes(...args)); - inst.startsWith = (...args) => inst.check(_startsWith(...args)); - inst.endsWith = (...args) => inst.check(_endsWith(...args)); - inst.min = (...args) => inst.check(_minLength(...args)); - inst.max = (...args) => inst.check(_maxLength(...args)); - inst.length = (...args) => inst.check(_length(...args)); - inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); - inst.lowercase = (params) => inst.check(_lowercase(params)); - inst.uppercase = (params) => inst.check(_uppercase(params)); - inst.trim = () => inst.check(_trim()); - inst.normalize = (...args) => inst.check(_normalize(...args)); - inst.toLowerCase = () => inst.check(_toLowerCase()); - inst.toUpperCase = () => inst.check(_toUpperCase()); -}); -const ZodString = $constructor("ZodString", (inst, def) => { - $ZodString.init(inst, def); - _ZodString.init(inst, def); - inst.email = (params) => inst.check(_email(ZodEmail, params)); - inst.url = (params) => inst.check(_url(ZodURL, params)); - inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); - inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params)); - inst.guid = (params) => inst.check(_guid(ZodGUID, params)); - inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); - inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); - inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); - inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); - inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); - inst.guid = (params) => inst.check(_guid(ZodGUID, params)); - inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); - inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); - inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); - inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); - inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); - inst.xid = (params) => inst.check(_xid(ZodXID, params)); - inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); - inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); - inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); - inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); - inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); - inst.e164 = (params) => inst.check(_e164(ZodE164, params)); - inst.datetime = (params) => inst.check(datetime(params)); - inst.date = (params) => inst.check(date(params)); - inst.time = (params) => inst.check(time(params)); - inst.duration = (params) => inst.check(duration(params)); -}); -function string(params) { - return _string(ZodString, params); -} -const ZodStringFormat = $constructor("ZodStringFormat", (inst, def) => { - $ZodStringFormat.init(inst, def); - _ZodString.init(inst, def); -}); -const ZodEmail = $constructor("ZodEmail", (inst, def) => { - $ZodEmail.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodGUID = $constructor("ZodGUID", (inst, def) => { - $ZodGUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodUUID = $constructor("ZodUUID", (inst, def) => { - $ZodUUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodURL = $constructor("ZodURL", (inst, def) => { - $ZodURL.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodEmoji = $constructor("ZodEmoji", (inst, def) => { - $ZodEmoji.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodNanoID = $constructor("ZodNanoID", (inst, def) => { - $ZodNanoID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodCUID = $constructor("ZodCUID", (inst, def) => { - $ZodCUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodCUID2 = $constructor("ZodCUID2", (inst, def) => { - $ZodCUID2.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodULID = $constructor("ZodULID", (inst, def) => { - $ZodULID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodXID = $constructor("ZodXID", (inst, def) => { - $ZodXID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodKSUID = $constructor("ZodKSUID", (inst, def) => { - $ZodKSUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodIPv4 = $constructor("ZodIPv4", (inst, def) => { - $ZodIPv4.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodIPv6 = $constructor("ZodIPv6", (inst, def) => { - $ZodIPv6.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodCIDRv4 = $constructor("ZodCIDRv4", (inst, def) => { - $ZodCIDRv4.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodCIDRv6 = $constructor("ZodCIDRv6", (inst, def) => { - $ZodCIDRv6.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodBase64 = $constructor("ZodBase64", (inst, def) => { - $ZodBase64.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodBase64URL = $constructor("ZodBase64URL", (inst, def) => { - $ZodBase64URL.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodE164 = $constructor("ZodE164", (inst, def) => { - $ZodE164.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodJWT = $constructor("ZodJWT", (inst, def) => { - $ZodJWT.init(inst, def); - ZodStringFormat.init(inst, def); -}); -$constructor("ZodCustomStringFormat", (inst, def) => { - $ZodCustomStringFormat.init(inst, def); - ZodStringFormat.init(inst, def); -}); -const ZodNumber = $constructor("ZodNumber", (inst, def) => { - $ZodNumber.init(inst, def); - ZodType.init(inst, def); - inst.gt = (value, params) => inst.check(_gt(value, params)); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.lt = (value, params) => inst.check(_lt(value, params)); - inst.lte = (value, params) => inst.check(_lte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - inst.int = (params) => inst.check(int(params)); - inst.safe = (params) => inst.check(int(params)); - inst.positive = (params) => inst.check(_gt(0, params)); - inst.nonnegative = (params) => inst.check(_gte(0, params)); - inst.negative = (params) => inst.check(_lt(0, params)); - inst.nonpositive = (params) => inst.check(_lte(0, params)); - inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); - inst.step = (value, params) => inst.check(_multipleOf(value, params)); - inst.finite = () => inst; - const bag = inst._zod.bag; - inst.minValue = - Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; - inst.maxValue = - Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; - inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); - inst.isFinite = true; - inst.format = bag.format ?? null; -}); -function number(params) { - return _number(ZodNumber, params); -} -const ZodNumberFormat = $constructor("ZodNumberFormat", (inst, def) => { - $ZodNumberFormat.init(inst, def); - ZodNumber.init(inst, def); -}); -function int(params) { - return _int(ZodNumberFormat, params); -} -const ZodBoolean = $constructor("ZodBoolean", (inst, def) => { - $ZodBoolean.init(inst, def); - ZodType.init(inst, def); -}); -function boolean(params) { - return _boolean(ZodBoolean, params); -} -const ZodBigInt = $constructor("ZodBigInt", (inst, def) => { - $ZodBigInt.init(inst, def); - ZodType.init(inst, def); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.gt = (value, params) => inst.check(_gt(value, params)); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.lt = (value, params) => inst.check(_lt(value, params)); - inst.lte = (value, params) => inst.check(_lte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - inst.positive = (params) => inst.check(_gt(BigInt(0), params)); - inst.negative = (params) => inst.check(_lt(BigInt(0), params)); - inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); - inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); - inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); - const bag = inst._zod.bag; - inst.minValue = bag.minimum ?? null; - inst.maxValue = bag.maximum ?? null; - inst.format = bag.format ?? null; -}); -$constructor("ZodBigIntFormat", (inst, def) => { - $ZodBigIntFormat.init(inst, def); - ZodBigInt.init(inst, def); -}); -$constructor("ZodSymbol", (inst, def) => { - $ZodSymbol.init(inst, def); - ZodType.init(inst, def); -}); -$constructor("ZodUndefined", (inst, def) => { - $ZodUndefined.init(inst, def); - ZodType.init(inst, def); -}); -const ZodNull = $constructor("ZodNull", (inst, def) => { - $ZodNull.init(inst, def); - ZodType.init(inst, def); -}); -function _null(params) { - return _null$1(ZodNull, params); -} -$constructor("ZodAny", (inst, def) => { - $ZodAny.init(inst, def); - ZodType.init(inst, def); -}); -const ZodUnknown = $constructor("ZodUnknown", (inst, def) => { - $ZodUnknown.init(inst, def); - ZodType.init(inst, def); -}); -function unknown() { - return _unknown(ZodUnknown); -} -const ZodNever = $constructor("ZodNever", (inst, def) => { - $ZodNever.init(inst, def); - ZodType.init(inst, def); -}); -function never(params) { - return _never(ZodNever, params); -} -$constructor("ZodVoid", (inst, def) => { - $ZodVoid.init(inst, def); - ZodType.init(inst, def); -}); -$constructor("ZodDate", (inst, def) => { - $ZodDate.init(inst, def); - ZodType.init(inst, def); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - const c = inst._zod.bag; - inst.minDate = c.minimum ? new Date(c.minimum) : null; - inst.maxDate = c.maximum ? new Date(c.maximum) : null; -}); -const ZodArray = $constructor("ZodArray", (inst, def) => { - $ZodArray.init(inst, def); - ZodType.init(inst, def); - inst.element = def.element; - inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); - inst.nonempty = (params) => inst.check(_minLength(1, params)); - inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); - inst.length = (len, params) => inst.check(_length(len, params)); - inst.unwrap = () => inst.element; -}); -function array(element, params) { - return _array(ZodArray, element, params); -} -const ZodObject = $constructor("ZodObject", (inst, def) => { - $ZodObject.init(inst, def); - ZodType.init(inst, def); - defineLazy(inst, "shape", () => def.shape); - inst.keyof = () => _enum$3(Object.keys(inst._zod.def.shape)); - inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall }); - inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); - inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); - inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); - inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined }); - inst.extend = (incoming) => { - return extend(inst, incoming); - }; - inst.merge = (other) => merge$1(inst, other); - inst.pick = (mask) => pick(inst, mask); - inst.omit = (mask) => omit(inst, mask); - inst.partial = (...args) => partial(ZodOptional, inst, args[0]); - inst.required = (...args) => required$6(ZodNonOptional, inst, args[0]); -}); -function object(shape, params) { - const def = { - type: "object", - get shape() { - assignProp(this, "shape", { ...shape }); - return this.shape; - }, - ...normalizeParams(params), - }; - return new ZodObject(def); -} -function looseObject(shape, params) { - return new ZodObject({ - type: "object", - get shape() { - assignProp(this, "shape", { ...shape }); - return this.shape; - }, - catchall: unknown(), - ...normalizeParams(params), - }); -} -const ZodUnion = $constructor("ZodUnion", (inst, def) => { - $ZodUnion.init(inst, def); - ZodType.init(inst, def); - inst.options = def.options; -}); -function union(options, params) { - return new ZodUnion({ - type: "union", - options: options, - ...normalizeParams(params), - }); -} -const ZodDiscriminatedUnion = $constructor("ZodDiscriminatedUnion", (inst, def) => { - ZodUnion.init(inst, def); - $ZodDiscriminatedUnion.init(inst, def); -}); -function discriminatedUnion(discriminator, options, params) { - return new ZodDiscriminatedUnion({ - type: "union", - options, - discriminator, - ...normalizeParams(params), - }); -} -const ZodIntersection = $constructor("ZodIntersection", (inst, def) => { - $ZodIntersection.init(inst, def); - ZodType.init(inst, def); -}); -function intersection(left, right) { - return new ZodIntersection({ - type: "intersection", - left: left, - right: right, - }); -} -$constructor("ZodTuple", (inst, def) => { - $ZodTuple.init(inst, def); - ZodType.init(inst, def); - inst.rest = (rest) => inst.clone({ - ...inst._zod.def, - rest: rest, - }); -}); -const ZodRecord = $constructor("ZodRecord", (inst, def) => { - $ZodRecord.init(inst, def); - ZodType.init(inst, def); - inst.keyType = def.keyType; - inst.valueType = def.valueType; -}); -function record(keyType, valueType, params) { - return new ZodRecord({ - type: "record", - keyType, - valueType: valueType, - ...normalizeParams(params), - }); -} -$constructor("ZodMap", (inst, def) => { - $ZodMap.init(inst, def); - ZodType.init(inst, def); - inst.keyType = def.keyType; - inst.valueType = def.valueType; -}); -$constructor("ZodSet", (inst, def) => { - $ZodSet.init(inst, def); - ZodType.init(inst, def); - inst.min = (...args) => inst.check(_minSize(...args)); - inst.nonempty = (params) => inst.check(_minSize(1, params)); - inst.max = (...args) => inst.check(_maxSize(...args)); - inst.size = (...args) => inst.check(_size(...args)); -}); -const ZodEnum = $constructor("ZodEnum", (inst, def) => { - $ZodEnum.init(inst, def); - ZodType.init(inst, def); - inst.enum = def.entries; - inst.options = Object.values(def.entries); - const keys = new Set(Object.keys(def.entries)); - inst.extract = (values, params) => { - const newEntries = {}; - for (const value of values) { - if (keys.has(value)) { - newEntries[value] = def.entries[value]; - } - else - throw new Error(`Key ${value} not found in enum`); - } - return new ZodEnum({ - ...def, - checks: [], - ...normalizeParams(params), - entries: newEntries, - }); - }; - inst.exclude = (values, params) => { - const newEntries = { ...def.entries }; - for (const value of values) { - if (keys.has(value)) { - delete newEntries[value]; - } - else - throw new Error(`Key ${value} not found in enum`); - } - return new ZodEnum({ - ...def, - checks: [], - ...normalizeParams(params), - entries: newEntries, - }); - }; -}); -function _enum$3(values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new ZodEnum({ - type: "enum", - entries, - ...normalizeParams(params), - }); -} -const ZodLiteral = $constructor("ZodLiteral", (inst, def) => { - $ZodLiteral.init(inst, def); - ZodType.init(inst, def); - inst.values = new Set(def.values); - Object.defineProperty(inst, "value", { - get() { - if (def.values.length > 1) { - throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); - } - return def.values[0]; - }, - }); -}); -function literal(value, params) { - return new ZodLiteral({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...normalizeParams(params), - }); -} -$constructor("ZodFile", (inst, def) => { - $ZodFile.init(inst, def); - ZodType.init(inst, def); - inst.min = (size, params) => inst.check(_minSize(size, params)); - inst.max = (size, params) => inst.check(_maxSize(size, params)); - inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); -}); -const ZodTransform = $constructor("ZodTransform", (inst, def) => { - $ZodTransform.init(inst, def); - ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - payload.addIssue = (issue$1) => { - if (typeof issue$1 === "string") { - payload.issues.push(issue(issue$1, payload.value, def)); - } - else { - const _issue = issue$1; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = inst); - _issue.continue ?? (_issue.continue = true); - payload.issues.push(issue(_issue)); - } - }; - const output = def.transform(payload.value, payload); - if (output instanceof Promise) { - return output.then((output) => { - payload.value = output; - return payload; - }); - } - payload.value = output; - return payload; - }; -}); -function transform(fn) { - return new ZodTransform({ - type: "transform", - transform: fn, - }); -} -const ZodOptional = $constructor("ZodOptional", (inst, def) => { - $ZodOptional.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; -}); -function optional(innerType) { - return new ZodOptional({ - type: "optional", - innerType: innerType, - }); -} -const ZodNullable = $constructor("ZodNullable", (inst, def) => { - $ZodNullable.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nullable(innerType) { - return new ZodNullable({ - type: "nullable", - innerType: innerType, - }); -} -const ZodDefault = $constructor("ZodDefault", (inst, def) => { - $ZodDefault.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeDefault = inst.unwrap; -}); -function _default(innerType, defaultValue) { - return new ZodDefault({ - type: "default", - innerType: innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; - }, - }); -} -const ZodPrefault = $constructor("ZodPrefault", (inst, def) => { - $ZodPrefault.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; -}); -function prefault(innerType, defaultValue) { - return new ZodPrefault({ - type: "prefault", - innerType: innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : defaultValue; - }, - }); -} -const ZodNonOptional = $constructor("ZodNonOptional", (inst, def) => { - $ZodNonOptional.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nonoptional(innerType, params) { - return new ZodNonOptional({ - type: "nonoptional", - innerType: innerType, - ...normalizeParams(params), - }); -} -$constructor("ZodSuccess", (inst, def) => { - $ZodSuccess.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; -}); -const ZodCatch = $constructor("ZodCatch", (inst, def) => { - $ZodCatch.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeCatch = inst.unwrap; -}); -function _catch(innerType, catchValue) { - return new ZodCatch({ - type: "catch", - innerType: innerType, - catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue), - }); -} -$constructor("ZodNaN", (inst, def) => { - $ZodNaN.init(inst, def); - ZodType.init(inst, def); -}); -const ZodPipe = $constructor("ZodPipe", (inst, def) => { - $ZodPipe.init(inst, def); - ZodType.init(inst, def); - inst.in = def.in; - inst.out = def.out; -}); -function pipe$1(in_, out) { - return new ZodPipe({ - type: "pipe", - in: in_, - out: out, - }); -} -const ZodReadonly = $constructor("ZodReadonly", (inst, def) => { - $ZodReadonly.init(inst, def); - ZodType.init(inst, def); -}); -function readonly(innerType) { - return new ZodReadonly({ - type: "readonly", - innerType: innerType, - }); -} -$constructor("ZodTemplateLiteral", (inst, def) => { - $ZodTemplateLiteral.init(inst, def); - ZodType.init(inst, def); -}); -$constructor("ZodLazy", (inst, def) => { - $ZodLazy.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.getter(); -}); -$constructor("ZodPromise", (inst, def) => { - $ZodPromise.init(inst, def); - ZodType.init(inst, def); - inst.unwrap = () => inst._zod.def.innerType; -}); -const ZodCustom = $constructor("ZodCustom", (inst, def) => { - $ZodCustom.init(inst, def); - ZodType.init(inst, def); -}); -function check(fn) { - const ch = new $ZodCheck({ - check: "custom", - }); - ch._zod.check = fn; - return ch; -} -function custom$1(fn, _params) { - return _custom(ZodCustom, fn ?? (() => true), _params); -} -function refine(fn, _params = {}) { - return _refine(ZodCustom, fn, _params); -} -function superRefine(fn) { - const ch = check((payload) => { - payload.addIssue = (issue$1) => { - if (typeof issue$1 === "string") { - payload.issues.push(issue(issue$1, payload.value, ch._zod.def)); - } - else { - const _issue = issue$1; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = ch); - _issue.continue ?? (_issue.continue = !ch._zod.def.abort); - payload.issues.push(issue(_issue)); - } - }; - return fn(payload.value, payload); - }); - return ch; -} -function preprocess(fn, schema) { - return pipe$1(transform(fn), schema); -} - -const LATEST_PROTOCOL_VERSION = '2025-11-25'; -const SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, '2025-06-18', '2025-03-26', '2024-11-05', '2024-10-07']; -const RELATED_TASK_META_KEY = 'io.modelcontextprotocol/related-task'; -const JSONRPC_VERSION = '2.0'; -const AssertObjectSchema = custom$1((v) => v !== null && (typeof v === 'object' || typeof v === 'function')); -const ProgressTokenSchema = union([string(), number().int()]); -const CursorSchema = string(); -looseObject({ - ttl: union([number(), _null()]).optional(), - pollInterval: number().optional() -}); -const TaskMetadataSchema = object({ - ttl: number().optional() -}); -const RelatedTaskMetadataSchema = object({ - taskId: string() -}); -const RequestMetaSchema = looseObject({ - progressToken: ProgressTokenSchema.optional(), - [RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional() -}); -const BaseRequestParamsSchema = object({ - _meta: RequestMetaSchema.optional() -}); -const TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({ - task: TaskMetadataSchema.optional() -}); -const isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success; -const RequestSchema = object({ - method: string(), - params: BaseRequestParamsSchema.loose().optional() -}); -const NotificationsParamsSchema = object({ - _meta: RequestMetaSchema.optional() -}); -const NotificationSchema = object({ - method: string(), - params: NotificationsParamsSchema.loose().optional() -}); -const ResultSchema = looseObject({ - _meta: RequestMetaSchema.optional() -}); -const RequestIdSchema = union([string(), number().int()]); -const JSONRPCRequestSchema = object({ - jsonrpc: literal(JSONRPC_VERSION), - id: RequestIdSchema, - ...RequestSchema.shape -}) - .strict(); -const isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success; -const JSONRPCNotificationSchema = object({ - jsonrpc: literal(JSONRPC_VERSION), - ...NotificationSchema.shape -}) - .strict(); -const isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success; -const JSONRPCResultResponseSchema = object({ - jsonrpc: literal(JSONRPC_VERSION), - id: RequestIdSchema, - result: ResultSchema -}) - .strict(); -const isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success; -var ErrorCode$1; -(function (ErrorCode) { - ErrorCode[ErrorCode["ConnectionClosed"] = -32e3] = "ConnectionClosed"; - ErrorCode[ErrorCode["RequestTimeout"] = -32001] = "RequestTimeout"; - ErrorCode[ErrorCode["ParseError"] = -32700] = "ParseError"; - ErrorCode[ErrorCode["InvalidRequest"] = -32600] = "InvalidRequest"; - ErrorCode[ErrorCode["MethodNotFound"] = -32601] = "MethodNotFound"; - ErrorCode[ErrorCode["InvalidParams"] = -32602] = "InvalidParams"; - ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError"; - ErrorCode[ErrorCode["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired"; -})(ErrorCode$1 || (ErrorCode$1 = {})); -const JSONRPCErrorResponseSchema = object({ - jsonrpc: literal(JSONRPC_VERSION), - id: RequestIdSchema.optional(), - error: object({ - code: number().int(), - message: string(), - data: unknown().optional() - }) -}) - .strict(); -const isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success; -const JSONRPCMessageSchema = union([ - JSONRPCRequestSchema, - JSONRPCNotificationSchema, - JSONRPCResultResponseSchema, - JSONRPCErrorResponseSchema -]); -union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]); -const EmptyResultSchema = ResultSchema.strict(); -const CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({ - requestId: RequestIdSchema.optional(), - reason: string().optional() -}); -const CancelledNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/cancelled'), - params: CancelledNotificationParamsSchema -}); -const IconSchema = object({ - src: string(), - mimeType: string().optional(), - sizes: array(string()).optional(), - theme: _enum$3(['light', 'dark']).optional() -}); -const IconsSchema = object({ - icons: array(IconSchema).optional() -}); -const BaseMetadataSchema = object({ - name: string(), - title: string().optional() -}); -const ImplementationSchema = BaseMetadataSchema.extend({ - ...BaseMetadataSchema.shape, - ...IconsSchema.shape, - version: string(), - websiteUrl: string().optional(), - description: string().optional() -}); -const FormElicitationCapabilitySchema = intersection(object({ - applyDefaults: boolean().optional() -}), record(string(), unknown())); -const ElicitationCapabilitySchema = preprocess(value => { - if (value && typeof value === 'object' && !Array.isArray(value)) { - if (Object.keys(value).length === 0) { - return { form: {} }; - } - } - return value; -}, intersection(object({ - form: FormElicitationCapabilitySchema.optional(), - url: AssertObjectSchema.optional() -}), record(string(), unknown()).optional())); -const ClientTasksCapabilitySchema = looseObject({ - list: AssertObjectSchema.optional(), - cancel: AssertObjectSchema.optional(), - requests: looseObject({ - sampling: looseObject({ - createMessage: AssertObjectSchema.optional() - }) - .optional(), - elicitation: looseObject({ - create: AssertObjectSchema.optional() - }) - .optional() - }) - .optional() -}); -const ServerTasksCapabilitySchema = looseObject({ - list: AssertObjectSchema.optional(), - cancel: AssertObjectSchema.optional(), - requests: looseObject({ - tools: looseObject({ - call: AssertObjectSchema.optional() - }) - .optional() - }) - .optional() -}); -const ClientCapabilitiesSchema = object({ - experimental: record(string(), AssertObjectSchema).optional(), - sampling: object({ - context: AssertObjectSchema.optional(), - tools: AssertObjectSchema.optional() - }) - .optional(), - elicitation: ElicitationCapabilitySchema.optional(), - roots: object({ - listChanged: boolean().optional() - }) - .optional(), - tasks: ClientTasksCapabilitySchema.optional() -}); -const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({ - protocolVersion: string(), - capabilities: ClientCapabilitiesSchema, - clientInfo: ImplementationSchema -}); -const InitializeRequestSchema = RequestSchema.extend({ - method: literal('initialize'), - params: InitializeRequestParamsSchema -}); -const ServerCapabilitiesSchema = object({ - experimental: record(string(), AssertObjectSchema).optional(), - logging: AssertObjectSchema.optional(), - completions: AssertObjectSchema.optional(), - prompts: object({ - listChanged: boolean().optional() - }) - .optional(), - resources: object({ - subscribe: boolean().optional(), - listChanged: boolean().optional() - }) - .optional(), - tools: object({ - listChanged: boolean().optional() - }) - .optional(), - tasks: ServerTasksCapabilitySchema.optional() -}); -const InitializeResultSchema = ResultSchema.extend({ - protocolVersion: string(), - capabilities: ServerCapabilitiesSchema, - serverInfo: ImplementationSchema, - instructions: string().optional() -}); -const InitializedNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/initialized'), - params: NotificationsParamsSchema.optional() -}); -const PingRequestSchema = RequestSchema.extend({ - method: literal('ping'), - params: BaseRequestParamsSchema.optional() -}); -const ProgressSchema = object({ - progress: number(), - total: optional(number()), - message: optional(string()) -}); -const ProgressNotificationParamsSchema = object({ - ...NotificationsParamsSchema.shape, - ...ProgressSchema.shape, - progressToken: ProgressTokenSchema -}); -const ProgressNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/progress'), - params: ProgressNotificationParamsSchema -}); -const PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ - cursor: CursorSchema.optional() -}); -const PaginatedRequestSchema = RequestSchema.extend({ - params: PaginatedRequestParamsSchema.optional() -}); -const PaginatedResultSchema = ResultSchema.extend({ - nextCursor: CursorSchema.optional() -}); -const TaskStatusSchema = _enum$3(['working', 'input_required', 'completed', 'failed', 'cancelled']); -const TaskSchema = object({ - taskId: string(), - status: TaskStatusSchema, - ttl: union([number(), _null()]), - createdAt: string(), - lastUpdatedAt: string(), - pollInterval: optional(number()), - statusMessage: optional(string()) -}); -const CreateTaskResultSchema = ResultSchema.extend({ - task: TaskSchema -}); -const TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema); -const TaskStatusNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/tasks/status'), - params: TaskStatusNotificationParamsSchema -}); -const GetTaskRequestSchema = RequestSchema.extend({ - method: literal('tasks/get'), - params: BaseRequestParamsSchema.extend({ - taskId: string() - }) -}); -const GetTaskResultSchema = ResultSchema.merge(TaskSchema); -const GetTaskPayloadRequestSchema = RequestSchema.extend({ - method: literal('tasks/result'), - params: BaseRequestParamsSchema.extend({ - taskId: string() - }) -}); -ResultSchema.loose(); -const ListTasksRequestSchema = PaginatedRequestSchema.extend({ - method: literal('tasks/list') -}); -const ListTasksResultSchema = PaginatedResultSchema.extend({ - tasks: array(TaskSchema) -}); -const CancelTaskRequestSchema = RequestSchema.extend({ - method: literal('tasks/cancel'), - params: BaseRequestParamsSchema.extend({ - taskId: string() - }) -}); -const CancelTaskResultSchema = ResultSchema.merge(TaskSchema); -const ResourceContentsSchema = object({ - uri: string(), - mimeType: optional(string()), - _meta: record(string(), unknown()).optional() -}); -const TextResourceContentsSchema = ResourceContentsSchema.extend({ - text: string() -}); -const Base64Schema = string().refine(val => { - try { - atob(val); - return true; - } - catch { - return false; - } -}, { message: 'Invalid Base64 string' }); -const BlobResourceContentsSchema = ResourceContentsSchema.extend({ - blob: Base64Schema -}); -const RoleSchema = _enum$3(['user', 'assistant']); -const AnnotationsSchema = object({ - audience: array(RoleSchema).optional(), - priority: number().min(0).max(1).optional(), - lastModified: datetime({ offset: true }).optional() -}); -const ResourceSchema = object({ - ...BaseMetadataSchema.shape, - ...IconsSchema.shape, - uri: string(), - description: optional(string()), - mimeType: optional(string()), - annotations: AnnotationsSchema.optional(), - _meta: optional(looseObject({})) -}); -const ResourceTemplateSchema = object({ - ...BaseMetadataSchema.shape, - ...IconsSchema.shape, - uriTemplate: string(), - description: optional(string()), - mimeType: optional(string()), - annotations: AnnotationsSchema.optional(), - _meta: optional(looseObject({})) -}); -const ListResourcesRequestSchema = PaginatedRequestSchema.extend({ - method: literal('resources/list') -}); -const ListResourcesResultSchema = PaginatedResultSchema.extend({ - resources: array(ResourceSchema) -}); -const ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ - method: literal('resources/templates/list') -}); -const ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ - resourceTemplates: array(ResourceTemplateSchema) -}); -const ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ - uri: string() -}); -const ReadResourceRequestParamsSchema = ResourceRequestParamsSchema; -const ReadResourceRequestSchema = RequestSchema.extend({ - method: literal('resources/read'), - params: ReadResourceRequestParamsSchema -}); -const ReadResourceResultSchema = ResultSchema.extend({ - contents: array(union([TextResourceContentsSchema, BlobResourceContentsSchema])) -}); -const ResourceListChangedNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/resources/list_changed'), - params: NotificationsParamsSchema.optional() -}); -const SubscribeRequestParamsSchema = ResourceRequestParamsSchema; -const SubscribeRequestSchema = RequestSchema.extend({ - method: literal('resources/subscribe'), - params: SubscribeRequestParamsSchema -}); -const UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema; -const UnsubscribeRequestSchema = RequestSchema.extend({ - method: literal('resources/unsubscribe'), - params: UnsubscribeRequestParamsSchema -}); -const ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ - uri: string() -}); -const ResourceUpdatedNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/resources/updated'), - params: ResourceUpdatedNotificationParamsSchema -}); -const PromptArgumentSchema = object({ - name: string(), - description: optional(string()), - required: optional(boolean()) -}); -const PromptSchema = object({ - ...BaseMetadataSchema.shape, - ...IconsSchema.shape, - description: optional(string()), - arguments: optional(array(PromptArgumentSchema)), - _meta: optional(looseObject({})) -}); -const ListPromptsRequestSchema = PaginatedRequestSchema.extend({ - method: literal('prompts/list') -}); -const ListPromptsResultSchema = PaginatedResultSchema.extend({ - prompts: array(PromptSchema) -}); -const GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({ - name: string(), - arguments: record(string(), string()).optional() -}); -const GetPromptRequestSchema = RequestSchema.extend({ - method: literal('prompts/get'), - params: GetPromptRequestParamsSchema -}); -const TextContentSchema = object({ - type: literal('text'), - text: string(), - annotations: AnnotationsSchema.optional(), - _meta: record(string(), unknown()).optional() -}); -const ImageContentSchema = object({ - type: literal('image'), - data: Base64Schema, - mimeType: string(), - annotations: AnnotationsSchema.optional(), - _meta: record(string(), unknown()).optional() -}); -const AudioContentSchema = object({ - type: literal('audio'), - data: Base64Schema, - mimeType: string(), - annotations: AnnotationsSchema.optional(), - _meta: record(string(), unknown()).optional() -}); -const ToolUseContentSchema = object({ - type: literal('tool_use'), - name: string(), - id: string(), - input: record(string(), unknown()), - _meta: record(string(), unknown()).optional() -}); -const EmbeddedResourceSchema = object({ - type: literal('resource'), - resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]), - annotations: AnnotationsSchema.optional(), - _meta: record(string(), unknown()).optional() -}); -const ResourceLinkSchema = ResourceSchema.extend({ - type: literal('resource_link') -}); -const ContentBlockSchema = union([ - TextContentSchema, - ImageContentSchema, - AudioContentSchema, - ResourceLinkSchema, - EmbeddedResourceSchema -]); -const PromptMessageSchema = object({ - role: RoleSchema, - content: ContentBlockSchema -}); -const GetPromptResultSchema = ResultSchema.extend({ - description: string().optional(), - messages: array(PromptMessageSchema) -}); -const PromptListChangedNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/prompts/list_changed'), - params: NotificationsParamsSchema.optional() -}); -const ToolAnnotationsSchema = object({ - title: string().optional(), - readOnlyHint: boolean().optional(), - destructiveHint: boolean().optional(), - idempotentHint: boolean().optional(), - openWorldHint: boolean().optional() -}); -const ToolExecutionSchema = object({ - taskSupport: _enum$3(['required', 'optional', 'forbidden']).optional() -}); -const ToolSchema = object({ - ...BaseMetadataSchema.shape, - ...IconsSchema.shape, - description: string().optional(), - inputSchema: object({ - type: literal('object'), - properties: record(string(), AssertObjectSchema).optional(), - required: array(string()).optional() - }) - .catchall(unknown()), - outputSchema: object({ - type: literal('object'), - properties: record(string(), AssertObjectSchema).optional(), - required: array(string()).optional() - }) - .catchall(unknown()) - .optional(), - annotations: ToolAnnotationsSchema.optional(), - execution: ToolExecutionSchema.optional(), - _meta: record(string(), unknown()).optional() -}); -const ListToolsRequestSchema = PaginatedRequestSchema.extend({ - method: literal('tools/list') -}); -const ListToolsResultSchema = PaginatedResultSchema.extend({ - tools: array(ToolSchema) -}); -const CallToolResultSchema = ResultSchema.extend({ - content: array(ContentBlockSchema).default([]), - structuredContent: record(string(), unknown()).optional(), - isError: boolean().optional() -}); -CallToolResultSchema.or(ResultSchema.extend({ - toolResult: unknown() -})); -const CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({ - name: string(), - arguments: record(string(), unknown()).optional() -}); -const CallToolRequestSchema = RequestSchema.extend({ - method: literal('tools/call'), - params: CallToolRequestParamsSchema -}); -const ToolListChangedNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/tools/list_changed'), - params: NotificationsParamsSchema.optional() -}); -const ListChangedOptionsBaseSchema = object({ - autoRefresh: boolean().default(true), - debounceMs: number().int().nonnegative().default(300) -}); -const LoggingLevelSchema = _enum$3(['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency']); -const SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ - level: LoggingLevelSchema -}); -const SetLevelRequestSchema = RequestSchema.extend({ - method: literal('logging/setLevel'), - params: SetLevelRequestParamsSchema -}); -const LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({ - level: LoggingLevelSchema, - logger: string().optional(), - data: unknown() -}); -const LoggingMessageNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/message'), - params: LoggingMessageNotificationParamsSchema -}); -const ModelHintSchema = object({ - name: string().optional() -}); -const ModelPreferencesSchema = object({ - hints: array(ModelHintSchema).optional(), - costPriority: number().min(0).max(1).optional(), - speedPriority: number().min(0).max(1).optional(), - intelligencePriority: number().min(0).max(1).optional() -}); -const ToolChoiceSchema = object({ - mode: _enum$3(['auto', 'required', 'none']).optional() -}); -const ToolResultContentSchema = object({ - type: literal('tool_result'), - toolUseId: string().describe('The unique identifier for the corresponding tool call.'), - content: array(ContentBlockSchema).default([]), - structuredContent: object({}).loose().optional(), - isError: boolean().optional(), - _meta: record(string(), unknown()).optional() -}); -const SamplingContentSchema = discriminatedUnion('type', [TextContentSchema, ImageContentSchema, AudioContentSchema]); -const SamplingMessageContentBlockSchema = discriminatedUnion('type', [ - TextContentSchema, - ImageContentSchema, - AudioContentSchema, - ToolUseContentSchema, - ToolResultContentSchema -]); -const SamplingMessageSchema = object({ - role: RoleSchema, - content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]), - _meta: record(string(), unknown()).optional() -}); -const CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({ - messages: array(SamplingMessageSchema), - modelPreferences: ModelPreferencesSchema.optional(), - systemPrompt: string().optional(), - includeContext: _enum$3(['none', 'thisServer', 'allServers']).optional(), - temperature: number().optional(), - maxTokens: number().int(), - stopSequences: array(string()).optional(), - metadata: AssertObjectSchema.optional(), - tools: array(ToolSchema).optional(), - toolChoice: ToolChoiceSchema.optional() -}); -const CreateMessageRequestSchema = RequestSchema.extend({ - method: literal('sampling/createMessage'), - params: CreateMessageRequestParamsSchema -}); -const CreateMessageResultSchema = ResultSchema.extend({ - model: string(), - stopReason: optional(_enum$3(['endTurn', 'stopSequence', 'maxTokens']).or(string())), - role: RoleSchema, - content: SamplingContentSchema -}); -const CreateMessageResultWithToolsSchema = ResultSchema.extend({ - model: string(), - stopReason: optional(_enum$3(['endTurn', 'stopSequence', 'maxTokens', 'toolUse']).or(string())), - role: RoleSchema, - content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]) -}); -const BooleanSchemaSchema = object({ - type: literal('boolean'), - title: string().optional(), - description: string().optional(), - default: boolean().optional() -}); -const StringSchemaSchema = object({ - type: literal('string'), - title: string().optional(), - description: string().optional(), - minLength: number().optional(), - maxLength: number().optional(), - format: _enum$3(['email', 'uri', 'date', 'date-time']).optional(), - default: string().optional() -}); -const NumberSchemaSchema = object({ - type: _enum$3(['number', 'integer']), - title: string().optional(), - description: string().optional(), - minimum: number().optional(), - maximum: number().optional(), - default: number().optional() -}); -const UntitledSingleSelectEnumSchemaSchema = object({ - type: literal('string'), - title: string().optional(), - description: string().optional(), - enum: array(string()), - default: string().optional() -}); -const TitledSingleSelectEnumSchemaSchema = object({ - type: literal('string'), - title: string().optional(), - description: string().optional(), - oneOf: array(object({ - const: string(), - title: string() - })), - default: string().optional() -}); -const LegacyTitledEnumSchemaSchema = object({ - type: literal('string'), - title: string().optional(), - description: string().optional(), - enum: array(string()), - enumNames: array(string()).optional(), - default: string().optional() -}); -const SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]); -const UntitledMultiSelectEnumSchemaSchema = object({ - type: literal('array'), - title: string().optional(), - description: string().optional(), - minItems: number().optional(), - maxItems: number().optional(), - items: object({ - type: literal('string'), - enum: array(string()) - }), - default: array(string()).optional() -}); -const TitledMultiSelectEnumSchemaSchema = object({ - type: literal('array'), - title: string().optional(), - description: string().optional(), - minItems: number().optional(), - maxItems: number().optional(), - items: object({ - anyOf: array(object({ - const: string(), - title: string() - })) - }), - default: array(string()).optional() -}); -const MultiSelectEnumSchemaSchema = union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]); -const EnumSchemaSchema = union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]); -const PrimitiveSchemaDefinitionSchema = union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]); -const ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({ - mode: literal('form').optional(), - message: string(), - requestedSchema: object({ - type: literal('object'), - properties: record(string(), PrimitiveSchemaDefinitionSchema), - required: array(string()).optional() - }) -}); -const ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({ - mode: literal('url'), - message: string(), - elicitationId: string(), - url: string().url() -}); -const ElicitRequestParamsSchema = union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]); -const ElicitRequestSchema = RequestSchema.extend({ - method: literal('elicitation/create'), - params: ElicitRequestParamsSchema -}); -const ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ - elicitationId: string() -}); -const ElicitationCompleteNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/elicitation/complete'), - params: ElicitationCompleteNotificationParamsSchema -}); -const ElicitResultSchema = ResultSchema.extend({ - action: _enum$3(['accept', 'decline', 'cancel']), - content: preprocess(val => (val === null ? undefined : val), record(string(), union([string(), number(), boolean(), array(string())])).optional()) -}); -const ResourceTemplateReferenceSchema = object({ - type: literal('ref/resource'), - uri: string() -}); -const PromptReferenceSchema = object({ - type: literal('ref/prompt'), - name: string() -}); -const CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({ - ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]), - argument: object({ - name: string(), - value: string() - }), - context: object({ - arguments: record(string(), string()).optional() - }) - .optional() -}); -const CompleteRequestSchema = RequestSchema.extend({ - method: literal('completion/complete'), - params: CompleteRequestParamsSchema -}); -function assertCompleteRequestPrompt(request) { - if (request.params.ref.type !== 'ref/prompt') { - throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`); - } -} -function assertCompleteRequestResourceTemplate(request) { - if (request.params.ref.type !== 'ref/resource') { - throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`); - } -} -const CompleteResultSchema = ResultSchema.extend({ - completion: looseObject({ - values: array(string()).max(100), - total: optional(number().int()), - hasMore: optional(boolean()) - }) -}); -const RootSchema = object({ - uri: string().startsWith('file://'), - name: string().optional(), - _meta: record(string(), unknown()).optional() -}); -const ListRootsRequestSchema = RequestSchema.extend({ - method: literal('roots/list'), - params: BaseRequestParamsSchema.optional() -}); -const ListRootsResultSchema = ResultSchema.extend({ - roots: array(RootSchema) -}); -const RootsListChangedNotificationSchema = NotificationSchema.extend({ - method: literal('notifications/roots/list_changed'), - params: NotificationsParamsSchema.optional() -}); -union([ - PingRequestSchema, - InitializeRequestSchema, - CompleteRequestSchema, - SetLevelRequestSchema, - GetPromptRequestSchema, - ListPromptsRequestSchema, - ListResourcesRequestSchema, - ListResourceTemplatesRequestSchema, - ReadResourceRequestSchema, - SubscribeRequestSchema, - UnsubscribeRequestSchema, - CallToolRequestSchema, - ListToolsRequestSchema, - GetTaskRequestSchema, - GetTaskPayloadRequestSchema, - ListTasksRequestSchema, - CancelTaskRequestSchema -]); -union([ - CancelledNotificationSchema, - ProgressNotificationSchema, - InitializedNotificationSchema, - RootsListChangedNotificationSchema, - TaskStatusNotificationSchema -]); -union([ - EmptyResultSchema, - CreateMessageResultSchema, - CreateMessageResultWithToolsSchema, - ElicitResultSchema, - ListRootsResultSchema, - GetTaskResultSchema, - ListTasksResultSchema, - CreateTaskResultSchema -]); -union([ - PingRequestSchema, - CreateMessageRequestSchema, - ElicitRequestSchema, - ListRootsRequestSchema, - GetTaskRequestSchema, - GetTaskPayloadRequestSchema, - ListTasksRequestSchema, - CancelTaskRequestSchema -]); -union([ - CancelledNotificationSchema, - ProgressNotificationSchema, - LoggingMessageNotificationSchema, - ResourceUpdatedNotificationSchema, - ResourceListChangedNotificationSchema, - ToolListChangedNotificationSchema, - PromptListChangedNotificationSchema, - TaskStatusNotificationSchema, - ElicitationCompleteNotificationSchema -]); -union([ - EmptyResultSchema, - InitializeResultSchema, - CompleteResultSchema, - GetPromptResultSchema, - ListPromptsResultSchema, - ListResourcesResultSchema, - ListResourceTemplatesResultSchema, - ReadResourceResultSchema, - CallToolResultSchema, - ListToolsResultSchema, - GetTaskResultSchema, - ListTasksResultSchema, - CreateTaskResultSchema -]); -class McpError extends Error { - constructor(code, message, data) { - super(`MCP error ${code}: ${message}`); - this.code = code; - this.data = data; - this.name = 'McpError'; - } - static fromError(code, message, data) { - if (code === ErrorCode$1.UrlElicitationRequired && data) { - const errorData = data; - if (errorData.elicitations) { - return new UrlElicitationRequiredError(errorData.elicitations, message); - } - } - return new McpError(code, message, data); - } -} -class UrlElicitationRequiredError extends McpError { - constructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? 's' : ''} required`) { - super(ErrorCode$1.UrlElicitationRequired, message, { - elicitations: elicitations - }); - } - get elicitations() { - return this.data?.elicitations ?? []; - } -} - -function isTerminal(status) { - return status === 'completed' || status === 'failed' || status === 'cancelled'; -} - -const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use"); -const defaultOptions = { - name: undefined, - $refStrategy: "root", - basePath: ["#"], - effectStrategy: "input", - pipeStrategy: "all", - dateStrategy: "format:date-time", - mapStrategy: "entries", - removeAdditionalStrategy: "passthrough", - allowedAdditionalProperties: true, - rejectedAdditionalProperties: false, - definitionPath: "definitions", - target: "jsonSchema7", - strictUnions: false, - definitions: {}, - errorMessages: false, - markdownDescription: false, - patternStrategy: "escape", - applyRegexFlags: false, - emailStrategy: "format:email", - base64Strategy: "contentEncoding:base64", - nameStrategy: "ref", - openAiAnyTypeName: "OpenAiAnyType" -}; -const getDefaultOptions = (options) => (typeof options === "string" - ? { - ...defaultOptions, - name: options, - } - : { - ...defaultOptions, - ...options, - }); - -const getRefs = (options) => { - const _options = getDefaultOptions(options); - const currentPath = _options.name !== undefined - ? [..._options.basePath, _options.definitionPath, _options.name] - : _options.basePath; - return { - ..._options, - flags: { hasReferencedOpenAiAnyType: false }, - currentPath: currentPath, - propertyPath: undefined, - seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [ - def._def, - { - def: def._def, - path: [..._options.basePath, _options.definitionPath, name], - jsonSchema: undefined, - }, - ])), - }; -}; - -function addErrorMessage(res, key, errorMessage, refs) { - if (!refs?.errorMessages) - return; - if (errorMessage) { - res.errorMessage = { - ...res.errorMessage, - [key]: errorMessage, - }; - } -} -function setResponseValueAndErrors(res, key, value, errorMessage, refs) { - res[key] = value; - addErrorMessage(res, key, errorMessage, refs); -} - -const getRelativePath = (pathA, pathB) => { - let i = 0; - for (; i < pathA.length && i < pathB.length; i++) { - if (pathA[i] !== pathB[i]) - break; - } - return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/"); -}; - -function parseAnyDef(refs) { - if (refs.target !== "openAi") { - return {}; - } - const anyDefinitionPath = [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName, - ]; - refs.flags.hasReferencedOpenAiAnyType = true; - return { - $ref: refs.$refStrategy === "relative" - ? getRelativePath(anyDefinitionPath, refs.currentPath) - : anyDefinitionPath.join("/"), - }; -} - -function parseArrayDef(def, refs) { - const res = { - type: "array", - }; - if (def.type?._def && - def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) { - res.items = parseDef(def.type._def, { - ...refs, - currentPath: [...refs.currentPath, "items"], - }); - } - if (def.minLength) { - setResponseValueAndErrors(res, "minItems", def.minLength.value, def.minLength.message, refs); - } - if (def.maxLength) { - setResponseValueAndErrors(res, "maxItems", def.maxLength.value, def.maxLength.message, refs); - } - if (def.exactLength) { - setResponseValueAndErrors(res, "minItems", def.exactLength.value, def.exactLength.message, refs); - setResponseValueAndErrors(res, "maxItems", def.exactLength.value, def.exactLength.message, refs); - } - return res; -} - -function parseBigintDef(def, refs) { - const res = { - type: "integer", - format: "int64", - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } - else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } - else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; -} - -function parseBooleanDef() { - return { - type: "boolean", - }; -} - -function parseBrandedDef(_def, refs) { - return parseDef(_def.type._def, refs); -} - -const parseCatchDef = (def, refs) => { - return parseDef(def.innerType._def, refs); -}; - -function parseDateDef(def, refs, overrideDateStrategy) { - const strategy = overrideDateStrategy ?? refs.dateStrategy; - if (Array.isArray(strategy)) { - return { - anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)), - }; - } - switch (strategy) { - case "string": - case "format:date-time": - return { - type: "string", - format: "date-time", - }; - case "format:date": - return { - type: "string", - format: "date", - }; - case "integer": - return integerDateParser(def, refs); - } -} -const integerDateParser = (def, refs) => { - const res = { - type: "integer", - format: "unix-time", - }; - if (refs.target === "openApi3") { - return res; - } - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors(res, "minimum", check.value, - check.message, refs); - break; - case "max": - setResponseValueAndErrors(res, "maximum", check.value, - check.message, refs); - break; - } - } - return res; -}; - -function parseDefaultDef(_def, refs) { - return { - ...parseDef(_def.innerType._def, refs), - default: _def.defaultValue(), - }; -} - -function parseEffectsDef(_def, refs) { - return refs.effectStrategy === "input" - ? parseDef(_def.schema._def, refs) - : parseAnyDef(refs); -} - -function parseEnumDef(def) { - return { - type: "string", - enum: Array.from(def.values), - }; -} - -const isJsonSchema7AllOfType = (type) => { - if ("type" in type && type.type === "string") - return false; - return "allOf" in type; -}; -function parseIntersectionDef(def, refs) { - const allOf = [ - parseDef(def.left._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"], - }), - parseDef(def.right._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "1"], - }), - ].filter((x) => !!x); - let unevaluatedProperties = refs.target === "jsonSchema2019-09" - ? { unevaluatedProperties: false } - : undefined; - const mergedAllOf = []; - allOf.forEach((schema) => { - if (isJsonSchema7AllOfType(schema)) { - mergedAllOf.push(...schema.allOf); - if (schema.unevaluatedProperties === undefined) { - unevaluatedProperties = undefined; - } - } - else { - let nestedSchema = schema; - if ("additionalProperties" in schema && - schema.additionalProperties === false) { - const { additionalProperties, ...rest } = schema; - nestedSchema = rest; - } - else { - unevaluatedProperties = undefined; - } - mergedAllOf.push(nestedSchema); - } - }); - return mergedAllOf.length - ? { - allOf: mergedAllOf, - ...unevaluatedProperties, - } - : undefined; -} - -function parseLiteralDef(def, refs) { - const parsedType = typeof def.value; - if (parsedType !== "bigint" && - parsedType !== "number" && - parsedType !== "boolean" && - parsedType !== "string") { - return { - type: Array.isArray(def.value) ? "array" : "object", - }; - } - if (refs.target === "openApi3") { - return { - type: parsedType === "bigint" ? "integer" : parsedType, - enum: [def.value], - }; - } - return { - type: parsedType === "bigint" ? "integer" : parsedType, - const: def.value, - }; -} - -let emojiRegex = undefined; -const zodPatterns = { - cuid: /^[cC][^\s-]{8,}$/, - cuid2: /^[0-9a-z]+$/, - ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/, - email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/, - emoji: () => { - if (emojiRegex === undefined) { - emojiRegex = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u"); - } - return emojiRegex; - }, - uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/, - ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, - ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, - ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, - ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, - base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, - base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, - nanoid: /^[a-zA-Z0-9_-]{21}$/, - jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, -}; -function parseStringDef(def, refs) { - const res = { - type: "string", - }; - if (def.checks) { - for (const check of def.checks) { - switch (check.kind) { - case "min": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" - ? Math.max(res.minLength, check.value) - : check.value, check.message, refs); - break; - case "max": - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" - ? Math.min(res.maxLength, check.value) - : check.value, check.message, refs); - break; - case "email": - switch (refs.emailStrategy) { - case "format:email": - addFormat(res, "email", check.message, refs); - break; - case "format:idn-email": - addFormat(res, "idn-email", check.message, refs); - break; - case "pattern:zod": - addPattern(res, zodPatterns.email, check.message, refs); - break; - } - break; - case "url": - addFormat(res, "uri", check.message, refs); - break; - case "uuid": - addFormat(res, "uuid", check.message, refs); - break; - case "regex": - addPattern(res, check.regex, check.message, refs); - break; - case "cuid": - addPattern(res, zodPatterns.cuid, check.message, refs); - break; - case "cuid2": - addPattern(res, zodPatterns.cuid2, check.message, refs); - break; - case "startsWith": - addPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs); - break; - case "endsWith": - addPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs); - break; - case "datetime": - addFormat(res, "date-time", check.message, refs); - break; - case "date": - addFormat(res, "date", check.message, refs); - break; - case "time": - addFormat(res, "time", check.message, refs); - break; - case "duration": - addFormat(res, "duration", check.message, refs); - break; - case "length": - setResponseValueAndErrors(res, "minLength", typeof res.minLength === "number" - ? Math.max(res.minLength, check.value) - : check.value, check.message, refs); - setResponseValueAndErrors(res, "maxLength", typeof res.maxLength === "number" - ? Math.min(res.maxLength, check.value) - : check.value, check.message, refs); - break; - case "includes": { - addPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs); - break; - } - case "ip": { - if (check.version !== "v6") { - addFormat(res, "ipv4", check.message, refs); - } - if (check.version !== "v4") { - addFormat(res, "ipv6", check.message, refs); - } - break; - } - case "base64url": - addPattern(res, zodPatterns.base64url, check.message, refs); - break; - case "jwt": - addPattern(res, zodPatterns.jwt, check.message, refs); - break; - case "cidr": { - if (check.version !== "v6") { - addPattern(res, zodPatterns.ipv4Cidr, check.message, refs); - } - if (check.version !== "v4") { - addPattern(res, zodPatterns.ipv6Cidr, check.message, refs); - } - break; - } - case "emoji": - addPattern(res, zodPatterns.emoji(), check.message, refs); - break; - case "ulid": { - addPattern(res, zodPatterns.ulid, check.message, refs); - break; - } - case "base64": { - switch (refs.base64Strategy) { - case "format:binary": { - addFormat(res, "binary", check.message, refs); - break; - } - case "contentEncoding:base64": { - setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs); - break; - } - case "pattern:zod": { - addPattern(res, zodPatterns.base64, check.message, refs); - break; - } - } - break; - } - case "nanoid": { - addPattern(res, zodPatterns.nanoid, check.message, refs); - } - } - } - } - return res; -} -function escapeLiteralCheckValue(literal, refs) { - return refs.patternStrategy === "escape" - ? escapeNonAlphaNumeric(literal) - : literal; -} -const ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"); -function escapeNonAlphaNumeric(source) { - let result = ""; - for (let i = 0; i < source.length; i++) { - if (!ALPHA_NUMERIC.has(source[i])) { - result += "\\"; - } - result += source[i]; - } - return result; -} -function addFormat(schema, value, message, refs) { - if (schema.format || schema.anyOf?.some((x) => x.format)) { - if (!schema.anyOf) { - schema.anyOf = []; - } - if (schema.format) { - schema.anyOf.push({ - format: schema.format, - ...(schema.errorMessage && - refs.errorMessages && { - errorMessage: { format: schema.errorMessage.format }, - }), - }); - delete schema.format; - if (schema.errorMessage) { - delete schema.errorMessage.format; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } - } - schema.anyOf.push({ - format: value, - ...(message && - refs.errorMessages && { errorMessage: { format: message } }), - }); - } - else { - setResponseValueAndErrors(schema, "format", value, message, refs); - } -} -function addPattern(schema, regex, message, refs) { - if (schema.pattern || schema.allOf?.some((x) => x.pattern)) { - if (!schema.allOf) { - schema.allOf = []; - } - if (schema.pattern) { - schema.allOf.push({ - pattern: schema.pattern, - ...(schema.errorMessage && - refs.errorMessages && { - errorMessage: { pattern: schema.errorMessage.pattern }, - }), - }); - delete schema.pattern; - if (schema.errorMessage) { - delete schema.errorMessage.pattern; - if (Object.keys(schema.errorMessage).length === 0) { - delete schema.errorMessage; - } - } - } - schema.allOf.push({ - pattern: stringifyRegExpWithFlags(regex, refs), - ...(message && - refs.errorMessages && { errorMessage: { pattern: message } }), - }); - } - else { - setResponseValueAndErrors(schema, "pattern", stringifyRegExpWithFlags(regex, refs), message, refs); - } -} -function stringifyRegExpWithFlags(regex, refs) { - if (!refs.applyRegexFlags || !regex.flags) { - return regex.source; - } - const flags = { - i: regex.flags.includes("i"), - m: regex.flags.includes("m"), - s: regex.flags.includes("s"), - }; - const source = flags.i ? regex.source.toLowerCase() : regex.source; - let pattern = ""; - let isEscaped = false; - let inCharGroup = false; - let inCharRange = false; - for (let i = 0; i < source.length; i++) { - if (isEscaped) { - pattern += source[i]; - isEscaped = false; - continue; - } - if (flags.i) { - if (inCharGroup) { - if (source[i].match(/[a-z]/)) { - if (inCharRange) { - pattern += source[i]; - pattern += `${source[i - 2]}-${source[i]}`.toUpperCase(); - inCharRange = false; - } - else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) { - pattern += source[i]; - inCharRange = true; - } - else { - pattern += `${source[i]}${source[i].toUpperCase()}`; - } - continue; - } - } - else if (source[i].match(/[a-z]/)) { - pattern += `[${source[i]}${source[i].toUpperCase()}]`; - continue; - } - } - if (flags.m) { - if (source[i] === "^") { - pattern += `(^|(?<=[\r\n]))`; - continue; - } - else if (source[i] === "$") { - pattern += `($|(?=[\r\n]))`; - continue; - } - } - if (flags.s && source[i] === ".") { - pattern += inCharGroup ? `${source[i]}\r\n` : `[${source[i]}\r\n]`; - continue; - } - pattern += source[i]; - if (source[i] === "\\") { - isEscaped = true; - } - else if (inCharGroup && source[i] === "]") { - inCharGroup = false; - } - else if (!inCharGroup && source[i] === "[") { - inCharGroup = true; - } - } - try { - new RegExp(pattern); - } - catch { - console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`); - return regex.source; - } - return pattern; -} - -function parseRecordDef(def, refs) { - if (refs.target === "openAi") { - console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); - } - if (refs.target === "openApi3" && - def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { - return { - type: "object", - required: def.keyType._def.values, - properties: def.keyType._def.values.reduce((acc, key) => ({ - ...acc, - [key]: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", key], - }) ?? parseAnyDef(refs), - }), {}), - additionalProperties: refs.rejectedAdditionalProperties, - }; - } - const schema = { - type: "object", - additionalProperties: parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"], - }) ?? refs.allowedAdditionalProperties, - }; - if (refs.target === "openApi3") { - return schema; - } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && - def.keyType._def.checks?.length) { - const { type, ...keyType } = parseStringDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType, - }; - } - else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) { - return { - ...schema, - propertyNames: { - enum: def.keyType._def.values, - }, - }; - } - else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && - def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && - def.keyType._def.type._def.checks?.length) { - const { type, ...keyType } = parseBrandedDef(def.keyType._def, refs); - return { - ...schema, - propertyNames: keyType, - }; - } - return schema; -} - -function parseMapDef(def, refs) { - if (refs.mapStrategy === "record") { - return parseRecordDef(def, refs); - } - const keys = parseDef(def.keyType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "0"], - }) || parseAnyDef(refs); - const values = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items", "items", "1"], - }) || parseAnyDef(refs); - return { - type: "array", - maxItems: 125, - items: { - type: "array", - items: [keys, values], - minItems: 2, - maxItems: 2, - }, - }; -} - -function parseNativeEnumDef(def) { - const object = def.values; - const actualKeys = Object.keys(def.values).filter((key) => { - return typeof object[object[key]] !== "number"; - }); - const actualValues = actualKeys.map((key) => object[key]); - const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values))); - return { - type: parsedTypes.length === 1 - ? parsedTypes[0] === "string" - ? "string" - : "number" - : ["string", "number"], - enum: actualValues, - }; -} - -function parseNeverDef(refs) { - return refs.target === "openAi" - ? undefined - : { - not: parseAnyDef({ - ...refs, - currentPath: [...refs.currentPath, "not"], - }), - }; -} - -function parseNullDef(refs) { - return refs.target === "openApi3" - ? { - enum: ["null"], - nullable: true, - } - : { - type: "null", - }; -} - -const primitiveMappings = { - ZodString: "string", - ZodNumber: "number", - ZodBigInt: "integer", - ZodBoolean: "boolean", - ZodNull: "null", -}; -function parseUnionDef(def, refs) { - if (refs.target === "openApi3") - return asAnyOf(def, refs); - const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options; - if (options.every((x) => x._def.typeName in primitiveMappings && - (!x._def.checks || !x._def.checks.length))) { - const types = options.reduce((types, x) => { - const type = primitiveMappings[x._def.typeName]; - return type && !types.includes(type) ? [...types, type] : types; - }, []); - return { - type: types.length > 1 ? types : types[0], - }; - } - else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) { - const types = options.reduce((acc, x) => { - const type = typeof x._def.value; - switch (type) { - case "string": - case "number": - case "boolean": - return [...acc, type]; - case "bigint": - return [...acc, "integer"]; - case "object": - if (x._def.value === null) - return [...acc, "null"]; - case "symbol": - case "undefined": - case "function": - default: - return acc; - } - }, []); - if (types.length === options.length) { - const uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i); - return { - type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0], - enum: options.reduce((acc, x) => { - return acc.includes(x._def.value) ? acc : [...acc, x._def.value]; - }, []), - }; - } - } - else if (options.every((x) => x._def.typeName === "ZodEnum")) { - return { - type: "string", - enum: options.reduce((acc, x) => [ - ...acc, - ...x._def.values.filter((x) => !acc.includes(x)), - ], []), - }; - } - return asAnyOf(def, refs); -} -const asAnyOf = (def, refs) => { - const anyOf = (def.options instanceof Map - ? Array.from(def.options.values()) - : def.options) - .map((x, i) => parseDef(x._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", `${i}`], - })) - .filter((x) => !!x && - (!refs.strictUnions || - (typeof x === "object" && Object.keys(x).length > 0))); - return anyOf.length ? { anyOf } : undefined; -}; - -function parseNullableDef(def, refs) { - if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && - (!def.innerType._def.checks || !def.innerType._def.checks.length)) { - if (refs.target === "openApi3") { - return { - type: primitiveMappings[def.innerType._def.typeName], - nullable: true, - }; - } - return { - type: [ - primitiveMappings[def.innerType._def.typeName], - "null", - ], - }; - } - if (refs.target === "openApi3") { - const base = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath], - }); - if (base && "$ref" in base) - return { allOf: [base], nullable: true }; - return base && { ...base, nullable: true }; - } - const base = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "0"], - }); - return base && { anyOf: [base, { type: "null" }] }; -} - -function parseNumberDef(def, refs) { - const res = { - type: "number", - }; - if (!def.checks) - return res; - for (const check of def.checks) { - switch (check.kind) { - case "int": - res.type = "integer"; - addErrorMessage(res, "type", check.message, refs); - break; - case "min": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - else { - setResponseValueAndErrors(res, "exclusiveMinimum", check.value, check.message, refs); - } - } - else { - if (!check.inclusive) { - res.exclusiveMinimum = true; - } - setResponseValueAndErrors(res, "minimum", check.value, check.message, refs); - } - break; - case "max": - if (refs.target === "jsonSchema7") { - if (check.inclusive) { - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - else { - setResponseValueAndErrors(res, "exclusiveMaximum", check.value, check.message, refs); - } - } - else { - if (!check.inclusive) { - res.exclusiveMaximum = true; - } - setResponseValueAndErrors(res, "maximum", check.value, check.message, refs); - } - break; - case "multipleOf": - setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs); - break; - } - } - return res; -} - -function parseObjectDef(def, refs) { - const forceOptionalIntoNullable = refs.target === "openAi"; - const result = { - type: "object", - properties: {}, - }; - const required = []; - const shape = def.shape(); - for (const propName in shape) { - let propDef = shape[propName]; - if (propDef === undefined || propDef._def === undefined) { - continue; - } - let propOptional = safeIsOptional(propDef); - if (propOptional && forceOptionalIntoNullable) { - if (propDef._def.typeName === "ZodOptional") { - propDef = propDef._def.innerType; - } - if (!propDef.isNullable()) { - propDef = propDef.nullable(); - } - propOptional = false; - } - const parsedDef = parseDef(propDef._def, { - ...refs, - currentPath: [...refs.currentPath, "properties", propName], - propertyPath: [...refs.currentPath, "properties", propName], - }); - if (parsedDef === undefined) { - continue; - } - result.properties[propName] = parsedDef; - if (!propOptional) { - required.push(propName); - } - } - if (required.length) { - result.required = required; - } - const additionalProperties = decideAdditionalProperties(def, refs); - if (additionalProperties !== undefined) { - result.additionalProperties = additionalProperties; - } - return result; -} -function decideAdditionalProperties(def, refs) { - if (def.catchall._def.typeName !== "ZodNever") { - return parseDef(def.catchall._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalProperties"], - }); - } - switch (def.unknownKeys) { - case "passthrough": - return refs.allowedAdditionalProperties; - case "strict": - return refs.rejectedAdditionalProperties; - case "strip": - return refs.removeAdditionalStrategy === "strict" - ? refs.allowedAdditionalProperties - : refs.rejectedAdditionalProperties; - } -} -function safeIsOptional(schema) { - try { - return schema.isOptional(); - } - catch { - return true; - } -} - -const parseOptionalDef = (def, refs) => { - if (refs.currentPath.toString() === refs.propertyPath?.toString()) { - return parseDef(def.innerType._def, refs); - } - const innerSchema = parseDef(def.innerType._def, { - ...refs, - currentPath: [...refs.currentPath, "anyOf", "1"], - }); - return innerSchema - ? { - anyOf: [ - { - not: parseAnyDef(refs), - }, - innerSchema, - ], - } - : parseAnyDef(refs); -}; - -const parsePipelineDef = (def, refs) => { - if (refs.pipeStrategy === "input") { - return parseDef(def.in._def, refs); - } - else if (refs.pipeStrategy === "output") { - return parseDef(def.out._def, refs); - } - const a = parseDef(def.in._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", "0"], - }); - const b = parseDef(def.out._def, { - ...refs, - currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"], - }); - return { - allOf: [a, b].filter((x) => x !== undefined), - }; -}; - -function parsePromiseDef(def, refs) { - return parseDef(def.type._def, refs); -} - -function parseSetDef(def, refs) { - const items = parseDef(def.valueType._def, { - ...refs, - currentPath: [...refs.currentPath, "items"], - }); - const schema = { - type: "array", - uniqueItems: true, - items, - }; - if (def.minSize) { - setResponseValueAndErrors(schema, "minItems", def.minSize.value, def.minSize.message, refs); - } - if (def.maxSize) { - setResponseValueAndErrors(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs); - } - return schema; -} - -function parseTupleDef(def, refs) { - if (def.rest) { - return { - type: "array", - minItems: def.items.length, - items: def.items - .map((x, i) => parseDef(x._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i}`], - })) - .reduce((acc, x) => (x === undefined ? acc : [...acc, x]), []), - additionalItems: parseDef(def.rest._def, { - ...refs, - currentPath: [...refs.currentPath, "additionalItems"], - }), - }; - } - else { - return { - type: "array", - minItems: def.items.length, - maxItems: def.items.length, - items: def.items - .map((x, i) => parseDef(x._def, { - ...refs, - currentPath: [...refs.currentPath, "items", `${i}`], - })) - .reduce((acc, x) => (x === undefined ? acc : [...acc, x]), []), - }; - } -} - -function parseUndefinedDef(refs) { - return { - not: parseAnyDef(refs), - }; -} - -function parseUnknownDef(refs) { - return parseAnyDef(refs); -} - -const parseReadonlyDef = (def, refs) => { - return parseDef(def.innerType._def, refs); -}; - -const selectParser = (def, typeName, refs) => { - switch (typeName) { - case ZodFirstPartyTypeKind.ZodString: - return parseStringDef(def, refs); - case ZodFirstPartyTypeKind.ZodNumber: - return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind.ZodObject: - return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind.ZodBigInt: - return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind.ZodBoolean: - return parseBooleanDef(); - case ZodFirstPartyTypeKind.ZodDate: - return parseDateDef(def, refs); - case ZodFirstPartyTypeKind.ZodUndefined: - return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind.ZodNull: - return parseNullDef(refs); - case ZodFirstPartyTypeKind.ZodArray: - return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind.ZodUnion: - case ZodFirstPartyTypeKind.ZodDiscriminatedUnion: - return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind.ZodIntersection: - return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind.ZodTuple: - return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind.ZodRecord: - return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind.ZodLiteral: - return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind.ZodEnum: - return parseEnumDef(def); - case ZodFirstPartyTypeKind.ZodNativeEnum: - return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind.ZodNullable: - return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind.ZodOptional: - return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind.ZodMap: - return parseMapDef(def, refs); - case ZodFirstPartyTypeKind.ZodSet: - return parseSetDef(def, refs); - case ZodFirstPartyTypeKind.ZodLazy: - return () => def.getter()._def; - case ZodFirstPartyTypeKind.ZodPromise: - return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind.ZodNaN: - case ZodFirstPartyTypeKind.ZodNever: - return parseNeverDef(refs); - case ZodFirstPartyTypeKind.ZodEffects: - return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind.ZodAny: - return parseAnyDef(refs); - case ZodFirstPartyTypeKind.ZodUnknown: - return parseUnknownDef(refs); - case ZodFirstPartyTypeKind.ZodDefault: - return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind.ZodBranded: - return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind.ZodReadonly: - return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind.ZodCatch: - return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind.ZodPipeline: - return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind.ZodFunction: - case ZodFirstPartyTypeKind.ZodVoid: - case ZodFirstPartyTypeKind.ZodSymbol: - return undefined; - default: - return ((_) => undefined)(); - } -}; - -function parseDef(def, refs, forceResolution = false) { - const seenItem = refs.seen.get(def); - if (refs.override) { - const overrideResult = refs.override?.(def, refs, seenItem, forceResolution); - if (overrideResult !== ignoreOverride) { - return overrideResult; - } - } - if (seenItem && !forceResolution) { - const seenSchema = get$ref(seenItem, refs); - if (seenSchema !== undefined) { - return seenSchema; - } - } - const newItem = { def, path: refs.currentPath, jsonSchema: undefined }; - refs.seen.set(def, newItem); - const jsonSchemaOrGetter = selectParser(def, def.typeName, refs); - const jsonSchema = typeof jsonSchemaOrGetter === "function" - ? parseDef(jsonSchemaOrGetter(), refs) - : jsonSchemaOrGetter; - if (jsonSchema) { - addMeta(def, refs, jsonSchema); - } - if (refs.postProcess) { - const postProcessResult = refs.postProcess(jsonSchema, def, refs); - newItem.jsonSchema = jsonSchema; - return postProcessResult; - } - newItem.jsonSchema = jsonSchema; - return jsonSchema; -} -const get$ref = (item, refs) => { - switch (refs.$refStrategy) { - case "root": - return { $ref: item.path.join("/") }; - case "relative": - return { $ref: getRelativePath(refs.currentPath, item.path) }; - case "none": - case "seen": { - if (item.path.length < refs.currentPath.length && - item.path.every((value, index) => refs.currentPath[index] === value)) { - console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`); - return parseAnyDef(refs); - } - return refs.$refStrategy === "seen" ? parseAnyDef(refs) : undefined; - } - } -}; -const addMeta = (def, refs, jsonSchema) => { - if (def.description) { - jsonSchema.description = def.description; - if (refs.markdownDescription) { - jsonSchema.markdownDescription = def.description; - } - } - return jsonSchema; -}; - -const zodToJsonSchema = (schema, options) => { - const refs = getRefs(options); - let definitions = typeof options === "object" && options.definitions - ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({ - ...acc, - [name]: parseDef(schema._def, { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name], - }, true) ?? parseAnyDef(refs), - }), {}) - : undefined; - const name = typeof options === "string" - ? options - : options?.nameStrategy === "title" - ? undefined - : options?.name; - const main = parseDef(schema._def, name === undefined - ? refs - : { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name], - }, false) ?? parseAnyDef(refs); - const title = typeof options === "object" && - options.name !== undefined && - options.nameStrategy === "title" - ? options.name - : undefined; - if (title !== undefined) { - main.title = title; - } - if (refs.flags.hasReferencedOpenAiAnyType) { - if (!definitions) { - definitions = {}; - } - if (!definitions[refs.openAiAnyTypeName]) { - definitions[refs.openAiAnyTypeName] = { - type: ["string", "number", "integer", "boolean", "array", "null"], - items: { - $ref: refs.$refStrategy === "relative" - ? "1" - : [ - ...refs.basePath, - refs.definitionPath, - refs.openAiAnyTypeName, - ].join("/"), - }, - }; - } - } - const combined = name === undefined - ? definitions - ? { - ...main, - [refs.definitionPath]: definitions, - } - : main - : { - $ref: [ - ...(refs.$refStrategy === "relative" ? [] : refs.basePath), - refs.definitionPath, - name, - ].join("/"), - [refs.definitionPath]: { - ...definitions, - [name]: main, - }, - }; - if (refs.target === "jsonSchema7") { - combined.$schema = "http://json-schema.org/draft-07/schema#"; - } - else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") { - combined.$schema = "https://json-schema.org/draft/2019-09/schema#"; - } - if (refs.target === "openAi" && - ("anyOf" in combined || - "oneOf" in combined || - "allOf" in combined || - ("type" in combined && Array.isArray(combined.type)))) { - console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."); - } - return combined; -}; - -function mapMiniTarget(t) { - if (!t) - return 'draft-7'; - if (t === 'jsonSchema7' || t === 'draft-7') - return 'draft-7'; - if (t === 'jsonSchema2019-09' || t === 'draft-2020-12') - return 'draft-2020-12'; - return 'draft-7'; -} -function toJsonSchemaCompat(schema, opts) { - if (isZ4Schema(schema)) { - return toJSONSchema(schema, { - target: mapMiniTarget(opts?.target), - io: opts?.pipeStrategy ?? 'input' - }); - } - return zodToJsonSchema(schema, { - strictUnions: opts?.strictUnions ?? true, - pipeStrategy: opts?.pipeStrategy ?? 'input' - }); -} -function getMethodLiteral(schema) { - const shape = getObjectShape(schema); - const methodSchema = shape?.method; - if (!methodSchema) { - throw new Error('Schema is missing a method literal'); - } - const value = getLiteralValue(methodSchema); - if (typeof value !== 'string') { - throw new Error('Schema method literal must be a string'); - } - return value; -} -function parseWithCompat(schema, data) { - const result = safeParse$1(schema, data); - if (!result.success) { - throw result.error; - } - return result.data; -} - -const DEFAULT_REQUEST_TIMEOUT_MSEC = 60000; -class Protocol { - constructor(_options) { - this._options = _options; - this._requestMessageId = 0; - this._requestHandlers = new Map(); - this._requestHandlerAbortControllers = new Map(); - this._notificationHandlers = new Map(); - this._responseHandlers = new Map(); - this._progressHandlers = new Map(); - this._timeoutInfo = new Map(); - this._pendingDebouncedNotifications = new Set(); - this._taskProgressTokens = new Map(); - this._requestResolvers = new Map(); - this.setNotificationHandler(CancelledNotificationSchema, notification => { - this._oncancel(notification); - }); - this.setNotificationHandler(ProgressNotificationSchema, notification => { - this._onprogress(notification); - }); - this.setRequestHandler(PingRequestSchema, - _request => ({})); - this._taskStore = _options?.taskStore; - this._taskMessageQueue = _options?.taskMessageQueue; - if (this._taskStore) { - this.setRequestHandler(GetTaskRequestSchema, async (request, extra) => { - const task = await this._taskStore.getTask(request.params.taskId, extra.sessionId); - if (!task) { - throw new McpError(ErrorCode$1.InvalidParams, 'Failed to retrieve task: Task not found'); - } - return { - ...task - }; - }); - this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => { - const handleTaskResult = async () => { - const taskId = request.params.taskId; - if (this._taskMessageQueue) { - let queuedMessage; - while ((queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId))) { - if (queuedMessage.type === 'response' || queuedMessage.type === 'error') { - const message = queuedMessage.message; - const requestId = message.id; - const resolver = this._requestResolvers.get(requestId); - if (resolver) { - this._requestResolvers.delete(requestId); - if (queuedMessage.type === 'response') { - resolver(message); - } - else { - const errorMessage = message; - const error = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data); - resolver(error); - } - } - else { - const messageType = queuedMessage.type === 'response' ? 'Response' : 'Error'; - this._onerror(new Error(`${messageType} handler missing for request ${requestId}`)); - } - continue; - } - await this._transport?.send(queuedMessage.message, { relatedRequestId: extra.requestId }); - } - } - const task = await this._taskStore.getTask(taskId, extra.sessionId); - if (!task) { - throw new McpError(ErrorCode$1.InvalidParams, `Task not found: ${taskId}`); - } - if (!isTerminal(task.status)) { - await this._waitForTaskUpdate(taskId, extra.signal); - return await handleTaskResult(); - } - if (isTerminal(task.status)) { - const result = await this._taskStore.getTaskResult(taskId, extra.sessionId); - this._clearTaskQueue(taskId); - return { - ...result, - _meta: { - ...result._meta, - [RELATED_TASK_META_KEY]: { - taskId: taskId - } - } - }; - } - return await handleTaskResult(); - }; - return await handleTaskResult(); - }); - this.setRequestHandler(ListTasksRequestSchema, async (request, extra) => { - try { - const { tasks, nextCursor } = await this._taskStore.listTasks(request.params?.cursor, extra.sessionId); - return { - tasks, - nextCursor, - _meta: {} - }; - } - catch (error) { - throw new McpError(ErrorCode$1.InvalidParams, `Failed to list tasks: ${error instanceof Error ? error.message : String(error)}`); - } - }); - this.setRequestHandler(CancelTaskRequestSchema, async (request, extra) => { - try { - const task = await this._taskStore.getTask(request.params.taskId, extra.sessionId); - if (!task) { - throw new McpError(ErrorCode$1.InvalidParams, `Task not found: ${request.params.taskId}`); - } - if (isTerminal(task.status)) { - throw new McpError(ErrorCode$1.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`); - } - await this._taskStore.updateTaskStatus(request.params.taskId, 'cancelled', 'Client cancelled task execution.', extra.sessionId); - this._clearTaskQueue(request.params.taskId); - const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId); - if (!cancelledTask) { - throw new McpError(ErrorCode$1.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`); - } - return { - _meta: {}, - ...cancelledTask - }; - } - catch (error) { - if (error instanceof McpError) { - throw error; - } - throw new McpError(ErrorCode$1.InvalidRequest, `Failed to cancel task: ${error instanceof Error ? error.message : String(error)}`); - } - }); - } - } - async _oncancel(notification) { - if (!notification.params.requestId) { - return; - } - const controller = this._requestHandlerAbortControllers.get(notification.params.requestId); - controller?.abort(notification.params.reason); - } - _setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) { - this._timeoutInfo.set(messageId, { - timeoutId: setTimeout(onTimeout, timeout), - startTime: Date.now(), - timeout, - maxTotalTimeout, - resetTimeoutOnProgress, - onTimeout - }); - } - _resetTimeout(messageId) { - const info = this._timeoutInfo.get(messageId); - if (!info) - return false; - const totalElapsed = Date.now() - info.startTime; - if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) { - this._timeoutInfo.delete(messageId); - throw McpError.fromError(ErrorCode$1.RequestTimeout, 'Maximum total timeout exceeded', { - maxTotalTimeout: info.maxTotalTimeout, - totalElapsed - }); - } - clearTimeout(info.timeoutId); - info.timeoutId = setTimeout(info.onTimeout, info.timeout); - return true; - } - _cleanupTimeout(messageId) { - const info = this._timeoutInfo.get(messageId); - if (info) { - clearTimeout(info.timeoutId); - this._timeoutInfo.delete(messageId); - } - } - async connect(transport) { - if (this._transport) { - throw new Error('Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.'); - } - this._transport = transport; - const _onclose = this.transport?.onclose; - this._transport.onclose = () => { - _onclose?.(); - this._onclose(); - }; - const _onerror = this.transport?.onerror; - this._transport.onerror = (error) => { - _onerror?.(error); - this._onerror(error); - }; - const _onmessage = this._transport?.onmessage; - this._transport.onmessage = (message, extra) => { - _onmessage?.(message, extra); - if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) { - this._onresponse(message); - } - else if (isJSONRPCRequest(message)) { - this._onrequest(message, extra); - } - else if (isJSONRPCNotification(message)) { - this._onnotification(message); - } - else { - this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`)); - } - }; - await this._transport.start(); - } - _onclose() { - const responseHandlers = this._responseHandlers; - this._responseHandlers = new Map(); - this._progressHandlers.clear(); - this._taskProgressTokens.clear(); - this._pendingDebouncedNotifications.clear(); - for (const info of this._timeoutInfo.values()) { - clearTimeout(info.timeoutId); - } - this._timeoutInfo.clear(); - for (const controller of this._requestHandlerAbortControllers.values()) { - controller.abort(); - } - this._requestHandlerAbortControllers.clear(); - const error = McpError.fromError(ErrorCode$1.ConnectionClosed, 'Connection closed'); - this._transport = undefined; - this.onclose?.(); - for (const handler of responseHandlers.values()) { - handler(error); - } - } - _onerror(error) { - this.onerror?.(error); - } - _onnotification(notification) { - const handler = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler; - if (handler === undefined) { - return; - } - Promise.resolve() - .then(() => handler(notification)) - .catch(error => this._onerror(new Error(`Uncaught error in notification handler: ${error}`))); - } - _onrequest(request, extra) { - const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler; - const capturedTransport = this._transport; - const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId; - if (handler === undefined) { - const errorResponse = { - jsonrpc: '2.0', - id: request.id, - error: { - code: ErrorCode$1.MethodNotFound, - message: 'Method not found' - } - }; - if (relatedTaskId && this._taskMessageQueue) { - this._enqueueTaskMessage(relatedTaskId, { - type: 'error', - message: errorResponse, - timestamp: Date.now() - }, capturedTransport?.sessionId).catch(error => this._onerror(new Error(`Failed to enqueue error response: ${error}`))); - } - else { - capturedTransport - ?.send(errorResponse) - .catch(error => this._onerror(new Error(`Failed to send an error response: ${error}`))); - } - return; - } - const abortController = new AbortController(); - this._requestHandlerAbortControllers.set(request.id, abortController); - const taskCreationParams = isTaskAugmentedRequestParams(request.params) ? request.params.task : undefined; - const taskStore = this._taskStore ? this.requestTaskStore(request, capturedTransport?.sessionId) : undefined; - const fullExtra = { - signal: abortController.signal, - sessionId: capturedTransport?.sessionId, - _meta: request.params?._meta, - sendNotification: async (notification) => { - if (abortController.signal.aborted) - return; - const notificationOptions = { relatedRequestId: request.id }; - if (relatedTaskId) { - notificationOptions.relatedTask = { taskId: relatedTaskId }; - } - await this.notification(notification, notificationOptions); - }, - sendRequest: async (r, resultSchema, options) => { - if (abortController.signal.aborted) { - throw new McpError(ErrorCode$1.ConnectionClosed, 'Request was cancelled'); - } - const requestOptions = { ...options, relatedRequestId: request.id }; - if (relatedTaskId && !requestOptions.relatedTask) { - requestOptions.relatedTask = { taskId: relatedTaskId }; - } - const effectiveTaskId = requestOptions.relatedTask?.taskId ?? relatedTaskId; - if (effectiveTaskId && taskStore) { - await taskStore.updateTaskStatus(effectiveTaskId, 'input_required'); - } - return await this.request(r, resultSchema, requestOptions); - }, - authInfo: extra?.authInfo, - requestId: request.id, - requestInfo: extra?.requestInfo, - taskId: relatedTaskId, - taskStore: taskStore, - taskRequestedTtl: taskCreationParams?.ttl, - closeSSEStream: extra?.closeSSEStream, - closeStandaloneSSEStream: extra?.closeStandaloneSSEStream - }; - Promise.resolve() - .then(() => { - if (taskCreationParams) { - this.assertTaskHandlerCapability(request.method); - } - }) - .then(() => handler(request, fullExtra)) - .then(async (result) => { - if (abortController.signal.aborted) { - return; - } - const response = { - result, - jsonrpc: '2.0', - id: request.id - }; - if (relatedTaskId && this._taskMessageQueue) { - await this._enqueueTaskMessage(relatedTaskId, { - type: 'response', - message: response, - timestamp: Date.now() - }, capturedTransport?.sessionId); - } - else { - await capturedTransport?.send(response); - } - }, async (error) => { - if (abortController.signal.aborted) { - return; - } - const errorResponse = { - jsonrpc: '2.0', - id: request.id, - error: { - code: Number.isSafeInteger(error['code']) ? error['code'] : ErrorCode$1.InternalError, - message: error.message ?? 'Internal error', - ...(error['data'] !== undefined && { data: error['data'] }) - } - }; - if (relatedTaskId && this._taskMessageQueue) { - await this._enqueueTaskMessage(relatedTaskId, { - type: 'error', - message: errorResponse, - timestamp: Date.now() - }, capturedTransport?.sessionId); - } - else { - await capturedTransport?.send(errorResponse); - } - }) - .catch(error => this._onerror(new Error(`Failed to send response: ${error}`))) - .finally(() => { - if (this._requestHandlerAbortControllers.get(request.id) === abortController) { - this._requestHandlerAbortControllers.delete(request.id); - } - }); - } - _onprogress(notification) { - const { progressToken, ...params } = notification.params; - const messageId = Number(progressToken); - const handler = this._progressHandlers.get(messageId); - if (!handler) { - this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`)); - return; - } - const responseHandler = this._responseHandlers.get(messageId); - const timeoutInfo = this._timeoutInfo.get(messageId); - if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) { - try { - this._resetTimeout(messageId); - } - catch (error) { - this._responseHandlers.delete(messageId); - this._progressHandlers.delete(messageId); - this._cleanupTimeout(messageId); - responseHandler(error); - return; - } - } - handler(params); - } - _onresponse(response) { - const messageId = Number(response.id); - const resolver = this._requestResolvers.get(messageId); - if (resolver) { - this._requestResolvers.delete(messageId); - if (isJSONRPCResultResponse(response)) { - resolver(response); - } - else { - const error = new McpError(response.error.code, response.error.message, response.error.data); - resolver(error); - } - return; - } - const handler = this._responseHandlers.get(messageId); - if (handler === undefined) { - this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`)); - return; - } - this._responseHandlers.delete(messageId); - this._cleanupTimeout(messageId); - let isTaskResponse = false; - if (isJSONRPCResultResponse(response) && response.result && typeof response.result === 'object') { - const result = response.result; - if (result.task && typeof result.task === 'object') { - const task = result.task; - if (typeof task.taskId === 'string') { - isTaskResponse = true; - this._taskProgressTokens.set(task.taskId, messageId); - } - } - } - if (!isTaskResponse) { - this._progressHandlers.delete(messageId); - } - if (isJSONRPCResultResponse(response)) { - handler(response); - } - else { - const error = McpError.fromError(response.error.code, response.error.message, response.error.data); - handler(error); - } - } - get transport() { - return this._transport; - } - async close() { - await this._transport?.close(); - } - async *requestStream(request, resultSchema, options) { - const { task } = options ?? {}; - if (!task) { - try { - const result = await this.request(request, resultSchema, options); - yield { type: 'result', result }; - } - catch (error) { - yield { - type: 'error', - error: error instanceof McpError ? error : new McpError(ErrorCode$1.InternalError, String(error)) - }; - } - return; - } - let taskId; - try { - const createResult = await this.request(request, CreateTaskResultSchema, options); - if (createResult.task) { - taskId = createResult.task.taskId; - yield { type: 'taskCreated', task: createResult.task }; - } - else { - throw new McpError(ErrorCode$1.InternalError, 'Task creation did not return a task'); - } - while (true) { - const task = await this.getTask({ taskId }, options); - yield { type: 'taskStatus', task }; - if (isTerminal(task.status)) { - if (task.status === 'completed') { - const result = await this.getTaskResult({ taskId }, resultSchema, options); - yield { type: 'result', result }; - } - else if (task.status === 'failed') { - yield { - type: 'error', - error: new McpError(ErrorCode$1.InternalError, `Task ${taskId} failed`) - }; - } - else if (task.status === 'cancelled') { - yield { - type: 'error', - error: new McpError(ErrorCode$1.InternalError, `Task ${taskId} was cancelled`) - }; - } - return; - } - if (task.status === 'input_required') { - const result = await this.getTaskResult({ taskId }, resultSchema, options); - yield { type: 'result', result }; - return; - } - const pollInterval = task.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1000; - await new Promise(resolve => setTimeout(resolve, pollInterval)); - options?.signal?.throwIfAborted(); - } - } - catch (error) { - yield { - type: 'error', - error: error instanceof McpError ? error : new McpError(ErrorCode$1.InternalError, String(error)) - }; - } - } - request(request, resultSchema, options) { - const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {}; - return new Promise((resolve, reject) => { - const earlyReject = (error) => { - reject(error); - }; - if (!this._transport) { - earlyReject(new Error('Not connected')); - return; - } - if (this._options?.enforceStrictCapabilities === true) { - try { - this.assertCapabilityForMethod(request.method); - if (task) { - this.assertTaskCapability(request.method); - } - } - catch (e) { - earlyReject(e); - return; - } - } - options?.signal?.throwIfAborted(); - const messageId = this._requestMessageId++; - const jsonrpcRequest = { - ...request, - jsonrpc: '2.0', - id: messageId - }; - if (options?.onprogress) { - this._progressHandlers.set(messageId, options.onprogress); - jsonrpcRequest.params = { - ...request.params, - _meta: { - ...(request.params?._meta || {}), - progressToken: messageId - } - }; - } - if (task) { - jsonrpcRequest.params = { - ...jsonrpcRequest.params, - task: task - }; - } - if (relatedTask) { - jsonrpcRequest.params = { - ...jsonrpcRequest.params, - _meta: { - ...(jsonrpcRequest.params?._meta || {}), - [RELATED_TASK_META_KEY]: relatedTask - } - }; - } - const cancel = (reason) => { - this._responseHandlers.delete(messageId); - this._progressHandlers.delete(messageId); - this._cleanupTimeout(messageId); - this._transport - ?.send({ - jsonrpc: '2.0', - method: 'notifications/cancelled', - params: { - requestId: messageId, - reason: String(reason) - } - }, { relatedRequestId, resumptionToken, onresumptiontoken }) - .catch(error => this._onerror(new Error(`Failed to send cancellation: ${error}`))); - const error = reason instanceof McpError ? reason : new McpError(ErrorCode$1.RequestTimeout, String(reason)); - reject(error); - }; - this._responseHandlers.set(messageId, response => { - if (options?.signal?.aborted) { - return; - } - if (response instanceof Error) { - return reject(response); - } - try { - const parseResult = safeParse$1(resultSchema, response.result); - if (!parseResult.success) { - reject(parseResult.error); - } - else { - resolve(parseResult.data); - } - } - catch (error) { - reject(error); - } - }); - options?.signal?.addEventListener('abort', () => { - cancel(options?.signal?.reason); - }); - const timeout = options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC; - const timeoutHandler = () => cancel(McpError.fromError(ErrorCode$1.RequestTimeout, 'Request timed out', { timeout })); - this._setupTimeout(messageId, timeout, options?.maxTotalTimeout, timeoutHandler, options?.resetTimeoutOnProgress ?? false); - const relatedTaskId = relatedTask?.taskId; - if (relatedTaskId) { - const responseResolver = (response) => { - const handler = this._responseHandlers.get(messageId); - if (handler) { - handler(response); - } - else { - this._onerror(new Error(`Response handler missing for side-channeled request ${messageId}`)); - } - }; - this._requestResolvers.set(messageId, responseResolver); - this._enqueueTaskMessage(relatedTaskId, { - type: 'request', - message: jsonrpcRequest, - timestamp: Date.now() - }).catch(error => { - this._cleanupTimeout(messageId); - reject(error); - }); - } - else { - this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch(error => { - this._cleanupTimeout(messageId); - reject(error); - }); - } - }); - } - async getTask(params, options) { - return this.request({ method: 'tasks/get', params }, GetTaskResultSchema, options); - } - async getTaskResult(params, resultSchema, options) { - return this.request({ method: 'tasks/result', params }, resultSchema, options); - } - async listTasks(params, options) { - return this.request({ method: 'tasks/list', params }, ListTasksResultSchema, options); - } - async cancelTask(params, options) { - return this.request({ method: 'tasks/cancel', params }, CancelTaskResultSchema, options); - } - async notification(notification, options) { - if (!this._transport) { - throw new Error('Not connected'); - } - this.assertNotificationCapability(notification.method); - const relatedTaskId = options?.relatedTask?.taskId; - if (relatedTaskId) { - const jsonrpcNotification = { - ...notification, - jsonrpc: '2.0', - params: { - ...notification.params, - _meta: { - ...(notification.params?._meta || {}), - [RELATED_TASK_META_KEY]: options.relatedTask - } - } - }; - await this._enqueueTaskMessage(relatedTaskId, { - type: 'notification', - message: jsonrpcNotification, - timestamp: Date.now() - }); - return; - } - const debouncedMethods = this._options?.debouncedNotificationMethods ?? []; - const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !options?.relatedRequestId && !options?.relatedTask; - if (canDebounce) { - if (this._pendingDebouncedNotifications.has(notification.method)) { - return; - } - this._pendingDebouncedNotifications.add(notification.method); - Promise.resolve().then(() => { - this._pendingDebouncedNotifications.delete(notification.method); - if (!this._transport) { - return; - } - let jsonrpcNotification = { - ...notification, - jsonrpc: '2.0' - }; - if (options?.relatedTask) { - jsonrpcNotification = { - ...jsonrpcNotification, - params: { - ...jsonrpcNotification.params, - _meta: { - ...(jsonrpcNotification.params?._meta || {}), - [RELATED_TASK_META_KEY]: options.relatedTask - } - } - }; - } - this._transport?.send(jsonrpcNotification, options).catch(error => this._onerror(error)); - }); - return; - } - let jsonrpcNotification = { - ...notification, - jsonrpc: '2.0' - }; - if (options?.relatedTask) { - jsonrpcNotification = { - ...jsonrpcNotification, - params: { - ...jsonrpcNotification.params, - _meta: { - ...(jsonrpcNotification.params?._meta || {}), - [RELATED_TASK_META_KEY]: options.relatedTask - } - } - }; - } - await this._transport.send(jsonrpcNotification, options); - } - setRequestHandler(requestSchema, handler) { - const method = getMethodLiteral(requestSchema); - this.assertRequestHandlerCapability(method); - this._requestHandlers.set(method, (request, extra) => { - const parsed = parseWithCompat(requestSchema, request); - return Promise.resolve(handler(parsed, extra)); - }); - } - removeRequestHandler(method) { - this._requestHandlers.delete(method); - } - assertCanSetRequestHandler(method) { - if (this._requestHandlers.has(method)) { - throw new Error(`A request handler for ${method} already exists, which would be overridden`); - } - } - setNotificationHandler(notificationSchema, handler) { - const method = getMethodLiteral(notificationSchema); - this._notificationHandlers.set(method, notification => { - const parsed = parseWithCompat(notificationSchema, notification); - return Promise.resolve(handler(parsed)); - }); - } - removeNotificationHandler(method) { - this._notificationHandlers.delete(method); - } - _cleanupTaskProgressHandler(taskId) { - const progressToken = this._taskProgressTokens.get(taskId); - if (progressToken !== undefined) { - this._progressHandlers.delete(progressToken); - this._taskProgressTokens.delete(taskId); - } - } - async _enqueueTaskMessage(taskId, message, sessionId) { - if (!this._taskStore || !this._taskMessageQueue) { - throw new Error('Cannot enqueue task message: taskStore and taskMessageQueue are not configured'); - } - const maxQueueSize = this._options?.maxTaskQueueSize; - await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize); - } - async _clearTaskQueue(taskId, sessionId) { - if (this._taskMessageQueue) { - const messages = await this._taskMessageQueue.dequeueAll(taskId, sessionId); - for (const message of messages) { - if (message.type === 'request' && isJSONRPCRequest(message.message)) { - const requestId = message.message.id; - const resolver = this._requestResolvers.get(requestId); - if (resolver) { - resolver(new McpError(ErrorCode$1.InternalError, 'Task cancelled or completed')); - this._requestResolvers.delete(requestId); - } - else { - this._onerror(new Error(`Resolver missing for request ${requestId} during task ${taskId} cleanup`)); - } - } - } - } - } - async _waitForTaskUpdate(taskId, signal) { - let interval = this._options?.defaultTaskPollInterval ?? 1000; - try { - const task = await this._taskStore?.getTask(taskId); - if (task?.pollInterval) { - interval = task.pollInterval; - } - } - catch { - } - return new Promise((resolve, reject) => { - if (signal.aborted) { - reject(new McpError(ErrorCode$1.InvalidRequest, 'Request cancelled')); - return; - } - const timeoutId = setTimeout(resolve, interval); - signal.addEventListener('abort', () => { - clearTimeout(timeoutId); - reject(new McpError(ErrorCode$1.InvalidRequest, 'Request cancelled')); - }, { once: true }); - }); - } - requestTaskStore(request, sessionId) { - const taskStore = this._taskStore; - if (!taskStore) { - throw new Error('No task store configured'); - } - return { - createTask: async (taskParams) => { - if (!request) { - throw new Error('No request provided'); - } - return await taskStore.createTask(taskParams, request.id, { - method: request.method, - params: request.params - }, sessionId); - }, - getTask: async (taskId) => { - const task = await taskStore.getTask(taskId, sessionId); - if (!task) { - throw new McpError(ErrorCode$1.InvalidParams, 'Failed to retrieve task: Task not found'); - } - return task; - }, - storeTaskResult: async (taskId, status, result) => { - await taskStore.storeTaskResult(taskId, status, result, sessionId); - const task = await taskStore.getTask(taskId, sessionId); - if (task) { - const notification = TaskStatusNotificationSchema.parse({ - method: 'notifications/tasks/status', - params: task - }); - await this.notification(notification); - if (isTerminal(task.status)) { - this._cleanupTaskProgressHandler(taskId); - } - } - }, - getTaskResult: taskId => { - return taskStore.getTaskResult(taskId, sessionId); - }, - updateTaskStatus: async (taskId, status, statusMessage) => { - const task = await taskStore.getTask(taskId, sessionId); - if (!task) { - throw new McpError(ErrorCode$1.InvalidParams, `Task "${taskId}" not found - it may have been cleaned up`); - } - if (isTerminal(task.status)) { - throw new McpError(ErrorCode$1.InvalidParams, `Cannot update task "${taskId}" from terminal status "${task.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`); - } - await taskStore.updateTaskStatus(taskId, status, statusMessage, sessionId); - const updatedTask = await taskStore.getTask(taskId, sessionId); - if (updatedTask) { - const notification = TaskStatusNotificationSchema.parse({ - method: 'notifications/tasks/status', - params: updatedTask - }); - await this.notification(notification); - if (isTerminal(updatedTask.status)) { - this._cleanupTaskProgressHandler(taskId); - } - } - }, - listTasks: cursor => { - return taskStore.listTasks(cursor, sessionId); - } - }; - } -} -function isPlainObject(value) { - return value !== null && typeof value === 'object' && !Array.isArray(value); -} -function mergeCapabilities(base, additional) { - const result = { ...base }; - for (const key in additional) { - const k = key; - const addValue = additional[k]; - if (addValue === undefined) - continue; - const baseValue = result[k]; - if (isPlainObject(baseValue) && isPlainObject(addValue)) { - result[k] = { ...baseValue, ...addValue }; - } - else { - result[k] = addValue; - } - } - return result; -} - -var ajv$3 = {exports: {}}; - -var core$5 = {}; - -var validate$2 = {}; - -var boolSchema$1 = {}; - -var errors$2 = {}; - -var codegen$1 = {}; - -var code$4 = {}; - -var hasRequiredCode$4; - -function requireCode$4 () { - if (hasRequiredCode$4) return code$4; - hasRequiredCode$4 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.regexpCode = exports$1.getEsmExportName = exports$1.getProperty = exports$1.safeStringify = exports$1.stringify = exports$1.strConcat = exports$1.addCodeArg = exports$1.str = exports$1._ = exports$1.nil = exports$1._Code = exports$1.Name = exports$1.IDENTIFIER = exports$1._CodeOrName = void 0; - class _CodeOrName { - } - exports$1._CodeOrName = _CodeOrName; - exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; - class Name extends _CodeOrName { - constructor(s) { - super(); - if (!exports$1.IDENTIFIER.test(s)) - throw new Error("CodeGen: name must be a valid identifier"); - this.str = s; - } - toString() { - return this.str; - } - emptyStr() { - return false; - } - get names() { - return { [this.str]: 1 }; - } - } - exports$1.Name = Name; - class _Code extends _CodeOrName { - constructor(code) { - super(); - this._items = typeof code === "string" ? [code] : code; - } - toString() { - return this.str; - } - emptyStr() { - if (this._items.length > 1) - return false; - const item = this._items[0]; - return item === "" || item === '""'; - } - get str() { - var _a; - return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, ""))); - } - get names() { - var _a; - return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => { - if (c instanceof Name) - names[c.str] = (names[c.str] || 0) + 1; - return names; - }, {}))); - } - } - exports$1._Code = _Code; - exports$1.nil = new _Code(""); - function _(strs, ...args) { - const code = [strs[0]]; - let i = 0; - while (i < args.length) { - addCodeArg(code, args[i]); - code.push(strs[++i]); - } - return new _Code(code); - } - exports$1._ = _; - const plus = new _Code("+"); - function str(strs, ...args) { - const expr = [safeStringify(strs[0])]; - let i = 0; - while (i < args.length) { - expr.push(plus); - addCodeArg(expr, args[i]); - expr.push(plus, safeStringify(strs[++i])); - } - optimize(expr); - return new _Code(expr); - } - exports$1.str = str; - function addCodeArg(code, arg) { - if (arg instanceof _Code) - code.push(...arg._items); - else if (arg instanceof Name) - code.push(arg); - else - code.push(interpolate(arg)); - } - exports$1.addCodeArg = addCodeArg; - function optimize(expr) { - let i = 1; - while (i < expr.length - 1) { - if (expr[i] === plus) { - const res = mergeExprItems(expr[i - 1], expr[i + 1]); - if (res !== undefined) { - expr.splice(i - 1, 3, res); - continue; - } - expr[i++] = "+"; - } - i++; - } - } - function mergeExprItems(a, b) { - if (b === '""') - return a; - if (a === '""') - return b; - if (typeof a == "string") { - if (b instanceof Name || a[a.length - 1] !== '"') - return; - if (typeof b != "string") - return `${a.slice(0, -1)}${b}"`; - if (b[0] === '"') - return a.slice(0, -1) + b.slice(1); - return; - } - if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) - return `"${a}${b.slice(1)}`; - return; - } - function strConcat(c1, c2) { - return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`; - } - exports$1.strConcat = strConcat; - function interpolate(x) { - return typeof x == "number" || typeof x == "boolean" || x === null - ? x - : safeStringify(Array.isArray(x) ? x.join(",") : x); - } - function stringify(x) { - return new _Code(safeStringify(x)); - } - exports$1.stringify = stringify; - function safeStringify(x) { - return JSON.stringify(x) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029"); - } - exports$1.safeStringify = safeStringify; - function getProperty(key) { - return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`; - } - exports$1.getProperty = getProperty; - function getEsmExportName(key) { - if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) { - return new _Code(`${key}`); - } - throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); - } - exports$1.getEsmExportName = getEsmExportName; - function regexpCode(rx) { - return new _Code(rx.toString()); - } - exports$1.regexpCode = regexpCode; - } (code$4)); - return code$4; -} - -var scope$2 = {}; - -var hasRequiredScope$2; - -function requireScope$2 () { - if (hasRequiredScope$2) return scope$2; - hasRequiredScope$2 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0; - const code_1 = /*@__PURE__*/ requireCode$4(); - class ValueError extends Error { - constructor(name) { - super(`CodeGen: "code" for ${name} not defined`); - this.value = name.value; - } - } - var UsedValueState; - (function (UsedValueState) { - UsedValueState[UsedValueState["Started"] = 0] = "Started"; - UsedValueState[UsedValueState["Completed"] = 1] = "Completed"; - })(UsedValueState || (exports$1.UsedValueState = UsedValueState = {})); - exports$1.varKinds = { - const: new code_1.Name("const"), - let: new code_1.Name("let"), - var: new code_1.Name("var"), - }; - class Scope { - constructor({ prefixes, parent } = {}) { - this._names = {}; - this._prefixes = prefixes; - this._parent = parent; - } - toName(nameOrPrefix) { - return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); - } - name(prefix) { - return new code_1.Name(this._newName(prefix)); - } - _newName(prefix) { - const ng = this._names[prefix] || this._nameGroup(prefix); - return `${prefix}${ng.index++}`; - } - _nameGroup(prefix) { - var _a, _b; - if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) { - throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); - } - return (this._names[prefix] = { prefix, index: 0 }); - } - } - exports$1.Scope = Scope; - class ValueScopeName extends code_1.Name { - constructor(prefix, nameStr) { - super(nameStr); - this.prefix = prefix; - } - setValue(value, { property, itemIndex }) { - this.value = value; - this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`; - } - } - exports$1.ValueScopeName = ValueScopeName; - const line = (0, code_1._) `\n`; - class ValueScope extends Scope { - constructor(opts) { - super(opts); - this._values = {}; - this._scope = opts.scope; - this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; - } - get() { - return this._scope; - } - name(prefix) { - return new ValueScopeName(prefix, this._newName(prefix)); - } - value(nameOrPrefix, value) { - var _a; - if (value.ref === undefined) - throw new Error("CodeGen: ref must be passed in value"); - const name = this.toName(nameOrPrefix); - const { prefix } = name; - const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; - let vs = this._values[prefix]; - if (vs) { - const _name = vs.get(valueKey); - if (_name) - return _name; - } - else { - vs = this._values[prefix] = new Map(); - } - vs.set(valueKey, name); - const s = this._scope[prefix] || (this._scope[prefix] = []); - const itemIndex = s.length; - s[itemIndex] = value.ref; - name.setValue(value, { property: prefix, itemIndex }); - return name; - } - getValue(prefix, keyOrRef) { - const vs = this._values[prefix]; - if (!vs) - return; - return vs.get(keyOrRef); - } - scopeRefs(scopeName, values = this._values) { - return this._reduceValues(values, (name) => { - if (name.scopePath === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return (0, code_1._) `${scopeName}${name.scopePath}`; - }); - } - scopeCode(values = this._values, usedValues, getCode) { - return this._reduceValues(values, (name) => { - if (name.value === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return name.value.code; - }, usedValues, getCode); - } - _reduceValues(values, valueCode, usedValues = {}, getCode) { - let code = code_1.nil; - for (const prefix in values) { - const vs = values[prefix]; - if (!vs) - continue; - const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map()); - vs.forEach((name) => { - if (nameSet.has(name)) - return; - nameSet.set(name, UsedValueState.Started); - let c = valueCode(name); - if (c) { - const def = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const; - code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`; - } - else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) { - code = (0, code_1._) `${code}${c}${this.opts._n}`; - } - else { - throw new ValueError(name); - } - nameSet.set(name, UsedValueState.Completed); - }); - } - return code; - } - } - exports$1.ValueScope = ValueScope; - } (scope$2)); - return scope$2; -} - -var hasRequiredCodegen$1; - -function requireCodegen$1 () { - if (hasRequiredCodegen$1) return codegen$1; - hasRequiredCodegen$1 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.or = exports$1.and = exports$1.not = exports$1.CodeGen = exports$1.operators = exports$1.varKinds = exports$1.ValueScopeName = exports$1.ValueScope = exports$1.Scope = exports$1.Name = exports$1.regexpCode = exports$1.stringify = exports$1.getProperty = exports$1.nil = exports$1.strConcat = exports$1.str = exports$1._ = void 0; - const code_1 = /*@__PURE__*/ requireCode$4(); - const scope_1 = /*@__PURE__*/ requireScope$2(); - var code_2 = /*@__PURE__*/ requireCode$4(); - Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return code_2._; } }); - Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return code_2.str; } }); - Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } }); - Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return code_2.nil; } }); - Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } }); - Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return code_2.stringify; } }); - Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } }); - Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return code_2.Name; } }); - var scope_2 = /*@__PURE__*/ requireScope$2(); - Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } }); - Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } }); - Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } }); - Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } }); - exports$1.operators = { - GT: new code_1._Code(">"), - GTE: new code_1._Code(">="), - LT: new code_1._Code("<"), - LTE: new code_1._Code("<="), - EQ: new code_1._Code("==="), - NEQ: new code_1._Code("!=="), - NOT: new code_1._Code("!"), - OR: new code_1._Code("||"), - AND: new code_1._Code("&&"), - ADD: new code_1._Code("+"), - }; - class Node { - optimizeNodes() { - return this; - } - optimizeNames(_names, _constants) { - return this; - } - } - class Def extends Node { - constructor(varKind, name, rhs) { - super(); - this.varKind = varKind; - this.name = name; - this.rhs = rhs; - } - render({ es5, _n }) { - const varKind = es5 ? scope_1.varKinds.var : this.varKind; - const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`; - return `${varKind} ${this.name}${rhs};` + _n; - } - optimizeNames(names, constants) { - if (!names[this.name.str]) - return; - if (this.rhs) - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; - } - } - class Assign extends Node { - constructor(lhs, rhs, sideEffects) { - super(); - this.lhs = lhs; - this.rhs = rhs; - this.sideEffects = sideEffects; - } - render({ _n }) { - return `${this.lhs} = ${this.rhs};` + _n; - } - optimizeNames(names, constants) { - if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) - return; - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; - return addExprNames(names, this.rhs); - } - } - class AssignOp extends Assign { - constructor(lhs, op, rhs, sideEffects) { - super(lhs, rhs, sideEffects); - this.op = op; - } - render({ _n }) { - return `${this.lhs} ${this.op}= ${this.rhs};` + _n; - } - } - class Label extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - return `${this.label}:` + _n; - } - } - class Break extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - const label = this.label ? ` ${this.label}` : ""; - return `break${label};` + _n; - } - } - class Throw extends Node { - constructor(error) { - super(); - this.error = error; - } - render({ _n }) { - return `throw ${this.error};` + _n; - } - get names() { - return this.error.names; - } - } - class AnyCode extends Node { - constructor(code) { - super(); - this.code = code; - } - render({ _n }) { - return `${this.code};` + _n; - } - optimizeNodes() { - return `${this.code}` ? this : undefined; - } - optimizeNames(names, constants) { - this.code = optimizeExpr(this.code, names, constants); - return this; - } - get names() { - return this.code instanceof code_1._CodeOrName ? this.code.names : {}; - } - } - class ParentNode extends Node { - constructor(nodes = []) { - super(); - this.nodes = nodes; - } - render(opts) { - return this.nodes.reduce((code, n) => code + n.render(opts), ""); - } - optimizeNodes() { - const { nodes } = this; - let i = nodes.length; - while (i--) { - const n = nodes[i].optimizeNodes(); - if (Array.isArray(n)) - nodes.splice(i, 1, ...n); - else if (n) - nodes[i] = n; - else - nodes.splice(i, 1); - } - return nodes.length > 0 ? this : undefined; - } - optimizeNames(names, constants) { - const { nodes } = this; - let i = nodes.length; - while (i--) { - const n = nodes[i]; - if (n.optimizeNames(names, constants)) - continue; - subtractNames(names, n.names); - nodes.splice(i, 1); - } - return nodes.length > 0 ? this : undefined; - } - get names() { - return this.nodes.reduce((names, n) => addNames(names, n.names), {}); - } - } - class BlockNode extends ParentNode { - render(opts) { - return "{" + opts._n + super.render(opts) + "}" + opts._n; - } - } - class Root extends ParentNode { - } - class Else extends BlockNode { - } - Else.kind = "else"; - class If extends BlockNode { - constructor(condition, nodes) { - super(nodes); - this.condition = condition; - } - render(opts) { - let code = `if(${this.condition})` + super.render(opts); - if (this.else) - code += "else " + this.else.render(opts); - return code; - } - optimizeNodes() { - super.optimizeNodes(); - const cond = this.condition; - if (cond === true) - return this.nodes; - let e = this.else; - if (e) { - const ns = e.optimizeNodes(); - e = this.else = Array.isArray(ns) ? new Else(ns) : ns; - } - if (e) { - if (cond === false) - return e instanceof If ? e : e.nodes; - if (this.nodes.length) - return this; - return new If(not(cond), e instanceof If ? [e] : e.nodes); - } - if (cond === false || !this.nodes.length) - return undefined; - return this; - } - optimizeNames(names, constants) { - var _a; - this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - if (!(super.optimizeNames(names, constants) || this.else)) - return; - this.condition = optimizeExpr(this.condition, names, constants); - return this; - } - get names() { - const names = super.names; - addExprNames(names, this.condition); - if (this.else) - addNames(names, this.else.names); - return names; - } - } - If.kind = "if"; - class For extends BlockNode { - } - For.kind = "for"; - class ForLoop extends For { - constructor(iteration) { - super(); - this.iteration = iteration; - } - render(opts) { - return `for(${this.iteration})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iteration = optimizeExpr(this.iteration, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iteration.names); - } - } - class ForRange extends For { - constructor(varKind, name, from, to) { - super(); - this.varKind = varKind; - this.name = name; - this.from = from; - this.to = to; - } - render(opts) { - const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; - const { name, from, to } = this; - return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); - } - get names() { - const names = addExprNames(super.names, this.from); - return addExprNames(names, this.to); - } - } - class ForIter extends For { - constructor(loop, varKind, name, iterable) { - super(); - this.loop = loop; - this.varKind = varKind; - this.name = name; - this.iterable = iterable; - } - render(opts) { - return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iterable = optimizeExpr(this.iterable, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iterable.names); - } - } - class Func extends BlockNode { - constructor(name, args, async) { - super(); - this.name = name; - this.args = args; - this.async = async; - } - render(opts) { - const _async = this.async ? "async " : ""; - return `${_async}function ${this.name}(${this.args})` + super.render(opts); - } - } - Func.kind = "func"; - class Return extends ParentNode { - render(opts) { - return "return " + super.render(opts); - } - } - Return.kind = "return"; - class Try extends BlockNode { - render(opts) { - let code = "try" + super.render(opts); - if (this.catch) - code += this.catch.render(opts); - if (this.finally) - code += this.finally.render(opts); - return code; - } - optimizeNodes() { - var _a, _b; - super.optimizeNodes(); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); - return this; - } - optimizeNames(names, constants) { - var _a, _b; - super.optimizeNames(names, constants); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); - return this; - } - get names() { - const names = super.names; - if (this.catch) - addNames(names, this.catch.names); - if (this.finally) - addNames(names, this.finally.names); - return names; - } - } - class Catch extends BlockNode { - constructor(error) { - super(); - this.error = error; - } - render(opts) { - return `catch(${this.error})` + super.render(opts); - } - } - Catch.kind = "catch"; - class Finally extends BlockNode { - render(opts) { - return "finally" + super.render(opts); - } - } - Finally.kind = "finally"; - class CodeGen { - constructor(extScope, opts = {}) { - this._values = {}; - this._blockStarts = []; - this._constants = {}; - this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; - this._extScope = extScope; - this._scope = new scope_1.Scope({ parent: extScope }); - this._nodes = [new Root()]; - } - toString() { - return this._root.render(this.opts); - } - name(prefix) { - return this._scope.name(prefix); - } - scopeName(prefix) { - return this._extScope.name(prefix); - } - scopeValue(prefixOrName, value) { - const name = this._extScope.value(prefixOrName, value); - const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set()); - vs.add(name); - return name; - } - getScopeValue(prefix, keyOrRef) { - return this._extScope.getValue(prefix, keyOrRef); - } - scopeRefs(scopeName) { - return this._extScope.scopeRefs(scopeName, this._values); - } - scopeCode() { - return this._extScope.scopeCode(this._values); - } - _def(varKind, nameOrPrefix, rhs, constant) { - const name = this._scope.toName(nameOrPrefix); - if (rhs !== undefined && constant) - this._constants[name.str] = rhs; - this._leafNode(new Def(varKind, name, rhs)); - return name; - } - const(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); - } - let(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); - } - var(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); - } - assign(lhs, rhs, sideEffects) { - return this._leafNode(new Assign(lhs, rhs, sideEffects)); - } - add(lhs, rhs) { - return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs)); - } - code(c) { - if (typeof c == "function") - c(); - else if (c !== code_1.nil) - this._leafNode(new AnyCode(c)); - return this; - } - object(...keyValues) { - const code = ["{"]; - for (const [key, value] of keyValues) { - if (code.length > 1) - code.push(","); - code.push(key); - if (key !== value || this.opts.es5) { - code.push(":"); - (0, code_1.addCodeArg)(code, value); - } - } - code.push("}"); - return new code_1._Code(code); - } - if(condition, thenBody, elseBody) { - this._blockNode(new If(condition)); - if (thenBody && elseBody) { - this.code(thenBody).else().code(elseBody).endIf(); - } - else if (thenBody) { - this.code(thenBody).endIf(); - } - else if (elseBody) { - throw new Error('CodeGen: "else" body without "then" body'); - } - return this; - } - elseIf(condition) { - return this._elseNode(new If(condition)); - } - else() { - return this._elseNode(new Else()); - } - endIf() { - return this._endBlockNode(If, Else); - } - _for(node, forBody) { - this._blockNode(node); - if (forBody) - this.code(forBody).endFor(); - return this; - } - for(iteration, forBody) { - return this._for(new ForLoop(iteration), forBody); - } - forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); - } - forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { - const name = this._scope.toName(nameOrPrefix); - if (this.opts.es5) { - const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); - return this.forRange("_i", 0, (0, code_1._) `${arr}.length`, (i) => { - this.var(name, (0, code_1._) `${arr}[${i}]`); - forBody(name); - }); - } - return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); - } - forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { - if (this.opts.ownProperties) { - return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody); - } - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); - } - endFor() { - return this._endBlockNode(For); - } - label(label) { - return this._leafNode(new Label(label)); - } - break(label) { - return this._leafNode(new Break(label)); - } - return(value) { - const node = new Return(); - this._blockNode(node); - this.code(value); - if (node.nodes.length !== 1) - throw new Error('CodeGen: "return" should have one node'); - return this._endBlockNode(Return); - } - try(tryBody, catchCode, finallyCode) { - if (!catchCode && !finallyCode) - throw new Error('CodeGen: "try" without "catch" and "finally"'); - const node = new Try(); - this._blockNode(node); - this.code(tryBody); - if (catchCode) { - const error = this.name("e"); - this._currNode = node.catch = new Catch(error); - catchCode(error); - } - if (finallyCode) { - this._currNode = node.finally = new Finally(); - this.code(finallyCode); - } - return this._endBlockNode(Catch, Finally); - } - throw(error) { - return this._leafNode(new Throw(error)); - } - block(body, nodeCount) { - this._blockStarts.push(this._nodes.length); - if (body) - this.code(body).endBlock(nodeCount); - return this; - } - endBlock(nodeCount) { - const len = this._blockStarts.pop(); - if (len === undefined) - throw new Error("CodeGen: not in self-balancing block"); - const toClose = this._nodes.length - len; - if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) { - throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); - } - this._nodes.length = len; - return this; - } - func(name, args = code_1.nil, async, funcBody) { - this._blockNode(new Func(name, args, async)); - if (funcBody) - this.code(funcBody).endFunc(); - return this; - } - endFunc() { - return this._endBlockNode(Func); - } - optimize(n = 1) { - while (n-- > 0) { - this._root.optimizeNodes(); - this._root.optimizeNames(this._root.names, this._constants); - } - } - _leafNode(node) { - this._currNode.nodes.push(node); - return this; - } - _blockNode(node) { - this._currNode.nodes.push(node); - this._nodes.push(node); - } - _endBlockNode(N1, N2) { - const n = this._currNode; - if (n instanceof N1 || (N2 && n instanceof N2)) { - this._nodes.pop(); - return this; - } - throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); - } - _elseNode(node) { - const n = this._currNode; - if (!(n instanceof If)) { - throw new Error('CodeGen: "else" without "if"'); - } - this._currNode = n.else = node; - return this; - } - get _root() { - return this._nodes[0]; - } - get _currNode() { - const ns = this._nodes; - return ns[ns.length - 1]; - } - set _currNode(node) { - const ns = this._nodes; - ns[ns.length - 1] = node; - } - } - exports$1.CodeGen = CodeGen; - function addNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) + (from[n] || 0); - return names; - } - function addExprNames(names, from) { - return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; - } - function optimizeExpr(expr, names, constants) { - if (expr instanceof code_1.Name) - return replaceName(expr); - if (!canOptimize(expr)) - return expr; - return new code_1._Code(expr._items.reduce((items, c) => { - if (c instanceof code_1.Name) - c = replaceName(c); - if (c instanceof code_1._Code) - items.push(...c._items); - else - items.push(c); - return items; - }, [])); - function replaceName(n) { - const c = constants[n.str]; - if (c === undefined || names[n.str] !== 1) - return n; - delete names[n.str]; - return c; - } - function canOptimize(e) { - return (e instanceof code_1._Code && - e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined)); - } - } - function subtractNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) - (from[n] || 0); - } - function not(x) { - return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`; - } - exports$1.not = not; - const andCode = mappend(exports$1.operators.AND); - function and(...args) { - return args.reduce(andCode); - } - exports$1.and = and; - const orCode = mappend(exports$1.operators.OR); - function or(...args) { - return args.reduce(orCode); - } - exports$1.or = or; - function mappend(op) { - return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`); - } - function par(x) { - return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`; - } - } (codegen$1)); - return codegen$1; -} - -var util$5 = {}; - -var hasRequiredUtil$5; - -function requireUtil$5 () { - if (hasRequiredUtil$5) return util$5; - hasRequiredUtil$5 = 1; - Object.defineProperty(util$5, "__esModule", { value: true }); - util$5.checkStrictMode = util$5.getErrorPath = util$5.Type = util$5.useFunc = util$5.setEvaluated = util$5.evaluatedPropsToName = util$5.mergeEvaluated = util$5.eachItem = util$5.unescapeJsonPointer = util$5.escapeJsonPointer = util$5.escapeFragment = util$5.unescapeFragment = util$5.schemaRefOrVal = util$5.schemaHasRulesButRef = util$5.schemaHasRules = util$5.checkUnknownRules = util$5.alwaysValidSchema = util$5.toHash = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const code_1 = /*@__PURE__*/ requireCode$4(); - function toHash(arr) { - const hash = {}; - for (const item of arr) - hash[item] = true; - return hash; - } - util$5.toHash = toHash; - function alwaysValidSchema(it, schema) { - if (typeof schema == "boolean") - return schema; - if (Object.keys(schema).length === 0) - return true; - checkUnknownRules(it, schema); - return !schemaHasRules(schema, it.self.RULES.all); - } - util$5.alwaysValidSchema = alwaysValidSchema; - function checkUnknownRules(it, schema = it.schema) { - const { opts, self } = it; - if (!opts.strictSchema) - return; - if (typeof schema === "boolean") - return; - const rules = self.RULES.keywords; - for (const key in schema) { - if (!rules[key]) - checkStrictMode(it, `unknown keyword: "${key}"`); - } - } - util$5.checkUnknownRules = checkUnknownRules; - function schemaHasRules(schema, rules) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (rules[key]) - return true; - return false; - } - util$5.schemaHasRules = schemaHasRules; - function schemaHasRulesButRef(schema, RULES) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (key !== "$ref" && RULES.all[key]) - return true; - return false; - } - util$5.schemaHasRulesButRef = schemaHasRulesButRef; - function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) { - if (!$data) { - if (typeof schema == "number" || typeof schema == "boolean") - return schema; - if (typeof schema == "string") - return (0, codegen_1._) `${schema}`; - } - return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; - } - util$5.schemaRefOrVal = schemaRefOrVal; - function unescapeFragment(str) { - return unescapeJsonPointer(decodeURIComponent(str)); - } - util$5.unescapeFragment = unescapeFragment; - function escapeFragment(str) { - return encodeURIComponent(escapeJsonPointer(str)); - } - util$5.escapeFragment = escapeFragment; - function escapeJsonPointer(str) { - if (typeof str == "number") - return `${str}`; - return str.replace(/~/g, "~0").replace(/\//g, "~1"); - } - util$5.escapeJsonPointer = escapeJsonPointer; - function unescapeJsonPointer(str) { - return str.replace(/~1/g, "/").replace(/~0/g, "~"); - } - util$5.unescapeJsonPointer = unescapeJsonPointer; - function eachItem(xs, f) { - if (Array.isArray(xs)) { - for (const x of xs) - f(x); - } - else { - f(xs); - } - } - util$5.eachItem = eachItem; - function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) { - return (gen, from, to, toName) => { - const res = to === undefined - ? from - : to instanceof codegen_1.Name - ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) - : from instanceof codegen_1.Name - ? (mergeToName(gen, to, from), from) - : mergeValues(from, to); - return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; - }; - } - util$5.mergeEvaluated = { - props: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => { - gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`)); - }), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => { - if (from === true) { - gen.assign(to, true); - } - else { - gen.assign(to, (0, codegen_1._) `${to} || {}`); - setEvaluated(gen, to, from); - } - }), - mergeValues: (from, to) => (from === true ? true : { ...from, ...to }), - resultToName: evaluatedPropsToName, - }), - items: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)), - mergeValues: (from, to) => (from === true ? true : Math.max(from, to)), - resultToName: (gen, items) => gen.var("items", items), - }), - }; - function evaluatedPropsToName(gen, ps) { - if (ps === true) - return gen.var("props", true); - const props = gen.var("props", (0, codegen_1._) `{}`); - if (ps !== undefined) - setEvaluated(gen, props, ps); - return props; - } - util$5.evaluatedPropsToName = evaluatedPropsToName; - function setEvaluated(gen, props, ps) { - Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true)); - } - util$5.setEvaluated = setEvaluated; - const snippets = {}; - function useFunc(gen, f) { - return gen.scopeValue("func", { - ref: f, - code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)), - }); - } - util$5.useFunc = useFunc; - var Type; - (function (Type) { - Type[Type["Num"] = 0] = "Num"; - Type[Type["Str"] = 1] = "Str"; - })(Type || (util$5.Type = Type = {})); - function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { - if (dataProp instanceof codegen_1.Name) { - const isNumber = dataPropType === Type.Num; - return jsPropertySyntax - ? isNumber - ? (0, codegen_1._) `"[" + ${dataProp} + "]"` - : (0, codegen_1._) `"['" + ${dataProp} + "']"` - : isNumber - ? (0, codegen_1._) `"/" + ${dataProp}` - : (0, codegen_1._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; - } - return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); - } - util$5.getErrorPath = getErrorPath; - function checkStrictMode(it, msg, mode = it.opts.strictSchema) { - if (!mode) - return; - msg = `strict mode: ${msg}`; - if (mode === true) - throw new Error(msg); - it.self.logger.warn(msg); - } - util$5.checkStrictMode = checkStrictMode; - return util$5; -} - -var names$1 = {}; - -var hasRequiredNames$1; - -function requireNames$1 () { - if (hasRequiredNames$1) return names$1; - hasRequiredNames$1 = 1; - Object.defineProperty(names$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const names = { - data: new codegen_1.Name("data"), - valCxt: new codegen_1.Name("valCxt"), - instancePath: new codegen_1.Name("instancePath"), - parentData: new codegen_1.Name("parentData"), - parentDataProperty: new codegen_1.Name("parentDataProperty"), - rootData: new codegen_1.Name("rootData"), - dynamicAnchors: new codegen_1.Name("dynamicAnchors"), - vErrors: new codegen_1.Name("vErrors"), - errors: new codegen_1.Name("errors"), - this: new codegen_1.Name("this"), - self: new codegen_1.Name("self"), - scope: new codegen_1.Name("scope"), - json: new codegen_1.Name("json"), - jsonPos: new codegen_1.Name("jsonPos"), - jsonLen: new codegen_1.Name("jsonLen"), - jsonPart: new codegen_1.Name("jsonPart"), - }; - names$1.default = names; - return names$1; -} - -var hasRequiredErrors$2; - -function requireErrors$2 () { - if (hasRequiredErrors$2) return errors$2; - hasRequiredErrors$2 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const names_1 = /*@__PURE__*/ requireNames$1(); - exports$1.keywordError = { - message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`, - }; - exports$1.keyword$DataError = { - message: ({ keyword, schemaType }) => schemaType - ? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)` - : (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`, - }; - function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) { - addError(gen, errObj); - } - else { - returnErrors(it, (0, codegen_1._) `[${errObj}]`); - } - } - exports$1.reportError = reportError; - function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - addError(gen, errObj); - if (!(compositeRule || allErrors)) { - returnErrors(it, names_1.default.vErrors); - } - } - exports$1.reportExtraError = reportExtraError; - function resetErrorsCount(gen, errsCount) { - gen.assign(names_1.default.errors, errsCount); - gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); - } - exports$1.resetErrorsCount = resetErrorsCount; - function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) { - if (errsCount === undefined) - throw new Error("ajv implementation error"); - const err = gen.name("err"); - gen.forRange("i", errsCount, names_1.default.errors, (i) => { - gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`); - gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath))); - gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`); - if (it.opts.verbose) { - gen.assign((0, codegen_1._) `${err}.schema`, schemaValue); - gen.assign((0, codegen_1._) `${err}.data`, data); - } - }); - } - exports$1.extendErrors = extendErrors; - function addError(gen, errObj) { - const err = gen.const("err", errObj); - gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`); - gen.code((0, codegen_1._) `${names_1.default.errors}++`); - } - function returnErrors(it, errs) { - const { gen, validateName, schemaEnv } = it; - if (schemaEnv.$async) { - gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, errs); - gen.return(false); - } - } - const E = { - keyword: new codegen_1.Name("keyword"), - schemaPath: new codegen_1.Name("schemaPath"), - params: new codegen_1.Name("params"), - propertyName: new codegen_1.Name("propertyName"), - message: new codegen_1.Name("message"), - schema: new codegen_1.Name("schema"), - parentSchema: new codegen_1.Name("parentSchema"), - }; - function errorObjectCode(cxt, error, errorPaths) { - const { createErrors } = cxt.it; - if (createErrors === false) - return (0, codegen_1._) `{}`; - return errorObject(cxt, error, errorPaths); - } - function errorObject(cxt, error, errorPaths = {}) { - const { gen, it } = cxt; - const keyValues = [ - errorInstancePath(it, errorPaths), - errorSchemaPath(cxt, errorPaths), - ]; - extraErrorProps(cxt, error, keyValues); - return gen.object(...keyValues); - } - function errorInstancePath({ errorPath }, { instancePath }) { - const instPath = instancePath - ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` - : errorPath; - return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; - } - function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { - let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`; - if (schemaPath) { - schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; - } - return [E.schemaPath, schPath]; - } - function extraErrorProps(cxt, { params, message }, keyValues) { - const { keyword, data, schemaValue, it } = cxt; - const { opts, propertyName, topSchemaRef, schemaPath } = it; - keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._) `{}`]); - if (opts.messages) { - keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); - } - if (opts.verbose) { - keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); - } - if (propertyName) - keyValues.push([E.propertyName, propertyName]); - } - } (errors$2)); - return errors$2; -} - -var hasRequiredBoolSchema$1; - -function requireBoolSchema$1 () { - if (hasRequiredBoolSchema$1) return boolSchema$1; - hasRequiredBoolSchema$1 = 1; - Object.defineProperty(boolSchema$1, "__esModule", { value: true }); - boolSchema$1.boolOrEmptySchema = boolSchema$1.topBoolOrEmptySchema = void 0; - const errors_1 = /*@__PURE__*/ requireErrors$2(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const boolError = { - message: "boolean schema is false", - }; - function topBoolOrEmptySchema(it) { - const { gen, schema, validateName } = it; - if (schema === false) { - falseSchemaError(it, false); - } - else if (typeof schema == "object" && schema.$async === true) { - gen.return(names_1.default.data); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, null); - gen.return(true); - } - } - boolSchema$1.topBoolOrEmptySchema = topBoolOrEmptySchema; - function boolOrEmptySchema(it, valid) { - const { gen, schema } = it; - if (schema === false) { - gen.var(valid, false); - falseSchemaError(it); - } - else { - gen.var(valid, true); - } - } - boolSchema$1.boolOrEmptySchema = boolOrEmptySchema; - function falseSchemaError(it, overrideAllErrors) { - const { gen, data } = it; - const cxt = { - gen, - keyword: "false schema", - data, - schema: false, - schemaCode: false, - schemaValue: false, - params: {}, - it, - }; - (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors); - } - return boolSchema$1; -} - -var dataType$1 = {}; - -var rules$2 = {}; - -var hasRequiredRules$2; - -function requireRules$2 () { - if (hasRequiredRules$2) return rules$2; - hasRequiredRules$2 = 1; - Object.defineProperty(rules$2, "__esModule", { value: true }); - rules$2.getRules = rules$2.isJSONType = void 0; - const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; - const jsonTypes = new Set(_jsonTypes); - function isJSONType(x) { - return typeof x == "string" && jsonTypes.has(x); - } - rules$2.isJSONType = isJSONType; - function getRules() { - const groups = { - number: { type: "number", rules: [] }, - string: { type: "string", rules: [] }, - array: { type: "array", rules: [] }, - object: { type: "object", rules: [] }, - }; - return { - types: { ...groups, integer: true, boolean: true, null: true }, - rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], - post: { rules: [] }, - all: {}, - keywords: {}, - }; - } - rules$2.getRules = getRules; - return rules$2; -} - -var applicability$1 = {}; - -var hasRequiredApplicability$1; - -function requireApplicability$1 () { - if (hasRequiredApplicability$1) return applicability$1; - hasRequiredApplicability$1 = 1; - Object.defineProperty(applicability$1, "__esModule", { value: true }); - applicability$1.shouldUseRule = applicability$1.shouldUseGroup = applicability$1.schemaHasRulesForType = void 0; - function schemaHasRulesForType({ schema, self }, type) { - const group = self.RULES.types[type]; - return group && group !== true && shouldUseGroup(schema, group); - } - applicability$1.schemaHasRulesForType = schemaHasRulesForType; - function shouldUseGroup(schema, group) { - return group.rules.some((rule) => shouldUseRule(schema, rule)); - } - applicability$1.shouldUseGroup = shouldUseGroup; - function shouldUseRule(schema, rule) { - var _a; - return (schema[rule.keyword] !== undefined || - ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined))); - } - applicability$1.shouldUseRule = shouldUseRule; - return applicability$1; -} - -var hasRequiredDataType$1; - -function requireDataType$1 () { - if (hasRequiredDataType$1) return dataType$1; - hasRequiredDataType$1 = 1; - Object.defineProperty(dataType$1, "__esModule", { value: true }); - dataType$1.reportTypeError = dataType$1.checkDataTypes = dataType$1.checkDataType = dataType$1.coerceAndCheckDataType = dataType$1.getJSONTypes = dataType$1.getSchemaTypes = dataType$1.DataType = void 0; - const rules_1 = /*@__PURE__*/ requireRules$2(); - const applicability_1 = /*@__PURE__*/ requireApplicability$1(); - const errors_1 = /*@__PURE__*/ requireErrors$2(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - var DataType; - (function (DataType) { - DataType[DataType["Correct"] = 0] = "Correct"; - DataType[DataType["Wrong"] = 1] = "Wrong"; - })(DataType || (dataType$1.DataType = DataType = {})); - function getSchemaTypes(schema) { - const types = getJSONTypes(schema.type); - const hasNull = types.includes("null"); - if (hasNull) { - if (schema.nullable === false) - throw new Error("type: null contradicts nullable: false"); - } - else { - if (!types.length && schema.nullable !== undefined) { - throw new Error('"nullable" cannot be used without "type"'); - } - if (schema.nullable === true) - types.push("null"); - } - return types; - } - dataType$1.getSchemaTypes = getSchemaTypes; - function getJSONTypes(ts) { - const types = Array.isArray(ts) ? ts : ts ? [ts] : []; - if (types.every(rules_1.isJSONType)) - return types; - throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); - } - dataType$1.getJSONTypes = getJSONTypes; - function coerceAndCheckDataType(it, types) { - const { gen, data, opts } = it; - const coerceTo = coerceToTypes(types, opts.coerceTypes); - const checkTypes = types.length > 0 && - !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0])); - if (checkTypes) { - const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); - gen.if(wrongType, () => { - if (coerceTo.length) - coerceData(it, types, coerceTo); - else - reportTypeError(it); - }); - } - return checkTypes; - } - dataType$1.coerceAndCheckDataType = coerceAndCheckDataType; - const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]); - function coerceToTypes(types, coerceTypes) { - return coerceTypes - ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array")) - : []; - } - function coerceData(it, types, coerceTo) { - const { gen, data, opts } = it; - const dataType = gen.let("dataType", (0, codegen_1._) `typeof ${data}`); - const coerced = gen.let("coerced", (0, codegen_1._) `undefined`); - if (opts.coerceTypes === "array") { - gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen - .assign(data, (0, codegen_1._) `${data}[0]`) - .assign(dataType, (0, codegen_1._) `typeof ${data}`) - .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); - } - gen.if((0, codegen_1._) `${coerced} !== undefined`); - for (const t of coerceTo) { - if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) { - coerceSpecificType(t); - } - } - gen.else(); - reportTypeError(it); - gen.endIf(); - gen.if((0, codegen_1._) `${coerced} !== undefined`, () => { - gen.assign(data, coerced); - assignParentData(it, coerced); - }); - function coerceSpecificType(t) { - switch (t) { - case "string": - gen - .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`) - .assign(coerced, (0, codegen_1._) `"" + ${data}`) - .elseIf((0, codegen_1._) `${data} === null`) - .assign(coerced, (0, codegen_1._) `""`); - return; - case "number": - gen - .elseIf((0, codegen_1._) `${dataType} == "boolean" || ${data} === null - || (${dataType} == "string" && ${data} && ${data} == +${data})`) - .assign(coerced, (0, codegen_1._) `+${data}`); - return; - case "integer": - gen - .elseIf((0, codegen_1._) `${dataType} === "boolean" || ${data} === null - || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`) - .assign(coerced, (0, codegen_1._) `+${data}`); - return; - case "boolean": - gen - .elseIf((0, codegen_1._) `${data} === "false" || ${data} === 0 || ${data} === null`) - .assign(coerced, false) - .elseIf((0, codegen_1._) `${data} === "true" || ${data} === 1`) - .assign(coerced, true); - return; - case "null": - gen.elseIf((0, codegen_1._) `${data} === "" || ${data} === 0 || ${data} === false`); - gen.assign(coerced, null); - return; - case "array": - gen - .elseIf((0, codegen_1._) `${dataType} === "string" || ${dataType} === "number" - || ${dataType} === "boolean" || ${data} === null`) - .assign(coerced, (0, codegen_1._) `[${data}]`); - } - } - } - function assignParentData({ gen, parentData, parentDataProperty }, expr) { - gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr)); - } - function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { - const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; - let cond; - switch (dataType) { - case "null": - return (0, codegen_1._) `${data} ${EQ} null`; - case "array": - cond = (0, codegen_1._) `Array.isArray(${data})`; - break; - case "object": - cond = (0, codegen_1._) `${data} && typeof ${data} == "object" && !Array.isArray(${data})`; - break; - case "integer": - cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`); - break; - case "number": - cond = numCond(); - break; - default: - return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`; - } - return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); - function numCond(_cond = codegen_1.nil) { - return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil); - } - } - dataType$1.checkDataType = checkDataType; - function checkDataTypes(dataTypes, data, strictNums, correct) { - if (dataTypes.length === 1) { - return checkDataType(dataTypes[0], data, strictNums, correct); - } - let cond; - const types = (0, util_1.toHash)(dataTypes); - if (types.array && types.object) { - const notObj = (0, codegen_1._) `typeof ${data} != "object"`; - cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`; - delete types.null; - delete types.array; - delete types.object; - } - else { - cond = codegen_1.nil; - } - if (types.number) - delete types.integer; - for (const t in types) - cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct)); - return cond; - } - dataType$1.checkDataTypes = checkDataTypes; - const typeError = { - message: ({ schema }) => `must be ${schema}`, - params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`, - }; - function reportTypeError(it) { - const cxt = getTypeErrorContext(it); - (0, errors_1.reportError)(cxt, typeError); - } - dataType$1.reportTypeError = reportTypeError; - function getTypeErrorContext(it) { - const { gen, data, schema } = it; - const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type"); - return { - gen, - keyword: "type", - data, - schema: schema.type, - schemaCode, - schemaValue: schemaCode, - parentSchema: schema, - params: {}, - it, - }; - } - return dataType$1; -} - -var defaults$2 = {}; - -var hasRequiredDefaults$1; - -function requireDefaults$1 () { - if (hasRequiredDefaults$1) return defaults$2; - hasRequiredDefaults$1 = 1; - Object.defineProperty(defaults$2, "__esModule", { value: true }); - defaults$2.assignDefaults = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - function assignDefaults(it, ty) { - const { properties, items } = it.schema; - if (ty === "object" && properties) { - for (const key in properties) { - assignDefault(it, key, properties[key].default); - } - } - else if (ty === "array" && Array.isArray(items)) { - items.forEach((sch, i) => assignDefault(it, i, sch.default)); - } - } - defaults$2.assignDefaults = assignDefaults; - function assignDefault(it, prop, defaultValue) { - const { gen, compositeRule, data, opts } = it; - if (defaultValue === undefined) - return; - const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`; - if (compositeRule) { - (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`); - return; - } - let condition = (0, codegen_1._) `${childData} === undefined`; - if (opts.useDefaults === "empty") { - condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === ""`; - } - gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); - } - return defaults$2; -} - -var keyword$3 = {}; - -var code$3 = {}; - -var hasRequiredCode$3; - -function requireCode$3 () { - if (hasRequiredCode$3) return code$3; - hasRequiredCode$3 = 1; - Object.defineProperty(code$3, "__esModule", { value: true }); - code$3.validateUnion = code$3.validateArray = code$3.usePattern = code$3.callValidateCode = code$3.schemaProperties = code$3.allSchemaProperties = code$3.noPropertyInData = code$3.propertyInData = code$3.isOwnProperty = code$3.hasPropFunc = code$3.reportMissingProp = code$3.checkMissingProp = code$3.checkReportMissingProp = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const util_2 = /*@__PURE__*/ requireUtil$5(); - function checkReportMissingProp(cxt, prop) { - const { gen, data, it } = cxt; - gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { - cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true); - cxt.error(); - }); - } - code$3.checkReportMissingProp = checkReportMissingProp; - function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { - return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`))); - } - code$3.checkMissingProp = checkMissingProp; - function reportMissingProp(cxt, missing) { - cxt.setParams({ missingProperty: missing }, true); - cxt.error(); - } - code$3.reportMissingProp = reportMissingProp; - function hasPropFunc(gen) { - return gen.scopeValue("func", { - ref: Object.prototype.hasOwnProperty, - code: (0, codegen_1._) `Object.prototype.hasOwnProperty`, - }); - } - code$3.hasPropFunc = hasPropFunc; - function isOwnProperty(gen, data, property) { - return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`; - } - code$3.isOwnProperty = isOwnProperty; - function propertyInData(gen, data, property, ownProperties) { - const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`; - return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond; - } - code$3.propertyInData = propertyInData; - function noPropertyInData(gen, data, property, ownProperties) { - const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`; - return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; - } - code$3.noPropertyInData = noPropertyInData; - function allSchemaProperties(schemaMap) { - return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; - } - code$3.allSchemaProperties = allSchemaProperties; - function schemaProperties(it, schemaMap) { - return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p])); - } - code$3.schemaProperties = schemaProperties; - function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { - const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; - const valCxt = [ - [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], - [names_1.default.parentData, it.parentData], - [names_1.default.parentDataProperty, it.parentDataProperty], - [names_1.default.rootData, names_1.default.rootData], - ]; - if (it.opts.dynamicRef) - valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); - const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`; - return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`; - } - code$3.callValidateCode = callValidateCode; - const newRegExp = (0, codegen_1._) `new RegExp`; - function usePattern({ gen, it: { opts } }, pattern) { - const u = opts.unicodeRegExp ? "u" : ""; - const { regExp } = opts.code; - const rx = regExp(pattern, u); - return gen.scopeValue("pattern", { - key: rx.toString(), - ref: rx, - code: (0, codegen_1._) `${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`, - }); - } - code$3.usePattern = usePattern; - function validateArray(cxt) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - if (it.allErrors) { - const validArr = gen.let("valid", true); - validateItems(() => gen.assign(validArr, false)); - return validArr; - } - gen.var(valid, true); - validateItems(() => gen.break()); - return valid; - function validateItems(notValid) { - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword, - dataProp: i, - dataPropType: util_1.Type.Num, - }, valid); - gen.if((0, codegen_1.not)(valid), notValid); - }); - } - } - code$3.validateArray = validateArray; - function validateUnion(cxt) { - const { gen, schema, keyword, it } = cxt; - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)); - if (alwaysValid && !it.opts.unevaluated) - return; - const valid = gen.let("valid", false); - const schValid = gen.name("_valid"); - gen.block(() => schema.forEach((_sch, i) => { - const schCxt = cxt.subschema({ - keyword, - schemaProp: i, - compositeRule: true, - }, schValid); - gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`); - const merged = cxt.mergeValidEvaluated(schCxt, schValid); - if (!merged) - gen.if((0, codegen_1.not)(valid)); - })); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - } - code$3.validateUnion = validateUnion; - return code$3; -} - -var hasRequiredKeyword$3; - -function requireKeyword$3 () { - if (hasRequiredKeyword$3) return keyword$3; - hasRequiredKeyword$3 = 1; - Object.defineProperty(keyword$3, "__esModule", { value: true }); - keyword$3.validateKeywordUsage = keyword$3.validSchemaType = keyword$3.funcKeywordCode = keyword$3.macroKeywordCode = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const code_1 = /*@__PURE__*/ requireCode$3(); - const errors_1 = /*@__PURE__*/ requireErrors$2(); - function macroKeywordCode(cxt, def) { - const { gen, keyword, schema, parentSchema, it } = cxt; - const macroSchema = def.macro.call(it.self, schema, parentSchema, it); - const schemaRef = useKeyword(gen, keyword, macroSchema); - if (it.opts.validateSchema !== false) - it.self.validateSchema(macroSchema, true); - const valid = gen.name("valid"); - cxt.subschema({ - schema: macroSchema, - schemaPath: codegen_1.nil, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - topSchemaRef: schemaRef, - compositeRule: true, - }, valid); - cxt.pass(valid, () => cxt.error(true)); - } - keyword$3.macroKeywordCode = macroKeywordCode; - function funcKeywordCode(cxt, def) { - var _a; - const { gen, keyword, schema, parentSchema, $data, it } = cxt; - checkAsyncKeyword(it, def); - const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate; - const validateRef = useKeyword(gen, keyword, validate); - const valid = gen.let("valid"); - cxt.block$data(valid, validateKeyword); - cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); - function validateKeyword() { - if (def.errors === false) { - assignValid(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => cxt.error()); - } - else { - const ruleErrs = def.async ? validateAsync() : validateSync(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => addErrs(cxt, ruleErrs)); - } - } - function validateAsync() { - const ruleErrs = gen.let("ruleErrs", null); - gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e))); - return ruleErrs; - } - function validateSync() { - const validateErrs = (0, codegen_1._) `${validateRef}.errors`; - gen.assign(validateErrs, null); - assignValid(codegen_1.nil); - return validateErrs; - } - function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) { - const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self; - const passSchema = !(("compile" in def && !$data) || def.schema === false); - gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); - } - function reportErrs(errors) { - var _a; - gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors); - } - } - keyword$3.funcKeywordCode = funcKeywordCode; - function modifyData(cxt) { - const { gen, data, it } = cxt; - gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`)); - } - function addErrs(cxt, errs) { - const { gen } = cxt; - gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => { - gen - .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`) - .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`); - (0, errors_1.extendErrors)(cxt); - }, () => cxt.error()); - } - function checkAsyncKeyword({ schemaEnv }, def) { - if (def.async && !schemaEnv.$async) - throw new Error("async keyword in sync schema"); - } - function useKeyword(gen, keyword, result) { - if (result === undefined) - throw new Error(`keyword "${keyword}" failed to compile`); - return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); - } - function validSchemaType(schema, schemaType, allowUndefined = false) { - return (!schemaType.length || - schemaType.some((st) => st === "array" - ? Array.isArray(schema) - : st === "object" - ? schema && typeof schema == "object" && !Array.isArray(schema) - : typeof schema == st || (allowUndefined && typeof schema == "undefined"))); - } - keyword$3.validSchemaType = validSchemaType; - function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) { - if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { - throw new Error("ajv implementation error"); - } - const deps = def.dependencies; - if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) { - throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); - } - if (def.validateSchema) { - const valid = def.validateSchema(schema[keyword]); - if (!valid) { - const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + - self.errorsText(def.validateSchema.errors); - if (opts.validateSchema === "log") - self.logger.error(msg); - else - throw new Error(msg); - } - } - } - keyword$3.validateKeywordUsage = validateKeywordUsage; - return keyword$3; -} - -var subschema$1 = {}; - -var hasRequiredSubschema$1; - -function requireSubschema$1 () { - if (hasRequiredSubschema$1) return subschema$1; - hasRequiredSubschema$1 = 1; - Object.defineProperty(subschema$1, "__esModule", { value: true }); - subschema$1.extendSubschemaMode = subschema$1.extendSubschemaData = subschema$1.getSubschema = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) { - if (keyword !== undefined && schema !== undefined) { - throw new Error('both "keyword" and "schema" passed, only one allowed'); - } - if (keyword !== undefined) { - const sch = it.schema[keyword]; - return schemaProp === undefined - ? { - schema: sch, - schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - } - : { - schema: sch[schemaProp], - schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`, - }; - } - if (schema !== undefined) { - if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) { - throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); - } - return { - schema, - schemaPath, - topSchemaRef, - errSchemaPath, - }; - } - throw new Error('either "keyword" or "schema" must be passed'); - } - subschema$1.getSubschema = getSubschema; - function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { - if (data !== undefined && dataProp !== undefined) { - throw new Error('both "data" and "dataProp" passed, only one allowed'); - } - const { gen } = it; - if (dataProp !== undefined) { - const { errorPath, dataPathArr, opts } = it; - const nextData = gen.let("data", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true); - dataContextProps(nextData); - subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; - subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`; - subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; - } - if (data !== undefined) { - const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); - dataContextProps(nextData); - if (propertyName !== undefined) - subschema.propertyName = propertyName; - } - if (dataTypes) - subschema.dataTypes = dataTypes; - function dataContextProps(_nextData) { - subschema.data = _nextData; - subschema.dataLevel = it.dataLevel + 1; - subschema.dataTypes = []; - it.definedProperties = new Set(); - subschema.parentData = it.data; - subschema.dataNames = [...it.dataNames, _nextData]; - } - } - subschema$1.extendSubschemaData = extendSubschemaData; - function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { - if (compositeRule !== undefined) - subschema.compositeRule = compositeRule; - if (createErrors !== undefined) - subschema.createErrors = createErrors; - if (allErrors !== undefined) - subschema.allErrors = allErrors; - subschema.jtdDiscriminator = jtdDiscriminator; - subschema.jtdMetadata = jtdMetadata; - } - subschema$1.extendSubschemaMode = extendSubschemaMode; - return subschema$1; -} - -var resolve$1 = {}; - -var fastDeepEqual; -var hasRequiredFastDeepEqual; - -function requireFastDeepEqual () { - if (hasRequiredFastDeepEqual) return fastDeepEqual; - hasRequiredFastDeepEqual = 1; - fastDeepEqual = function equal(a, b) { - if (a === b) return true; - if (a && b && typeof a == 'object' && typeof b == 'object') { - if (a.constructor !== b.constructor) return false; - var length, i, keys; - if (Array.isArray(a)) { - length = a.length; - if (length != b.length) return false; - for (i = length; i-- !== 0;) - if (!equal(a[i], b[i])) return false; - return true; - } - if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; - if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); - if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); - keys = Object.keys(a); - length = keys.length; - if (length !== Object.keys(b).length) return false; - for (i = length; i-- !== 0;) - if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; - for (i = length; i-- !== 0;) { - var key = keys[i]; - if (!equal(a[key], b[key])) return false; - } - return true; - } - return a!==a && b!==b; - }; - return fastDeepEqual; -} - -var jsonSchemaTraverse$2 = {exports: {}}; - -var hasRequiredJsonSchemaTraverse$2; - -function requireJsonSchemaTraverse$2 () { - if (hasRequiredJsonSchemaTraverse$2) return jsonSchemaTraverse$2.exports; - hasRequiredJsonSchemaTraverse$2 = 1; - var traverse = jsonSchemaTraverse$2.exports = function (schema, opts, cb) { - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - cb = opts.cb || cb; - var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; - var post = cb.post || function() {}; - _traverse(opts, pre, post, schema, '', schema); - }; - traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - if: true, - then: true, - else: true - }; - traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true - }; - traverse.propsKeywords = { - $defs: true, - definitions: true, - properties: true, - patternProperties: true, - dependencies: true - }; - traverse.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true - }; - function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i (count += countKeys(sch))); - } - if (count === Infinity) - return Infinity; - } - return count; - } - function getFullPath(resolver, id = "", normalize) { - if (normalize !== false) - id = normalizeId(id); - const p = resolver.parse(id); - return _getFullPath(resolver, p); - } - resolve$1.getFullPath = getFullPath; - function _getFullPath(resolver, p) { - const serialized = resolver.serialize(p); - return serialized.split("#")[0] + "#"; - } - resolve$1._getFullPath = _getFullPath; - const TRAILING_SLASH_HASH = /#\/?$/; - function normalizeId(id) { - return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; - } - resolve$1.normalizeId = normalizeId; - function resolveUrl(resolver, baseId, id) { - id = normalizeId(id); - return resolver.resolve(baseId, id); - } - resolve$1.resolveUrl = resolveUrl; - const ANCHOR = /^[a-z_][-a-z0-9._]*$/i; - function getSchemaRefs(schema, baseId) { - if (typeof schema == "boolean") - return {}; - const { schemaId, uriResolver } = this.opts; - const schId = normalizeId(schema[schemaId] || baseId); - const baseIds = { "": schId }; - const pathPrefix = getFullPath(uriResolver, schId, false); - const localRefs = {}; - const schemaRefs = new Set(); - traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { - if (parentJsonPtr === undefined) - return; - const fullPath = pathPrefix + jsonPtr; - let innerBaseId = baseIds[parentJsonPtr]; - if (typeof sch[schemaId] == "string") - innerBaseId = addRef.call(this, sch[schemaId]); - addAnchor.call(this, sch.$anchor); - addAnchor.call(this, sch.$dynamicAnchor); - baseIds[jsonPtr] = innerBaseId; - function addRef(ref) { - const _resolve = this.opts.uriResolver.resolve; - ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); - if (schemaRefs.has(ref)) - throw ambiguos(ref); - schemaRefs.add(ref); - let schOrRef = this.refs[ref]; - if (typeof schOrRef == "string") - schOrRef = this.refs[schOrRef]; - if (typeof schOrRef == "object") { - checkAmbiguosRef(sch, schOrRef.schema, ref); - } - else if (ref !== normalizeId(fullPath)) { - if (ref[0] === "#") { - checkAmbiguosRef(sch, localRefs[ref], ref); - localRefs[ref] = sch; - } - else { - this.refs[ref] = fullPath; - } - } - return ref; - } - function addAnchor(anchor) { - if (typeof anchor == "string") { - if (!ANCHOR.test(anchor)) - throw new Error(`invalid anchor "${anchor}"`); - addRef.call(this, `#${anchor}`); - } - } - }); - return localRefs; - function checkAmbiguosRef(sch1, sch2, ref) { - if (sch2 !== undefined && !equal(sch1, sch2)) - throw ambiguos(ref); - } - function ambiguos(ref) { - return new Error(`reference "${ref}" resolves to more than one schema`); - } - } - resolve$1.getSchemaRefs = getSchemaRefs; - return resolve$1; -} - -var hasRequiredValidate$2; - -function requireValidate$2 () { - if (hasRequiredValidate$2) return validate$2; - hasRequiredValidate$2 = 1; - Object.defineProperty(validate$2, "__esModule", { value: true }); - validate$2.getData = validate$2.KeywordCxt = validate$2.validateFunctionCode = void 0; - const boolSchema_1 = /*@__PURE__*/ requireBoolSchema$1(); - const dataType_1 = /*@__PURE__*/ requireDataType$1(); - const applicability_1 = /*@__PURE__*/ requireApplicability$1(); - const dataType_2 = /*@__PURE__*/ requireDataType$1(); - const defaults_1 = /*@__PURE__*/ requireDefaults$1(); - const keyword_1 = /*@__PURE__*/ requireKeyword$3(); - const subschema_1 = /*@__PURE__*/ requireSubschema$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const resolve_1 = /*@__PURE__*/ requireResolve$2(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const errors_1 = /*@__PURE__*/ requireErrors$2(); - function validateFunctionCode(it) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - topSchemaObjCode(it); - return; - } - } - validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); - } - validate$2.validateFunctionCode = validateFunctionCode; - function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) { - if (opts.code.es5) { - gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { - gen.code((0, codegen_1._) `"use strict"; ${funcSourceUrl(schema, opts)}`); - destructureValCxtES5(gen, opts); - gen.code(body); - }); - } - else { - gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body)); - } - } - function destructureValCxt(opts) { - return (0, codegen_1._) `{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; - } - function destructureValCxtES5(gen, opts) { - gen.if(names_1.default.valCxt, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`); - gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); - gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); - }, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._) `""`); - gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`); - gen.var(names_1.default.rootData, names_1.default.data); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`); - }); - } - function topSchemaObjCode(it) { - const { schema, opts, gen } = it; - validateFunction(it, () => { - if (opts.$comment && schema.$comment) - commentKeyword(it); - checkNoDefault(it); - gen.let(names_1.default.vErrors, null); - gen.let(names_1.default.errors, 0); - if (opts.unevaluated) - resetEvaluated(it); - typeAndKeywords(it); - returnResults(it); - }); - return; - } - function resetEvaluated(it) { - const { gen, validateName } = it; - it.evaluated = gen.const("evaluated", (0, codegen_1._) `${validateName}.evaluated`); - gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`)); - gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`)); - } - function funcSourceUrl(schema, opts) { - const schId = typeof schema == "object" && schema[opts.schemaId]; - return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil; - } - function subschemaCode(it, valid) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - subSchemaObjCode(it, valid); - return; - } - } - (0, boolSchema_1.boolOrEmptySchema)(it, valid); - } - function schemaCxtHasRules({ schema, self }) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (self.RULES.all[key]) - return true; - return false; - } - function isSchemaObj(it) { - return typeof it.schema != "boolean"; - } - function subSchemaObjCode(it, valid) { - const { schema, gen, opts } = it; - if (opts.$comment && schema.$comment) - commentKeyword(it); - updateContext(it); - checkAsyncSchema(it); - const errsCount = gen.const("_errs", names_1.default.errors); - typeAndKeywords(it, errsCount); - gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); - } - function checkKeywords(it) { - (0, util_1.checkUnknownRules)(it); - checkRefsAndKeywords(it); - } - function typeAndKeywords(it, errsCount) { - if (it.opts.jtd) - return schemaKeywords(it, [], false, errsCount); - const types = (0, dataType_1.getSchemaTypes)(it.schema); - const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types); - schemaKeywords(it, types, !checkedTypes, errsCount); - } - function checkRefsAndKeywords(it) { - const { schema, errSchemaPath, opts, self } = it; - if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) { - self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); - } - } - function checkNoDefault(it) { - const { schema, opts } = it; - if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) { - (0, util_1.checkStrictMode)(it, "default is ignored in the schema root"); - } - } - function updateContext(it) { - const schId = it.schema[it.opts.schemaId]; - if (schId) - it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId); - } - function checkAsyncSchema(it) { - if (it.schema.$async && !it.schemaEnv.$async) - throw new Error("async schema in sync schema"); - } - function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) { - const msg = schema.$comment; - if (opts.$comment === true) { - gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`); - } - else if (typeof opts.$comment == "function") { - const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`; - const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); - gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); - } - } - function returnResults(it) { - const { gen, schemaEnv, validateName, ValidationError, opts } = it; - if (schemaEnv.$async) { - gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`)); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors); - if (opts.unevaluated) - assignEvaluated(it); - gen.return((0, codegen_1._) `${names_1.default.errors} === 0`); - } - } - function assignEvaluated({ gen, evaluated, props, items }) { - if (props instanceof codegen_1.Name) - gen.assign((0, codegen_1._) `${evaluated}.props`, props); - if (items instanceof codegen_1.Name) - gen.assign((0, codegen_1._) `${evaluated}.items`, items); - } - function schemaKeywords(it, types, typeErrors, errsCount) { - const { gen, schema, data, allErrors, opts, self } = it; - const { RULES } = self; - if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) { - gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); - return; - } - if (!opts.jtd) - checkStrictTypes(it, types); - gen.block(() => { - for (const group of RULES.rules) - groupKeywords(group); - groupKeywords(RULES.post); - }); - function groupKeywords(group) { - if (!(0, applicability_1.shouldUseGroup)(schema, group)) - return; - if (group.type) { - gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers)); - iterateKeywords(it, group); - if (types.length === 1 && types[0] === group.type && typeErrors) { - gen.else(); - (0, dataType_2.reportTypeError)(it); - } - gen.endIf(); - } - else { - iterateKeywords(it, group); - } - if (!allErrors) - gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`); - } - } - function iterateKeywords(it, group) { - const { gen, schema, opts: { useDefaults }, } = it; - if (useDefaults) - (0, defaults_1.assignDefaults)(it, group.type); - gen.block(() => { - for (const rule of group.rules) { - if ((0, applicability_1.shouldUseRule)(schema, rule)) { - keywordCode(it, rule.keyword, rule.definition, group.type); - } - } - }); - } - function checkStrictTypes(it, types) { - if (it.schemaEnv.meta || !it.opts.strictTypes) - return; - checkContextTypes(it, types); - if (!it.opts.allowUnionTypes) - checkMultipleTypes(it, types); - checkKeywordTypes(it, it.dataTypes); - } - function checkContextTypes(it, types) { - if (!types.length) - return; - if (!it.dataTypes.length) { - it.dataTypes = types; - return; - } - types.forEach((t) => { - if (!includesType(it.dataTypes, t)) { - strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); - } - }); - narrowSchemaTypes(it, types); - } - function checkMultipleTypes(it, ts) { - if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { - strictTypesError(it, "use allowUnionTypes to allow union type keyword"); - } - } - function checkKeywordTypes(it, ts) { - const rules = it.self.RULES.all; - for (const keyword in rules) { - const rule = rules[keyword]; - if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) { - const { type } = rule.definition; - if (type.length && !type.some((t) => hasApplicableType(ts, t))) { - strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`); - } - } - } - } - function hasApplicableType(schTs, kwdT) { - return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer")); - } - function includesType(ts, t) { - return ts.includes(t) || (t === "integer" && ts.includes("number")); - } - function narrowSchemaTypes(it, withTypes) { - const ts = []; - for (const t of it.dataTypes) { - if (includesType(withTypes, t)) - ts.push(t); - else if (withTypes.includes("integer") && t === "number") - ts.push("integer"); - } - it.dataTypes = ts; - } - function strictTypesError(it, msg) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - msg += ` at "${schemaPath}" (strictTypes)`; - (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes); - } - class KeywordCxt { - constructor(it, def, keyword) { - (0, keyword_1.validateKeywordUsage)(it, def, keyword); - this.gen = it.gen; - this.allErrors = it.allErrors; - this.keyword = keyword; - this.data = it.data; - this.schema = it.schema[keyword]; - this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data; - this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data); - this.schemaType = def.schemaType; - this.parentSchema = it.schema; - this.params = {}; - this.it = it; - this.def = def; - if (this.$data) { - this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); - } - else { - this.schemaCode = this.schemaValue; - if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { - throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); - } - } - if ("code" in def ? def.trackErrors : def.errors !== false) { - this.errsCount = it.gen.const("_errs", names_1.default.errors); - } - } - result(condition, successAction, failAction) { - this.failResult((0, codegen_1.not)(condition), successAction, failAction); - } - failResult(condition, successAction, failAction) { - this.gen.if(condition); - if (failAction) - failAction(); - else - this.error(); - if (successAction) { - this.gen.else(); - successAction(); - if (this.allErrors) - this.gen.endIf(); - } - else { - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - } - pass(condition, failAction) { - this.failResult((0, codegen_1.not)(condition), undefined, failAction); - } - fail(condition) { - if (condition === undefined) { - this.error(); - if (!this.allErrors) - this.gen.if(false); - return; - } - this.gen.if(condition); - this.error(); - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - fail$data(condition) { - if (!this.$data) - return this.fail(condition); - const { schemaCode } = this; - this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); - } - error(append, errorParams, errorPaths) { - if (errorParams) { - this.setParams(errorParams); - this._error(append, errorPaths); - this.setParams({}); - return; - } - this._error(append, errorPaths); - } - _error(append, errorPaths) { - (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); - } - $dataError() { - (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); - } - reset() { - if (this.errsCount === undefined) - throw new Error('add "trackErrors" to keyword definition'); - (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); - } - ok(cond) { - if (!this.allErrors) - this.gen.if(cond); - } - setParams(obj, assign) { - if (assign) - Object.assign(this.params, obj); - else - this.params = obj; - } - block$data(valid, codeBlock, $dataValid = codegen_1.nil) { - this.gen.block(() => { - this.check$data(valid, $dataValid); - codeBlock(); - }); - } - check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { - if (!this.$data) - return; - const { gen, schemaCode, schemaType, def } = this; - gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid)); - if (valid !== codegen_1.nil) - gen.assign(valid, true); - if (schemaType.length || def.validateSchema) { - gen.elseIf(this.invalid$data()); - this.$dataError(); - if (valid !== codegen_1.nil) - gen.assign(valid, false); - } - gen.else(); - } - invalid$data() { - const { gen, schemaCode, schemaType, def, it } = this; - return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); - function wrong$DataType() { - if (schemaType.length) { - if (!(schemaCode instanceof codegen_1.Name)) - throw new Error("ajv implementation error"); - const st = Array.isArray(schemaType) ? schemaType : [schemaType]; - return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; - } - return codegen_1.nil; - } - function invalid$DataSchema() { - if (def.validateSchema) { - const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); - return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`; - } - return codegen_1.nil; - } - } - subschema(appl, valid) { - const subschema = (0, subschema_1.getSubschema)(this.it, appl); - (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); - (0, subschema_1.extendSubschemaMode)(subschema, appl); - const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined }; - subschemaCode(nextContext, valid); - return nextContext; - } - mergeEvaluated(schemaCxt, toName) { - const { it, gen } = this; - if (!it.opts.unevaluated) - return; - if (it.props !== true && schemaCxt.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); - } - if (it.items !== true && schemaCxt.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); - } - } - mergeValidEvaluated(schemaCxt, valid) { - const { it, gen } = this; - if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { - gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); - return true; - } - } - } - validate$2.KeywordCxt = KeywordCxt; - function keywordCode(it, keyword, def, ruleType) { - const cxt = new KeywordCxt(it, def, keyword); - if ("code" in def) { - def.code(cxt, ruleType); - } - else if (cxt.$data && def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } - else if ("macro" in def) { - (0, keyword_1.macroKeywordCode)(cxt, def); - } - else if (def.compile || def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } - } - const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; - const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function getData($data, { dataLevel, dataNames, dataPathArr }) { - let jsonPointer; - let data; - if ($data === "") - return names_1.default.rootData; - if ($data[0] === "/") { - if (!JSON_POINTER.test($data)) - throw new Error(`Invalid JSON-pointer: ${$data}`); - jsonPointer = $data; - data = names_1.default.rootData; - } - else { - const matches = RELATIVE_JSON_POINTER.exec($data); - if (!matches) - throw new Error(`Invalid JSON-pointer: ${$data}`); - const up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer === "#") { - if (up >= dataLevel) - throw new Error(errorMsg("property/index", up)); - return dataPathArr[dataLevel - up]; - } - if (up > dataLevel) - throw new Error(errorMsg("data", up)); - data = dataNames[dataLevel - up]; - if (!jsonPointer) - return data; - } - let expr = data; - const segments = jsonPointer.split("/"); - for (const segment of segments) { - if (segment) { - data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; - expr = (0, codegen_1._) `${expr} && ${data}`; - } - } - return expr; - function errorMsg(pointerType, up) { - return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; - } - } - validate$2.getData = getData; - return validate$2; -} - -var validation_error$1 = {}; - -var hasRequiredValidation_error$1; - -function requireValidation_error$1 () { - if (hasRequiredValidation_error$1) return validation_error$1; - hasRequiredValidation_error$1 = 1; - Object.defineProperty(validation_error$1, "__esModule", { value: true }); - class ValidationError extends Error { - constructor(errors) { - super("validation failed"); - this.errors = errors; - this.ajv = this.validation = true; - } - } - validation_error$1.default = ValidationError; - return validation_error$1; -} - -var ref_error$1 = {}; - -var hasRequiredRef_error$1; - -function requireRef_error$1 () { - if (hasRequiredRef_error$1) return ref_error$1; - hasRequiredRef_error$1 = 1; - Object.defineProperty(ref_error$1, "__esModule", { value: true }); - const resolve_1 = /*@__PURE__*/ requireResolve$2(); - class MissingRefError extends Error { - constructor(resolver, baseId, ref, msg) { - super(msg || `can't resolve reference ${ref} from id ${baseId}`); - this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); - this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); - } - } - ref_error$1.default = MissingRefError; - return ref_error$1; -} - -var compile$2 = {}; - -var hasRequiredCompile$3; - -function requireCompile$3 () { - if (hasRequiredCompile$3) return compile$2; - hasRequiredCompile$3 = 1; - Object.defineProperty(compile$2, "__esModule", { value: true }); - compile$2.resolveSchema = compile$2.getCompilingSchema = compile$2.resolveRef = compile$2.compileSchema = compile$2.SchemaEnv = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const validation_error_1 = /*@__PURE__*/ requireValidation_error$1(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const resolve_1 = /*@__PURE__*/ requireResolve$2(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const validate_1 = /*@__PURE__*/ requireValidate$2(); - class SchemaEnv { - constructor(env) { - var _a; - this.refs = {}; - this.dynamicAnchors = {}; - let schema; - if (typeof env.schema == "object") - schema = env.schema; - this.schema = env.schema; - this.schemaId = env.schemaId; - this.root = env.root || this; - this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]); - this.schemaPath = env.schemaPath; - this.localRefs = env.localRefs; - this.meta = env.meta; - this.$async = schema === null || schema === void 0 ? void 0 : schema.$async; - this.refs = {}; - } - } - compile$2.SchemaEnv = SchemaEnv; - function compileSchema(sch) { - const _sch = getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - let _ValidationError; - if (sch.$async) { - _ValidationError = gen.scopeValue("Error", { - ref: validation_error_1.default, - code: (0, codegen_1._) `require("ajv/dist/runtime/validation_error").default`, - }); - } - const validateName = gen.scopeName("validate"); - sch.validateName = validateName; - const schemaCxt = { - gen, - allErrors: this.opts.allErrors, - data: names_1.default.data, - parentData: names_1.default.parentData, - parentDataProperty: names_1.default.parentDataProperty, - dataNames: [names_1.default.data], - dataPathArr: [codegen_1.nil], - dataLevel: 0, - dataTypes: [], - definedProperties: new Set(), - topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true - ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } - : { ref: sch.schema }), - validateName, - ValidationError: _ValidationError, - schema: sch.schema, - schemaEnv: sch, - rootId, - baseId: sch.baseId || rootId, - schemaPath: codegen_1.nil, - errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), - errorPath: (0, codegen_1._) `""`, - opts: this.opts, - self: this, - }; - let sourceCode; - try { - this._compilations.add(sch); - (0, validate_1.validateFunctionCode)(schemaCxt); - gen.optimize(this.opts.code.optimize); - const validateCode = gen.toString(); - sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; - if (this.opts.code.process) - sourceCode = this.opts.code.process(sourceCode, sch); - const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); - const validate = makeValidate(this, this.scope.get()); - this.scope.value(validateName, { ref: validate }); - validate.errors = null; - validate.schema = sch.schema; - validate.schemaEnv = sch; - if (sch.$async) - validate.$async = true; - if (this.opts.code.source === true) { - validate.source = { validateName, validateCode, scopeValues: gen._values }; - } - if (this.opts.unevaluated) { - const { props, items } = schemaCxt; - validate.evaluated = { - props: props instanceof codegen_1.Name ? undefined : props, - items: items instanceof codegen_1.Name ? undefined : items, - dynamicProps: props instanceof codegen_1.Name, - dynamicItems: items instanceof codegen_1.Name, - }; - if (validate.source) - validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated); - } - sch.validate = validate; - return sch; - } - catch (e) { - delete sch.validate; - delete sch.validateName; - if (sourceCode) - this.logger.error("Error compiling schema, function code:", sourceCode); - throw e; - } - finally { - this._compilations.delete(sch); - } - } - compile$2.compileSchema = compileSchema; - function resolveRef(root, baseId, ref) { - var _a; - ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); - const schOrFunc = root.refs[ref]; - if (schOrFunc) - return schOrFunc; - let _sch = resolve.call(this, root, ref); - if (_sch === undefined) { - const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; - const { schemaId } = this.opts; - if (schema) - _sch = new SchemaEnv({ schema, schemaId, root, baseId }); - } - if (_sch === undefined) - return; - return (root.refs[ref] = inlineOrCompile.call(this, _sch)); - } - compile$2.resolveRef = resolveRef; - function inlineOrCompile(sch) { - if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) - return sch.schema; - return sch.validate ? sch : compileSchema.call(this, sch); - } - function getCompilingSchema(schEnv) { - for (const sch of this._compilations) { - if (sameSchemaEnv(sch, schEnv)) - return sch; - } - } - compile$2.getCompilingSchema = getCompilingSchema; - function sameSchemaEnv(s1, s2) { - return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; - } - function resolve(root, - ref - ) { - let sch; - while (typeof (sch = this.refs[ref]) == "string") - ref = sch; - return sch || this.schemas[ref] || resolveSchema.call(this, root, ref); - } - function resolveSchema(root, - ref - ) { - const p = this.opts.uriResolver.parse(ref); - const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p); - let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined); - if (Object.keys(root.schema).length > 0 && refPath === baseId) { - return getJsonPointer.call(this, p, root); - } - const id = (0, resolve_1.normalizeId)(refPath); - const schOrRef = this.refs[id] || this.schemas[id]; - if (typeof schOrRef == "string") { - const sch = resolveSchema.call(this, root, schOrRef); - if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") - return; - return getJsonPointer.call(this, p, sch); - } - if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") - return; - if (!schOrRef.validate) - compileSchema.call(this, schOrRef); - if (id === (0, resolve_1.normalizeId)(ref)) { - const { schema } = schOrRef; - const { schemaId } = this.opts; - const schId = schema[schemaId]; - if (schId) - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - return new SchemaEnv({ schema, schemaId, root, baseId }); - } - return getJsonPointer.call(this, p, schOrRef); - } - compile$2.resolveSchema = resolveSchema; - const PREVENT_SCOPE_CHANGE = new Set([ - "properties", - "patternProperties", - "enum", - "dependencies", - "definitions", - ]); - function getJsonPointer(parsedRef, { baseId, schema, root }) { - var _a; - if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") - return; - for (const part of parsedRef.fragment.slice(1).split("/")) { - if (typeof schema === "boolean") - return; - const partSchema = schema[(0, util_1.unescapeFragment)(part)]; - if (partSchema === undefined) - return; - schema = partSchema; - const schId = typeof schema === "object" && schema[this.opts.schemaId]; - if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - } - } - let env; - if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) { - const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref); - env = resolveSchema.call(this, root, $ref); - } - const { schemaId } = this.opts; - env = env || new SchemaEnv({ schema, schemaId, root, baseId }); - if (env.schema !== env.root.schema) - return env; - return undefined; - } - return compile$2; -} - -var $id$5 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"; -var description$2 = "Meta-schema for $data reference (JSON AnySchema extension proposal)"; -var type$5 = "object"; -var required$5 = [ - "$data" -]; -var properties$8 = { - $data: { - type: "string", - anyOf: [ - { - format: "relative-json-pointer" - }, - { - format: "json-pointer" - } - ] - } -}; -var additionalProperties$4 = false; -var require$$9$1 = { - $id: $id$5, - description: description$2, - type: type$5, - required: required$5, - properties: properties$8, - additionalProperties: additionalProperties$4 -}; - -var uri$1 = {}; - -var fastUri = {exports: {}}; - -var utils$2; -var hasRequiredUtils$2; - -function requireUtils$2 () { - if (hasRequiredUtils$2) return utils$2; - hasRequiredUtils$2 = 1; - const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu); - const isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u); - function stringArrayToHexStripped (input) { - let acc = ''; - let code = 0; - let i = 0; - for (i = 0; i < input.length; i++) { - code = input[i].charCodeAt(0); - if (code === 48) { - continue - } - if (!((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))) { - return '' - } - acc += input[i]; - break - } - for (i += 1; i < input.length; i++) { - code = input[i].charCodeAt(0); - if (!((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))) { - return '' - } - acc += input[i]; - } - return acc - } - const nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u); - function consumeIsZone (buffer) { - buffer.length = 0; - return true - } - function consumeHextets (buffer, address, output) { - if (buffer.length) { - const hex = stringArrayToHexStripped(buffer); - if (hex !== '') { - address.push(hex); - } else { - output.error = true; - return false - } - buffer.length = 0; - } - return true - } - function getIPV6 (input) { - let tokenCount = 0; - const output = { error: false, address: '', zone: '' }; - const address = []; - const buffer = []; - let endipv6Encountered = false; - let endIpv6 = false; - let consume = consumeHextets; - for (let i = 0; i < input.length; i++) { - const cursor = input[i]; - if (cursor === '[' || cursor === ']') { continue } - if (cursor === ':') { - if (endipv6Encountered === true) { - endIpv6 = true; - } - if (!consume(buffer, address, output)) { break } - if (++tokenCount > 7) { - output.error = true; - break - } - if (i > 0 && input[i - 1] === ':') { - endipv6Encountered = true; - } - address.push(':'); - continue - } else if (cursor === '%') { - if (!consume(buffer, address, output)) { break } - consume = consumeIsZone; - } else { - buffer.push(cursor); - continue - } - } - if (buffer.length) { - if (consume === consumeIsZone) { - output.zone = buffer.join(''); - } else if (endIpv6) { - address.push(buffer.join('')); - } else { - address.push(stringArrayToHexStripped(buffer)); - } - } - output.address = address.join(''); - return output - } - function normalizeIPv6 (host) { - if (findToken(host, ':') < 2) { return { host, isIPV6: false } } - const ipv6 = getIPV6(host); - if (!ipv6.error) { - let newHost = ipv6.address; - let escapedHost = ipv6.address; - if (ipv6.zone) { - newHost += '%' + ipv6.zone; - escapedHost += '%25' + ipv6.zone; - } - return { host: newHost, isIPV6: true, escapedHost } - } else { - return { host, isIPV6: false } - } - } - function findToken (str, token) { - let ind = 0; - for (let i = 0; i < str.length; i++) { - if (str[i] === token) ind++; - } - return ind - } - function removeDotSegments (path) { - let input = path; - const output = []; - let nextSlash = -1; - let len = 0; - while (len = input.length) { - if (len === 1) { - if (input === '.') { - break - } else if (input === '/') { - output.push('/'); - break - } else { - output.push(input); - break - } - } else if (len === 2) { - if (input[0] === '.') { - if (input[1] === '.') { - break - } else if (input[1] === '/') { - input = input.slice(2); - continue - } - } else if (input[0] === '/') { - if (input[1] === '.' || input[1] === '/') { - output.push('/'); - break - } - } - } else if (len === 3) { - if (input === '/..') { - if (output.length !== 0) { - output.pop(); - } - output.push('/'); - break - } - } - if (input[0] === '.') { - if (input[1] === '.') { - if (input[2] === '/') { - input = input.slice(3); - continue - } - } else if (input[1] === '/') { - input = input.slice(2); - continue - } - } else if (input[0] === '/') { - if (input[1] === '.') { - if (input[2] === '/') { - input = input.slice(2); - continue - } else if (input[2] === '.') { - if (input[3] === '/') { - input = input.slice(3); - if (output.length !== 0) { - output.pop(); - } - continue - } - } - } - } - if ((nextSlash = input.indexOf('/', 1)) === -1) { - output.push(input); - break - } else { - output.push(input.slice(0, nextSlash)); - input = input.slice(nextSlash); - } - } - return output.join('') - } - function normalizeComponentEncoding (component, esc) { - const func = esc !== true ? escape : unescape; - if (component.scheme !== undefined) { - component.scheme = func(component.scheme); - } - if (component.userinfo !== undefined) { - component.userinfo = func(component.userinfo); - } - if (component.host !== undefined) { - component.host = func(component.host); - } - if (component.path !== undefined) { - component.path = func(component.path); - } - if (component.query !== undefined) { - component.query = func(component.query); - } - if (component.fragment !== undefined) { - component.fragment = func(component.fragment); - } - return component - } - function recomposeAuthority (component) { - const uriTokens = []; - if (component.userinfo !== undefined) { - uriTokens.push(component.userinfo); - uriTokens.push('@'); - } - if (component.host !== undefined) { - let host = unescape(component.host); - if (!isIPv4(host)) { - const ipV6res = normalizeIPv6(host); - if (ipV6res.isIPV6 === true) { - host = `[${ipV6res.escapedHost}]`; - } else { - host = component.host; - } - } - uriTokens.push(host); - } - if (typeof component.port === 'number' || typeof component.port === 'string') { - uriTokens.push(':'); - uriTokens.push(String(component.port)); - } - return uriTokens.length ? uriTokens.join('') : undefined - } utils$2 = { - nonSimpleDomain, - recomposeAuthority, - normalizeComponentEncoding, - removeDotSegments, - isIPv4, - isUUID, - normalizeIPv6, - stringArrayToHexStripped - }; - return utils$2; -} - -var schemes; -var hasRequiredSchemes; - -function requireSchemes () { - if (hasRequiredSchemes) return schemes; - hasRequiredSchemes = 1; - const { isUUID } = requireUtils$2(); - const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; - const supportedSchemeNames = (['http', 'https', 'ws', - 'wss', 'urn', 'urn:uuid']); - function isValidSchemeName (name) { - return supportedSchemeNames.indexOf( (name)) !== -1 - } - function wsIsSecure (wsComponent) { - if (wsComponent.secure === true) { - return true - } else if (wsComponent.secure === false) { - return false - } else if (wsComponent.scheme) { - return ( - wsComponent.scheme.length === 3 && - (wsComponent.scheme[0] === 'w' || wsComponent.scheme[0] === 'W') && - (wsComponent.scheme[1] === 's' || wsComponent.scheme[1] === 'S') && - (wsComponent.scheme[2] === 's' || wsComponent.scheme[2] === 'S') - ) - } else { - return false - } - } - function httpParse (component) { - if (!component.host) { - component.error = component.error || 'HTTP URIs must have a host.'; - } - return component - } - function httpSerialize (component) { - const secure = String(component.scheme).toLowerCase() === 'https'; - if (component.port === (secure ? 443 : 80) || component.port === '') { - component.port = undefined; - } - if (!component.path) { - component.path = '/'; - } - return component - } - function wsParse (wsComponent) { - wsComponent.secure = wsIsSecure(wsComponent); - wsComponent.resourceName = (wsComponent.path || '/') + (wsComponent.query ? '?' + wsComponent.query : ''); - wsComponent.path = undefined; - wsComponent.query = undefined; - return wsComponent - } - function wsSerialize (wsComponent) { - if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === '') { - wsComponent.port = undefined; - } - if (typeof wsComponent.secure === 'boolean') { - wsComponent.scheme = (wsComponent.secure ? 'wss' : 'ws'); - wsComponent.secure = undefined; - } - if (wsComponent.resourceName) { - const [path, query] = wsComponent.resourceName.split('?'); - wsComponent.path = (path && path !== '/' ? path : undefined); - wsComponent.query = query; - wsComponent.resourceName = undefined; - } - wsComponent.fragment = undefined; - return wsComponent - } - function urnParse (urnComponent, options) { - if (!urnComponent.path) { - urnComponent.error = 'URN can not be parsed'; - return urnComponent - } - const matches = urnComponent.path.match(URN_REG); - if (matches) { - const scheme = options.scheme || urnComponent.scheme || 'urn'; - urnComponent.nid = matches[1].toLowerCase(); - urnComponent.nss = matches[2]; - const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`; - const schemeHandler = getSchemeHandler(urnScheme); - urnComponent.path = undefined; - if (schemeHandler) { - urnComponent = schemeHandler.parse(urnComponent, options); - } - } else { - urnComponent.error = urnComponent.error || 'URN can not be parsed.'; - } - return urnComponent - } - function urnSerialize (urnComponent, options) { - if (urnComponent.nid === undefined) { - throw new Error('URN without nid cannot be serialized') - } - const scheme = options.scheme || urnComponent.scheme || 'urn'; - const nid = urnComponent.nid.toLowerCase(); - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = getSchemeHandler(urnScheme); - if (schemeHandler) { - urnComponent = schemeHandler.serialize(urnComponent, options); - } - const uriComponent = urnComponent; - const nss = urnComponent.nss; - uriComponent.path = `${nid || options.nid}:${nss}`; - options.skipEscape = true; - return uriComponent - } - function urnuuidParse (urnComponent, options) { - const uuidComponent = urnComponent; - uuidComponent.uuid = uuidComponent.nss; - uuidComponent.nss = undefined; - if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) { - uuidComponent.error = uuidComponent.error || 'UUID is not valid.'; - } - return uuidComponent - } - function urnuuidSerialize (uuidComponent) { - const urnComponent = uuidComponent; - urnComponent.nss = (uuidComponent.uuid || '').toLowerCase(); - return urnComponent - } - const http = ({ - scheme: 'http', - domainHost: true, - parse: httpParse, - serialize: httpSerialize - }); - const https = ({ - scheme: 'https', - domainHost: http.domainHost, - parse: httpParse, - serialize: httpSerialize - }); - const ws = ({ - scheme: 'ws', - domainHost: true, - parse: wsParse, - serialize: wsSerialize - }); - const wss = ({ - scheme: 'wss', - domainHost: ws.domainHost, - parse: ws.parse, - serialize: ws.serialize - }); - const urn = ({ - scheme: 'urn', - parse: urnParse, - serialize: urnSerialize, - skipNormalize: true - }); - const urnuuid = ({ - scheme: 'urn:uuid', - parse: urnuuidParse, - serialize: urnuuidSerialize, - skipNormalize: true - }); - const SCHEMES = ({ - http, - https, - ws, - wss, - urn, - 'urn:uuid': urnuuid - }); - Object.setPrototypeOf(SCHEMES, null); - function getSchemeHandler (scheme) { - return ( - scheme && ( - SCHEMES[ (scheme)] || - SCHEMES[(scheme.toLowerCase())]) - ) || - undefined - } - schemes = { - wsIsSecure, - SCHEMES, - isValidSchemeName, - getSchemeHandler, - }; - return schemes; -} - -var hasRequiredFastUri; - -function requireFastUri () { - if (hasRequiredFastUri) return fastUri.exports; - hasRequiredFastUri = 1; - const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = requireUtils$2(); - const { SCHEMES, getSchemeHandler } = requireSchemes(); - function normalize (uri, options) { - if (typeof uri === 'string') { - uri = (serialize(parse(uri, options), options)); - } else if (typeof uri === 'object') { - uri = (parse(serialize(uri, options), options)); - } - return uri - } - function resolve (baseURI, relativeURI, options) { - const schemelessOptions = options ? Object.assign({ scheme: 'null' }, options) : { scheme: 'null' }; - const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true); - schemelessOptions.skipEscape = true; - return serialize(resolved, schemelessOptions) - } - function resolveComponent (base, relative, options, skipNormalization) { - const target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); - relative = parse(serialize(relative, options), options); - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ''); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ''); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path[0] === '/') { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = '/' + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target - } - function equal (uriA, uriB, options) { - if (typeof uriA === 'string') { - uriA = unescape(uriA); - uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true }); - } else if (typeof uriA === 'object') { - uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true }); - } - if (typeof uriB === 'string') { - uriB = unescape(uriB); - uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true }); - } else if (typeof uriB === 'object') { - uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true }); - } - return uriA.toLowerCase() === uriB.toLowerCase() - } - function serialize (cmpts, opts) { - const component = { - host: cmpts.host, - scheme: cmpts.scheme, - userinfo: cmpts.userinfo, - port: cmpts.port, - path: cmpts.path, - query: cmpts.query, - nid: cmpts.nid, - nss: cmpts.nss, - uuid: cmpts.uuid, - fragment: cmpts.fragment, - reference: cmpts.reference, - resourceName: cmpts.resourceName, - secure: cmpts.secure, - error: '' - }; - const options = Object.assign({}, opts); - const uriTokens = []; - const schemeHandler = getSchemeHandler(options.scheme || component.scheme); - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options); - if (component.path !== undefined) { - if (!options.skipEscape) { - component.path = escape(component.path); - if (component.scheme !== undefined) { - component.path = component.path.split('%3A').join(':'); - } - } else { - component.path = unescape(component.path); - } - } - if (options.reference !== 'suffix' && component.scheme) { - uriTokens.push(component.scheme, ':'); - } - const authority = recomposeAuthority(component); - if (authority !== undefined) { - if (options.reference !== 'suffix') { - uriTokens.push('//'); - } - uriTokens.push(authority); - if (component.path && component.path[0] !== '/') { - uriTokens.push('/'); - } - } - if (component.path !== undefined) { - let s = component.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if ( - authority === undefined && - s[0] === '/' && - s[1] === '/' - ) { - s = '/%2F' + s.slice(2); - } - uriTokens.push(s); - } - if (component.query !== undefined) { - uriTokens.push('?', component.query); - } - if (component.fragment !== undefined) { - uriTokens.push('#', component.fragment); - } - return uriTokens.join('') - } - const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; - function parse (uri, opts) { - const options = Object.assign({}, opts); - const parsed = { - scheme: undefined, - userinfo: undefined, - host: '', - port: undefined, - path: '', - query: undefined, - fragment: undefined - }; - let isIP = false; - if (options.reference === 'suffix') { - if (options.scheme) { - uri = options.scheme + ':' + uri; - } else { - uri = '//' + uri; - } - } - const matches = uri.match(URI_PARSE); - if (matches) { - parsed.scheme = matches[1]; - parsed.userinfo = matches[3]; - parsed.host = matches[4]; - parsed.port = parseInt(matches[5], 10); - parsed.path = matches[6] || ''; - parsed.query = matches[7]; - parsed.fragment = matches[8]; - if (isNaN(parsed.port)) { - parsed.port = matches[5]; - } - if (parsed.host) { - const ipv4result = isIPv4(parsed.host); - if (ipv4result === false) { - const ipv6result = normalizeIPv6(parsed.host); - parsed.host = ipv6result.host.toLowerCase(); - isIP = ipv6result.isIPV6; - } else { - isIP = true; - } - } - if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) { - parsed.reference = 'same-document'; - } else if (parsed.scheme === undefined) { - parsed.reference = 'relative'; - } else if (parsed.fragment === undefined) { - parsed.reference = 'absolute'; - } else { - parsed.reference = 'uri'; - } - if (options.reference && options.reference !== 'suffix' && options.reference !== parsed.reference) { - parsed.error = parsed.error || 'URI is not a ' + options.reference + ' reference.'; - } - const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme); - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) { - try { - parsed.host = URL.domainToASCII(parsed.host.toLowerCase()); - } catch (e) { - parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e; - } - } - } - if (!schemeHandler || (schemeHandler && !schemeHandler.skipNormalize)) { - if (uri.indexOf('%') !== -1) { - if (parsed.scheme !== undefined) { - parsed.scheme = unescape(parsed.scheme); - } - if (parsed.host !== undefined) { - parsed.host = unescape(parsed.host); - } - } - if (parsed.path) { - parsed.path = escape(unescape(parsed.path)); - } - if (parsed.fragment) { - parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)); - } - } - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(parsed, options); - } - } else { - parsed.error = parsed.error || 'URI can not be parsed.'; - } - return parsed - } - const fastUri$1 = { - SCHEMES, - normalize, - resolve, - resolveComponent, - equal, - serialize, - parse - }; - fastUri.exports = fastUri$1; - fastUri.exports.default = fastUri$1; - fastUri.exports.fastUri = fastUri$1; - return fastUri.exports; -} - -var hasRequiredUri$1; - -function requireUri$1 () { - if (hasRequiredUri$1) return uri$1; - hasRequiredUri$1 = 1; - Object.defineProperty(uri$1, "__esModule", { value: true }); - const uri = requireFastUri(); - uri.code = 'require("ajv/dist/runtime/uri").default'; - uri$1.default = uri; - return uri$1; -} - -var hasRequiredCore$4; - -function requireCore$4 () { - if (hasRequiredCore$4) return core$5; - hasRequiredCore$4 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0; - var validate_1 = /*@__PURE__*/ requireValidate$2(); - Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); - var codegen_1 = /*@__PURE__*/ requireCodegen$1(); - Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } }); - Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } }); - Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); - Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); - Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); - Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); - const validation_error_1 = /*@__PURE__*/ requireValidation_error$1(); - const ref_error_1 = /*@__PURE__*/ requireRef_error$1(); - const rules_1 = /*@__PURE__*/ requireRules$2(); - const compile_1 = /*@__PURE__*/ requireCompile$3(); - const codegen_2 = /*@__PURE__*/ requireCodegen$1(); - const resolve_1 = /*@__PURE__*/ requireResolve$2(); - const dataType_1 = /*@__PURE__*/ requireDataType$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const $dataRefSchema = require$$9$1; - const uri_1 = /*@__PURE__*/ requireUri$1(); - const defaultRegExp = (str, flags) => new RegExp(str, flags); - defaultRegExp.code = "new RegExp"; - const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; - const EXT_SCOPE_NAMES = new Set([ - "validate", - "serialize", - "parse", - "wrapper", - "root", - "schema", - "keyword", - "pattern", - "formats", - "validate$data", - "func", - "obj", - "Error", - ]); - const removedOptions = { - errorDataPath: "", - format: "`validateFormats: false` can be used instead.", - nullable: '"nullable" keyword is supported by default.', - jsonPointers: "Deprecated jsPropertySyntax can be used instead.", - extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", - missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", - processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", - sourceCode: "Use option `code: {source: true}`", - strictDefaults: "It is default now, see option `strict`.", - strictKeywords: "It is default now, see option `strict`.", - uniqueItems: '"uniqueItems" keyword is always validated.', - unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", - cache: "Map is used as cache, schema object as key.", - serialize: "Map is used as cache, schema object as key.", - ajvErrors: "It is default now.", - }; - const deprecatedOptions = { - ignoreKeywordsWithRef: "", - jsPropertySyntax: "", - unicode: '"minLength"/"maxLength" account for unicode characters by default.', - }; - const MAX_EXPRESSION = 200; - function requiredOptions(o) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; - const s = o.strict; - const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; - const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0; - const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; - const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; - return { - strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, - strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true, - strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", - strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log", - strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false, - code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, - loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, - loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, - meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true, - messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, - inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, - schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", - addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, - validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, - validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, - unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, - int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, - uriResolver: uriResolver, - }; - } - class Ajv { - constructor(opts = {}) { - this.schemas = {}; - this.refs = {}; - this.formats = {}; - this._compilations = new Set(); - this._loading = {}; - this._cache = new Map(); - opts = this.opts = { ...opts, ...requiredOptions(opts) }; - const { es5, lines } = this.opts.code; - this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); - this.logger = getLogger(opts.logger); - const formatOpt = opts.validateFormats; - opts.validateFormats = false; - this.RULES = (0, rules_1.getRules)(); - checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); - checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); - this._metaOpts = getMetaSchemaOptions.call(this); - if (opts.formats) - addInitialFormats.call(this); - this._addVocabularies(); - this._addDefaultMetaSchema(); - if (opts.keywords) - addInitialKeywords.call(this, opts.keywords); - if (typeof opts.meta == "object") - this.addMetaSchema(opts.meta); - addInitialSchemas.call(this); - opts.validateFormats = formatOpt; - } - _addVocabularies() { - this.addKeyword("$async"); - } - _addDefaultMetaSchema() { - const { $data, meta, schemaId } = this.opts; - let _dataRefSchema = $dataRefSchema; - if (schemaId === "id") { - _dataRefSchema = { ...$dataRefSchema }; - _dataRefSchema.id = _dataRefSchema.$id; - delete _dataRefSchema.$id; - } - if (meta && $data) - this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); - } - defaultMeta() { - const { meta, schemaId } = this.opts; - return (this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined); - } - validate(schemaKeyRef, - data - ) { - let v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) - throw new Error(`no schema with key or ref "${schemaKeyRef}"`); - } - else { - v = this.compile(schemaKeyRef); - } - const valid = v(data); - if (!("$async" in v)) - this.errors = v.errors; - return valid; - } - compile(schema, _meta) { - const sch = this._addSchema(schema, _meta); - return (sch.validate || this._compileSchemaEnv(sch)); - } - compileAsync(schema, meta) { - if (typeof this.opts.loadSchema != "function") { - throw new Error("options.loadSchema should be a function"); - } - const { loadSchema } = this.opts; - return runCompileAsync.call(this, schema, meta); - async function runCompileAsync(_schema, _meta) { - await loadMetaSchema.call(this, _schema.$schema); - const sch = this._addSchema(_schema, _meta); - return sch.validate || _compileAsync.call(this, sch); - } - async function loadMetaSchema($ref) { - if ($ref && !this.getSchema($ref)) { - await runCompileAsync.call(this, { $ref }, true); - } - } - async function _compileAsync(sch) { - try { - return this._compileSchemaEnv(sch); - } - catch (e) { - if (!(e instanceof ref_error_1.default)) - throw e; - checkLoaded.call(this, e); - await loadMissingSchema.call(this, e.missingSchema); - return _compileAsync.call(this, sch); - } - } - function checkLoaded({ missingSchema: ref, missingRef }) { - if (this.refs[ref]) { - throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); - } - } - async function loadMissingSchema(ref) { - const _schema = await _loadSchema.call(this, ref); - if (!this.refs[ref]) - await loadMetaSchema.call(this, _schema.$schema); - if (!this.refs[ref]) - this.addSchema(_schema, ref, meta); - } - async function _loadSchema(ref) { - const p = this._loading[ref]; - if (p) - return p; - try { - return await (this._loading[ref] = loadSchema(ref)); - } - finally { - delete this._loading[ref]; - } - } - } - addSchema(schema, - key, - _meta, - _validateSchema = this.opts.validateSchema - ) { - if (Array.isArray(schema)) { - for (const sch of schema) - this.addSchema(sch, undefined, _meta, _validateSchema); - return this; - } - let id; - if (typeof schema === "object") { - const { schemaId } = this.opts; - id = schema[schemaId]; - if (id !== undefined && typeof id != "string") { - throw new Error(`schema ${schemaId} must be string`); - } - } - key = (0, resolve_1.normalizeId)(key || id); - this._checkUnique(key); - this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true); - return this; - } - addMetaSchema(schema, key, - _validateSchema = this.opts.validateSchema - ) { - this.addSchema(schema, key, true, _validateSchema); - return this; - } - validateSchema(schema, throwOrLogError) { - if (typeof schema == "boolean") - return true; - let $schema; - $schema = schema.$schema; - if ($schema !== undefined && typeof $schema != "string") { - throw new Error("$schema must be a string"); - } - $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; - } - const valid = this.validate($schema, schema); - if (!valid && throwOrLogError) { - const message = "schema is invalid: " + this.errorsText(); - if (this.opts.validateSchema === "log") - this.logger.error(message); - else - throw new Error(message); - } - return valid; - } - getSchema(keyRef) { - let sch; - while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") - keyRef = sch; - if (sch === undefined) { - const { schemaId } = this.opts; - const root = new compile_1.SchemaEnv({ schema: {}, schemaId }); - sch = compile_1.resolveSchema.call(this, root, keyRef); - if (!sch) - return; - this.refs[keyRef] = sch; - } - return (sch.validate || this._compileSchemaEnv(sch)); - } - removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - this._removeAllSchemas(this.schemas, schemaKeyRef); - this._removeAllSchemas(this.refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case "undefined": - this._removeAllSchemas(this.schemas); - this._removeAllSchemas(this.refs); - this._cache.clear(); - return this; - case "string": { - const sch = getSchEnv.call(this, schemaKeyRef); - if (typeof sch == "object") - this._cache.delete(sch.schema); - delete this.schemas[schemaKeyRef]; - delete this.refs[schemaKeyRef]; - return this; - } - case "object": { - const cacheKey = schemaKeyRef; - this._cache.delete(cacheKey); - let id = schemaKeyRef[this.opts.schemaId]; - if (id) { - id = (0, resolve_1.normalizeId)(id); - delete this.schemas[id]; - delete this.refs[id]; - } - return this; - } - default: - throw new Error("ajv.removeSchema: invalid parameter"); - } - } - addVocabulary(definitions) { - for (const def of definitions) - this.addKeyword(def); - return this; - } - addKeyword(kwdOrDef, def - ) { - let keyword; - if (typeof kwdOrDef == "string") { - keyword = kwdOrDef; - if (typeof def == "object") { - this.logger.warn("these parameters are deprecated, see docs for addKeyword"); - def.keyword = keyword; - } - } - else if (typeof kwdOrDef == "object" && def === undefined) { - def = kwdOrDef; - keyword = def.keyword; - if (Array.isArray(keyword) && !keyword.length) { - throw new Error("addKeywords: keyword must be string or non-empty array"); - } - } - else { - throw new Error("invalid addKeywords parameters"); - } - checkKeyword.call(this, keyword, def); - if (!def) { - (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); - return this; - } - keywordMetaschema.call(this, def); - const definition = { - ...def, - type: (0, dataType_1.getJSONTypes)(def.type), - schemaType: (0, dataType_1.getJSONTypes)(def.schemaType), - }; - (0, util_1.eachItem)(keyword, definition.type.length === 0 - ? (k) => addRule.call(this, k, definition) - : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); - return this; - } - getKeyword(keyword) { - const rule = this.RULES.all[keyword]; - return typeof rule == "object" ? rule.definition : !!rule; - } - removeKeyword(keyword) { - const { RULES } = this; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - for (const group of RULES.rules) { - const i = group.rules.findIndex((rule) => rule.keyword === keyword); - if (i >= 0) - group.rules.splice(i, 1); - } - return this; - } - addFormat(name, format) { - if (typeof format == "string") - format = new RegExp(format); - this.formats[name] = format; - return this; - } - errorsText(errors = this.errors, - { separator = ", ", dataVar = "data" } = {} - ) { - if (!errors || errors.length === 0) - return "No errors"; - return errors - .map((e) => `${dataVar}${e.instancePath} ${e.message}`) - .reduce((text, msg) => text + separator + msg); - } - $dataMetaSchema(metaSchema, keywordsJsonPointers) { - const rules = this.RULES.all; - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - for (const jsonPointer of keywordsJsonPointers) { - const segments = jsonPointer.split("/").slice(1); - let keywords = metaSchema; - for (const seg of segments) - keywords = keywords[seg]; - for (const key in rules) { - const rule = rules[key]; - if (typeof rule != "object") - continue; - const { $data } = rule.definition; - const schema = keywords[key]; - if ($data && schema) - keywords[key] = schemaOrData(schema); - } - } - return metaSchema; - } - _removeAllSchemas(schemas, regex) { - for (const keyRef in schemas) { - const sch = schemas[keyRef]; - if (!regex || regex.test(keyRef)) { - if (typeof sch == "string") { - delete schemas[keyRef]; - } - else if (sch && !sch.meta) { - this._cache.delete(sch.schema); - delete schemas[keyRef]; - } - } - } - } - _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { - let id; - const { schemaId } = this.opts; - if (typeof schema == "object") { - id = schema[schemaId]; - } - else { - if (this.opts.jtd) - throw new Error("schema must be object"); - else if (typeof schema != "boolean") - throw new Error("schema must be object or boolean"); - } - let sch = this._cache.get(schema); - if (sch !== undefined) - return sch; - baseId = (0, resolve_1.normalizeId)(id || baseId); - const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId); - sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs }); - this._cache.set(sch.schema, sch); - if (addSchema && !baseId.startsWith("#")) { - if (baseId) - this._checkUnique(baseId); - this.refs[baseId] = sch; - } - if (validateSchema) - this.validateSchema(schema, true); - return sch; - } - _checkUnique(id) { - if (this.schemas[id] || this.refs[id]) { - throw new Error(`schema with key or id "${id}" already exists`); - } - } - _compileSchemaEnv(sch) { - if (sch.meta) - this._compileMetaSchema(sch); - else - compile_1.compileSchema.call(this, sch); - if (!sch.validate) - throw new Error("ajv implementation error"); - return sch.validate; - } - _compileMetaSchema(sch) { - const currentOpts = this.opts; - this.opts = this._metaOpts; - try { - compile_1.compileSchema.call(this, sch); - } - finally { - this.opts = currentOpts; - } - } - } - Ajv.ValidationError = validation_error_1.default; - Ajv.MissingRefError = ref_error_1.default; - exports$1.default = Ajv; - function checkOptions(checkOpts, options, msg, log = "error") { - for (const key in checkOpts) { - const opt = key; - if (opt in options) - this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`); - } - } - function getSchEnv(keyRef) { - keyRef = (0, resolve_1.normalizeId)(keyRef); - return this.schemas[keyRef] || this.refs[keyRef]; - } - function addInitialSchemas() { - const optsSchemas = this.opts.schemas; - if (!optsSchemas) - return; - if (Array.isArray(optsSchemas)) - this.addSchema(optsSchemas); - else - for (const key in optsSchemas) - this.addSchema(optsSchemas[key], key); - } - function addInitialFormats() { - for (const name in this.opts.formats) { - const format = this.opts.formats[name]; - if (format) - this.addFormat(name, format); - } - } - function addInitialKeywords(defs) { - if (Array.isArray(defs)) { - this.addVocabulary(defs); - return; - } - this.logger.warn("keywords option as map is deprecated, pass array"); - for (const keyword in defs) { - const def = defs[keyword]; - if (!def.keyword) - def.keyword = keyword; - this.addKeyword(def); - } - } - function getMetaSchemaOptions() { - const metaOpts = { ...this.opts }; - for (const opt of META_IGNORE_OPTIONS) - delete metaOpts[opt]; - return metaOpts; - } - const noLogs = { log() { }, warn() { }, error() { } }; - function getLogger(logger) { - if (logger === false) - return noLogs; - if (logger === undefined) - return console; - if (logger.log && logger.warn && logger.error) - return logger; - throw new Error("logger must implement log, warn and error methods"); - } - const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; - function checkKeyword(keyword, def) { - const { RULES } = this; - (0, util_1.eachItem)(keyword, (kwd) => { - if (RULES.keywords[kwd]) - throw new Error(`Keyword ${kwd} is already defined`); - if (!KEYWORD_NAME.test(kwd)) - throw new Error(`Keyword ${kwd} has invalid name`); - }); - if (!def) - return; - if (def.$data && !("code" in def || "validate" in def)) { - throw new Error('$data keyword must have "code" or "validate" function'); - } - } - function addRule(keyword, definition, dataType) { - var _a; - const post = definition === null || definition === void 0 ? void 0 : definition.post; - if (dataType && post) - throw new Error('keyword with "post" flag cannot have "type"'); - const { RULES } = this; - let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); - if (!ruleGroup) { - ruleGroup = { type: dataType, rules: [] }; - RULES.rules.push(ruleGroup); - } - RULES.keywords[keyword] = true; - if (!definition) - return; - const rule = { - keyword, - definition: { - ...definition, - type: (0, dataType_1.getJSONTypes)(definition.type), - schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType), - }, - }; - if (definition.before) - addBeforeRule.call(this, ruleGroup, rule, definition.before); - else - ruleGroup.rules.push(rule); - RULES.all[keyword] = rule; - (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); - } - function addBeforeRule(ruleGroup, rule, before) { - const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); - if (i >= 0) { - ruleGroup.rules.splice(i, 0, rule); - } - else { - ruleGroup.rules.push(rule); - this.logger.warn(`rule ${before} is not defined`); - } - } - function keywordMetaschema(def) { - let { metaSchema } = def; - if (metaSchema === undefined) - return; - if (def.$data && this.opts.$data) - metaSchema = schemaOrData(metaSchema); - def.validateSchema = this.compile(metaSchema, true); - } - const $dataRef = { - $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - }; - function schemaOrData(schema) { - return { anyOf: [schema, $dataRef] }; - } - } (core$5)); - return core$5; -} - -var draft7$1 = {}; - -var core$4 = {}; - -var id$1 = {}; - -var hasRequiredId$1; - -function requireId$1 () { - if (hasRequiredId$1) return id$1; - hasRequiredId$1 = 1; - Object.defineProperty(id$1, "__esModule", { value: true }); - const def = { - keyword: "id", - code() { - throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); - }, - }; - id$1.default = def; - return id$1; -} - -var ref$2 = {}; - -var hasRequiredRef$2; - -function requireRef$2 () { - if (hasRequiredRef$2) return ref$2; - hasRequiredRef$2 = 1; - Object.defineProperty(ref$2, "__esModule", { value: true }); - ref$2.callRef = ref$2.getValidate = void 0; - const ref_error_1 = /*@__PURE__*/ requireRef_error$1(); - const code_1 = /*@__PURE__*/ requireCode$3(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const compile_1 = /*@__PURE__*/ requireCompile$3(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const def = { - keyword: "$ref", - schemaType: "string", - code(cxt) { - const { gen, schema: $ref, it } = cxt; - const { baseId, schemaEnv: env, validateName, opts, self } = it; - const { root } = env; - if (($ref === "#" || $ref === "#/") && baseId === root.baseId) - return callRootRef(); - const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref); - if (schOrEnv === undefined) - throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref); - if (schOrEnv instanceof compile_1.SchemaEnv) - return callValidate(schOrEnv); - return inlineRefSchema(schOrEnv); - function callRootRef() { - if (env === root) - return callRef(cxt, validateName, env, env.$async); - const rootName = gen.scopeValue("root", { ref: root }); - return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async); - } - function callValidate(sch) { - const v = getValidate(cxt, sch); - callRef(cxt, v, sch, sch.$async); - } - function inlineRefSchema(sch) { - const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); - const valid = gen.name("valid"); - const schCxt = cxt.subschema({ - schema: sch, - dataTypes: [], - schemaPath: codegen_1.nil, - topSchemaRef: schName, - errSchemaPath: $ref, - }, valid); - cxt.mergeEvaluated(schCxt); - cxt.ok(valid); - } - }, - }; - function getValidate(cxt, sch) { - const { gen } = cxt; - return sch.validate - ? gen.scopeValue("validate", { ref: sch.validate }) - : (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.validate`; - } - ref$2.getValidate = getValidate; - function callRef(cxt, v, sch, $async) { - const { gen, it } = cxt; - const { allErrors, schemaEnv: env, opts } = it; - const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; - if ($async) - callAsyncRef(); - else - callSyncRef(); - function callAsyncRef() { - if (!env.$async) - throw new Error("async schema referenced by sync schema"); - const valid = gen.let("valid"); - gen.try(() => { - gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`); - addEvaluatedFrom(v); - if (!allErrors) - gen.assign(valid, true); - }, (e) => { - gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); - addErrorsFrom(e); - if (!allErrors) - gen.assign(valid, false); - }); - cxt.ok(valid); - } - function callSyncRef() { - cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); - } - function addErrorsFrom(source) { - const errs = (0, codegen_1._) `${source}.errors`; - gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); - gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`); - } - function addEvaluatedFrom(source) { - var _a; - if (!it.opts.unevaluated) - return; - const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; - if (it.props !== true) { - if (schEvaluated && !schEvaluated.dynamicProps) { - if (schEvaluated.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props); - } - } - else { - const props = gen.var("props", (0, codegen_1._) `${source}.evaluated.props`); - it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name); - } - } - if (it.items !== true) { - if (schEvaluated && !schEvaluated.dynamicItems) { - if (schEvaluated.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); - } - } - else { - const items = gen.var("items", (0, codegen_1._) `${source}.evaluated.items`); - it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name); - } - } - } - } - ref$2.callRef = callRef; - ref$2.default = def; - return ref$2; -} - -var hasRequiredCore$3; - -function requireCore$3 () { - if (hasRequiredCore$3) return core$4; - hasRequiredCore$3 = 1; - Object.defineProperty(core$4, "__esModule", { value: true }); - const id_1 = /*@__PURE__*/ requireId$1(); - const ref_1 = /*@__PURE__*/ requireRef$2(); - const core = [ - "$schema", - "$id", - "$defs", - "$vocabulary", - { keyword: "$comment" }, - "definitions", - id_1.default, - ref_1.default, - ]; - core$4.default = core; - return core$4; -} - -var validation$2 = {}; - -var limitNumber$1 = {}; - -var hasRequiredLimitNumber$1; - -function requireLimitNumber$1 () { - if (hasRequiredLimitNumber$1) return limitNumber$1; - hasRequiredLimitNumber$1 = 1; - Object.defineProperty(limitNumber$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const ops = codegen_1.operators; - const KWDs = { - maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, - exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }, - }; - const error = { - message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`, - params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, - }; - const def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); - }, - }; - limitNumber$1.default = def; - return limitNumber$1; -} - -var multipleOf$2 = {}; - -var hasRequiredMultipleOf$2; - -function requireMultipleOf$2 () { - if (hasRequiredMultipleOf$2) return multipleOf$2; - hasRequiredMultipleOf$2 = 1; - Object.defineProperty(multipleOf$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`, - params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`, - }; - const def = { - keyword: "multipleOf", - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { gen, data, schemaCode, it } = cxt; - const prec = it.opts.multipleOfPrecision; - const res = gen.let("res"); - const invalid = prec - ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` - : (0, codegen_1._) `${res} !== parseInt(${res})`; - cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); - }, - }; - multipleOf$2.default = def; - return multipleOf$2; -} - -var limitLength$1 = {}; - -var ucs2length$2 = {}; - -var hasRequiredUcs2length$2; - -function requireUcs2length$2 () { - if (hasRequiredUcs2length$2) return ucs2length$2; - hasRequiredUcs2length$2 = 1; - Object.defineProperty(ucs2length$2, "__esModule", { value: true }); - function ucs2length(str) { - const len = str.length; - let length = 0; - let pos = 0; - let value; - while (pos < len) { - length++; - value = str.charCodeAt(pos++); - if (value >= 0xd800 && value <= 0xdbff && pos < len) { - value = str.charCodeAt(pos); - if ((value & 0xfc00) === 0xdc00) - pos++; - } - } - return length; - } - ucs2length$2.default = ucs2length; - ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; - return ucs2length$2; -} - -var hasRequiredLimitLength$1; - -function requireLimitLength$1 () { - if (hasRequiredLimitLength$1) return limitLength$1; - hasRequiredLimitLength$1 = 1; - Object.defineProperty(limitLength$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const ucs2length_1 = /*@__PURE__*/ requireUcs2length$2(); - const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxLength" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, - }; - const def = { - keyword: ["maxLength", "minLength"], - type: "string", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode, it } = cxt; - const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; - const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; - cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`); - }, - }; - limitLength$1.default = def; - return limitLength$1; -} - -var pattern$2 = {}; - -var hasRequiredPattern$2; - -function requirePattern$2 () { - if (hasRequiredPattern$2) return pattern$2; - hasRequiredPattern$2 = 1; - Object.defineProperty(pattern$2, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$3(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`, - }; - const def = { - keyword: "pattern", - type: "string", - schemaType: "string", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - const u = it.opts.unicodeRegExp ? "u" : ""; - if ($data) { - const { regExp } = it.opts.code; - const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._) `new RegExp` : (0, util_1.useFunc)(gen, regExp); - const valid = gen.let("valid"); - gen.try(() => gen.assign(valid, (0, codegen_1._) `${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false)); - cxt.fail$data((0, codegen_1._) `!${valid}`); - } - else { - const regExp = (0, code_1.usePattern)(cxt, schema); - cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`); - } - }, - }; - pattern$2.default = def; - return pattern$2; -} - -var limitProperties$1 = {}; - -var hasRequiredLimitProperties$1; - -function requireLimitProperties$1 () { - if (hasRequiredLimitProperties$1) return limitProperties$1; - hasRequiredLimitProperties$1 = 1; - Object.defineProperty(limitProperties$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxProperties" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, - }; - const def = { - keyword: ["maxProperties", "minProperties"], - type: "object", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`); - }, - }; - limitProperties$1.default = def; - return limitProperties$1; -} - -var required$4 = {}; - -var hasRequiredRequired$2; - -function requireRequired$2 () { - if (hasRequiredRequired$2) return required$4; - hasRequiredRequired$2 = 1; - Object.defineProperty(required$4, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$3(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`, - params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`, - }; - const def = { - keyword: "required", - type: "object", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, schema, schemaCode, data, $data, it } = cxt; - const { opts } = it; - if (!$data && schema.length === 0) - return; - const useLoop = schema.length >= opts.loopRequired; - if (it.allErrors) - allErrorsMode(); - else - exitOnErrorMode(); - if (opts.strictRequired) { - const props = cxt.parentSchema.properties; - const { definedProperties } = cxt.it; - for (const requiredKey of schema) { - if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; - (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired); - } - } - } - function allErrorsMode() { - if (useLoop || $data) { - cxt.block$data(codegen_1.nil, loopAllRequired); - } - else { - for (const prop of schema) { - (0, code_1.checkReportMissingProp)(cxt, prop); - } - } - } - function exitOnErrorMode() { - const missing = gen.let("missing"); - if (useLoop || $data) { - const valid = gen.let("valid", true); - cxt.block$data(valid, () => loopUntilMissing(missing, valid)); - cxt.ok(valid); - } - else { - gen.if((0, code_1.checkMissingProp)(cxt, schema, missing)); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); - } - } - function loopAllRequired() { - gen.forOf("prop", schemaCode, (prop) => { - cxt.setParams({ missingProperty: prop }); - gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); - }); - } - function loopUntilMissing(missing, valid) { - cxt.setParams({ missingProperty: missing }); - gen.forOf(missing, schemaCode, () => { - gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(); - gen.break(); - }); - }, codegen_1.nil); - } - }, - }; - required$4.default = def; - return required$4; -} - -var limitItems$1 = {}; - -var hasRequiredLimitItems$1; - -function requireLimitItems$1 () { - if (hasRequiredLimitItems$1) return limitItems$1; - hasRequiredLimitItems$1 = 1; - Object.defineProperty(limitItems$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxItems" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, - }; - const def = { - keyword: ["maxItems", "minItems"], - type: "array", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`); - }, - }; - limitItems$1.default = def; - return limitItems$1; -} - -var uniqueItems$2 = {}; - -var equal$1 = {}; - -var hasRequiredEqual$1; - -function requireEqual$1 () { - if (hasRequiredEqual$1) return equal$1; - hasRequiredEqual$1 = 1; - Object.defineProperty(equal$1, "__esModule", { value: true }); - const equal = requireFastDeepEqual(); - equal.code = 'require("ajv/dist/runtime/equal").default'; - equal$1.default = equal; - return equal$1; -} - -var hasRequiredUniqueItems$2; - -function requireUniqueItems$2 () { - if (hasRequiredUniqueItems$2) return uniqueItems$2; - hasRequiredUniqueItems$2 = 1; - Object.defineProperty(uniqueItems$2, "__esModule", { value: true }); - const dataType_1 = /*@__PURE__*/ requireDataType$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const equal_1 = /*@__PURE__*/ requireEqual$1(); - const error = { - message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`, - params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`, - }; - const def = { - keyword: "uniqueItems", - type: "array", - schemaType: "boolean", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt; - if (!$data && !schema) - return; - const valid = gen.let("valid"); - const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; - cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`); - cxt.ok(valid); - function validateUniqueItems() { - const i = gen.let("i", (0, codegen_1._) `${data}.length`); - const j = gen.let("j"); - cxt.setParams({ i, j }); - gen.assign(valid, true); - gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); - } - function canOptimize() { - return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); - } - function loopN(i, j) { - const item = gen.name("item"); - const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); - const indices = gen.const("indices", (0, codegen_1._) `{}`); - gen.for((0, codegen_1._) `;${i}--;`, () => { - gen.let(item, (0, codegen_1._) `${data}[${i}]`); - gen.if(wrongType, (0, codegen_1._) `continue`); - if (itemTypes.length > 1) - gen.if((0, codegen_1._) `typeof ${item} == "string"`, (0, codegen_1._) `${item} += "_"`); - gen - .if((0, codegen_1._) `typeof ${indices}[${item}] == "number"`, () => { - gen.assign(j, (0, codegen_1._) `${indices}[${item}]`); - cxt.error(); - gen.assign(valid, false).break(); - }) - .code((0, codegen_1._) `${indices}[${item}] = ${i}`); - }); - } - function loopN2(i, j) { - const eql = (0, util_1.useFunc)(gen, equal_1.default); - const outer = gen.name("outer"); - gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => { - cxt.error(); - gen.assign(valid, false).break(outer); - }))); - } - }, - }; - uniqueItems$2.default = def; - return uniqueItems$2; -} - -var _const$2 = {}; - -var hasRequired_const$2; - -function require_const$2 () { - if (hasRequired_const$2) return _const$2; - hasRequired_const$2 = 1; - Object.defineProperty(_const$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const equal_1 = /*@__PURE__*/ requireEqual$1(); - const error = { - message: "must be equal to constant", - params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`, - }; - const def = { - keyword: "const", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schemaCode, schema } = cxt; - if ($data || (schema && typeof schema == "object")) { - cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); - } - else { - cxt.fail((0, codegen_1._) `${schema} !== ${data}`); - } - }, - }; - _const$2.default = def; - return _const$2; -} - -var _enum$2 = {}; - -var hasRequired_enum$2; - -function require_enum$2 () { - if (hasRequired_enum$2) return _enum$2; - hasRequired_enum$2 = 1; - Object.defineProperty(_enum$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const equal_1 = /*@__PURE__*/ requireEqual$1(); - const error = { - message: "must be equal to one of the allowed values", - params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`, - }; - const def = { - keyword: "enum", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - if (!$data && schema.length === 0) - throw new Error("enum must have non-empty array"); - const useLoop = schema.length >= it.opts.loopEnum; - let eql; - const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default))); - let valid; - if (useLoop || $data) { - valid = gen.let("valid"); - cxt.block$data(valid, loopEnum); - } - else { - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const vSchema = gen.const("vSchema", schemaCode); - valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i))); - } - cxt.pass(valid); - function loopEnum() { - gen.assign(valid, false); - gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); - } - function equalCode(vSchema, i) { - const sch = schema[i]; - return typeof sch === "object" && sch !== null - ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])` - : (0, codegen_1._) `${data} === ${sch}`; - } - }, - }; - _enum$2.default = def; - return _enum$2; -} - -var hasRequiredValidation$2; - -function requireValidation$2 () { - if (hasRequiredValidation$2) return validation$2; - hasRequiredValidation$2 = 1; - Object.defineProperty(validation$2, "__esModule", { value: true }); - const limitNumber_1 = /*@__PURE__*/ requireLimitNumber$1(); - const multipleOf_1 = /*@__PURE__*/ requireMultipleOf$2(); - const limitLength_1 = /*@__PURE__*/ requireLimitLength$1(); - const pattern_1 = /*@__PURE__*/ requirePattern$2(); - const limitProperties_1 = /*@__PURE__*/ requireLimitProperties$1(); - const required_1 = /*@__PURE__*/ requireRequired$2(); - const limitItems_1 = /*@__PURE__*/ requireLimitItems$1(); - const uniqueItems_1 = /*@__PURE__*/ requireUniqueItems$2(); - const const_1 = /*@__PURE__*/ require_const$2(); - const enum_1 = /*@__PURE__*/ require_enum$2(); - const validation = [ - limitNumber_1.default, - multipleOf_1.default, - limitLength_1.default, - pattern_1.default, - limitProperties_1.default, - required_1.default, - limitItems_1.default, - uniqueItems_1.default, - { keyword: "type", schemaType: ["string", "array"] }, - { keyword: "nullable", schemaType: "boolean" }, - const_1.default, - enum_1.default, - ]; - validation$2.default = validation; - return validation$2; -} - -var applicator$1 = {}; - -var additionalItems$1 = {}; - -var hasRequiredAdditionalItems$1; - -function requireAdditionalItems$1 () { - if (hasRequiredAdditionalItems$1) return additionalItems$1; - hasRequiredAdditionalItems$1 = 1; - Object.defineProperty(additionalItems$1, "__esModule", { value: true }); - additionalItems$1.validateAdditionalItems = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, - }; - const def = { - keyword: "additionalItems", - type: "array", - schemaType: ["boolean", "object"], - before: "uniqueItems", - error, - code(cxt) { - const { parentSchema, it } = cxt; - const { items } = parentSchema; - if (!Array.isArray(items)) { - (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas'); - return; - } - validateAdditionalItems(cxt, items); - }, - }; - function validateAdditionalItems(cxt, items) { - const { gen, schema, data, keyword, it } = cxt; - it.items = true; - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - if (schema === false) { - cxt.setParams({ len: items.length }); - cxt.pass((0, codegen_1._) `${len} <= ${items.length}`); - } - else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.var("valid", (0, codegen_1._) `${len} <= ${items.length}`); - gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); - cxt.ok(valid); - } - function validateItems(valid) { - gen.forRange("i", items.length, len, (i) => { - cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); - if (!it.allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - }); - } - } - additionalItems$1.validateAdditionalItems = validateAdditionalItems; - additionalItems$1.default = def; - return additionalItems$1; -} - -var prefixItems$1 = {}; - -var items$2 = {}; - -var hasRequiredItems$2; - -function requireItems$2 () { - if (hasRequiredItems$2) return items$2; - hasRequiredItems$2 = 1; - Object.defineProperty(items$2, "__esModule", { value: true }); - items$2.validateTuple = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const code_1 = /*@__PURE__*/ requireCode$3(); - const def = { - keyword: "items", - type: "array", - schemaType: ["object", "array", "boolean"], - before: "uniqueItems", - code(cxt) { - const { schema, it } = cxt; - if (Array.isArray(schema)) - return validateTuple(cxt, "additionalItems", schema); - it.items = true; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - cxt.ok((0, code_1.validateArray)(cxt)); - }, - }; - function validateTuple(cxt, extraItems, schArr = cxt.schema) { - const { gen, parentSchema, data, keyword, it } = cxt; - checkStrictTuple(parentSchema); - if (it.opts.unevaluated && schArr.length && it.items !== true) { - it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items); - } - const valid = gen.name("valid"); - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - schArr.forEach((sch, i) => { - if ((0, util_1.alwaysValidSchema)(it, sch)) - return; - gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({ - keyword, - schemaProp: i, - dataProp: i, - }, valid)); - cxt.ok(valid); - }); - function checkStrictTuple(sch) { - const { opts, errSchemaPath } = it; - const l = schArr.length; - const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); - if (opts.strictTuples && !fullTuple) { - const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; - (0, util_1.checkStrictMode)(it, msg, opts.strictTuples); - } - } - } - items$2.validateTuple = validateTuple; - items$2.default = def; - return items$2; -} - -var hasRequiredPrefixItems$1; - -function requirePrefixItems$1 () { - if (hasRequiredPrefixItems$1) return prefixItems$1; - hasRequiredPrefixItems$1 = 1; - Object.defineProperty(prefixItems$1, "__esModule", { value: true }); - const items_1 = /*@__PURE__*/ requireItems$2(); - const def = { - keyword: "prefixItems", - type: "array", - schemaType: ["array"], - before: "uniqueItems", - code: (cxt) => (0, items_1.validateTuple)(cxt, "items"), - }; - prefixItems$1.default = def; - return prefixItems$1; -} - -var items2020$1 = {}; - -var hasRequiredItems2020$1; - -function requireItems2020$1 () { - if (hasRequiredItems2020$1) return items2020$1; - hasRequiredItems2020$1 = 1; - Object.defineProperty(items2020$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const code_1 = /*@__PURE__*/ requireCode$3(); - const additionalItems_1 = /*@__PURE__*/ requireAdditionalItems$1(); - const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, - }; - const def = { - keyword: "items", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - error, - code(cxt) { - const { schema, parentSchema, it } = cxt; - const { prefixItems } = parentSchema; - it.items = true; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - if (prefixItems) - (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); - else - cxt.ok((0, code_1.validateArray)(cxt)); - }, - }; - items2020$1.default = def; - return items2020$1; -} - -var contains$3 = {}; - -var hasRequiredContains$2; - -function requireContains$2 () { - if (hasRequiredContains$2) return contains$3; - hasRequiredContains$2 = 1; - Object.defineProperty(contains$3, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: ({ params: { min, max } }) => max === undefined - ? (0, codegen_1.str) `must contain at least ${min} valid item(s)` - : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`, - params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`, - }; - const def = { - keyword: "contains", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - let min; - let max; - const { minContains, maxContains } = parentSchema; - if (it.opts.next) { - min = minContains === undefined ? 1 : minContains; - max = maxContains; - } - else { - min = 1; - } - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - cxt.setParams({ min, max }); - if (max === undefined && min === 0) { - (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); - return; - } - if (max !== undefined && min > max) { - (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); - cxt.fail(); - return; - } - if ((0, util_1.alwaysValidSchema)(it, schema)) { - let cond = (0, codegen_1._) `${len} >= ${min}`; - if (max !== undefined) - cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`; - cxt.pass(cond); - return; - } - it.items = true; - const valid = gen.name("valid"); - if (max === undefined && min === 1) { - validateItems(valid, () => gen.if(valid, () => gen.break())); - } - else if (min === 0) { - gen.let(valid, true); - if (max !== undefined) - gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount); - } - else { - gen.let(valid, false); - validateItemsWithCount(); - } - cxt.result(valid, () => cxt.reset()); - function validateItemsWithCount() { - const schValid = gen.name("_valid"); - const count = gen.let("count", 0); - validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); - } - function validateItems(_valid, block) { - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword: "contains", - dataProp: i, - dataPropType: util_1.Type.Num, - compositeRule: true, - }, _valid); - block(); - }); - } - function checkLimits(count) { - gen.code((0, codegen_1._) `${count}++`); - if (max === undefined) { - gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break()); - } - else { - gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break()); - if (min === 1) - gen.assign(valid, true); - else - gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true)); - } - } - }, - }; - contains$3.default = def; - return contains$3; -} - -var dependencies$2 = {}; - -var hasRequiredDependencies$2; - -function requireDependencies$2 () { - if (hasRequiredDependencies$2) return dependencies$2; - hasRequiredDependencies$2 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const code_1 = /*@__PURE__*/ requireCode$3(); - exports$1.error = { - message: ({ params: { property, depsCount, deps } }) => { - const property_ies = depsCount === 1 ? "property" : "properties"; - return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`; - }, - params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property}, - missingProperty: ${missingProperty}, - depsCount: ${depsCount}, - deps: ${deps}}`, - }; - const def = { - keyword: "dependencies", - type: "object", - schemaType: "object", - error: exports$1.error, - code(cxt) { - const [propDeps, schDeps] = splitDependencies(cxt); - validatePropertyDeps(cxt, propDeps); - validateSchemaDeps(cxt, schDeps); - }, - }; - function splitDependencies({ schema }) { - const propertyDeps = {}; - const schemaDeps = {}; - for (const key in schema) { - if (key === "__proto__") - continue; - const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps; - deps[key] = schema[key]; - } - return [propertyDeps, schemaDeps]; - } - function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { - const { gen, data, it } = cxt; - if (Object.keys(propertyDeps).length === 0) - return; - const missing = gen.let("missing"); - for (const prop in propertyDeps) { - const deps = propertyDeps[prop]; - if (deps.length === 0) - continue; - const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties); - cxt.setParams({ - property: prop, - depsCount: deps.length, - deps: deps.join(", "), - }); - if (it.allErrors) { - gen.if(hasProperty, () => { - for (const depProp of deps) { - (0, code_1.checkReportMissingProp)(cxt, depProp); - } - }); - } - else { - gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); - } - } - } - exports$1.validatePropertyDeps = validatePropertyDeps; - function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - for (const prop in schemaDeps) { - if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) - continue; - gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => { - const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); - cxt.mergeValidEvaluated(schCxt, valid); - }, () => gen.var(valid, true) - ); - cxt.ok(valid); - } - } - exports$1.validateSchemaDeps = validateSchemaDeps; - exports$1.default = def; - } (dependencies$2)); - return dependencies$2; -} - -var propertyNames$2 = {}; - -var hasRequiredPropertyNames$2; - -function requirePropertyNames$2 () { - if (hasRequiredPropertyNames$2) return propertyNames$2; - hasRequiredPropertyNames$2 = 1; - Object.defineProperty(propertyNames$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: "property name must be valid", - params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`, - }; - const def = { - keyword: "propertyNames", - type: "object", - schemaType: ["object", "boolean"], - error, - code(cxt) { - const { gen, schema, data, it } = cxt; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - const valid = gen.name("valid"); - gen.forIn("key", data, (key) => { - cxt.setParams({ propertyName: key }); - cxt.subschema({ - keyword: "propertyNames", - data: key, - dataTypes: ["string"], - propertyName: key, - compositeRule: true, - }, valid); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(true); - if (!it.allErrors) - gen.break(); - }); - }); - cxt.ok(valid); - }, - }; - propertyNames$2.default = def; - return propertyNames$2; -} - -var additionalProperties$3 = {}; - -var hasRequiredAdditionalProperties$1; - -function requireAdditionalProperties$1 () { - if (hasRequiredAdditionalProperties$1) return additionalProperties$3; - hasRequiredAdditionalProperties$1 = 1; - Object.defineProperty(additionalProperties$3, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$3(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const names_1 = /*@__PURE__*/ requireNames$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: "must NOT have additional properties", - params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`, - }; - const def = { - keyword: "additionalProperties", - type: ["object"], - schemaType: ["boolean", "object"], - allowUndefined: true, - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, errsCount, it } = cxt; - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, opts } = it; - it.props = true; - if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema)) - return; - const props = (0, code_1.allSchemaProperties)(parentSchema.properties); - const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); - checkAdditionalProperties(); - cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); - function checkAdditionalProperties() { - gen.forIn("key", data, (key) => { - if (!props.length && !patProps.length) - additionalPropertyCode(key); - else - gen.if(isAdditional(key), () => additionalPropertyCode(key)); - }); - } - function isAdditional(key) { - let definedProp; - if (props.length > 8) { - const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties"); - definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); - } - else if (props.length) { - definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`)); - } - else { - definedProp = codegen_1.nil; - } - if (patProps.length) { - definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`)); - } - return (0, codegen_1.not)(definedProp); - } - function deleteAdditional(key) { - gen.code((0, codegen_1._) `delete ${data}[${key}]`); - } - function additionalPropertyCode(key) { - if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) { - deleteAdditional(key); - return; - } - if (schema === false) { - cxt.setParams({ additionalProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; - } - if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.name("valid"); - if (opts.removeAdditional === "failing") { - applyAdditionalSchema(key, valid, false); - gen.if((0, codegen_1.not)(valid), () => { - cxt.reset(); - deleteAdditional(key); - }); - } - else { - applyAdditionalSchema(key, valid); - if (!allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } - } - } - function applyAdditionalSchema(key, valid, errors) { - const subschema = { - keyword: "additionalProperties", - dataProp: key, - dataPropType: util_1.Type.Str, - }; - if (errors === false) { - Object.assign(subschema, { - compositeRule: true, - createErrors: false, - allErrors: false, - }); - } - cxt.subschema(subschema, valid); - } - }, - }; - additionalProperties$3.default = def; - return additionalProperties$3; -} - -var properties$7 = {}; - -var hasRequiredProperties$2; - -function requireProperties$2 () { - if (hasRequiredProperties$2) return properties$7; - hasRequiredProperties$2 = 1; - Object.defineProperty(properties$7, "__esModule", { value: true }); - const validate_1 = /*@__PURE__*/ requireValidate$2(); - const code_1 = /*@__PURE__*/ requireCode$3(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const additionalProperties_1 = /*@__PURE__*/ requireAdditionalProperties$1(); - const def = { - keyword: "properties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) { - additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); - } - const allProps = (0, code_1.allSchemaProperties)(schema); - for (const prop of allProps) { - it.definedProperties.add(prop); - } - if (it.opts.unevaluated && allProps.length && it.props !== true) { - it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props); - } - const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p])); - if (properties.length === 0) - return; - const valid = gen.name("valid"); - for (const prop of properties) { - if (hasDefault(prop)) { - applyPropertySchema(prop); - } - else { - gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties)); - applyPropertySchema(prop); - if (!it.allErrors) - gen.else().var(valid, true); - gen.endIf(); - } - cxt.it.definedProperties.add(prop); - cxt.ok(valid); - } - function hasDefault(prop) { - return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined; - } - function applyPropertySchema(prop) { - cxt.subschema({ - keyword: "properties", - schemaProp: prop, - dataProp: prop, - }, valid); - } - }, - }; - properties$7.default = def; - return properties$7; -} - -var patternProperties$1 = {}; - -var hasRequiredPatternProperties$1; - -function requirePatternProperties$1 () { - if (hasRequiredPatternProperties$1) return patternProperties$1; - hasRequiredPatternProperties$1 = 1; - Object.defineProperty(patternProperties$1, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$3(); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const util_2 = /*@__PURE__*/ requireUtil$5(); - const def = { - keyword: "patternProperties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, data, parentSchema, it } = cxt; - const { opts } = it; - const patterns = (0, code_1.allSchemaProperties)(schema); - const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p])); - if (patterns.length === 0 || - (alwaysValidPatterns.length === patterns.length && - (!it.opts.unevaluated || it.props === true))) { - return; - } - const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; - const valid = gen.name("valid"); - if (it.props !== true && !(it.props instanceof codegen_1.Name)) { - it.props = (0, util_2.evaluatedPropsToName)(gen, it.props); - } - const { props } = it; - validatePatternProperties(); - function validatePatternProperties() { - for (const pat of patterns) { - if (checkProperties) - checkMatchingProperties(pat); - if (it.allErrors) { - validateProperties(pat); - } - else { - gen.var(valid, true); - validateProperties(pat); - gen.if(valid); - } - } - } - function checkMatchingProperties(pat) { - for (const prop in checkProperties) { - if (new RegExp(pat).test(prop)) { - (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); - } - } - } - function validateProperties(pat) { - gen.forIn("key", data, (key) => { - gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { - const alwaysValid = alwaysValidPatterns.includes(pat); - if (!alwaysValid) { - cxt.subschema({ - keyword: "patternProperties", - schemaProp: pat, - dataProp: key, - dataPropType: util_2.Type.Str, - }, valid); - } - if (it.opts.unevaluated && props !== true) { - gen.assign((0, codegen_1._) `${props}[${key}]`, true); - } - else if (!alwaysValid && !it.allErrors) { - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } - }); - }); - } - }, - }; - patternProperties$1.default = def; - return patternProperties$1; -} - -var not$2 = {}; - -var hasRequiredNot$2; - -function requireNot$2 () { - if (hasRequiredNot$2) return not$2; - hasRequiredNot$2 = 1; - Object.defineProperty(not$2, "__esModule", { value: true }); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const def = { - keyword: "not", - schemaType: ["object", "boolean"], - trackErrors: true, - code(cxt) { - const { gen, schema, it } = cxt; - if ((0, util_1.alwaysValidSchema)(it, schema)) { - cxt.fail(); - return; - } - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "not", - compositeRule: true, - createErrors: false, - allErrors: false, - }, valid); - cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); - }, - error: { message: "must NOT be valid" }, - }; - not$2.default = def; - return not$2; -} - -var anyOf$2 = {}; - -var hasRequiredAnyOf$2; - -function requireAnyOf$2 () { - if (hasRequiredAnyOf$2) return anyOf$2; - hasRequiredAnyOf$2 = 1; - Object.defineProperty(anyOf$2, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$3(); - const def = { - keyword: "anyOf", - schemaType: "array", - trackErrors: true, - code: code_1.validateUnion, - error: { message: "must match a schema in anyOf" }, - }; - anyOf$2.default = def; - return anyOf$2; -} - -var oneOf$2 = {}; - -var hasRequiredOneOf$2; - -function requireOneOf$2 () { - if (hasRequiredOneOf$2) return oneOf$2; - hasRequiredOneOf$2 = 1; - Object.defineProperty(oneOf$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: "must match exactly one schema in oneOf", - params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`, - }; - const def = { - keyword: "oneOf", - schemaType: "array", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, it } = cxt; - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - if (it.opts.discriminator && parentSchema.discriminator) - return; - const schArr = schema; - const valid = gen.let("valid", false); - const passing = gen.let("passing", null); - const schValid = gen.name("_valid"); - cxt.setParams({ passing }); - gen.block(validateOneOf); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - function validateOneOf() { - schArr.forEach((sch, i) => { - let schCxt; - if ((0, util_1.alwaysValidSchema)(it, sch)) { - gen.var(schValid, true); - } - else { - schCxt = cxt.subschema({ - keyword: "oneOf", - schemaProp: i, - compositeRule: true, - }, schValid); - } - if (i > 0) { - gen - .if((0, codegen_1._) `${schValid} && ${valid}`) - .assign(valid, false) - .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`) - .else(); - } - gen.if(schValid, () => { - gen.assign(valid, true); - gen.assign(passing, i); - if (schCxt) - cxt.mergeEvaluated(schCxt, codegen_1.Name); - }); - }); - } - }, - }; - oneOf$2.default = def; - return oneOf$2; -} - -var allOf$2 = {}; - -var hasRequiredAllOf$2; - -function requireAllOf$2 () { - if (hasRequiredAllOf$2) return allOf$2; - hasRequiredAllOf$2 = 1; - Object.defineProperty(allOf$2, "__esModule", { value: true }); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const def = { - keyword: "allOf", - schemaType: "array", - code(cxt) { - const { gen, schema, it } = cxt; - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const valid = gen.name("valid"); - schema.forEach((sch, i) => { - if ((0, util_1.alwaysValidSchema)(it, sch)) - return; - const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); - cxt.ok(valid); - cxt.mergeEvaluated(schCxt); - }); - }, - }; - allOf$2.default = def; - return allOf$2; -} - -var _if$2 = {}; - -var hasRequired_if$2; - -function require_if$2 () { - if (hasRequired_if$2) return _if$2; - hasRequired_if$2 = 1; - Object.defineProperty(_if$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: ({ params }) => (0, codegen_1.str) `must match "${params.ifClause}" schema`, - params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`, - }; - const def = { - keyword: "if", - schemaType: ["object", "boolean"], - trackErrors: true, - error, - code(cxt) { - const { gen, parentSchema, it } = cxt; - if (parentSchema.then === undefined && parentSchema.else === undefined) { - (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored'); - } - const hasThen = hasSchema(it, "then"); - const hasElse = hasSchema(it, "else"); - if (!hasThen && !hasElse) - return; - const valid = gen.let("valid", true); - const schValid = gen.name("_valid"); - validateIf(); - cxt.reset(); - if (hasThen && hasElse) { - const ifClause = gen.let("ifClause"); - cxt.setParams({ ifClause }); - gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); - } - else if (hasThen) { - gen.if(schValid, validateClause("then")); - } - else { - gen.if((0, codegen_1.not)(schValid), validateClause("else")); - } - cxt.pass(valid, () => cxt.error(true)); - function validateIf() { - const schCxt = cxt.subschema({ - keyword: "if", - compositeRule: true, - createErrors: false, - allErrors: false, - }, schValid); - cxt.mergeEvaluated(schCxt); - } - function validateClause(keyword, ifClause) { - return () => { - const schCxt = cxt.subschema({ keyword }, schValid); - gen.assign(valid, schValid); - cxt.mergeValidEvaluated(schCxt, valid); - if (ifClause) - gen.assign(ifClause, (0, codegen_1._) `${keyword}`); - else - cxt.setParams({ ifClause: keyword }); - }; - } - }, - }; - function hasSchema(it, keyword) { - const schema = it.schema[keyword]; - return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema); - } - _if$2.default = def; - return _if$2; -} - -var thenElse$1 = {}; - -var hasRequiredThenElse$1; - -function requireThenElse$1 () { - if (hasRequiredThenElse$1) return thenElse$1; - hasRequiredThenElse$1 = 1; - Object.defineProperty(thenElse$1, "__esModule", { value: true }); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const def = { - keyword: ["then", "else"], - schemaType: ["object", "boolean"], - code({ keyword, parentSchema, it }) { - if (parentSchema.if === undefined) - (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); - }, - }; - thenElse$1.default = def; - return thenElse$1; -} - -var hasRequiredApplicator$1; - -function requireApplicator$1 () { - if (hasRequiredApplicator$1) return applicator$1; - hasRequiredApplicator$1 = 1; - Object.defineProperty(applicator$1, "__esModule", { value: true }); - const additionalItems_1 = /*@__PURE__*/ requireAdditionalItems$1(); - const prefixItems_1 = /*@__PURE__*/ requirePrefixItems$1(); - const items_1 = /*@__PURE__*/ requireItems$2(); - const items2020_1 = /*@__PURE__*/ requireItems2020$1(); - const contains_1 = /*@__PURE__*/ requireContains$2(); - const dependencies_1 = /*@__PURE__*/ requireDependencies$2(); - const propertyNames_1 = /*@__PURE__*/ requirePropertyNames$2(); - const additionalProperties_1 = /*@__PURE__*/ requireAdditionalProperties$1(); - const properties_1 = /*@__PURE__*/ requireProperties$2(); - const patternProperties_1 = /*@__PURE__*/ requirePatternProperties$1(); - const not_1 = /*@__PURE__*/ requireNot$2(); - const anyOf_1 = /*@__PURE__*/ requireAnyOf$2(); - const oneOf_1 = /*@__PURE__*/ requireOneOf$2(); - const allOf_1 = /*@__PURE__*/ requireAllOf$2(); - const if_1 = /*@__PURE__*/ require_if$2(); - const thenElse_1 = /*@__PURE__*/ requireThenElse$1(); - function getApplicator(draft2020 = false) { - const applicator = [ - not_1.default, - anyOf_1.default, - oneOf_1.default, - allOf_1.default, - if_1.default, - thenElse_1.default, - propertyNames_1.default, - additionalProperties_1.default, - dependencies_1.default, - properties_1.default, - patternProperties_1.default, - ]; - if (draft2020) - applicator.push(prefixItems_1.default, items2020_1.default); - else - applicator.push(additionalItems_1.default, items_1.default); - applicator.push(contains_1.default); - return applicator; - } - applicator$1.default = getApplicator; - return applicator$1; -} - -var format$5 = {}; - -var format$4 = {}; - -var hasRequiredFormat$4; - -function requireFormat$4 () { - if (hasRequiredFormat$4) return format$4; - hasRequiredFormat$4 = 1; - Object.defineProperty(format$4, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must match format "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`, - }; - const def = { - keyword: "format", - type: ["number", "string"], - schemaType: "string", - $data: true, - error, - code(cxt, ruleType) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - const { opts, errSchemaPath, schemaEnv, self } = it; - if (!opts.validateFormats) - return; - if ($data) - validate$DataFormat(); - else - validateFormat(); - function validate$DataFormat() { - const fmts = gen.scopeValue("formats", { - ref: self.formats, - code: opts.code.formats, - }); - const fDef = gen.const("fDef", (0, codegen_1._) `${fmts}[${schemaCode}]`); - const fType = gen.let("fType"); - const format = gen.let("format"); - gen.if((0, codegen_1._) `typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || "string"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `"string"`).assign(format, fDef)); - cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); - function unknownFmt() { - if (opts.strictSchema === false) - return codegen_1.nil; - return (0, codegen_1._) `${schemaCode} && !${format}`; - } - function invalidFmt() { - const callFormat = schemaEnv.$async - ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` - : (0, codegen_1._) `${format}(${data})`; - const validData = (0, codegen_1._) `(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; - return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; - } - } - function validateFormat() { - const formatDef = self.formats[schema]; - if (!formatDef) { - unknownFormat(); - return; - } - if (formatDef === true) - return; - const [fmtType, format, fmtRef] = getFormat(formatDef); - if (fmtType === ruleType) - cxt.pass(validCondition()); - function unknownFormat() { - if (opts.strictSchema === false) { - self.logger.warn(unknownMsg()); - return; - } - throw new Error(unknownMsg()); - function unknownMsg() { - return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`; - } - } - function getFormat(fmtDef) { - const code = fmtDef instanceof RegExp - ? (0, codegen_1.regexpCode)(fmtDef) - : opts.code.formats - ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` - : undefined; - const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code }); - if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { - return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`]; - } - return ["string", fmtDef, fmt]; - } - function validCondition() { - if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { - if (!schemaEnv.$async) - throw new Error("async format in sync schema"); - return (0, codegen_1._) `await ${fmtRef}(${data})`; - } - return typeof format == "function" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`; - } - } - }, - }; - format$4.default = def; - return format$4; -} - -var hasRequiredFormat$3; - -function requireFormat$3 () { - if (hasRequiredFormat$3) return format$5; - hasRequiredFormat$3 = 1; - Object.defineProperty(format$5, "__esModule", { value: true }); - const format_1 = /*@__PURE__*/ requireFormat$4(); - const format = [format_1.default]; - format$5.default = format; - return format$5; -} - -var metadata$1 = {}; - -var hasRequiredMetadata$1; - -function requireMetadata$1 () { - if (hasRequiredMetadata$1) return metadata$1; - hasRequiredMetadata$1 = 1; - Object.defineProperty(metadata$1, "__esModule", { value: true }); - metadata$1.contentVocabulary = metadata$1.metadataVocabulary = void 0; - metadata$1.metadataVocabulary = [ - "title", - "description", - "default", - "deprecated", - "readOnly", - "writeOnly", - "examples", - ]; - metadata$1.contentVocabulary = [ - "contentMediaType", - "contentEncoding", - "contentSchema", - ]; - return metadata$1; -} - -var hasRequiredDraft7$1; - -function requireDraft7$1 () { - if (hasRequiredDraft7$1) return draft7$1; - hasRequiredDraft7$1 = 1; - Object.defineProperty(draft7$1, "__esModule", { value: true }); - const core_1 = /*@__PURE__*/ requireCore$3(); - const validation_1 = /*@__PURE__*/ requireValidation$2(); - const applicator_1 = /*@__PURE__*/ requireApplicator$1(); - const format_1 = /*@__PURE__*/ requireFormat$3(); - const metadata_1 = /*@__PURE__*/ requireMetadata$1(); - const draft7Vocabularies = [ - core_1.default, - validation_1.default, - (0, applicator_1.default)(), - format_1.default, - metadata_1.metadataVocabulary, - metadata_1.contentVocabulary, - ]; - draft7$1.default = draft7Vocabularies; - return draft7$1; -} - -var discriminator$1 = {}; - -var types$7 = {}; - -var hasRequiredTypes$3; - -function requireTypes$3 () { - if (hasRequiredTypes$3) return types$7; - hasRequiredTypes$3 = 1; - Object.defineProperty(types$7, "__esModule", { value: true }); - types$7.DiscrError = void 0; - var DiscrError; - (function (DiscrError) { - DiscrError["Tag"] = "tag"; - DiscrError["Mapping"] = "mapping"; - })(DiscrError || (types$7.DiscrError = DiscrError = {})); - return types$7; -} - -var hasRequiredDiscriminator$1; - -function requireDiscriminator$1 () { - if (hasRequiredDiscriminator$1) return discriminator$1; - hasRequiredDiscriminator$1 = 1; - Object.defineProperty(discriminator$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen$1(); - const types_1 = /*@__PURE__*/ requireTypes$3(); - const compile_1 = /*@__PURE__*/ requireCompile$3(); - const ref_error_1 = /*@__PURE__*/ requireRef_error$1(); - const util_1 = /*@__PURE__*/ requireUtil$5(); - const error = { - message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag - ? `tag "${tagName}" must be string` - : `value of tag "${tagName}" must be in oneOf`, - params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, - }; - const def = { - keyword: "discriminator", - type: "object", - schemaType: "object", - error, - code(cxt) { - const { gen, data, schema, parentSchema, it } = cxt; - const { oneOf } = parentSchema; - if (!it.opts.discriminator) { - throw new Error("discriminator: requires discriminator option"); - } - const tagName = schema.propertyName; - if (typeof tagName != "string") - throw new Error("discriminator: requires propertyName"); - if (schema.mapping) - throw new Error("discriminator: mapping is not supported"); - if (!oneOf) - throw new Error("discriminator: requires oneOf keyword"); - const valid = gen.let("valid", false); - const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`); - gen.if((0, codegen_1._) `typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); - cxt.ok(valid); - function validateMapping() { - const mapping = getMapping(); - gen.if(false); - for (const tagValue in mapping) { - gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`); - gen.assign(valid, applyTagSchema(mapping[tagValue])); - } - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); - gen.endIf(); - } - function applyTagSchema(schemaProp) { - const _valid = gen.name("valid"); - const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); - cxt.mergeEvaluated(schCxt, codegen_1.Name); - return _valid; - } - function getMapping() { - var _a; - const oneOfMapping = {}; - const topRequired = hasRequired(parentSchema); - let tagRequired = true; - for (let i = 0; i < oneOf.length; i++) { - let sch = oneOf[i]; - if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { - const ref = sch.$ref; - sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref); - if (sch instanceof compile_1.SchemaEnv) - sch = sch.schema; - if (sch === undefined) - throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref); - } - const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; - if (typeof propSch != "object") { - throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); - } - tagRequired = tagRequired && (topRequired || hasRequired(sch)); - addMappings(propSch, i); - } - if (!tagRequired) - throw new Error(`discriminator: "${tagName}" must be required`); - return oneOfMapping; - function hasRequired({ required }) { - return Array.isArray(required) && required.includes(tagName); - } - function addMappings(sch, i) { - if (sch.const) { - addMapping(sch.const, i); - } - else if (sch.enum) { - for (const tagValue of sch.enum) { - addMapping(tagValue, i); - } - } - else { - throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); - } - } - function addMapping(tagValue, i) { - if (typeof tagValue != "string" || tagValue in oneOfMapping) { - throw new Error(`discriminator: "${tagName}" values must be unique strings`); - } - oneOfMapping[tagValue] = i; - } - } - }, - }; - discriminator$1.default = def; - return discriminator$1; -} - -var $schema$3 = "http://json-schema.org/draft-07/schema#"; -var $id$4 = "http://json-schema.org/draft-07/schema#"; -var title$2 = "Core schema meta-schema"; -var definitions$2 = { - schemaArray: { - type: "array", - minItems: 1, - items: { - $ref: "#" - } - }, - nonNegativeInteger: { - type: "integer", - minimum: 0 - }, - nonNegativeIntegerDefault0: { - allOf: [ - { - $ref: "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - simpleTypes: { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - stringArray: { - type: "array", - items: { - type: "string" - }, - uniqueItems: true, - "default": [ - ] - } -}; -var type$4 = [ - "object", - "boolean" -]; -var properties$6 = { - $id: { - type: "string", - format: "uri-reference" - }, - $schema: { - type: "string", - format: "uri" - }, - $ref: { - type: "string", - format: "uri-reference" - }, - $comment: { - type: "string" - }, - title: { - type: "string" - }, - description: { - type: "string" - }, - "default": true, - readOnly: { - type: "boolean", - "default": false - }, - examples: { - type: "array", - items: true - }, - multipleOf: { - type: "number", - exclusiveMinimum: 0 - }, - maximum: { - type: "number" - }, - exclusiveMaximum: { - type: "number" - }, - minimum: { - type: "number" - }, - exclusiveMinimum: { - type: "number" - }, - maxLength: { - $ref: "#/definitions/nonNegativeInteger" - }, - minLength: { - $ref: "#/definitions/nonNegativeIntegerDefault0" - }, - pattern: { - type: "string", - format: "regex" - }, - additionalItems: { - $ref: "#" - }, - items: { - anyOf: [ - { - $ref: "#" - }, - { - $ref: "#/definitions/schemaArray" - } - ], - "default": true - }, - maxItems: { - $ref: "#/definitions/nonNegativeInteger" - }, - minItems: { - $ref: "#/definitions/nonNegativeIntegerDefault0" - }, - uniqueItems: { - type: "boolean", - "default": false - }, - contains: { - $ref: "#" - }, - maxProperties: { - $ref: "#/definitions/nonNegativeInteger" - }, - minProperties: { - $ref: "#/definitions/nonNegativeIntegerDefault0" - }, - required: { - $ref: "#/definitions/stringArray" - }, - additionalProperties: { - $ref: "#" - }, - definitions: { - type: "object", - additionalProperties: { - $ref: "#" - }, - "default": { - } - }, - properties: { - type: "object", - additionalProperties: { - $ref: "#" - }, - "default": { - } - }, - patternProperties: { - type: "object", - additionalProperties: { - $ref: "#" - }, - propertyNames: { - format: "regex" - }, - "default": { - } - }, - dependencies: { - type: "object", - additionalProperties: { - anyOf: [ - { - $ref: "#" - }, - { - $ref: "#/definitions/stringArray" - } - ] - } - }, - propertyNames: { - $ref: "#" - }, - "const": true, - "enum": { - type: "array", - items: true, - minItems: 1, - uniqueItems: true - }, - type: { - anyOf: [ - { - $ref: "#/definitions/simpleTypes" - }, - { - type: "array", - items: { - $ref: "#/definitions/simpleTypes" - }, - minItems: 1, - uniqueItems: true - } - ] - }, - format: { - type: "string" - }, - contentMediaType: { - type: "string" - }, - contentEncoding: { - type: "string" - }, - "if": { - $ref: "#" - }, - then: { - $ref: "#" - }, - "else": { - $ref: "#" - }, - allOf: { - $ref: "#/definitions/schemaArray" - }, - anyOf: { - $ref: "#/definitions/schemaArray" - }, - oneOf: { - $ref: "#/definitions/schemaArray" - }, - not: { - $ref: "#" - } -}; -var require$$3$2 = { - $schema: $schema$3, - $id: $id$4, - title: title$2, - definitions: definitions$2, - type: type$4, - properties: properties$6, - "default": true -}; - -var hasRequiredAjv$2; - -function requireAjv$2 () { - if (hasRequiredAjv$2) return ajv$3.exports; - hasRequiredAjv$2 = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv = void 0; - const core_1 = /*@__PURE__*/ requireCore$4(); - const draft7_1 = /*@__PURE__*/ requireDraft7$1(); - const discriminator_1 = /*@__PURE__*/ requireDiscriminator$1(); - const draft7MetaSchema = require$$3$2; - const META_SUPPORT_DATA = ["/properties"]; - const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; - class Ajv extends core_1.default { - _addVocabularies() { - super._addVocabularies(); - draft7_1.default.forEach((v) => this.addVocabulary(v)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - if (!this.opts.meta) - return; - const metaSchema = this.opts.$data - ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) - : draft7MetaSchema; - this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } - } - exports$1.Ajv = Ajv; - module.exports = exports$1 = Ajv; - module.exports.Ajv = Ajv; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.default = Ajv; - var validate_1 = /*@__PURE__*/ requireValidate$2(); - Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); - var codegen_1 = /*@__PURE__*/ requireCodegen$1(); - Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } }); - Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } }); - Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); - Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); - Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); - Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); - var validation_error_1 = /*@__PURE__*/ requireValidation_error$1(); - Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } }); - var ref_error_1 = /*@__PURE__*/ requireRef_error$1(); - Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } }); - } (ajv$3, ajv$3.exports)); - return ajv$3.exports; -} - -var ajvExports$1 = /*@__PURE__*/ requireAjv$2(); -var Ajv = /*@__PURE__*/getDefaultExportFromCjs(ajvExports$1); - -var dist$c = {exports: {}}; - -var formats = {}; - -var hasRequiredFormats$1; - -function requireFormats$1 () { - if (hasRequiredFormats$1) return formats; - hasRequiredFormats$1 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.formatNames = exports$1.fastFormats = exports$1.fullFormats = void 0; - function fmtDef(validate, compare) { - return { validate, compare }; - } - exports$1.fullFormats = { - date: fmtDef(date, compareDate), - time: fmtDef(getTime(true), compareTime), - "date-time": fmtDef(getDateTime(true), compareDateTime), - "iso-time": fmtDef(getTime(), compareIsoTime), - "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime), - duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?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0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, - "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, - url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/, - ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, - regex, - uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, - "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, - "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, - "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, - byte, - int32: { type: "number", validate: validateInt32 }, - int64: { type: "number", validate: validateInt64 }, - float: { type: "number", validate: validateNumber }, - double: { type: "number", validate: validateNumber }, - password: true, - binary: true, - }; - exports$1.fastFormats = { - ...exports$1.fullFormats, - date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate), - time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime), - "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), - "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime), - "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime), - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - }; - exports$1.formatNames = Object.keys(exports$1.fullFormats); - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; - const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - function date(str) { - const matches = DATE.exec(str); - if (!matches) - return false; - const year = +matches[1]; - const month = +matches[2]; - const day = +matches[3]; - return (month >= 1 && - month <= 12 && - day >= 1 && - day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month])); - } - function compareDate(d1, d2) { - if (!(d1 && d2)) - return undefined; - if (d1 > d2) - return 1; - if (d1 < d2) - return -1; - return 0; - } - const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i; - function getTime(strictTimeZone) { - return function time(str) { - const matches = TIME.exec(str); - if (!matches) - return false; - const hr = +matches[1]; - const min = +matches[2]; - const sec = +matches[3]; - const tz = matches[4]; - const tzSign = matches[5] === "-" ? -1 : 1; - const tzH = +(matches[6] || 0); - const tzM = +(matches[7] || 0); - if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz)) - return false; - if (hr <= 23 && min <= 59 && sec < 60) - return true; - const utcMin = min - tzM * tzSign; - const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0); - return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61; - }; - } - function compareTime(s1, s2) { - if (!(s1 && s2)) - return undefined; - const t1 = new Date("2020-01-01T" + s1).valueOf(); - const t2 = new Date("2020-01-01T" + s2).valueOf(); - if (!(t1 && t2)) - return undefined; - return t1 - t2; - } - function compareIsoTime(t1, t2) { - if (!(t1 && t2)) - return undefined; - const a1 = TIME.exec(t1); - const a2 = TIME.exec(t2); - if (!(a1 && a2)) - return undefined; - t1 = a1[1] + a1[2] + a1[3]; - t2 = a2[1] + a2[2] + a2[3]; - if (t1 > t2) - return 1; - if (t1 < t2) - return -1; - return 0; - } - const DATE_TIME_SEPARATOR = /t|\s/i; - function getDateTime(strictTimeZone) { - const time = getTime(strictTimeZone); - return function date_time(str) { - const dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]); - }; - } - function compareDateTime(dt1, dt2) { - if (!(dt1 && dt2)) - return undefined; - const d1 = new Date(dt1).valueOf(); - const d2 = new Date(dt2).valueOf(); - if (!(d1 && d2)) - return undefined; - return d1 - d2; - } - function compareIsoDateTime(dt1, dt2) { - if (!(dt1 && dt2)) - return undefined; - const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); - const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR); - const res = compareDate(d1, d2); - if (res === undefined) - return undefined; - return res || compareTime(t1, t2); - } - const NOT_URI_FRAGMENT = /\/|:/; - const URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; - function uri(str) { - return NOT_URI_FRAGMENT.test(str) && URI.test(str); - } - const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; - function byte(str) { - BYTE.lastIndex = 0; - return BYTE.test(str); - } - const MIN_INT32 = -2147483648; - const MAX_INT32 = 2 ** 31 - 1; - function validateInt32(value) { - return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32; - } - function validateInt64(value) { - return Number.isInteger(value); - } - function validateNumber() { - return true; - } - const Z_ANCHOR = /[^\\]\\Z/; - function regex(str) { - if (Z_ANCHOR.test(str)) - return false; - try { - new RegExp(str); - return true; - } - catch (e) { - return false; - } - } - } (formats)); - return formats; -} - -var limit = {}; - -var ajv$2 = {exports: {}}; - -var core$3 = {}; - -var validate$1 = {}; - -var boolSchema = {}; - -var errors$1 = {}; - -var codegen = {}; - -var code$2 = {}; - -var hasRequiredCode$2; - -function requireCode$2 () { - if (hasRequiredCode$2) return code$2; - hasRequiredCode$2 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.regexpCode = exports$1.getEsmExportName = exports$1.getProperty = exports$1.safeStringify = exports$1.stringify = exports$1.strConcat = exports$1.addCodeArg = exports$1.str = exports$1._ = exports$1.nil = exports$1._Code = exports$1.Name = exports$1.IDENTIFIER = exports$1._CodeOrName = void 0; - class _CodeOrName { - } - exports$1._CodeOrName = _CodeOrName; - exports$1.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; - class Name extends _CodeOrName { - constructor(s) { - super(); - if (!exports$1.IDENTIFIER.test(s)) - throw new Error("CodeGen: name must be a valid identifier"); - this.str = s; - } - toString() { - return this.str; - } - emptyStr() { - return false; - } - get names() { - return { [this.str]: 1 }; - } - } - exports$1.Name = Name; - class _Code extends _CodeOrName { - constructor(code) { - super(); - this._items = typeof code === "string" ? [code] : code; - } - toString() { - return this.str; - } - emptyStr() { - if (this._items.length > 1) - return false; - const item = this._items[0]; - return item === "" || item === '""'; - } - get str() { - var _a; - return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, ""))); - } - get names() { - var _a; - return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => { - if (c instanceof Name) - names[c.str] = (names[c.str] || 0) + 1; - return names; - }, {}))); - } - } - exports$1._Code = _Code; - exports$1.nil = new _Code(""); - function _(strs, ...args) { - const code = [strs[0]]; - let i = 0; - while (i < args.length) { - addCodeArg(code, args[i]); - code.push(strs[++i]); - } - return new _Code(code); - } - exports$1._ = _; - const plus = new _Code("+"); - function str(strs, ...args) { - const expr = [safeStringify(strs[0])]; - let i = 0; - while (i < args.length) { - expr.push(plus); - addCodeArg(expr, args[i]); - expr.push(plus, safeStringify(strs[++i])); - } - optimize(expr); - return new _Code(expr); - } - exports$1.str = str; - function addCodeArg(code, arg) { - if (arg instanceof _Code) - code.push(...arg._items); - else if (arg instanceof Name) - code.push(arg); - else - code.push(interpolate(arg)); - } - exports$1.addCodeArg = addCodeArg; - function optimize(expr) { - let i = 1; - while (i < expr.length - 1) { - if (expr[i] === plus) { - const res = mergeExprItems(expr[i - 1], expr[i + 1]); - if (res !== undefined) { - expr.splice(i - 1, 3, res); - continue; - } - expr[i++] = "+"; - } - i++; - } - } - function mergeExprItems(a, b) { - if (b === '""') - return a; - if (a === '""') - return b; - if (typeof a == "string") { - if (b instanceof Name || a[a.length - 1] !== '"') - return; - if (typeof b != "string") - return `${a.slice(0, -1)}${b}"`; - if (b[0] === '"') - return a.slice(0, -1) + b.slice(1); - return; - } - if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) - return `"${a}${b.slice(1)}`; - return; - } - function strConcat(c1, c2) { - return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`; - } - exports$1.strConcat = strConcat; - function interpolate(x) { - return typeof x == "number" || typeof x == "boolean" || x === null - ? x - : safeStringify(Array.isArray(x) ? x.join(",") : x); - } - function stringify(x) { - return new _Code(safeStringify(x)); - } - exports$1.stringify = stringify; - function safeStringify(x) { - return JSON.stringify(x) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029"); - } - exports$1.safeStringify = safeStringify; - function getProperty(key) { - return typeof key == "string" && exports$1.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`; - } - exports$1.getProperty = getProperty; - function getEsmExportName(key) { - if (typeof key == "string" && exports$1.IDENTIFIER.test(key)) { - return new _Code(`${key}`); - } - throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); - } - exports$1.getEsmExportName = getEsmExportName; - function regexpCode(rx) { - return new _Code(rx.toString()); - } - exports$1.regexpCode = regexpCode; - } (code$2)); - return code$2; -} - -var scope$1 = {}; - -var hasRequiredScope$1; - -function requireScope$1 () { - if (hasRequiredScope$1) return scope$1; - hasRequiredScope$1 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.ValueScope = exports$1.ValueScopeName = exports$1.Scope = exports$1.varKinds = exports$1.UsedValueState = void 0; - const code_1 = /*@__PURE__*/ requireCode$2(); - class ValueError extends Error { - constructor(name) { - super(`CodeGen: "code" for ${name} not defined`); - this.value = name.value; - } - } - var UsedValueState; - (function (UsedValueState) { - UsedValueState[UsedValueState["Started"] = 0] = "Started"; - UsedValueState[UsedValueState["Completed"] = 1] = "Completed"; - })(UsedValueState || (exports$1.UsedValueState = UsedValueState = {})); - exports$1.varKinds = { - const: new code_1.Name("const"), - let: new code_1.Name("let"), - var: new code_1.Name("var"), - }; - class Scope { - constructor({ prefixes, parent } = {}) { - this._names = {}; - this._prefixes = prefixes; - this._parent = parent; - } - toName(nameOrPrefix) { - return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); - } - name(prefix) { - return new code_1.Name(this._newName(prefix)); - } - _newName(prefix) { - const ng = this._names[prefix] || this._nameGroup(prefix); - return `${prefix}${ng.index++}`; - } - _nameGroup(prefix) { - var _a, _b; - if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) { - throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); - } - return (this._names[prefix] = { prefix, index: 0 }); - } - } - exports$1.Scope = Scope; - class ValueScopeName extends code_1.Name { - constructor(prefix, nameStr) { - super(nameStr); - this.prefix = prefix; - } - setValue(value, { property, itemIndex }) { - this.value = value; - this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`; - } - } - exports$1.ValueScopeName = ValueScopeName; - const line = (0, code_1._) `\n`; - class ValueScope extends Scope { - constructor(opts) { - super(opts); - this._values = {}; - this._scope = opts.scope; - this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; - } - get() { - return this._scope; - } - name(prefix) { - return new ValueScopeName(prefix, this._newName(prefix)); - } - value(nameOrPrefix, value) { - var _a; - if (value.ref === undefined) - throw new Error("CodeGen: ref must be passed in value"); - const name = this.toName(nameOrPrefix); - const { prefix } = name; - const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; - let vs = this._values[prefix]; - if (vs) { - const _name = vs.get(valueKey); - if (_name) - return _name; - } - else { - vs = this._values[prefix] = new Map(); - } - vs.set(valueKey, name); - const s = this._scope[prefix] || (this._scope[prefix] = []); - const itemIndex = s.length; - s[itemIndex] = value.ref; - name.setValue(value, { property: prefix, itemIndex }); - return name; - } - getValue(prefix, keyOrRef) { - const vs = this._values[prefix]; - if (!vs) - return; - return vs.get(keyOrRef); - } - scopeRefs(scopeName, values = this._values) { - return this._reduceValues(values, (name) => { - if (name.scopePath === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return (0, code_1._) `${scopeName}${name.scopePath}`; - }); - } - scopeCode(values = this._values, usedValues, getCode) { - return this._reduceValues(values, (name) => { - if (name.value === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return name.value.code; - }, usedValues, getCode); - } - _reduceValues(values, valueCode, usedValues = {}, getCode) { - let code = code_1.nil; - for (const prefix in values) { - const vs = values[prefix]; - if (!vs) - continue; - const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map()); - vs.forEach((name) => { - if (nameSet.has(name)) - return; - nameSet.set(name, UsedValueState.Started); - let c = valueCode(name); - if (c) { - const def = this.opts.es5 ? exports$1.varKinds.var : exports$1.varKinds.const; - code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`; - } - else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) { - code = (0, code_1._) `${code}${c}${this.opts._n}`; - } - else { - throw new ValueError(name); - } - nameSet.set(name, UsedValueState.Completed); - }); - } - return code; - } - } - exports$1.ValueScope = ValueScope; - } (scope$1)); - return scope$1; -} - -var hasRequiredCodegen; - -function requireCodegen () { - if (hasRequiredCodegen) return codegen; - hasRequiredCodegen = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.or = exports$1.and = exports$1.not = exports$1.CodeGen = exports$1.operators = exports$1.varKinds = exports$1.ValueScopeName = exports$1.ValueScope = exports$1.Scope = exports$1.Name = exports$1.regexpCode = exports$1.stringify = exports$1.getProperty = exports$1.nil = exports$1.strConcat = exports$1.str = exports$1._ = void 0; - const code_1 = /*@__PURE__*/ requireCode$2(); - const scope_1 = /*@__PURE__*/ requireScope$1(); - var code_2 = /*@__PURE__*/ requireCode$2(); - Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return code_2._; } }); - Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return code_2.str; } }); - Object.defineProperty(exports$1, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } }); - Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return code_2.nil; } }); - Object.defineProperty(exports$1, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } }); - Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return code_2.stringify; } }); - Object.defineProperty(exports$1, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } }); - Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return code_2.Name; } }); - var scope_2 = /*@__PURE__*/ requireScope$1(); - Object.defineProperty(exports$1, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } }); - Object.defineProperty(exports$1, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } }); - Object.defineProperty(exports$1, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } }); - Object.defineProperty(exports$1, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } }); - exports$1.operators = { - GT: new code_1._Code(">"), - GTE: new code_1._Code(">="), - LT: new code_1._Code("<"), - LTE: new code_1._Code("<="), - EQ: new code_1._Code("==="), - NEQ: new code_1._Code("!=="), - NOT: new code_1._Code("!"), - OR: new code_1._Code("||"), - AND: new code_1._Code("&&"), - ADD: new code_1._Code("+"), - }; - class Node { - optimizeNodes() { - return this; - } - optimizeNames(_names, _constants) { - return this; - } - } - class Def extends Node { - constructor(varKind, name, rhs) { - super(); - this.varKind = varKind; - this.name = name; - this.rhs = rhs; - } - render({ es5, _n }) { - const varKind = es5 ? scope_1.varKinds.var : this.varKind; - const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`; - return `${varKind} ${this.name}${rhs};` + _n; - } - optimizeNames(names, constants) { - if (!names[this.name.str]) - return; - if (this.rhs) - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; - } - } - class Assign extends Node { - constructor(lhs, rhs, sideEffects) { - super(); - this.lhs = lhs; - this.rhs = rhs; - this.sideEffects = sideEffects; - } - render({ _n }) { - return `${this.lhs} = ${this.rhs};` + _n; - } - optimizeNames(names, constants) { - if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) - return; - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; - return addExprNames(names, this.rhs); - } - } - class AssignOp extends Assign { - constructor(lhs, op, rhs, sideEffects) { - super(lhs, rhs, sideEffects); - this.op = op; - } - render({ _n }) { - return `${this.lhs} ${this.op}= ${this.rhs};` + _n; - } - } - class Label extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - return `${this.label}:` + _n; - } - } - class Break extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - const label = this.label ? ` ${this.label}` : ""; - return `break${label};` + _n; - } - } - class Throw extends Node { - constructor(error) { - super(); - this.error = error; - } - render({ _n }) { - return `throw ${this.error};` + _n; - } - get names() { - return this.error.names; - } - } - class AnyCode extends Node { - constructor(code) { - super(); - this.code = code; - } - render({ _n }) { - return `${this.code};` + _n; - } - optimizeNodes() { - return `${this.code}` ? this : undefined; - } - optimizeNames(names, constants) { - this.code = optimizeExpr(this.code, names, constants); - return this; - } - get names() { - return this.code instanceof code_1._CodeOrName ? this.code.names : {}; - } - } - class ParentNode extends Node { - constructor(nodes = []) { - super(); - this.nodes = nodes; - } - render(opts) { - return this.nodes.reduce((code, n) => code + n.render(opts), ""); - } - optimizeNodes() { - const { nodes } = this; - let i = nodes.length; - while (i--) { - const n = nodes[i].optimizeNodes(); - if (Array.isArray(n)) - nodes.splice(i, 1, ...n); - else if (n) - nodes[i] = n; - else - nodes.splice(i, 1); - } - return nodes.length > 0 ? this : undefined; - } - optimizeNames(names, constants) { - const { nodes } = this; - let i = nodes.length; - while (i--) { - const n = nodes[i]; - if (n.optimizeNames(names, constants)) - continue; - subtractNames(names, n.names); - nodes.splice(i, 1); - } - return nodes.length > 0 ? this : undefined; - } - get names() { - return this.nodes.reduce((names, n) => addNames(names, n.names), {}); - } - } - class BlockNode extends ParentNode { - render(opts) { - return "{" + opts._n + super.render(opts) + "}" + opts._n; - } - } - class Root extends ParentNode { - } - class Else extends BlockNode { - } - Else.kind = "else"; - class If extends BlockNode { - constructor(condition, nodes) { - super(nodes); - this.condition = condition; - } - render(opts) { - let code = `if(${this.condition})` + super.render(opts); - if (this.else) - code += "else " + this.else.render(opts); - return code; - } - optimizeNodes() { - super.optimizeNodes(); - const cond = this.condition; - if (cond === true) - return this.nodes; - let e = this.else; - if (e) { - const ns = e.optimizeNodes(); - e = this.else = Array.isArray(ns) ? new Else(ns) : ns; - } - if (e) { - if (cond === false) - return e instanceof If ? e : e.nodes; - if (this.nodes.length) - return this; - return new If(not(cond), e instanceof If ? [e] : e.nodes); - } - if (cond === false || !this.nodes.length) - return undefined; - return this; - } - optimizeNames(names, constants) { - var _a; - this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - if (!(super.optimizeNames(names, constants) || this.else)) - return; - this.condition = optimizeExpr(this.condition, names, constants); - return this; - } - get names() { - const names = super.names; - addExprNames(names, this.condition); - if (this.else) - addNames(names, this.else.names); - return names; - } - } - If.kind = "if"; - class For extends BlockNode { - } - For.kind = "for"; - class ForLoop extends For { - constructor(iteration) { - super(); - this.iteration = iteration; - } - render(opts) { - return `for(${this.iteration})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iteration = optimizeExpr(this.iteration, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iteration.names); - } - } - class ForRange extends For { - constructor(varKind, name, from, to) { - super(); - this.varKind = varKind; - this.name = name; - this.from = from; - this.to = to; - } - render(opts) { - const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; - const { name, from, to } = this; - return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); - } - get names() { - const names = addExprNames(super.names, this.from); - return addExprNames(names, this.to); - } - } - class ForIter extends For { - constructor(loop, varKind, name, iterable) { - super(); - this.loop = loop; - this.varKind = varKind; - this.name = name; - this.iterable = iterable; - } - render(opts) { - return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iterable = optimizeExpr(this.iterable, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iterable.names); - } - } - class Func extends BlockNode { - constructor(name, args, async) { - super(); - this.name = name; - this.args = args; - this.async = async; - } - render(opts) { - const _async = this.async ? "async " : ""; - return `${_async}function ${this.name}(${this.args})` + super.render(opts); - } - } - Func.kind = "func"; - class Return extends ParentNode { - render(opts) { - return "return " + super.render(opts); - } - } - Return.kind = "return"; - class Try extends BlockNode { - render(opts) { - let code = "try" + super.render(opts); - if (this.catch) - code += this.catch.render(opts); - if (this.finally) - code += this.finally.render(opts); - return code; - } - optimizeNodes() { - var _a, _b; - super.optimizeNodes(); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); - return this; - } - optimizeNames(names, constants) { - var _a, _b; - super.optimizeNames(names, constants); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); - return this; - } - get names() { - const names = super.names; - if (this.catch) - addNames(names, this.catch.names); - if (this.finally) - addNames(names, this.finally.names); - return names; - } - } - class Catch extends BlockNode { - constructor(error) { - super(); - this.error = error; - } - render(opts) { - return `catch(${this.error})` + super.render(opts); - } - } - Catch.kind = "catch"; - class Finally extends BlockNode { - render(opts) { - return "finally" + super.render(opts); - } - } - Finally.kind = "finally"; - class CodeGen { - constructor(extScope, opts = {}) { - this._values = {}; - this._blockStarts = []; - this._constants = {}; - this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; - this._extScope = extScope; - this._scope = new scope_1.Scope({ parent: extScope }); - this._nodes = [new Root()]; - } - toString() { - return this._root.render(this.opts); - } - name(prefix) { - return this._scope.name(prefix); - } - scopeName(prefix) { - return this._extScope.name(prefix); - } - scopeValue(prefixOrName, value) { - const name = this._extScope.value(prefixOrName, value); - const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set()); - vs.add(name); - return name; - } - getScopeValue(prefix, keyOrRef) { - return this._extScope.getValue(prefix, keyOrRef); - } - scopeRefs(scopeName) { - return this._extScope.scopeRefs(scopeName, this._values); - } - scopeCode() { - return this._extScope.scopeCode(this._values); - } - _def(varKind, nameOrPrefix, rhs, constant) { - const name = this._scope.toName(nameOrPrefix); - if (rhs !== undefined && constant) - this._constants[name.str] = rhs; - this._leafNode(new Def(varKind, name, rhs)); - return name; - } - const(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); - } - let(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); - } - var(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); - } - assign(lhs, rhs, sideEffects) { - return this._leafNode(new Assign(lhs, rhs, sideEffects)); - } - add(lhs, rhs) { - return this._leafNode(new AssignOp(lhs, exports$1.operators.ADD, rhs)); - } - code(c) { - if (typeof c == "function") - c(); - else if (c !== code_1.nil) - this._leafNode(new AnyCode(c)); - return this; - } - object(...keyValues) { - const code = ["{"]; - for (const [key, value] of keyValues) { - if (code.length > 1) - code.push(","); - code.push(key); - if (key !== value || this.opts.es5) { - code.push(":"); - (0, code_1.addCodeArg)(code, value); - } - } - code.push("}"); - return new code_1._Code(code); - } - if(condition, thenBody, elseBody) { - this._blockNode(new If(condition)); - if (thenBody && elseBody) { - this.code(thenBody).else().code(elseBody).endIf(); - } - else if (thenBody) { - this.code(thenBody).endIf(); - } - else if (elseBody) { - throw new Error('CodeGen: "else" body without "then" body'); - } - return this; - } - elseIf(condition) { - return this._elseNode(new If(condition)); - } - else() { - return this._elseNode(new Else()); - } - endIf() { - return this._endBlockNode(If, Else); - } - _for(node, forBody) { - this._blockNode(node); - if (forBody) - this.code(forBody).endFor(); - return this; - } - for(iteration, forBody) { - return this._for(new ForLoop(iteration), forBody); - } - forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); - } - forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { - const name = this._scope.toName(nameOrPrefix); - if (this.opts.es5) { - const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); - return this.forRange("_i", 0, (0, code_1._) `${arr}.length`, (i) => { - this.var(name, (0, code_1._) `${arr}[${i}]`); - forBody(name); - }); - } - return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); - } - forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { - if (this.opts.ownProperties) { - return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody); - } - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); - } - endFor() { - return this._endBlockNode(For); - } - label(label) { - return this._leafNode(new Label(label)); - } - break(label) { - return this._leafNode(new Break(label)); - } - return(value) { - const node = new Return(); - this._blockNode(node); - this.code(value); - if (node.nodes.length !== 1) - throw new Error('CodeGen: "return" should have one node'); - return this._endBlockNode(Return); - } - try(tryBody, catchCode, finallyCode) { - if (!catchCode && !finallyCode) - throw new Error('CodeGen: "try" without "catch" and "finally"'); - const node = new Try(); - this._blockNode(node); - this.code(tryBody); - if (catchCode) { - const error = this.name("e"); - this._currNode = node.catch = new Catch(error); - catchCode(error); - } - if (finallyCode) { - this._currNode = node.finally = new Finally(); - this.code(finallyCode); - } - return this._endBlockNode(Catch, Finally); - } - throw(error) { - return this._leafNode(new Throw(error)); - } - block(body, nodeCount) { - this._blockStarts.push(this._nodes.length); - if (body) - this.code(body).endBlock(nodeCount); - return this; - } - endBlock(nodeCount) { - const len = this._blockStarts.pop(); - if (len === undefined) - throw new Error("CodeGen: not in self-balancing block"); - const toClose = this._nodes.length - len; - if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) { - throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); - } - this._nodes.length = len; - return this; - } - func(name, args = code_1.nil, async, funcBody) { - this._blockNode(new Func(name, args, async)); - if (funcBody) - this.code(funcBody).endFunc(); - return this; - } - endFunc() { - return this._endBlockNode(Func); - } - optimize(n = 1) { - while (n-- > 0) { - this._root.optimizeNodes(); - this._root.optimizeNames(this._root.names, this._constants); - } - } - _leafNode(node) { - this._currNode.nodes.push(node); - return this; - } - _blockNode(node) { - this._currNode.nodes.push(node); - this._nodes.push(node); - } - _endBlockNode(N1, N2) { - const n = this._currNode; - if (n instanceof N1 || (N2 && n instanceof N2)) { - this._nodes.pop(); - return this; - } - throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); - } - _elseNode(node) { - const n = this._currNode; - if (!(n instanceof If)) { - throw new Error('CodeGen: "else" without "if"'); - } - this._currNode = n.else = node; - return this; - } - get _root() { - return this._nodes[0]; - } - get _currNode() { - const ns = this._nodes; - return ns[ns.length - 1]; - } - set _currNode(node) { - const ns = this._nodes; - ns[ns.length - 1] = node; - } - } - exports$1.CodeGen = CodeGen; - function addNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) + (from[n] || 0); - return names; - } - function addExprNames(names, from) { - return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; - } - function optimizeExpr(expr, names, constants) { - if (expr instanceof code_1.Name) - return replaceName(expr); - if (!canOptimize(expr)) - return expr; - return new code_1._Code(expr._items.reduce((items, c) => { - if (c instanceof code_1.Name) - c = replaceName(c); - if (c instanceof code_1._Code) - items.push(...c._items); - else - items.push(c); - return items; - }, [])); - function replaceName(n) { - const c = constants[n.str]; - if (c === undefined || names[n.str] !== 1) - return n; - delete names[n.str]; - return c; - } - function canOptimize(e) { - return (e instanceof code_1._Code && - e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined)); - } - } - function subtractNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) - (from[n] || 0); - } - function not(x) { - return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`; - } - exports$1.not = not; - const andCode = mappend(exports$1.operators.AND); - function and(...args) { - return args.reduce(andCode); - } - exports$1.and = and; - const orCode = mappend(exports$1.operators.OR); - function or(...args) { - return args.reduce(orCode); - } - exports$1.or = or; - function mappend(op) { - return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`); - } - function par(x) { - return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`; - } - } (codegen)); - return codegen; -} - -var util$4 = {}; - -var hasRequiredUtil$4; - -function requireUtil$4 () { - if (hasRequiredUtil$4) return util$4; - hasRequiredUtil$4 = 1; - Object.defineProperty(util$4, "__esModule", { value: true }); - util$4.checkStrictMode = util$4.getErrorPath = util$4.Type = util$4.useFunc = util$4.setEvaluated = util$4.evaluatedPropsToName = util$4.mergeEvaluated = util$4.eachItem = util$4.unescapeJsonPointer = util$4.escapeJsonPointer = util$4.escapeFragment = util$4.unescapeFragment = util$4.schemaRefOrVal = util$4.schemaHasRulesButRef = util$4.schemaHasRules = util$4.checkUnknownRules = util$4.alwaysValidSchema = util$4.toHash = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const code_1 = /*@__PURE__*/ requireCode$2(); - function toHash(arr) { - const hash = {}; - for (const item of arr) - hash[item] = true; - return hash; - } - util$4.toHash = toHash; - function alwaysValidSchema(it, schema) { - if (typeof schema == "boolean") - return schema; - if (Object.keys(schema).length === 0) - return true; - checkUnknownRules(it, schema); - return !schemaHasRules(schema, it.self.RULES.all); - } - util$4.alwaysValidSchema = alwaysValidSchema; - function checkUnknownRules(it, schema = it.schema) { - const { opts, self } = it; - if (!opts.strictSchema) - return; - if (typeof schema === "boolean") - return; - const rules = self.RULES.keywords; - for (const key in schema) { - if (!rules[key]) - checkStrictMode(it, `unknown keyword: "${key}"`); - } - } - util$4.checkUnknownRules = checkUnknownRules; - function schemaHasRules(schema, rules) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (rules[key]) - return true; - return false; - } - util$4.schemaHasRules = schemaHasRules; - function schemaHasRulesButRef(schema, RULES) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (key !== "$ref" && RULES.all[key]) - return true; - return false; - } - util$4.schemaHasRulesButRef = schemaHasRulesButRef; - function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) { - if (!$data) { - if (typeof schema == "number" || typeof schema == "boolean") - return schema; - if (typeof schema == "string") - return (0, codegen_1._) `${schema}`; - } - return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; - } - util$4.schemaRefOrVal = schemaRefOrVal; - function unescapeFragment(str) { - return unescapeJsonPointer(decodeURIComponent(str)); - } - util$4.unescapeFragment = unescapeFragment; - function escapeFragment(str) { - return encodeURIComponent(escapeJsonPointer(str)); - } - util$4.escapeFragment = escapeFragment; - function escapeJsonPointer(str) { - if (typeof str == "number") - return `${str}`; - return str.replace(/~/g, "~0").replace(/\//g, "~1"); - } - util$4.escapeJsonPointer = escapeJsonPointer; - function unescapeJsonPointer(str) { - return str.replace(/~1/g, "/").replace(/~0/g, "~"); - } - util$4.unescapeJsonPointer = unescapeJsonPointer; - function eachItem(xs, f) { - if (Array.isArray(xs)) { - for (const x of xs) - f(x); - } - else { - f(xs); - } - } - util$4.eachItem = eachItem; - function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) { - return (gen, from, to, toName) => { - const res = to === undefined - ? from - : to instanceof codegen_1.Name - ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) - : from instanceof codegen_1.Name - ? (mergeToName(gen, to, from), from) - : mergeValues(from, to); - return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; - }; - } - util$4.mergeEvaluated = { - props: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => { - gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`)); - }), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => { - if (from === true) { - gen.assign(to, true); - } - else { - gen.assign(to, (0, codegen_1._) `${to} || {}`); - setEvaluated(gen, to, from); - } - }), - mergeValues: (from, to) => (from === true ? true : { ...from, ...to }), - resultToName: evaluatedPropsToName, - }), - items: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)), - mergeValues: (from, to) => (from === true ? true : Math.max(from, to)), - resultToName: (gen, items) => gen.var("items", items), - }), - }; - function evaluatedPropsToName(gen, ps) { - if (ps === true) - return gen.var("props", true); - const props = gen.var("props", (0, codegen_1._) `{}`); - if (ps !== undefined) - setEvaluated(gen, props, ps); - return props; - } - util$4.evaluatedPropsToName = evaluatedPropsToName; - function setEvaluated(gen, props, ps) { - Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true)); - } - util$4.setEvaluated = setEvaluated; - const snippets = {}; - function useFunc(gen, f) { - return gen.scopeValue("func", { - ref: f, - code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)), - }); - } - util$4.useFunc = useFunc; - var Type; - (function (Type) { - Type[Type["Num"] = 0] = "Num"; - Type[Type["Str"] = 1] = "Str"; - })(Type || (util$4.Type = Type = {})); - function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { - if (dataProp instanceof codegen_1.Name) { - const isNumber = dataPropType === Type.Num; - return jsPropertySyntax - ? isNumber - ? (0, codegen_1._) `"[" + ${dataProp} + "]"` - : (0, codegen_1._) `"['" + ${dataProp} + "']"` - : isNumber - ? (0, codegen_1._) `"/" + ${dataProp}` - : (0, codegen_1._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; - } - return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); - } - util$4.getErrorPath = getErrorPath; - function checkStrictMode(it, msg, mode = it.opts.strictSchema) { - if (!mode) - return; - msg = `strict mode: ${msg}`; - if (mode === true) - throw new Error(msg); - it.self.logger.warn(msg); - } - util$4.checkStrictMode = checkStrictMode; - return util$4; -} - -var names = {}; - -var hasRequiredNames; - -function requireNames () { - if (hasRequiredNames) return names; - hasRequiredNames = 1; - Object.defineProperty(names, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const names$1 = { - data: new codegen_1.Name("data"), - valCxt: new codegen_1.Name("valCxt"), - instancePath: new codegen_1.Name("instancePath"), - parentData: new codegen_1.Name("parentData"), - parentDataProperty: new codegen_1.Name("parentDataProperty"), - rootData: new codegen_1.Name("rootData"), - dynamicAnchors: new codegen_1.Name("dynamicAnchors"), - vErrors: new codegen_1.Name("vErrors"), - errors: new codegen_1.Name("errors"), - this: new codegen_1.Name("this"), - self: new codegen_1.Name("self"), - scope: new codegen_1.Name("scope"), - json: new codegen_1.Name("json"), - jsonPos: new codegen_1.Name("jsonPos"), - jsonLen: new codegen_1.Name("jsonLen"), - jsonPart: new codegen_1.Name("jsonPart"), - }; - names.default = names$1; - return names; -} - -var hasRequiredErrors$1; - -function requireErrors$1 () { - if (hasRequiredErrors$1) return errors$1; - hasRequiredErrors$1 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.extendErrors = exports$1.resetErrorsCount = exports$1.reportExtraError = exports$1.reportError = exports$1.keyword$DataError = exports$1.keywordError = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const names_1 = /*@__PURE__*/ requireNames(); - exports$1.keywordError = { - message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`, - }; - exports$1.keyword$DataError = { - message: ({ keyword, schemaType }) => schemaType - ? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)` - : (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`, - }; - function reportError(cxt, error = exports$1.keywordError, errorPaths, overrideAllErrors) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) { - addError(gen, errObj); - } - else { - returnErrors(it, (0, codegen_1._) `[${errObj}]`); - } - } - exports$1.reportError = reportError; - function reportExtraError(cxt, error = exports$1.keywordError, errorPaths) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - addError(gen, errObj); - if (!(compositeRule || allErrors)) { - returnErrors(it, names_1.default.vErrors); - } - } - exports$1.reportExtraError = reportExtraError; - function resetErrorsCount(gen, errsCount) { - gen.assign(names_1.default.errors, errsCount); - gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); - } - exports$1.resetErrorsCount = resetErrorsCount; - function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) { - if (errsCount === undefined) - throw new Error("ajv implementation error"); - const err = gen.name("err"); - gen.forRange("i", errsCount, names_1.default.errors, (i) => { - gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`); - gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath))); - gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`); - if (it.opts.verbose) { - gen.assign((0, codegen_1._) `${err}.schema`, schemaValue); - gen.assign((0, codegen_1._) `${err}.data`, data); - } - }); - } - exports$1.extendErrors = extendErrors; - function addError(gen, errObj) { - const err = gen.const("err", errObj); - gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`); - gen.code((0, codegen_1._) `${names_1.default.errors}++`); - } - function returnErrors(it, errs) { - const { gen, validateName, schemaEnv } = it; - if (schemaEnv.$async) { - gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, errs); - gen.return(false); - } - } - const E = { - keyword: new codegen_1.Name("keyword"), - schemaPath: new codegen_1.Name("schemaPath"), - params: new codegen_1.Name("params"), - propertyName: new codegen_1.Name("propertyName"), - message: new codegen_1.Name("message"), - schema: new codegen_1.Name("schema"), - parentSchema: new codegen_1.Name("parentSchema"), - }; - function errorObjectCode(cxt, error, errorPaths) { - const { createErrors } = cxt.it; - if (createErrors === false) - return (0, codegen_1._) `{}`; - return errorObject(cxt, error, errorPaths); - } - function errorObject(cxt, error, errorPaths = {}) { - const { gen, it } = cxt; - const keyValues = [ - errorInstancePath(it, errorPaths), - errorSchemaPath(cxt, errorPaths), - ]; - extraErrorProps(cxt, error, keyValues); - return gen.object(...keyValues); - } - function errorInstancePath({ errorPath }, { instancePath }) { - const instPath = instancePath - ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` - : errorPath; - return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; - } - function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { - let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`; - if (schemaPath) { - schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; - } - return [E.schemaPath, schPath]; - } - function extraErrorProps(cxt, { params, message }, keyValues) { - const { keyword, data, schemaValue, it } = cxt; - const { opts, propertyName, topSchemaRef, schemaPath } = it; - keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._) `{}`]); - if (opts.messages) { - keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); - } - if (opts.verbose) { - keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); - } - if (propertyName) - keyValues.push([E.propertyName, propertyName]); - } - } (errors$1)); - return errors$1; -} - -var hasRequiredBoolSchema; - -function requireBoolSchema () { - if (hasRequiredBoolSchema) return boolSchema; - hasRequiredBoolSchema = 1; - Object.defineProperty(boolSchema, "__esModule", { value: true }); - boolSchema.boolOrEmptySchema = boolSchema.topBoolOrEmptySchema = void 0; - const errors_1 = /*@__PURE__*/ requireErrors$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const names_1 = /*@__PURE__*/ requireNames(); - const boolError = { - message: "boolean schema is false", - }; - function topBoolOrEmptySchema(it) { - const { gen, schema, validateName } = it; - if (schema === false) { - falseSchemaError(it, false); - } - else if (typeof schema == "object" && schema.$async === true) { - gen.return(names_1.default.data); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, null); - gen.return(true); - } - } - boolSchema.topBoolOrEmptySchema = topBoolOrEmptySchema; - function boolOrEmptySchema(it, valid) { - const { gen, schema } = it; - if (schema === false) { - gen.var(valid, false); - falseSchemaError(it); - } - else { - gen.var(valid, true); - } - } - boolSchema.boolOrEmptySchema = boolOrEmptySchema; - function falseSchemaError(it, overrideAllErrors) { - const { gen, data } = it; - const cxt = { - gen, - keyword: "false schema", - data, - schema: false, - schemaCode: false, - schemaValue: false, - params: {}, - it, - }; - (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors); - } - return boolSchema; -} - -var dataType = {}; - -var rules$1 = {}; - -var hasRequiredRules$1; - -function requireRules$1 () { - if (hasRequiredRules$1) return rules$1; - hasRequiredRules$1 = 1; - Object.defineProperty(rules$1, "__esModule", { value: true }); - rules$1.getRules = rules$1.isJSONType = void 0; - const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; - const jsonTypes = new Set(_jsonTypes); - function isJSONType(x) { - return typeof x == "string" && jsonTypes.has(x); - } - rules$1.isJSONType = isJSONType; - function getRules() { - const groups = { - number: { type: "number", rules: [] }, - string: { type: "string", rules: [] }, - array: { type: "array", rules: [] }, - object: { type: "object", rules: [] }, - }; - return { - types: { ...groups, integer: true, boolean: true, null: true }, - rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], - post: { rules: [] }, - all: {}, - keywords: {}, - }; - } - rules$1.getRules = getRules; - return rules$1; -} - -var applicability = {}; - -var hasRequiredApplicability; - -function requireApplicability () { - if (hasRequiredApplicability) return applicability; - hasRequiredApplicability = 1; - Object.defineProperty(applicability, "__esModule", { value: true }); - applicability.shouldUseRule = applicability.shouldUseGroup = applicability.schemaHasRulesForType = void 0; - function schemaHasRulesForType({ schema, self }, type) { - const group = self.RULES.types[type]; - return group && group !== true && shouldUseGroup(schema, group); - } - applicability.schemaHasRulesForType = schemaHasRulesForType; - function shouldUseGroup(schema, group) { - return group.rules.some((rule) => shouldUseRule(schema, rule)); - } - applicability.shouldUseGroup = shouldUseGroup; - function shouldUseRule(schema, rule) { - var _a; - return (schema[rule.keyword] !== undefined || - ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined))); - } - applicability.shouldUseRule = shouldUseRule; - return applicability; -} - -var hasRequiredDataType; - -function requireDataType () { - if (hasRequiredDataType) return dataType; - hasRequiredDataType = 1; - Object.defineProperty(dataType, "__esModule", { value: true }); - dataType.reportTypeError = dataType.checkDataTypes = dataType.checkDataType = dataType.coerceAndCheckDataType = dataType.getJSONTypes = dataType.getSchemaTypes = dataType.DataType = void 0; - const rules_1 = /*@__PURE__*/ requireRules$1(); - const applicability_1 = /*@__PURE__*/ requireApplicability(); - const errors_1 = /*@__PURE__*/ requireErrors$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - var DataType; - (function (DataType) { - DataType[DataType["Correct"] = 0] = "Correct"; - DataType[DataType["Wrong"] = 1] = "Wrong"; - })(DataType || (dataType.DataType = DataType = {})); - function getSchemaTypes(schema) { - const types = getJSONTypes(schema.type); - const hasNull = types.includes("null"); - if (hasNull) { - if (schema.nullable === false) - throw new Error("type: null contradicts nullable: false"); - } - else { - if (!types.length && schema.nullable !== undefined) { - throw new Error('"nullable" cannot be used without "type"'); - } - if (schema.nullable === true) - types.push("null"); - } - return types; - } - dataType.getSchemaTypes = getSchemaTypes; - function getJSONTypes(ts) { - const types = Array.isArray(ts) ? ts : ts ? [ts] : []; - if (types.every(rules_1.isJSONType)) - return types; - throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); - } - dataType.getJSONTypes = getJSONTypes; - function coerceAndCheckDataType(it, types) { - const { gen, data, opts } = it; - const coerceTo = coerceToTypes(types, opts.coerceTypes); - const checkTypes = types.length > 0 && - !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0])); - if (checkTypes) { - const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); - gen.if(wrongType, () => { - if (coerceTo.length) - coerceData(it, types, coerceTo); - else - reportTypeError(it); - }); - } - return checkTypes; - } - dataType.coerceAndCheckDataType = coerceAndCheckDataType; - const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]); - function coerceToTypes(types, coerceTypes) { - return coerceTypes - ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array")) - : []; - } - function coerceData(it, types, coerceTo) { - const { gen, data, opts } = it; - const dataType = gen.let("dataType", (0, codegen_1._) `typeof ${data}`); - const coerced = gen.let("coerced", (0, codegen_1._) `undefined`); - if (opts.coerceTypes === "array") { - gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen - .assign(data, (0, codegen_1._) `${data}[0]`) - .assign(dataType, (0, codegen_1._) `typeof ${data}`) - .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); - } - gen.if((0, codegen_1._) `${coerced} !== undefined`); - for (const t of coerceTo) { - if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) { - coerceSpecificType(t); - } - } - gen.else(); - reportTypeError(it); - gen.endIf(); - gen.if((0, codegen_1._) `${coerced} !== undefined`, () => { - gen.assign(data, coerced); - assignParentData(it, coerced); - }); - function coerceSpecificType(t) { - switch (t) { - case "string": - gen - .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`) - .assign(coerced, (0, codegen_1._) `"" + ${data}`) - .elseIf((0, codegen_1._) `${data} === null`) - .assign(coerced, (0, codegen_1._) `""`); - return; - case "number": - gen - .elseIf((0, codegen_1._) `${dataType} == "boolean" || ${data} === null - || (${dataType} == "string" && ${data} && ${data} == +${data})`) - .assign(coerced, (0, codegen_1._) `+${data}`); - return; - case "integer": - gen - .elseIf((0, codegen_1._) `${dataType} === "boolean" || ${data} === null - || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`) - .assign(coerced, (0, codegen_1._) `+${data}`); - return; - case "boolean": - gen - .elseIf((0, codegen_1._) `${data} === "false" || ${data} === 0 || ${data} === null`) - .assign(coerced, false) - .elseIf((0, codegen_1._) `${data} === "true" || ${data} === 1`) - .assign(coerced, true); - return; - case "null": - gen.elseIf((0, codegen_1._) `${data} === "" || ${data} === 0 || ${data} === false`); - gen.assign(coerced, null); - return; - case "array": - gen - .elseIf((0, codegen_1._) `${dataType} === "string" || ${dataType} === "number" - || ${dataType} === "boolean" || ${data} === null`) - .assign(coerced, (0, codegen_1._) `[${data}]`); - } - } - } - function assignParentData({ gen, parentData, parentDataProperty }, expr) { - gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr)); - } - function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { - const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; - let cond; - switch (dataType) { - case "null": - return (0, codegen_1._) `${data} ${EQ} null`; - case "array": - cond = (0, codegen_1._) `Array.isArray(${data})`; - break; - case "object": - cond = (0, codegen_1._) `${data} && typeof ${data} == "object" && !Array.isArray(${data})`; - break; - case "integer": - cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`); - break; - case "number": - cond = numCond(); - break; - default: - return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`; - } - return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); - function numCond(_cond = codegen_1.nil) { - return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil); - } - } - dataType.checkDataType = checkDataType; - function checkDataTypes(dataTypes, data, strictNums, correct) { - if (dataTypes.length === 1) { - return checkDataType(dataTypes[0], data, strictNums, correct); - } - let cond; - const types = (0, util_1.toHash)(dataTypes); - if (types.array && types.object) { - const notObj = (0, codegen_1._) `typeof ${data} != "object"`; - cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`; - delete types.null; - delete types.array; - delete types.object; - } - else { - cond = codegen_1.nil; - } - if (types.number) - delete types.integer; - for (const t in types) - cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct)); - return cond; - } - dataType.checkDataTypes = checkDataTypes; - const typeError = { - message: ({ schema }) => `must be ${schema}`, - params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`, - }; - function reportTypeError(it) { - const cxt = getTypeErrorContext(it); - (0, errors_1.reportError)(cxt, typeError); - } - dataType.reportTypeError = reportTypeError; - function getTypeErrorContext(it) { - const { gen, data, schema } = it; - const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type"); - return { - gen, - keyword: "type", - data, - schema: schema.type, - schemaCode, - schemaValue: schemaCode, - parentSchema: schema, - params: {}, - it, - }; - } - return dataType; -} - -var defaults$1 = {}; - -var hasRequiredDefaults; - -function requireDefaults () { - if (hasRequiredDefaults) return defaults$1; - hasRequiredDefaults = 1; - Object.defineProperty(defaults$1, "__esModule", { value: true }); - defaults$1.assignDefaults = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - function assignDefaults(it, ty) { - const { properties, items } = it.schema; - if (ty === "object" && properties) { - for (const key in properties) { - assignDefault(it, key, properties[key].default); - } - } - else if (ty === "array" && Array.isArray(items)) { - items.forEach((sch, i) => assignDefault(it, i, sch.default)); - } - } - defaults$1.assignDefaults = assignDefaults; - function assignDefault(it, prop, defaultValue) { - const { gen, compositeRule, data, opts } = it; - if (defaultValue === undefined) - return; - const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`; - if (compositeRule) { - (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`); - return; - } - let condition = (0, codegen_1._) `${childData} === undefined`; - if (opts.useDefaults === "empty") { - condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === ""`; - } - gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); - } - return defaults$1; -} - -var keyword$2 = {}; - -var code$1 = {}; - -var hasRequiredCode$1; - -function requireCode$1 () { - if (hasRequiredCode$1) return code$1; - hasRequiredCode$1 = 1; - Object.defineProperty(code$1, "__esModule", { value: true }); - code$1.validateUnion = code$1.validateArray = code$1.usePattern = code$1.callValidateCode = code$1.schemaProperties = code$1.allSchemaProperties = code$1.noPropertyInData = code$1.propertyInData = code$1.isOwnProperty = code$1.hasPropFunc = code$1.reportMissingProp = code$1.checkMissingProp = code$1.checkReportMissingProp = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const names_1 = /*@__PURE__*/ requireNames(); - const util_2 = /*@__PURE__*/ requireUtil$4(); - function checkReportMissingProp(cxt, prop) { - const { gen, data, it } = cxt; - gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { - cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true); - cxt.error(); - }); - } - code$1.checkReportMissingProp = checkReportMissingProp; - function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { - return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`))); - } - code$1.checkMissingProp = checkMissingProp; - function reportMissingProp(cxt, missing) { - cxt.setParams({ missingProperty: missing }, true); - cxt.error(); - } - code$1.reportMissingProp = reportMissingProp; - function hasPropFunc(gen) { - return gen.scopeValue("func", { - ref: Object.prototype.hasOwnProperty, - code: (0, codegen_1._) `Object.prototype.hasOwnProperty`, - }); - } - code$1.hasPropFunc = hasPropFunc; - function isOwnProperty(gen, data, property) { - return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`; - } - code$1.isOwnProperty = isOwnProperty; - function propertyInData(gen, data, property, ownProperties) { - const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`; - return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond; - } - code$1.propertyInData = propertyInData; - function noPropertyInData(gen, data, property, ownProperties) { - const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`; - return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; - } - code$1.noPropertyInData = noPropertyInData; - function allSchemaProperties(schemaMap) { - return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; - } - code$1.allSchemaProperties = allSchemaProperties; - function schemaProperties(it, schemaMap) { - return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p])); - } - code$1.schemaProperties = schemaProperties; - function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { - const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; - const valCxt = [ - [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], - [names_1.default.parentData, it.parentData], - [names_1.default.parentDataProperty, it.parentDataProperty], - [names_1.default.rootData, names_1.default.rootData], - ]; - if (it.opts.dynamicRef) - valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); - const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`; - return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`; - } - code$1.callValidateCode = callValidateCode; - const newRegExp = (0, codegen_1._) `new RegExp`; - function usePattern({ gen, it: { opts } }, pattern) { - const u = opts.unicodeRegExp ? "u" : ""; - const { regExp } = opts.code; - const rx = regExp(pattern, u); - return gen.scopeValue("pattern", { - key: rx.toString(), - ref: rx, - code: (0, codegen_1._) `${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`, - }); - } - code$1.usePattern = usePattern; - function validateArray(cxt) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - if (it.allErrors) { - const validArr = gen.let("valid", true); - validateItems(() => gen.assign(validArr, false)); - return validArr; - } - gen.var(valid, true); - validateItems(() => gen.break()); - return valid; - function validateItems(notValid) { - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword, - dataProp: i, - dataPropType: util_1.Type.Num, - }, valid); - gen.if((0, codegen_1.not)(valid), notValid); - }); - } - } - code$1.validateArray = validateArray; - function validateUnion(cxt) { - const { gen, schema, keyword, it } = cxt; - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)); - if (alwaysValid && !it.opts.unevaluated) - return; - const valid = gen.let("valid", false); - const schValid = gen.name("_valid"); - gen.block(() => schema.forEach((_sch, i) => { - const schCxt = cxt.subschema({ - keyword, - schemaProp: i, - compositeRule: true, - }, schValid); - gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`); - const merged = cxt.mergeValidEvaluated(schCxt, schValid); - if (!merged) - gen.if((0, codegen_1.not)(valid)); - })); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - } - code$1.validateUnion = validateUnion; - return code$1; -} - -var hasRequiredKeyword$2; - -function requireKeyword$2 () { - if (hasRequiredKeyword$2) return keyword$2; - hasRequiredKeyword$2 = 1; - Object.defineProperty(keyword$2, "__esModule", { value: true }); - keyword$2.validateKeywordUsage = keyword$2.validSchemaType = keyword$2.funcKeywordCode = keyword$2.macroKeywordCode = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const names_1 = /*@__PURE__*/ requireNames(); - const code_1 = /*@__PURE__*/ requireCode$1(); - const errors_1 = /*@__PURE__*/ requireErrors$1(); - function macroKeywordCode(cxt, def) { - const { gen, keyword, schema, parentSchema, it } = cxt; - const macroSchema = def.macro.call(it.self, schema, parentSchema, it); - const schemaRef = useKeyword(gen, keyword, macroSchema); - if (it.opts.validateSchema !== false) - it.self.validateSchema(macroSchema, true); - const valid = gen.name("valid"); - cxt.subschema({ - schema: macroSchema, - schemaPath: codegen_1.nil, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - topSchemaRef: schemaRef, - compositeRule: true, - }, valid); - cxt.pass(valid, () => cxt.error(true)); - } - keyword$2.macroKeywordCode = macroKeywordCode; - function funcKeywordCode(cxt, def) { - var _a; - const { gen, keyword, schema, parentSchema, $data, it } = cxt; - checkAsyncKeyword(it, def); - const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate; - const validateRef = useKeyword(gen, keyword, validate); - const valid = gen.let("valid"); - cxt.block$data(valid, validateKeyword); - cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); - function validateKeyword() { - if (def.errors === false) { - assignValid(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => cxt.error()); - } - else { - const ruleErrs = def.async ? validateAsync() : validateSync(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => addErrs(cxt, ruleErrs)); - } - } - function validateAsync() { - const ruleErrs = gen.let("ruleErrs", null); - gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e))); - return ruleErrs; - } - function validateSync() { - const validateErrs = (0, codegen_1._) `${validateRef}.errors`; - gen.assign(validateErrs, null); - assignValid(codegen_1.nil); - return validateErrs; - } - function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) { - const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self; - const passSchema = !(("compile" in def && !$data) || def.schema === false); - gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); - } - function reportErrs(errors) { - var _a; - gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors); - } - } - keyword$2.funcKeywordCode = funcKeywordCode; - function modifyData(cxt) { - const { gen, data, it } = cxt; - gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`)); - } - function addErrs(cxt, errs) { - const { gen } = cxt; - gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => { - gen - .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`) - .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`); - (0, errors_1.extendErrors)(cxt); - }, () => cxt.error()); - } - function checkAsyncKeyword({ schemaEnv }, def) { - if (def.async && !schemaEnv.$async) - throw new Error("async keyword in sync schema"); - } - function useKeyword(gen, keyword, result) { - if (result === undefined) - throw new Error(`keyword "${keyword}" failed to compile`); - return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); - } - function validSchemaType(schema, schemaType, allowUndefined = false) { - return (!schemaType.length || - schemaType.some((st) => st === "array" - ? Array.isArray(schema) - : st === "object" - ? schema && typeof schema == "object" && !Array.isArray(schema) - : typeof schema == st || (allowUndefined && typeof schema == "undefined"))); - } - keyword$2.validSchemaType = validSchemaType; - function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) { - if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { - throw new Error("ajv implementation error"); - } - const deps = def.dependencies; - if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) { - throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); - } - if (def.validateSchema) { - const valid = def.validateSchema(schema[keyword]); - if (!valid) { - const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + - self.errorsText(def.validateSchema.errors); - if (opts.validateSchema === "log") - self.logger.error(msg); - else - throw new Error(msg); - } - } - } - keyword$2.validateKeywordUsage = validateKeywordUsage; - return keyword$2; -} - -var subschema = {}; - -var hasRequiredSubschema; - -function requireSubschema () { - if (hasRequiredSubschema) return subschema; - hasRequiredSubschema = 1; - Object.defineProperty(subschema, "__esModule", { value: true }); - subschema.extendSubschemaMode = subschema.extendSubschemaData = subschema.getSubschema = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) { - if (keyword !== undefined && schema !== undefined) { - throw new Error('both "keyword" and "schema" passed, only one allowed'); - } - if (keyword !== undefined) { - const sch = it.schema[keyword]; - return schemaProp === undefined - ? { - schema: sch, - schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - } - : { - schema: sch[schemaProp], - schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`, - }; - } - if (schema !== undefined) { - if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) { - throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); - } - return { - schema, - schemaPath, - topSchemaRef, - errSchemaPath, - }; - } - throw new Error('either "keyword" or "schema" must be passed'); - } - subschema.getSubschema = getSubschema; - function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { - if (data !== undefined && dataProp !== undefined) { - throw new Error('both "data" and "dataProp" passed, only one allowed'); - } - const { gen } = it; - if (dataProp !== undefined) { - const { errorPath, dataPathArr, opts } = it; - const nextData = gen.let("data", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true); - dataContextProps(nextData); - subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; - subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`; - subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; - } - if (data !== undefined) { - const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); - dataContextProps(nextData); - if (propertyName !== undefined) - subschema.propertyName = propertyName; - } - if (dataTypes) - subschema.dataTypes = dataTypes; - function dataContextProps(_nextData) { - subschema.data = _nextData; - subschema.dataLevel = it.dataLevel + 1; - subschema.dataTypes = []; - it.definedProperties = new Set(); - subschema.parentData = it.data; - subschema.dataNames = [...it.dataNames, _nextData]; - } - } - subschema.extendSubschemaData = extendSubschemaData; - function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { - if (compositeRule !== undefined) - subschema.compositeRule = compositeRule; - if (createErrors !== undefined) - subschema.createErrors = createErrors; - if (allErrors !== undefined) - subschema.allErrors = allErrors; - subschema.jtdDiscriminator = jtdDiscriminator; - subschema.jtdMetadata = jtdMetadata; - } - subschema.extendSubschemaMode = extendSubschemaMode; - return subschema; -} - -var resolve = {}; - -var jsonSchemaTraverse$1 = {exports: {}}; - -var hasRequiredJsonSchemaTraverse$1; - -function requireJsonSchemaTraverse$1 () { - if (hasRequiredJsonSchemaTraverse$1) return jsonSchemaTraverse$1.exports; - hasRequiredJsonSchemaTraverse$1 = 1; - var traverse = jsonSchemaTraverse$1.exports = function (schema, opts, cb) { - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - cb = opts.cb || cb; - var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; - var post = cb.post || function() {}; - _traverse(opts, pre, post, schema, '', schema); - }; - traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - if: true, - then: true, - else: true - }; - traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true - }; - traverse.propsKeywords = { - $defs: true, - definitions: true, - properties: true, - patternProperties: true, - dependencies: true - }; - traverse.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true - }; - function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i (count += countKeys(sch))); - } - if (count === Infinity) - return Infinity; - } - return count; - } - function getFullPath(resolver, id = "", normalize) { - if (normalize !== false) - id = normalizeId(id); - const p = resolver.parse(id); - return _getFullPath(resolver, p); - } - resolve.getFullPath = getFullPath; - function _getFullPath(resolver, p) { - const serialized = resolver.serialize(p); - return serialized.split("#")[0] + "#"; - } - resolve._getFullPath = _getFullPath; - const TRAILING_SLASH_HASH = /#\/?$/; - function normalizeId(id) { - return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; - } - resolve.normalizeId = normalizeId; - function resolveUrl(resolver, baseId, id) { - id = normalizeId(id); - return resolver.resolve(baseId, id); - } - resolve.resolveUrl = resolveUrl; - const ANCHOR = /^[a-z_][-a-z0-9._]*$/i; - function getSchemaRefs(schema, baseId) { - if (typeof schema == "boolean") - return {}; - const { schemaId, uriResolver } = this.opts; - const schId = normalizeId(schema[schemaId] || baseId); - const baseIds = { "": schId }; - const pathPrefix = getFullPath(uriResolver, schId, false); - const localRefs = {}; - const schemaRefs = new Set(); - traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { - if (parentJsonPtr === undefined) - return; - const fullPath = pathPrefix + jsonPtr; - let innerBaseId = baseIds[parentJsonPtr]; - if (typeof sch[schemaId] == "string") - innerBaseId = addRef.call(this, sch[schemaId]); - addAnchor.call(this, sch.$anchor); - addAnchor.call(this, sch.$dynamicAnchor); - baseIds[jsonPtr] = innerBaseId; - function addRef(ref) { - const _resolve = this.opts.uriResolver.resolve; - ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); - if (schemaRefs.has(ref)) - throw ambiguos(ref); - schemaRefs.add(ref); - let schOrRef = this.refs[ref]; - if (typeof schOrRef == "string") - schOrRef = this.refs[schOrRef]; - if (typeof schOrRef == "object") { - checkAmbiguosRef(sch, schOrRef.schema, ref); - } - else if (ref !== normalizeId(fullPath)) { - if (ref[0] === "#") { - checkAmbiguosRef(sch, localRefs[ref], ref); - localRefs[ref] = sch; - } - else { - this.refs[ref] = fullPath; - } - } - return ref; - } - function addAnchor(anchor) { - if (typeof anchor == "string") { - if (!ANCHOR.test(anchor)) - throw new Error(`invalid anchor "${anchor}"`); - addRef.call(this, `#${anchor}`); - } - } - }); - return localRefs; - function checkAmbiguosRef(sch1, sch2, ref) { - if (sch2 !== undefined && !equal(sch1, sch2)) - throw ambiguos(ref); - } - function ambiguos(ref) { - return new Error(`reference "${ref}" resolves to more than one schema`); - } - } - resolve.getSchemaRefs = getSchemaRefs; - return resolve; -} - -var hasRequiredValidate$1; - -function requireValidate$1 () { - if (hasRequiredValidate$1) return validate$1; - hasRequiredValidate$1 = 1; - Object.defineProperty(validate$1, "__esModule", { value: true }); - validate$1.getData = validate$1.KeywordCxt = validate$1.validateFunctionCode = void 0; - const boolSchema_1 = /*@__PURE__*/ requireBoolSchema(); - const dataType_1 = /*@__PURE__*/ requireDataType(); - const applicability_1 = /*@__PURE__*/ requireApplicability(); - const dataType_2 = /*@__PURE__*/ requireDataType(); - const defaults_1 = /*@__PURE__*/ requireDefaults(); - const keyword_1 = /*@__PURE__*/ requireKeyword$2(); - const subschema_1 = /*@__PURE__*/ requireSubschema(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const names_1 = /*@__PURE__*/ requireNames(); - const resolve_1 = /*@__PURE__*/ requireResolve$1(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const errors_1 = /*@__PURE__*/ requireErrors$1(); - function validateFunctionCode(it) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - topSchemaObjCode(it); - return; - } - } - validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); - } - validate$1.validateFunctionCode = validateFunctionCode; - function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) { - if (opts.code.es5) { - gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { - gen.code((0, codegen_1._) `"use strict"; ${funcSourceUrl(schema, opts)}`); - destructureValCxtES5(gen, opts); - gen.code(body); - }); - } - else { - gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body)); - } - } - function destructureValCxt(opts) { - return (0, codegen_1._) `{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; - } - function destructureValCxtES5(gen, opts) { - gen.if(names_1.default.valCxt, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`); - gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); - gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); - }, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._) `""`); - gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`); - gen.var(names_1.default.rootData, names_1.default.data); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`); - }); - } - function topSchemaObjCode(it) { - const { schema, opts, gen } = it; - validateFunction(it, () => { - if (opts.$comment && schema.$comment) - commentKeyword(it); - checkNoDefault(it); - gen.let(names_1.default.vErrors, null); - gen.let(names_1.default.errors, 0); - if (opts.unevaluated) - resetEvaluated(it); - typeAndKeywords(it); - returnResults(it); - }); - return; - } - function resetEvaluated(it) { - const { gen, validateName } = it; - it.evaluated = gen.const("evaluated", (0, codegen_1._) `${validateName}.evaluated`); - gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`)); - gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`)); - } - function funcSourceUrl(schema, opts) { - const schId = typeof schema == "object" && schema[opts.schemaId]; - return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil; - } - function subschemaCode(it, valid) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - subSchemaObjCode(it, valid); - return; - } - } - (0, boolSchema_1.boolOrEmptySchema)(it, valid); - } - function schemaCxtHasRules({ schema, self }) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (self.RULES.all[key]) - return true; - return false; - } - function isSchemaObj(it) { - return typeof it.schema != "boolean"; - } - function subSchemaObjCode(it, valid) { - const { schema, gen, opts } = it; - if (opts.$comment && schema.$comment) - commentKeyword(it); - updateContext(it); - checkAsyncSchema(it); - const errsCount = gen.const("_errs", names_1.default.errors); - typeAndKeywords(it, errsCount); - gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); - } - function checkKeywords(it) { - (0, util_1.checkUnknownRules)(it); - checkRefsAndKeywords(it); - } - function typeAndKeywords(it, errsCount) { - if (it.opts.jtd) - return schemaKeywords(it, [], false, errsCount); - const types = (0, dataType_1.getSchemaTypes)(it.schema); - const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types); - schemaKeywords(it, types, !checkedTypes, errsCount); - } - function checkRefsAndKeywords(it) { - const { schema, errSchemaPath, opts, self } = it; - if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) { - self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); - } - } - function checkNoDefault(it) { - const { schema, opts } = it; - if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) { - (0, util_1.checkStrictMode)(it, "default is ignored in the schema root"); - } - } - function updateContext(it) { - const schId = it.schema[it.opts.schemaId]; - if (schId) - it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId); - } - function checkAsyncSchema(it) { - if (it.schema.$async && !it.schemaEnv.$async) - throw new Error("async schema in sync schema"); - } - function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) { - const msg = schema.$comment; - if (opts.$comment === true) { - gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`); - } - else if (typeof opts.$comment == "function") { - const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`; - const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); - gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); - } - } - function returnResults(it) { - const { gen, schemaEnv, validateName, ValidationError, opts } = it; - if (schemaEnv.$async) { - gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`)); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors); - if (opts.unevaluated) - assignEvaluated(it); - gen.return((0, codegen_1._) `${names_1.default.errors} === 0`); - } - } - function assignEvaluated({ gen, evaluated, props, items }) { - if (props instanceof codegen_1.Name) - gen.assign((0, codegen_1._) `${evaluated}.props`, props); - if (items instanceof codegen_1.Name) - gen.assign((0, codegen_1._) `${evaluated}.items`, items); - } - function schemaKeywords(it, types, typeErrors, errsCount) { - const { gen, schema, data, allErrors, opts, self } = it; - const { RULES } = self; - if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) { - gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); - return; - } - if (!opts.jtd) - checkStrictTypes(it, types); - gen.block(() => { - for (const group of RULES.rules) - groupKeywords(group); - groupKeywords(RULES.post); - }); - function groupKeywords(group) { - if (!(0, applicability_1.shouldUseGroup)(schema, group)) - return; - if (group.type) { - gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers)); - iterateKeywords(it, group); - if (types.length === 1 && types[0] === group.type && typeErrors) { - gen.else(); - (0, dataType_2.reportTypeError)(it); - } - gen.endIf(); - } - else { - iterateKeywords(it, group); - } - if (!allErrors) - gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`); - } - } - function iterateKeywords(it, group) { - const { gen, schema, opts: { useDefaults }, } = it; - if (useDefaults) - (0, defaults_1.assignDefaults)(it, group.type); - gen.block(() => { - for (const rule of group.rules) { - if ((0, applicability_1.shouldUseRule)(schema, rule)) { - keywordCode(it, rule.keyword, rule.definition, group.type); - } - } - }); - } - function checkStrictTypes(it, types) { - if (it.schemaEnv.meta || !it.opts.strictTypes) - return; - checkContextTypes(it, types); - if (!it.opts.allowUnionTypes) - checkMultipleTypes(it, types); - checkKeywordTypes(it, it.dataTypes); - } - function checkContextTypes(it, types) { - if (!types.length) - return; - if (!it.dataTypes.length) { - it.dataTypes = types; - return; - } - types.forEach((t) => { - if (!includesType(it.dataTypes, t)) { - strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); - } - }); - narrowSchemaTypes(it, types); - } - function checkMultipleTypes(it, ts) { - if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { - strictTypesError(it, "use allowUnionTypes to allow union type keyword"); - } - } - function checkKeywordTypes(it, ts) { - const rules = it.self.RULES.all; - for (const keyword in rules) { - const rule = rules[keyword]; - if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) { - const { type } = rule.definition; - if (type.length && !type.some((t) => hasApplicableType(ts, t))) { - strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`); - } - } - } - } - function hasApplicableType(schTs, kwdT) { - return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer")); - } - function includesType(ts, t) { - return ts.includes(t) || (t === "integer" && ts.includes("number")); - } - function narrowSchemaTypes(it, withTypes) { - const ts = []; - for (const t of it.dataTypes) { - if (includesType(withTypes, t)) - ts.push(t); - else if (withTypes.includes("integer") && t === "number") - ts.push("integer"); - } - it.dataTypes = ts; - } - function strictTypesError(it, msg) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - msg += ` at "${schemaPath}" (strictTypes)`; - (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes); - } - class KeywordCxt { - constructor(it, def, keyword) { - (0, keyword_1.validateKeywordUsage)(it, def, keyword); - this.gen = it.gen; - this.allErrors = it.allErrors; - this.keyword = keyword; - this.data = it.data; - this.schema = it.schema[keyword]; - this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data; - this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data); - this.schemaType = def.schemaType; - this.parentSchema = it.schema; - this.params = {}; - this.it = it; - this.def = def; - if (this.$data) { - this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); - } - else { - this.schemaCode = this.schemaValue; - if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { - throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); - } - } - if ("code" in def ? def.trackErrors : def.errors !== false) { - this.errsCount = it.gen.const("_errs", names_1.default.errors); - } - } - result(condition, successAction, failAction) { - this.failResult((0, codegen_1.not)(condition), successAction, failAction); - } - failResult(condition, successAction, failAction) { - this.gen.if(condition); - if (failAction) - failAction(); - else - this.error(); - if (successAction) { - this.gen.else(); - successAction(); - if (this.allErrors) - this.gen.endIf(); - } - else { - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - } - pass(condition, failAction) { - this.failResult((0, codegen_1.not)(condition), undefined, failAction); - } - fail(condition) { - if (condition === undefined) { - this.error(); - if (!this.allErrors) - this.gen.if(false); - return; - } - this.gen.if(condition); - this.error(); - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - fail$data(condition) { - if (!this.$data) - return this.fail(condition); - const { schemaCode } = this; - this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); - } - error(append, errorParams, errorPaths) { - if (errorParams) { - this.setParams(errorParams); - this._error(append, errorPaths); - this.setParams({}); - return; - } - this._error(append, errorPaths); - } - _error(append, errorPaths) { - (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); - } - $dataError() { - (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); - } - reset() { - if (this.errsCount === undefined) - throw new Error('add "trackErrors" to keyword definition'); - (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); - } - ok(cond) { - if (!this.allErrors) - this.gen.if(cond); - } - setParams(obj, assign) { - if (assign) - Object.assign(this.params, obj); - else - this.params = obj; - } - block$data(valid, codeBlock, $dataValid = codegen_1.nil) { - this.gen.block(() => { - this.check$data(valid, $dataValid); - codeBlock(); - }); - } - check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { - if (!this.$data) - return; - const { gen, schemaCode, schemaType, def } = this; - gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid)); - if (valid !== codegen_1.nil) - gen.assign(valid, true); - if (schemaType.length || def.validateSchema) { - gen.elseIf(this.invalid$data()); - this.$dataError(); - if (valid !== codegen_1.nil) - gen.assign(valid, false); - } - gen.else(); - } - invalid$data() { - const { gen, schemaCode, schemaType, def, it } = this; - return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); - function wrong$DataType() { - if (schemaType.length) { - if (!(schemaCode instanceof codegen_1.Name)) - throw new Error("ajv implementation error"); - const st = Array.isArray(schemaType) ? schemaType : [schemaType]; - return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; - } - return codegen_1.nil; - } - function invalid$DataSchema() { - if (def.validateSchema) { - const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); - return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`; - } - return codegen_1.nil; - } - } - subschema(appl, valid) { - const subschema = (0, subschema_1.getSubschema)(this.it, appl); - (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); - (0, subschema_1.extendSubschemaMode)(subschema, appl); - const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined }; - subschemaCode(nextContext, valid); - return nextContext; - } - mergeEvaluated(schemaCxt, toName) { - const { it, gen } = this; - if (!it.opts.unevaluated) - return; - if (it.props !== true && schemaCxt.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); - } - if (it.items !== true && schemaCxt.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); - } - } - mergeValidEvaluated(schemaCxt, valid) { - const { it, gen } = this; - if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { - gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); - return true; - } - } - } - validate$1.KeywordCxt = KeywordCxt; - function keywordCode(it, keyword, def, ruleType) { - const cxt = new KeywordCxt(it, def, keyword); - if ("code" in def) { - def.code(cxt, ruleType); - } - else if (cxt.$data && def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } - else if ("macro" in def) { - (0, keyword_1.macroKeywordCode)(cxt, def); - } - else if (def.compile || def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } - } - const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; - const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; - function getData($data, { dataLevel, dataNames, dataPathArr }) { - let jsonPointer; - let data; - if ($data === "") - return names_1.default.rootData; - if ($data[0] === "/") { - if (!JSON_POINTER.test($data)) - throw new Error(`Invalid JSON-pointer: ${$data}`); - jsonPointer = $data; - data = names_1.default.rootData; - } - else { - const matches = RELATIVE_JSON_POINTER.exec($data); - if (!matches) - throw new Error(`Invalid JSON-pointer: ${$data}`); - const up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer === "#") { - if (up >= dataLevel) - throw new Error(errorMsg("property/index", up)); - return dataPathArr[dataLevel - up]; - } - if (up > dataLevel) - throw new Error(errorMsg("data", up)); - data = dataNames[dataLevel - up]; - if (!jsonPointer) - return data; - } - let expr = data; - const segments = jsonPointer.split("/"); - for (const segment of segments) { - if (segment) { - data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; - expr = (0, codegen_1._) `${expr} && ${data}`; - } - } - return expr; - function errorMsg(pointerType, up) { - return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; - } - } - validate$1.getData = getData; - return validate$1; -} - -var validation_error = {}; - -var hasRequiredValidation_error; - -function requireValidation_error () { - if (hasRequiredValidation_error) return validation_error; - hasRequiredValidation_error = 1; - Object.defineProperty(validation_error, "__esModule", { value: true }); - class ValidationError extends Error { - constructor(errors) { - super("validation failed"); - this.errors = errors; - this.ajv = this.validation = true; - } - } - validation_error.default = ValidationError; - return validation_error; -} - -var ref_error = {}; - -var hasRequiredRef_error; - -function requireRef_error () { - if (hasRequiredRef_error) return ref_error; - hasRequiredRef_error = 1; - Object.defineProperty(ref_error, "__esModule", { value: true }); - const resolve_1 = /*@__PURE__*/ requireResolve$1(); - class MissingRefError extends Error { - constructor(resolver, baseId, ref, msg) { - super(msg || `can't resolve reference ${ref} from id ${baseId}`); - this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); - this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); - } - } - ref_error.default = MissingRefError; - return ref_error; -} - -var compile$1 = {}; - -var hasRequiredCompile$2; - -function requireCompile$2 () { - if (hasRequiredCompile$2) return compile$1; - hasRequiredCompile$2 = 1; - Object.defineProperty(compile$1, "__esModule", { value: true }); - compile$1.resolveSchema = compile$1.getCompilingSchema = compile$1.resolveRef = compile$1.compileSchema = compile$1.SchemaEnv = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const validation_error_1 = /*@__PURE__*/ requireValidation_error(); - const names_1 = /*@__PURE__*/ requireNames(); - const resolve_1 = /*@__PURE__*/ requireResolve$1(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const validate_1 = /*@__PURE__*/ requireValidate$1(); - class SchemaEnv { - constructor(env) { - var _a; - this.refs = {}; - this.dynamicAnchors = {}; - let schema; - if (typeof env.schema == "object") - schema = env.schema; - this.schema = env.schema; - this.schemaId = env.schemaId; - this.root = env.root || this; - this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]); - this.schemaPath = env.schemaPath; - this.localRefs = env.localRefs; - this.meta = env.meta; - this.$async = schema === null || schema === void 0 ? void 0 : schema.$async; - this.refs = {}; - } - } - compile$1.SchemaEnv = SchemaEnv; - function compileSchema(sch) { - const _sch = getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - let _ValidationError; - if (sch.$async) { - _ValidationError = gen.scopeValue("Error", { - ref: validation_error_1.default, - code: (0, codegen_1._) `require("ajv/dist/runtime/validation_error").default`, - }); - } - const validateName = gen.scopeName("validate"); - sch.validateName = validateName; - const schemaCxt = { - gen, - allErrors: this.opts.allErrors, - data: names_1.default.data, - parentData: names_1.default.parentData, - parentDataProperty: names_1.default.parentDataProperty, - dataNames: [names_1.default.data], - dataPathArr: [codegen_1.nil], - dataLevel: 0, - dataTypes: [], - definedProperties: new Set(), - topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true - ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } - : { ref: sch.schema }), - validateName, - ValidationError: _ValidationError, - schema: sch.schema, - schemaEnv: sch, - rootId, - baseId: sch.baseId || rootId, - schemaPath: codegen_1.nil, - errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), - errorPath: (0, codegen_1._) `""`, - opts: this.opts, - self: this, - }; - let sourceCode; - try { - this._compilations.add(sch); - (0, validate_1.validateFunctionCode)(schemaCxt); - gen.optimize(this.opts.code.optimize); - const validateCode = gen.toString(); - sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; - if (this.opts.code.process) - sourceCode = this.opts.code.process(sourceCode, sch); - const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); - const validate = makeValidate(this, this.scope.get()); - this.scope.value(validateName, { ref: validate }); - validate.errors = null; - validate.schema = sch.schema; - validate.schemaEnv = sch; - if (sch.$async) - validate.$async = true; - if (this.opts.code.source === true) { - validate.source = { validateName, validateCode, scopeValues: gen._values }; - } - if (this.opts.unevaluated) { - const { props, items } = schemaCxt; - validate.evaluated = { - props: props instanceof codegen_1.Name ? undefined : props, - items: items instanceof codegen_1.Name ? undefined : items, - dynamicProps: props instanceof codegen_1.Name, - dynamicItems: items instanceof codegen_1.Name, - }; - if (validate.source) - validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated); - } - sch.validate = validate; - return sch; - } - catch (e) { - delete sch.validate; - delete sch.validateName; - if (sourceCode) - this.logger.error("Error compiling schema, function code:", sourceCode); - throw e; - } - finally { - this._compilations.delete(sch); - } - } - compile$1.compileSchema = compileSchema; - function resolveRef(root, baseId, ref) { - var _a; - ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); - const schOrFunc = root.refs[ref]; - if (schOrFunc) - return schOrFunc; - let _sch = resolve.call(this, root, ref); - if (_sch === undefined) { - const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; - const { schemaId } = this.opts; - if (schema) - _sch = new SchemaEnv({ schema, schemaId, root, baseId }); - } - if (_sch === undefined) - return; - return (root.refs[ref] = inlineOrCompile.call(this, _sch)); - } - compile$1.resolveRef = resolveRef; - function inlineOrCompile(sch) { - if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) - return sch.schema; - return sch.validate ? sch : compileSchema.call(this, sch); - } - function getCompilingSchema(schEnv) { - for (const sch of this._compilations) { - if (sameSchemaEnv(sch, schEnv)) - return sch; - } - } - compile$1.getCompilingSchema = getCompilingSchema; - function sameSchemaEnv(s1, s2) { - return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; - } - function resolve(root, - ref - ) { - let sch; - while (typeof (sch = this.refs[ref]) == "string") - ref = sch; - return sch || this.schemas[ref] || resolveSchema.call(this, root, ref); - } - function resolveSchema(root, - ref - ) { - const p = this.opts.uriResolver.parse(ref); - const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p); - let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined); - if (Object.keys(root.schema).length > 0 && refPath === baseId) { - return getJsonPointer.call(this, p, root); - } - const id = (0, resolve_1.normalizeId)(refPath); - const schOrRef = this.refs[id] || this.schemas[id]; - if (typeof schOrRef == "string") { - const sch = resolveSchema.call(this, root, schOrRef); - if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") - return; - return getJsonPointer.call(this, p, sch); - } - if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") - return; - if (!schOrRef.validate) - compileSchema.call(this, schOrRef); - if (id === (0, resolve_1.normalizeId)(ref)) { - const { schema } = schOrRef; - const { schemaId } = this.opts; - const schId = schema[schemaId]; - if (schId) - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - return new SchemaEnv({ schema, schemaId, root, baseId }); - } - return getJsonPointer.call(this, p, schOrRef); - } - compile$1.resolveSchema = resolveSchema; - const PREVENT_SCOPE_CHANGE = new Set([ - "properties", - "patternProperties", - "enum", - "dependencies", - "definitions", - ]); - function getJsonPointer(parsedRef, { baseId, schema, root }) { - var _a; - if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") - return; - for (const part of parsedRef.fragment.slice(1).split("/")) { - if (typeof schema === "boolean") - return; - const partSchema = schema[(0, util_1.unescapeFragment)(part)]; - if (partSchema === undefined) - return; - schema = partSchema; - const schId = typeof schema === "object" && schema[this.opts.schemaId]; - if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - } - } - let env; - if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) { - const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref); - env = resolveSchema.call(this, root, $ref); - } - const { schemaId } = this.opts; - env = env || new SchemaEnv({ schema, schemaId, root, baseId }); - if (env.schema !== env.root.schema) - return env; - return undefined; - } - return compile$1; -} - -var $id$3 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"; -var description$1 = "Meta-schema for $data reference (JSON AnySchema extension proposal)"; -var type$3 = "object"; -var required$3 = [ - "$data" -]; -var properties$5 = { - $data: { - type: "string", - anyOf: [ - { - format: "relative-json-pointer" - }, - { - format: "json-pointer" - } - ] - } -}; -var additionalProperties$2 = false; -var require$$9 = { - $id: $id$3, - description: description$1, - type: type$3, - required: required$3, - properties: properties$5, - additionalProperties: additionalProperties$2 -}; - -var uri = {}; - -var hasRequiredUri; - -function requireUri () { - if (hasRequiredUri) return uri; - hasRequiredUri = 1; - Object.defineProperty(uri, "__esModule", { value: true }); - const uri$1 = requireFastUri(); - uri$1.code = 'require("ajv/dist/runtime/uri").default'; - uri.default = uri$1; - return uri; -} - -var hasRequiredCore$2; - -function requireCore$2 () { - if (hasRequiredCore$2) return core$3; - hasRequiredCore$2 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = void 0; - var validate_1 = /*@__PURE__*/ requireValidate$1(); - Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); - var codegen_1 = /*@__PURE__*/ requireCodegen(); - Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } }); - Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } }); - Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); - Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); - Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); - Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); - const validation_error_1 = /*@__PURE__*/ requireValidation_error(); - const ref_error_1 = /*@__PURE__*/ requireRef_error(); - const rules_1 = /*@__PURE__*/ requireRules$1(); - const compile_1 = /*@__PURE__*/ requireCompile$2(); - const codegen_2 = /*@__PURE__*/ requireCodegen(); - const resolve_1 = /*@__PURE__*/ requireResolve$1(); - const dataType_1 = /*@__PURE__*/ requireDataType(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const $dataRefSchema = require$$9; - const uri_1 = /*@__PURE__*/ requireUri(); - const defaultRegExp = (str, flags) => new RegExp(str, flags); - defaultRegExp.code = "new RegExp"; - const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; - const EXT_SCOPE_NAMES = new Set([ - "validate", - "serialize", - "parse", - "wrapper", - "root", - "schema", - "keyword", - "pattern", - "formats", - "validate$data", - "func", - "obj", - "Error", - ]); - const removedOptions = { - errorDataPath: "", - format: "`validateFormats: false` can be used instead.", - nullable: '"nullable" keyword is supported by default.', - jsonPointers: "Deprecated jsPropertySyntax can be used instead.", - extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", - missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", - processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", - sourceCode: "Use option `code: {source: true}`", - strictDefaults: "It is default now, see option `strict`.", - strictKeywords: "It is default now, see option `strict`.", - uniqueItems: '"uniqueItems" keyword is always validated.', - unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", - cache: "Map is used as cache, schema object as key.", - serialize: "Map is used as cache, schema object as key.", - ajvErrors: "It is default now.", - }; - const deprecatedOptions = { - ignoreKeywordsWithRef: "", - jsPropertySyntax: "", - unicode: '"minLength"/"maxLength" account for unicode characters by default.', - }; - const MAX_EXPRESSION = 200; - function requiredOptions(o) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; - const s = o.strict; - const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; - const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0; - const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; - const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; - return { - strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, - strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true, - strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", - strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log", - strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false, - code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, - loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, - loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, - meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true, - messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, - inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, - schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", - addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, - validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, - validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, - unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, - int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, - uriResolver: uriResolver, - }; - } - class Ajv { - constructor(opts = {}) { - this.schemas = {}; - this.refs = {}; - this.formats = {}; - this._compilations = new Set(); - this._loading = {}; - this._cache = new Map(); - opts = this.opts = { ...opts, ...requiredOptions(opts) }; - const { es5, lines } = this.opts.code; - this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); - this.logger = getLogger(opts.logger); - const formatOpt = opts.validateFormats; - opts.validateFormats = false; - this.RULES = (0, rules_1.getRules)(); - checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); - checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); - this._metaOpts = getMetaSchemaOptions.call(this); - if (opts.formats) - addInitialFormats.call(this); - this._addVocabularies(); - this._addDefaultMetaSchema(); - if (opts.keywords) - addInitialKeywords.call(this, opts.keywords); - if (typeof opts.meta == "object") - this.addMetaSchema(opts.meta); - addInitialSchemas.call(this); - opts.validateFormats = formatOpt; - } - _addVocabularies() { - this.addKeyword("$async"); - } - _addDefaultMetaSchema() { - const { $data, meta, schemaId } = this.opts; - let _dataRefSchema = $dataRefSchema; - if (schemaId === "id") { - _dataRefSchema = { ...$dataRefSchema }; - _dataRefSchema.id = _dataRefSchema.$id; - delete _dataRefSchema.$id; - } - if (meta && $data) - this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); - } - defaultMeta() { - const { meta, schemaId } = this.opts; - return (this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined); - } - validate(schemaKeyRef, - data - ) { - let v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) - throw new Error(`no schema with key or ref "${schemaKeyRef}"`); - } - else { - v = this.compile(schemaKeyRef); - } - const valid = v(data); - if (!("$async" in v)) - this.errors = v.errors; - return valid; - } - compile(schema, _meta) { - const sch = this._addSchema(schema, _meta); - return (sch.validate || this._compileSchemaEnv(sch)); - } - compileAsync(schema, meta) { - if (typeof this.opts.loadSchema != "function") { - throw new Error("options.loadSchema should be a function"); - } - const { loadSchema } = this.opts; - return runCompileAsync.call(this, schema, meta); - async function runCompileAsync(_schema, _meta) { - await loadMetaSchema.call(this, _schema.$schema); - const sch = this._addSchema(_schema, _meta); - return sch.validate || _compileAsync.call(this, sch); - } - async function loadMetaSchema($ref) { - if ($ref && !this.getSchema($ref)) { - await runCompileAsync.call(this, { $ref }, true); - } - } - async function _compileAsync(sch) { - try { - return this._compileSchemaEnv(sch); - } - catch (e) { - if (!(e instanceof ref_error_1.default)) - throw e; - checkLoaded.call(this, e); - await loadMissingSchema.call(this, e.missingSchema); - return _compileAsync.call(this, sch); - } - } - function checkLoaded({ missingSchema: ref, missingRef }) { - if (this.refs[ref]) { - throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); - } - } - async function loadMissingSchema(ref) { - const _schema = await _loadSchema.call(this, ref); - if (!this.refs[ref]) - await loadMetaSchema.call(this, _schema.$schema); - if (!this.refs[ref]) - this.addSchema(_schema, ref, meta); - } - async function _loadSchema(ref) { - const p = this._loading[ref]; - if (p) - return p; - try { - return await (this._loading[ref] = loadSchema(ref)); - } - finally { - delete this._loading[ref]; - } - } - } - addSchema(schema, - key, - _meta, - _validateSchema = this.opts.validateSchema - ) { - if (Array.isArray(schema)) { - for (const sch of schema) - this.addSchema(sch, undefined, _meta, _validateSchema); - return this; - } - let id; - if (typeof schema === "object") { - const { schemaId } = this.opts; - id = schema[schemaId]; - if (id !== undefined && typeof id != "string") { - throw new Error(`schema ${schemaId} must be string`); - } - } - key = (0, resolve_1.normalizeId)(key || id); - this._checkUnique(key); - this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true); - return this; - } - addMetaSchema(schema, key, - _validateSchema = this.opts.validateSchema - ) { - this.addSchema(schema, key, true, _validateSchema); - return this; - } - validateSchema(schema, throwOrLogError) { - if (typeof schema == "boolean") - return true; - let $schema; - $schema = schema.$schema; - if ($schema !== undefined && typeof $schema != "string") { - throw new Error("$schema must be a string"); - } - $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; - } - const valid = this.validate($schema, schema); - if (!valid && throwOrLogError) { - const message = "schema is invalid: " + this.errorsText(); - if (this.opts.validateSchema === "log") - this.logger.error(message); - else - throw new Error(message); - } - return valid; - } - getSchema(keyRef) { - let sch; - while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") - keyRef = sch; - if (sch === undefined) { - const { schemaId } = this.opts; - const root = new compile_1.SchemaEnv({ schema: {}, schemaId }); - sch = compile_1.resolveSchema.call(this, root, keyRef); - if (!sch) - return; - this.refs[keyRef] = sch; - } - return (sch.validate || this._compileSchemaEnv(sch)); - } - removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - this._removeAllSchemas(this.schemas, schemaKeyRef); - this._removeAllSchemas(this.refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case "undefined": - this._removeAllSchemas(this.schemas); - this._removeAllSchemas(this.refs); - this._cache.clear(); - return this; - case "string": { - const sch = getSchEnv.call(this, schemaKeyRef); - if (typeof sch == "object") - this._cache.delete(sch.schema); - delete this.schemas[schemaKeyRef]; - delete this.refs[schemaKeyRef]; - return this; - } - case "object": { - const cacheKey = schemaKeyRef; - this._cache.delete(cacheKey); - let id = schemaKeyRef[this.opts.schemaId]; - if (id) { - id = (0, resolve_1.normalizeId)(id); - delete this.schemas[id]; - delete this.refs[id]; - } - return this; - } - default: - throw new Error("ajv.removeSchema: invalid parameter"); - } - } - addVocabulary(definitions) { - for (const def of definitions) - this.addKeyword(def); - return this; - } - addKeyword(kwdOrDef, def - ) { - let keyword; - if (typeof kwdOrDef == "string") { - keyword = kwdOrDef; - if (typeof def == "object") { - this.logger.warn("these parameters are deprecated, see docs for addKeyword"); - def.keyword = keyword; - } - } - else if (typeof kwdOrDef == "object" && def === undefined) { - def = kwdOrDef; - keyword = def.keyword; - if (Array.isArray(keyword) && !keyword.length) { - throw new Error("addKeywords: keyword must be string or non-empty array"); - } - } - else { - throw new Error("invalid addKeywords parameters"); - } - checkKeyword.call(this, keyword, def); - if (!def) { - (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); - return this; - } - keywordMetaschema.call(this, def); - const definition = { - ...def, - type: (0, dataType_1.getJSONTypes)(def.type), - schemaType: (0, dataType_1.getJSONTypes)(def.schemaType), - }; - (0, util_1.eachItem)(keyword, definition.type.length === 0 - ? (k) => addRule.call(this, k, definition) - : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); - return this; - } - getKeyword(keyword) { - const rule = this.RULES.all[keyword]; - return typeof rule == "object" ? rule.definition : !!rule; - } - removeKeyword(keyword) { - const { RULES } = this; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - for (const group of RULES.rules) { - const i = group.rules.findIndex((rule) => rule.keyword === keyword); - if (i >= 0) - group.rules.splice(i, 1); - } - return this; - } - addFormat(name, format) { - if (typeof format == "string") - format = new RegExp(format); - this.formats[name] = format; - return this; - } - errorsText(errors = this.errors, - { separator = ", ", dataVar = "data" } = {} - ) { - if (!errors || errors.length === 0) - return "No errors"; - return errors - .map((e) => `${dataVar}${e.instancePath} ${e.message}`) - .reduce((text, msg) => text + separator + msg); - } - $dataMetaSchema(metaSchema, keywordsJsonPointers) { - const rules = this.RULES.all; - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - for (const jsonPointer of keywordsJsonPointers) { - const segments = jsonPointer.split("/").slice(1); - let keywords = metaSchema; - for (const seg of segments) - keywords = keywords[seg]; - for (const key in rules) { - const rule = rules[key]; - if (typeof rule != "object") - continue; - const { $data } = rule.definition; - const schema = keywords[key]; - if ($data && schema) - keywords[key] = schemaOrData(schema); - } - } - return metaSchema; - } - _removeAllSchemas(schemas, regex) { - for (const keyRef in schemas) { - const sch = schemas[keyRef]; - if (!regex || regex.test(keyRef)) { - if (typeof sch == "string") { - delete schemas[keyRef]; - } - else if (sch && !sch.meta) { - this._cache.delete(sch.schema); - delete schemas[keyRef]; - } - } - } - } - _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { - let id; - const { schemaId } = this.opts; - if (typeof schema == "object") { - id = schema[schemaId]; - } - else { - if (this.opts.jtd) - throw new Error("schema must be object"); - else if (typeof schema != "boolean") - throw new Error("schema must be object or boolean"); - } - let sch = this._cache.get(schema); - if (sch !== undefined) - return sch; - baseId = (0, resolve_1.normalizeId)(id || baseId); - const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId); - sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs }); - this._cache.set(sch.schema, sch); - if (addSchema && !baseId.startsWith("#")) { - if (baseId) - this._checkUnique(baseId); - this.refs[baseId] = sch; - } - if (validateSchema) - this.validateSchema(schema, true); - return sch; - } - _checkUnique(id) { - if (this.schemas[id] || this.refs[id]) { - throw new Error(`schema with key or id "${id}" already exists`); - } - } - _compileSchemaEnv(sch) { - if (sch.meta) - this._compileMetaSchema(sch); - else - compile_1.compileSchema.call(this, sch); - if (!sch.validate) - throw new Error("ajv implementation error"); - return sch.validate; - } - _compileMetaSchema(sch) { - const currentOpts = this.opts; - this.opts = this._metaOpts; - try { - compile_1.compileSchema.call(this, sch); - } - finally { - this.opts = currentOpts; - } - } - } - Ajv.ValidationError = validation_error_1.default; - Ajv.MissingRefError = ref_error_1.default; - exports$1.default = Ajv; - function checkOptions(checkOpts, options, msg, log = "error") { - for (const key in checkOpts) { - const opt = key; - if (opt in options) - this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`); - } - } - function getSchEnv(keyRef) { - keyRef = (0, resolve_1.normalizeId)(keyRef); - return this.schemas[keyRef] || this.refs[keyRef]; - } - function addInitialSchemas() { - const optsSchemas = this.opts.schemas; - if (!optsSchemas) - return; - if (Array.isArray(optsSchemas)) - this.addSchema(optsSchemas); - else - for (const key in optsSchemas) - this.addSchema(optsSchemas[key], key); - } - function addInitialFormats() { - for (const name in this.opts.formats) { - const format = this.opts.formats[name]; - if (format) - this.addFormat(name, format); - } - } - function addInitialKeywords(defs) { - if (Array.isArray(defs)) { - this.addVocabulary(defs); - return; - } - this.logger.warn("keywords option as map is deprecated, pass array"); - for (const keyword in defs) { - const def = defs[keyword]; - if (!def.keyword) - def.keyword = keyword; - this.addKeyword(def); - } - } - function getMetaSchemaOptions() { - const metaOpts = { ...this.opts }; - for (const opt of META_IGNORE_OPTIONS) - delete metaOpts[opt]; - return metaOpts; - } - const noLogs = { log() { }, warn() { }, error() { } }; - function getLogger(logger) { - if (logger === false) - return noLogs; - if (logger === undefined) - return console; - if (logger.log && logger.warn && logger.error) - return logger; - throw new Error("logger must implement log, warn and error methods"); - } - const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; - function checkKeyword(keyword, def) { - const { RULES } = this; - (0, util_1.eachItem)(keyword, (kwd) => { - if (RULES.keywords[kwd]) - throw new Error(`Keyword ${kwd} is already defined`); - if (!KEYWORD_NAME.test(kwd)) - throw new Error(`Keyword ${kwd} has invalid name`); - }); - if (!def) - return; - if (def.$data && !("code" in def || "validate" in def)) { - throw new Error('$data keyword must have "code" or "validate" function'); - } - } - function addRule(keyword, definition, dataType) { - var _a; - const post = definition === null || definition === void 0 ? void 0 : definition.post; - if (dataType && post) - throw new Error('keyword with "post" flag cannot have "type"'); - const { RULES } = this; - let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); - if (!ruleGroup) { - ruleGroup = { type: dataType, rules: [] }; - RULES.rules.push(ruleGroup); - } - RULES.keywords[keyword] = true; - if (!definition) - return; - const rule = { - keyword, - definition: { - ...definition, - type: (0, dataType_1.getJSONTypes)(definition.type), - schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType), - }, - }; - if (definition.before) - addBeforeRule.call(this, ruleGroup, rule, definition.before); - else - ruleGroup.rules.push(rule); - RULES.all[keyword] = rule; - (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); - } - function addBeforeRule(ruleGroup, rule, before) { - const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); - if (i >= 0) { - ruleGroup.rules.splice(i, 0, rule); - } - else { - ruleGroup.rules.push(rule); - this.logger.warn(`rule ${before} is not defined`); - } - } - function keywordMetaschema(def) { - let { metaSchema } = def; - if (metaSchema === undefined) - return; - if (def.$data && this.opts.$data) - metaSchema = schemaOrData(metaSchema); - def.validateSchema = this.compile(metaSchema, true); - } - const $dataRef = { - $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - }; - function schemaOrData(schema) { - return { anyOf: [schema, $dataRef] }; - } - } (core$3)); - return core$3; -} - -var draft7 = {}; - -var core$2 = {}; - -var id = {}; - -var hasRequiredId; - -function requireId () { - if (hasRequiredId) return id; - hasRequiredId = 1; - Object.defineProperty(id, "__esModule", { value: true }); - const def = { - keyword: "id", - code() { - throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); - }, - }; - id.default = def; - return id; -} - -var ref$1 = {}; - -var hasRequiredRef$1; - -function requireRef$1 () { - if (hasRequiredRef$1) return ref$1; - hasRequiredRef$1 = 1; - Object.defineProperty(ref$1, "__esModule", { value: true }); - ref$1.callRef = ref$1.getValidate = void 0; - const ref_error_1 = /*@__PURE__*/ requireRef_error(); - const code_1 = /*@__PURE__*/ requireCode$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const names_1 = /*@__PURE__*/ requireNames(); - const compile_1 = /*@__PURE__*/ requireCompile$2(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const def = { - keyword: "$ref", - schemaType: "string", - code(cxt) { - const { gen, schema: $ref, it } = cxt; - const { baseId, schemaEnv: env, validateName, opts, self } = it; - const { root } = env; - if (($ref === "#" || $ref === "#/") && baseId === root.baseId) - return callRootRef(); - const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref); - if (schOrEnv === undefined) - throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref); - if (schOrEnv instanceof compile_1.SchemaEnv) - return callValidate(schOrEnv); - return inlineRefSchema(schOrEnv); - function callRootRef() { - if (env === root) - return callRef(cxt, validateName, env, env.$async); - const rootName = gen.scopeValue("root", { ref: root }); - return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async); - } - function callValidate(sch) { - const v = getValidate(cxt, sch); - callRef(cxt, v, sch, sch.$async); - } - function inlineRefSchema(sch) { - const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); - const valid = gen.name("valid"); - const schCxt = cxt.subschema({ - schema: sch, - dataTypes: [], - schemaPath: codegen_1.nil, - topSchemaRef: schName, - errSchemaPath: $ref, - }, valid); - cxt.mergeEvaluated(schCxt); - cxt.ok(valid); - } - }, - }; - function getValidate(cxt, sch) { - const { gen } = cxt; - return sch.validate - ? gen.scopeValue("validate", { ref: sch.validate }) - : (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.validate`; - } - ref$1.getValidate = getValidate; - function callRef(cxt, v, sch, $async) { - const { gen, it } = cxt; - const { allErrors, schemaEnv: env, opts } = it; - const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; - if ($async) - callAsyncRef(); - else - callSyncRef(); - function callAsyncRef() { - if (!env.$async) - throw new Error("async schema referenced by sync schema"); - const valid = gen.let("valid"); - gen.try(() => { - gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`); - addEvaluatedFrom(v); - if (!allErrors) - gen.assign(valid, true); - }, (e) => { - gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); - addErrorsFrom(e); - if (!allErrors) - gen.assign(valid, false); - }); - cxt.ok(valid); - } - function callSyncRef() { - cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); - } - function addErrorsFrom(source) { - const errs = (0, codegen_1._) `${source}.errors`; - gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); - gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`); - } - function addEvaluatedFrom(source) { - var _a; - if (!it.opts.unevaluated) - return; - const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; - if (it.props !== true) { - if (schEvaluated && !schEvaluated.dynamicProps) { - if (schEvaluated.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props); - } - } - else { - const props = gen.var("props", (0, codegen_1._) `${source}.evaluated.props`); - it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name); - } - } - if (it.items !== true) { - if (schEvaluated && !schEvaluated.dynamicItems) { - if (schEvaluated.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); - } - } - else { - const items = gen.var("items", (0, codegen_1._) `${source}.evaluated.items`); - it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name); - } - } - } - } - ref$1.callRef = callRef; - ref$1.default = def; - return ref$1; -} - -var hasRequiredCore$1; - -function requireCore$1 () { - if (hasRequiredCore$1) return core$2; - hasRequiredCore$1 = 1; - Object.defineProperty(core$2, "__esModule", { value: true }); - const id_1 = /*@__PURE__*/ requireId(); - const ref_1 = /*@__PURE__*/ requireRef$1(); - const core = [ - "$schema", - "$id", - "$defs", - "$vocabulary", - { keyword: "$comment" }, - "definitions", - id_1.default, - ref_1.default, - ]; - core$2.default = core; - return core$2; -} - -var validation$1 = {}; - -var limitNumber = {}; - -var hasRequiredLimitNumber; - -function requireLimitNumber () { - if (hasRequiredLimitNumber) return limitNumber; - hasRequiredLimitNumber = 1; - Object.defineProperty(limitNumber, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const ops = codegen_1.operators; - const KWDs = { - maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, - exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }, - }; - const error = { - message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`, - params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, - }; - const def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); - }, - }; - limitNumber.default = def; - return limitNumber; -} - -var multipleOf$1 = {}; - -var hasRequiredMultipleOf$1; - -function requireMultipleOf$1 () { - if (hasRequiredMultipleOf$1) return multipleOf$1; - hasRequiredMultipleOf$1 = 1; - Object.defineProperty(multipleOf$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`, - params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`, - }; - const def = { - keyword: "multipleOf", - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { gen, data, schemaCode, it } = cxt; - const prec = it.opts.multipleOfPrecision; - const res = gen.let("res"); - const invalid = prec - ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` - : (0, codegen_1._) `${res} !== parseInt(${res})`; - cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); - }, - }; - multipleOf$1.default = def; - return multipleOf$1; -} - -var limitLength = {}; - -var ucs2length$1 = {}; - -var hasRequiredUcs2length$1; - -function requireUcs2length$1 () { - if (hasRequiredUcs2length$1) return ucs2length$1; - hasRequiredUcs2length$1 = 1; - Object.defineProperty(ucs2length$1, "__esModule", { value: true }); - function ucs2length(str) { - const len = str.length; - let length = 0; - let pos = 0; - let value; - while (pos < len) { - length++; - value = str.charCodeAt(pos++); - if (value >= 0xd800 && value <= 0xdbff && pos < len) { - value = str.charCodeAt(pos); - if ((value & 0xfc00) === 0xdc00) - pos++; - } - } - return length; - } - ucs2length$1.default = ucs2length; - ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; - return ucs2length$1; -} - -var hasRequiredLimitLength; - -function requireLimitLength () { - if (hasRequiredLimitLength) return limitLength; - hasRequiredLimitLength = 1; - Object.defineProperty(limitLength, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const ucs2length_1 = /*@__PURE__*/ requireUcs2length$1(); - const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxLength" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, - }; - const def = { - keyword: ["maxLength", "minLength"], - type: "string", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode, it } = cxt; - const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; - const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; - cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`); - }, - }; - limitLength.default = def; - return limitLength; -} - -var pattern$1 = {}; - -var hasRequiredPattern$1; - -function requirePattern$1 () { - if (hasRequiredPattern$1) return pattern$1; - hasRequiredPattern$1 = 1; - Object.defineProperty(pattern$1, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$1(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`, - }; - const def = { - keyword: "pattern", - type: "string", - schemaType: "string", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - const u = it.opts.unicodeRegExp ? "u" : ""; - if ($data) { - const { regExp } = it.opts.code; - const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._) `new RegExp` : (0, util_1.useFunc)(gen, regExp); - const valid = gen.let("valid"); - gen.try(() => gen.assign(valid, (0, codegen_1._) `${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false)); - cxt.fail$data((0, codegen_1._) `!${valid}`); - } - else { - const regExp = (0, code_1.usePattern)(cxt, schema); - cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`); - } - }, - }; - pattern$1.default = def; - return pattern$1; -} - -var limitProperties = {}; - -var hasRequiredLimitProperties; - -function requireLimitProperties () { - if (hasRequiredLimitProperties) return limitProperties; - hasRequiredLimitProperties = 1; - Object.defineProperty(limitProperties, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxProperties" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, - }; - const def = { - keyword: ["maxProperties", "minProperties"], - type: "object", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`); - }, - }; - limitProperties.default = def; - return limitProperties; -} - -var required$2 = {}; - -var hasRequiredRequired$1; - -function requireRequired$1 () { - if (hasRequiredRequired$1) return required$2; - hasRequiredRequired$1 = 1; - Object.defineProperty(required$2, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`, - params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`, - }; - const def = { - keyword: "required", - type: "object", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, schema, schemaCode, data, $data, it } = cxt; - const { opts } = it; - if (!$data && schema.length === 0) - return; - const useLoop = schema.length >= opts.loopRequired; - if (it.allErrors) - allErrorsMode(); - else - exitOnErrorMode(); - if (opts.strictRequired) { - const props = cxt.parentSchema.properties; - const { definedProperties } = cxt.it; - for (const requiredKey of schema) { - if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; - (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired); - } - } - } - function allErrorsMode() { - if (useLoop || $data) { - cxt.block$data(codegen_1.nil, loopAllRequired); - } - else { - for (const prop of schema) { - (0, code_1.checkReportMissingProp)(cxt, prop); - } - } - } - function exitOnErrorMode() { - const missing = gen.let("missing"); - if (useLoop || $data) { - const valid = gen.let("valid", true); - cxt.block$data(valid, () => loopUntilMissing(missing, valid)); - cxt.ok(valid); - } - else { - gen.if((0, code_1.checkMissingProp)(cxt, schema, missing)); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); - } - } - function loopAllRequired() { - gen.forOf("prop", schemaCode, (prop) => { - cxt.setParams({ missingProperty: prop }); - gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); - }); - } - function loopUntilMissing(missing, valid) { - cxt.setParams({ missingProperty: missing }); - gen.forOf(missing, schemaCode, () => { - gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(); - gen.break(); - }); - }, codegen_1.nil); - } - }, - }; - required$2.default = def; - return required$2; -} - -var limitItems = {}; - -var hasRequiredLimitItems; - -function requireLimitItems () { - if (hasRequiredLimitItems) return limitItems; - hasRequiredLimitItems = 1; - Object.defineProperty(limitItems, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxItems" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, - }; - const def = { - keyword: ["maxItems", "minItems"], - type: "array", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`); - }, - }; - limitItems.default = def; - return limitItems; -} - -var uniqueItems$1 = {}; - -var equal = {}; - -var hasRequiredEqual; - -function requireEqual () { - if (hasRequiredEqual) return equal; - hasRequiredEqual = 1; - Object.defineProperty(equal, "__esModule", { value: true }); - const equal$1 = requireFastDeepEqual(); - equal$1.code = 'require("ajv/dist/runtime/equal").default'; - equal.default = equal$1; - return equal; -} - -var hasRequiredUniqueItems$1; - -function requireUniqueItems$1 () { - if (hasRequiredUniqueItems$1) return uniqueItems$1; - hasRequiredUniqueItems$1 = 1; - Object.defineProperty(uniqueItems$1, "__esModule", { value: true }); - const dataType_1 = /*@__PURE__*/ requireDataType(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const equal_1 = /*@__PURE__*/ requireEqual(); - const error = { - message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`, - params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`, - }; - const def = { - keyword: "uniqueItems", - type: "array", - schemaType: "boolean", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt; - if (!$data && !schema) - return; - const valid = gen.let("valid"); - const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; - cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`); - cxt.ok(valid); - function validateUniqueItems() { - const i = gen.let("i", (0, codegen_1._) `${data}.length`); - const j = gen.let("j"); - cxt.setParams({ i, j }); - gen.assign(valid, true); - gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); - } - function canOptimize() { - return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); - } - function loopN(i, j) { - const item = gen.name("item"); - const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); - const indices = gen.const("indices", (0, codegen_1._) `{}`); - gen.for((0, codegen_1._) `;${i}--;`, () => { - gen.let(item, (0, codegen_1._) `${data}[${i}]`); - gen.if(wrongType, (0, codegen_1._) `continue`); - if (itemTypes.length > 1) - gen.if((0, codegen_1._) `typeof ${item} == "string"`, (0, codegen_1._) `${item} += "_"`); - gen - .if((0, codegen_1._) `typeof ${indices}[${item}] == "number"`, () => { - gen.assign(j, (0, codegen_1._) `${indices}[${item}]`); - cxt.error(); - gen.assign(valid, false).break(); - }) - .code((0, codegen_1._) `${indices}[${item}] = ${i}`); - }); - } - function loopN2(i, j) { - const eql = (0, util_1.useFunc)(gen, equal_1.default); - const outer = gen.name("outer"); - gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => { - cxt.error(); - gen.assign(valid, false).break(outer); - }))); - } - }, - }; - uniqueItems$1.default = def; - return uniqueItems$1; -} - -var _const$1 = {}; - -var hasRequired_const$1; - -function require_const$1 () { - if (hasRequired_const$1) return _const$1; - hasRequired_const$1 = 1; - Object.defineProperty(_const$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const equal_1 = /*@__PURE__*/ requireEqual(); - const error = { - message: "must be equal to constant", - params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`, - }; - const def = { - keyword: "const", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schemaCode, schema } = cxt; - if ($data || (schema && typeof schema == "object")) { - cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); - } - else { - cxt.fail((0, codegen_1._) `${schema} !== ${data}`); - } - }, - }; - _const$1.default = def; - return _const$1; -} - -var _enum$1 = {}; - -var hasRequired_enum$1; - -function require_enum$1 () { - if (hasRequired_enum$1) return _enum$1; - hasRequired_enum$1 = 1; - Object.defineProperty(_enum$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const equal_1 = /*@__PURE__*/ requireEqual(); - const error = { - message: "must be equal to one of the allowed values", - params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`, - }; - const def = { - keyword: "enum", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - if (!$data && schema.length === 0) - throw new Error("enum must have non-empty array"); - const useLoop = schema.length >= it.opts.loopEnum; - let eql; - const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default))); - let valid; - if (useLoop || $data) { - valid = gen.let("valid"); - cxt.block$data(valid, loopEnum); - } - else { - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const vSchema = gen.const("vSchema", schemaCode); - valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i))); - } - cxt.pass(valid); - function loopEnum() { - gen.assign(valid, false); - gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); - } - function equalCode(vSchema, i) { - const sch = schema[i]; - return typeof sch === "object" && sch !== null - ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])` - : (0, codegen_1._) `${data} === ${sch}`; - } - }, - }; - _enum$1.default = def; - return _enum$1; -} - -var hasRequiredValidation$1; - -function requireValidation$1 () { - if (hasRequiredValidation$1) return validation$1; - hasRequiredValidation$1 = 1; - Object.defineProperty(validation$1, "__esModule", { value: true }); - const limitNumber_1 = /*@__PURE__*/ requireLimitNumber(); - const multipleOf_1 = /*@__PURE__*/ requireMultipleOf$1(); - const limitLength_1 = /*@__PURE__*/ requireLimitLength(); - const pattern_1 = /*@__PURE__*/ requirePattern$1(); - const limitProperties_1 = /*@__PURE__*/ requireLimitProperties(); - const required_1 = /*@__PURE__*/ requireRequired$1(); - const limitItems_1 = /*@__PURE__*/ requireLimitItems(); - const uniqueItems_1 = /*@__PURE__*/ requireUniqueItems$1(); - const const_1 = /*@__PURE__*/ require_const$1(); - const enum_1 = /*@__PURE__*/ require_enum$1(); - const validation = [ - limitNumber_1.default, - multipleOf_1.default, - limitLength_1.default, - pattern_1.default, - limitProperties_1.default, - required_1.default, - limitItems_1.default, - uniqueItems_1.default, - { keyword: "type", schemaType: ["string", "array"] }, - { keyword: "nullable", schemaType: "boolean" }, - const_1.default, - enum_1.default, - ]; - validation$1.default = validation; - return validation$1; -} - -var applicator = {}; - -var additionalItems = {}; - -var hasRequiredAdditionalItems; - -function requireAdditionalItems () { - if (hasRequiredAdditionalItems) return additionalItems; - hasRequiredAdditionalItems = 1; - Object.defineProperty(additionalItems, "__esModule", { value: true }); - additionalItems.validateAdditionalItems = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, - }; - const def = { - keyword: "additionalItems", - type: "array", - schemaType: ["boolean", "object"], - before: "uniqueItems", - error, - code(cxt) { - const { parentSchema, it } = cxt; - const { items } = parentSchema; - if (!Array.isArray(items)) { - (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas'); - return; - } - validateAdditionalItems(cxt, items); - }, - }; - function validateAdditionalItems(cxt, items) { - const { gen, schema, data, keyword, it } = cxt; - it.items = true; - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - if (schema === false) { - cxt.setParams({ len: items.length }); - cxt.pass((0, codegen_1._) `${len} <= ${items.length}`); - } - else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.var("valid", (0, codegen_1._) `${len} <= ${items.length}`); - gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); - cxt.ok(valid); - } - function validateItems(valid) { - gen.forRange("i", items.length, len, (i) => { - cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); - if (!it.allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - }); - } - } - additionalItems.validateAdditionalItems = validateAdditionalItems; - additionalItems.default = def; - return additionalItems; -} - -var prefixItems = {}; - -var items$1 = {}; - -var hasRequiredItems$1; - -function requireItems$1 () { - if (hasRequiredItems$1) return items$1; - hasRequiredItems$1 = 1; - Object.defineProperty(items$1, "__esModule", { value: true }); - items$1.validateTuple = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const code_1 = /*@__PURE__*/ requireCode$1(); - const def = { - keyword: "items", - type: "array", - schemaType: ["object", "array", "boolean"], - before: "uniqueItems", - code(cxt) { - const { schema, it } = cxt; - if (Array.isArray(schema)) - return validateTuple(cxt, "additionalItems", schema); - it.items = true; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - cxt.ok((0, code_1.validateArray)(cxt)); - }, - }; - function validateTuple(cxt, extraItems, schArr = cxt.schema) { - const { gen, parentSchema, data, keyword, it } = cxt; - checkStrictTuple(parentSchema); - if (it.opts.unevaluated && schArr.length && it.items !== true) { - it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items); - } - const valid = gen.name("valid"); - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - schArr.forEach((sch, i) => { - if ((0, util_1.alwaysValidSchema)(it, sch)) - return; - gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({ - keyword, - schemaProp: i, - dataProp: i, - }, valid)); - cxt.ok(valid); - }); - function checkStrictTuple(sch) { - const { opts, errSchemaPath } = it; - const l = schArr.length; - const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); - if (opts.strictTuples && !fullTuple) { - const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; - (0, util_1.checkStrictMode)(it, msg, opts.strictTuples); - } - } - } - items$1.validateTuple = validateTuple; - items$1.default = def; - return items$1; -} - -var hasRequiredPrefixItems; - -function requirePrefixItems () { - if (hasRequiredPrefixItems) return prefixItems; - hasRequiredPrefixItems = 1; - Object.defineProperty(prefixItems, "__esModule", { value: true }); - const items_1 = /*@__PURE__*/ requireItems$1(); - const def = { - keyword: "prefixItems", - type: "array", - schemaType: ["array"], - before: "uniqueItems", - code: (cxt) => (0, items_1.validateTuple)(cxt, "items"), - }; - prefixItems.default = def; - return prefixItems; -} - -var items2020 = {}; - -var hasRequiredItems2020; - -function requireItems2020 () { - if (hasRequiredItems2020) return items2020; - hasRequiredItems2020 = 1; - Object.defineProperty(items2020, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const code_1 = /*@__PURE__*/ requireCode$1(); - const additionalItems_1 = /*@__PURE__*/ requireAdditionalItems(); - const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, - }; - const def = { - keyword: "items", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - error, - code(cxt) { - const { schema, parentSchema, it } = cxt; - const { prefixItems } = parentSchema; - it.items = true; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - if (prefixItems) - (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); - else - cxt.ok((0, code_1.validateArray)(cxt)); - }, - }; - items2020.default = def; - return items2020; -} - -var contains$2 = {}; - -var hasRequiredContains$1; - -function requireContains$1 () { - if (hasRequiredContains$1) return contains$2; - hasRequiredContains$1 = 1; - Object.defineProperty(contains$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: ({ params: { min, max } }) => max === undefined - ? (0, codegen_1.str) `must contain at least ${min} valid item(s)` - : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`, - params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`, - }; - const def = { - keyword: "contains", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - let min; - let max; - const { minContains, maxContains } = parentSchema; - if (it.opts.next) { - min = minContains === undefined ? 1 : minContains; - max = maxContains; - } - else { - min = 1; - } - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - cxt.setParams({ min, max }); - if (max === undefined && min === 0) { - (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); - return; - } - if (max !== undefined && min > max) { - (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); - cxt.fail(); - return; - } - if ((0, util_1.alwaysValidSchema)(it, schema)) { - let cond = (0, codegen_1._) `${len} >= ${min}`; - if (max !== undefined) - cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`; - cxt.pass(cond); - return; - } - it.items = true; - const valid = gen.name("valid"); - if (max === undefined && min === 1) { - validateItems(valid, () => gen.if(valid, () => gen.break())); - } - else if (min === 0) { - gen.let(valid, true); - if (max !== undefined) - gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount); - } - else { - gen.let(valid, false); - validateItemsWithCount(); - } - cxt.result(valid, () => cxt.reset()); - function validateItemsWithCount() { - const schValid = gen.name("_valid"); - const count = gen.let("count", 0); - validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); - } - function validateItems(_valid, block) { - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword: "contains", - dataProp: i, - dataPropType: util_1.Type.Num, - compositeRule: true, - }, _valid); - block(); - }); - } - function checkLimits(count) { - gen.code((0, codegen_1._) `${count}++`); - if (max === undefined) { - gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break()); - } - else { - gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break()); - if (min === 1) - gen.assign(valid, true); - else - gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true)); - } - } - }, - }; - contains$2.default = def; - return contains$2; -} - -var dependencies$1 = {}; - -var hasRequiredDependencies$1; - -function requireDependencies$1 () { - if (hasRequiredDependencies$1) return dependencies$1; - hasRequiredDependencies$1 = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.validateSchemaDeps = exports$1.validatePropertyDeps = exports$1.error = void 0; - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const code_1 = /*@__PURE__*/ requireCode$1(); - exports$1.error = { - message: ({ params: { property, depsCount, deps } }) => { - const property_ies = depsCount === 1 ? "property" : "properties"; - return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`; - }, - params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property}, - missingProperty: ${missingProperty}, - depsCount: ${depsCount}, - deps: ${deps}}`, - }; - const def = { - keyword: "dependencies", - type: "object", - schemaType: "object", - error: exports$1.error, - code(cxt) { - const [propDeps, schDeps] = splitDependencies(cxt); - validatePropertyDeps(cxt, propDeps); - validateSchemaDeps(cxt, schDeps); - }, - }; - function splitDependencies({ schema }) { - const propertyDeps = {}; - const schemaDeps = {}; - for (const key in schema) { - if (key === "__proto__") - continue; - const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps; - deps[key] = schema[key]; - } - return [propertyDeps, schemaDeps]; - } - function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { - const { gen, data, it } = cxt; - if (Object.keys(propertyDeps).length === 0) - return; - const missing = gen.let("missing"); - for (const prop in propertyDeps) { - const deps = propertyDeps[prop]; - if (deps.length === 0) - continue; - const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties); - cxt.setParams({ - property: prop, - depsCount: deps.length, - deps: deps.join(", "), - }); - if (it.allErrors) { - gen.if(hasProperty, () => { - for (const depProp of deps) { - (0, code_1.checkReportMissingProp)(cxt, depProp); - } - }); - } - else { - gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); - } - } - } - exports$1.validatePropertyDeps = validatePropertyDeps; - function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - for (const prop in schemaDeps) { - if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) - continue; - gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => { - const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); - cxt.mergeValidEvaluated(schCxt, valid); - }, () => gen.var(valid, true) - ); - cxt.ok(valid); - } - } - exports$1.validateSchemaDeps = validateSchemaDeps; - exports$1.default = def; - } (dependencies$1)); - return dependencies$1; -} - -var propertyNames$1 = {}; - -var hasRequiredPropertyNames$1; - -function requirePropertyNames$1 () { - if (hasRequiredPropertyNames$1) return propertyNames$1; - hasRequiredPropertyNames$1 = 1; - Object.defineProperty(propertyNames$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: "property name must be valid", - params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`, - }; - const def = { - keyword: "propertyNames", - type: "object", - schemaType: ["object", "boolean"], - error, - code(cxt) { - const { gen, schema, data, it } = cxt; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - const valid = gen.name("valid"); - gen.forIn("key", data, (key) => { - cxt.setParams({ propertyName: key }); - cxt.subschema({ - keyword: "propertyNames", - data: key, - dataTypes: ["string"], - propertyName: key, - compositeRule: true, - }, valid); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(true); - if (!it.allErrors) - gen.break(); - }); - }); - cxt.ok(valid); - }, - }; - propertyNames$1.default = def; - return propertyNames$1; -} - -var additionalProperties$1 = {}; - -var hasRequiredAdditionalProperties; - -function requireAdditionalProperties () { - if (hasRequiredAdditionalProperties) return additionalProperties$1; - hasRequiredAdditionalProperties = 1; - Object.defineProperty(additionalProperties$1, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const names_1 = /*@__PURE__*/ requireNames(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: "must NOT have additional properties", - params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`, - }; - const def = { - keyword: "additionalProperties", - type: ["object"], - schemaType: ["boolean", "object"], - allowUndefined: true, - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, errsCount, it } = cxt; - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, opts } = it; - it.props = true; - if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema)) - return; - const props = (0, code_1.allSchemaProperties)(parentSchema.properties); - const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); - checkAdditionalProperties(); - cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); - function checkAdditionalProperties() { - gen.forIn("key", data, (key) => { - if (!props.length && !patProps.length) - additionalPropertyCode(key); - else - gen.if(isAdditional(key), () => additionalPropertyCode(key)); - }); - } - function isAdditional(key) { - let definedProp; - if (props.length > 8) { - const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties"); - definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); - } - else if (props.length) { - definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`)); - } - else { - definedProp = codegen_1.nil; - } - if (patProps.length) { - definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`)); - } - return (0, codegen_1.not)(definedProp); - } - function deleteAdditional(key) { - gen.code((0, codegen_1._) `delete ${data}[${key}]`); - } - function additionalPropertyCode(key) { - if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) { - deleteAdditional(key); - return; - } - if (schema === false) { - cxt.setParams({ additionalProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; - } - if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.name("valid"); - if (opts.removeAdditional === "failing") { - applyAdditionalSchema(key, valid, false); - gen.if((0, codegen_1.not)(valid), () => { - cxt.reset(); - deleteAdditional(key); - }); - } - else { - applyAdditionalSchema(key, valid); - if (!allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } - } - } - function applyAdditionalSchema(key, valid, errors) { - const subschema = { - keyword: "additionalProperties", - dataProp: key, - dataPropType: util_1.Type.Str, - }; - if (errors === false) { - Object.assign(subschema, { - compositeRule: true, - createErrors: false, - allErrors: false, - }); - } - cxt.subschema(subschema, valid); - } - }, - }; - additionalProperties$1.default = def; - return additionalProperties$1; -} - -var properties$4 = {}; - -var hasRequiredProperties$1; - -function requireProperties$1 () { - if (hasRequiredProperties$1) return properties$4; - hasRequiredProperties$1 = 1; - Object.defineProperty(properties$4, "__esModule", { value: true }); - const validate_1 = /*@__PURE__*/ requireValidate$1(); - const code_1 = /*@__PURE__*/ requireCode$1(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const additionalProperties_1 = /*@__PURE__*/ requireAdditionalProperties(); - const def = { - keyword: "properties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) { - additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); - } - const allProps = (0, code_1.allSchemaProperties)(schema); - for (const prop of allProps) { - it.definedProperties.add(prop); - } - if (it.opts.unevaluated && allProps.length && it.props !== true) { - it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props); - } - const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p])); - if (properties.length === 0) - return; - const valid = gen.name("valid"); - for (const prop of properties) { - if (hasDefault(prop)) { - applyPropertySchema(prop); - } - else { - gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties)); - applyPropertySchema(prop); - if (!it.allErrors) - gen.else().var(valid, true); - gen.endIf(); - } - cxt.it.definedProperties.add(prop); - cxt.ok(valid); - } - function hasDefault(prop) { - return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined; - } - function applyPropertySchema(prop) { - cxt.subschema({ - keyword: "properties", - schemaProp: prop, - dataProp: prop, - }, valid); - } - }, - }; - properties$4.default = def; - return properties$4; -} - -var patternProperties = {}; - -var hasRequiredPatternProperties; - -function requirePatternProperties () { - if (hasRequiredPatternProperties) return patternProperties; - hasRequiredPatternProperties = 1; - Object.defineProperty(patternProperties, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const util_2 = /*@__PURE__*/ requireUtil$4(); - const def = { - keyword: "patternProperties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, data, parentSchema, it } = cxt; - const { opts } = it; - const patterns = (0, code_1.allSchemaProperties)(schema); - const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p])); - if (patterns.length === 0 || - (alwaysValidPatterns.length === patterns.length && - (!it.opts.unevaluated || it.props === true))) { - return; - } - const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; - const valid = gen.name("valid"); - if (it.props !== true && !(it.props instanceof codegen_1.Name)) { - it.props = (0, util_2.evaluatedPropsToName)(gen, it.props); - } - const { props } = it; - validatePatternProperties(); - function validatePatternProperties() { - for (const pat of patterns) { - if (checkProperties) - checkMatchingProperties(pat); - if (it.allErrors) { - validateProperties(pat); - } - else { - gen.var(valid, true); - validateProperties(pat); - gen.if(valid); - } - } - } - function checkMatchingProperties(pat) { - for (const prop in checkProperties) { - if (new RegExp(pat).test(prop)) { - (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); - } - } - } - function validateProperties(pat) { - gen.forIn("key", data, (key) => { - gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { - const alwaysValid = alwaysValidPatterns.includes(pat); - if (!alwaysValid) { - cxt.subschema({ - keyword: "patternProperties", - schemaProp: pat, - dataProp: key, - dataPropType: util_2.Type.Str, - }, valid); - } - if (it.opts.unevaluated && props !== true) { - gen.assign((0, codegen_1._) `${props}[${key}]`, true); - } - else if (!alwaysValid && !it.allErrors) { - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } - }); - }); - } - }, - }; - patternProperties.default = def; - return patternProperties; -} - -var not$1 = {}; - -var hasRequiredNot$1; - -function requireNot$1 () { - if (hasRequiredNot$1) return not$1; - hasRequiredNot$1 = 1; - Object.defineProperty(not$1, "__esModule", { value: true }); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const def = { - keyword: "not", - schemaType: ["object", "boolean"], - trackErrors: true, - code(cxt) { - const { gen, schema, it } = cxt; - if ((0, util_1.alwaysValidSchema)(it, schema)) { - cxt.fail(); - return; - } - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "not", - compositeRule: true, - createErrors: false, - allErrors: false, - }, valid); - cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); - }, - error: { message: "must NOT be valid" }, - }; - not$1.default = def; - return not$1; -} - -var anyOf$1 = {}; - -var hasRequiredAnyOf$1; - -function requireAnyOf$1 () { - if (hasRequiredAnyOf$1) return anyOf$1; - hasRequiredAnyOf$1 = 1; - Object.defineProperty(anyOf$1, "__esModule", { value: true }); - const code_1 = /*@__PURE__*/ requireCode$1(); - const def = { - keyword: "anyOf", - schemaType: "array", - trackErrors: true, - code: code_1.validateUnion, - error: { message: "must match a schema in anyOf" }, - }; - anyOf$1.default = def; - return anyOf$1; -} - -var oneOf$1 = {}; - -var hasRequiredOneOf$1; - -function requireOneOf$1 () { - if (hasRequiredOneOf$1) return oneOf$1; - hasRequiredOneOf$1 = 1; - Object.defineProperty(oneOf$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: "must match exactly one schema in oneOf", - params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`, - }; - const def = { - keyword: "oneOf", - schemaType: "array", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, it } = cxt; - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - if (it.opts.discriminator && parentSchema.discriminator) - return; - const schArr = schema; - const valid = gen.let("valid", false); - const passing = gen.let("passing", null); - const schValid = gen.name("_valid"); - cxt.setParams({ passing }); - gen.block(validateOneOf); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - function validateOneOf() { - schArr.forEach((sch, i) => { - let schCxt; - if ((0, util_1.alwaysValidSchema)(it, sch)) { - gen.var(schValid, true); - } - else { - schCxt = cxt.subschema({ - keyword: "oneOf", - schemaProp: i, - compositeRule: true, - }, schValid); - } - if (i > 0) { - gen - .if((0, codegen_1._) `${schValid} && ${valid}`) - .assign(valid, false) - .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`) - .else(); - } - gen.if(schValid, () => { - gen.assign(valid, true); - gen.assign(passing, i); - if (schCxt) - cxt.mergeEvaluated(schCxt, codegen_1.Name); - }); - }); - } - }, - }; - oneOf$1.default = def; - return oneOf$1; -} - -var allOf$1 = {}; - -var hasRequiredAllOf$1; - -function requireAllOf$1 () { - if (hasRequiredAllOf$1) return allOf$1; - hasRequiredAllOf$1 = 1; - Object.defineProperty(allOf$1, "__esModule", { value: true }); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const def = { - keyword: "allOf", - schemaType: "array", - code(cxt) { - const { gen, schema, it } = cxt; - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const valid = gen.name("valid"); - schema.forEach((sch, i) => { - if ((0, util_1.alwaysValidSchema)(it, sch)) - return; - const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); - cxt.ok(valid); - cxt.mergeEvaluated(schCxt); - }); - }, - }; - allOf$1.default = def; - return allOf$1; -} - -var _if$1 = {}; - -var hasRequired_if$1; - -function require_if$1 () { - if (hasRequired_if$1) return _if$1; - hasRequired_if$1 = 1; - Object.defineProperty(_if$1, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: ({ params }) => (0, codegen_1.str) `must match "${params.ifClause}" schema`, - params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`, - }; - const def = { - keyword: "if", - schemaType: ["object", "boolean"], - trackErrors: true, - error, - code(cxt) { - const { gen, parentSchema, it } = cxt; - if (parentSchema.then === undefined && parentSchema.else === undefined) { - (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored'); - } - const hasThen = hasSchema(it, "then"); - const hasElse = hasSchema(it, "else"); - if (!hasThen && !hasElse) - return; - const valid = gen.let("valid", true); - const schValid = gen.name("_valid"); - validateIf(); - cxt.reset(); - if (hasThen && hasElse) { - const ifClause = gen.let("ifClause"); - cxt.setParams({ ifClause }); - gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); - } - else if (hasThen) { - gen.if(schValid, validateClause("then")); - } - else { - gen.if((0, codegen_1.not)(schValid), validateClause("else")); - } - cxt.pass(valid, () => cxt.error(true)); - function validateIf() { - const schCxt = cxt.subschema({ - keyword: "if", - compositeRule: true, - createErrors: false, - allErrors: false, - }, schValid); - cxt.mergeEvaluated(schCxt); - } - function validateClause(keyword, ifClause) { - return () => { - const schCxt = cxt.subschema({ keyword }, schValid); - gen.assign(valid, schValid); - cxt.mergeValidEvaluated(schCxt, valid); - if (ifClause) - gen.assign(ifClause, (0, codegen_1._) `${keyword}`); - else - cxt.setParams({ ifClause: keyword }); - }; - } - }, - }; - function hasSchema(it, keyword) { - const schema = it.schema[keyword]; - return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema); - } - _if$1.default = def; - return _if$1; -} - -var thenElse = {}; - -var hasRequiredThenElse; - -function requireThenElse () { - if (hasRequiredThenElse) return thenElse; - hasRequiredThenElse = 1; - Object.defineProperty(thenElse, "__esModule", { value: true }); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const def = { - keyword: ["then", "else"], - schemaType: ["object", "boolean"], - code({ keyword, parentSchema, it }) { - if (parentSchema.if === undefined) - (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); - }, - }; - thenElse.default = def; - return thenElse; -} - -var hasRequiredApplicator; - -function requireApplicator () { - if (hasRequiredApplicator) return applicator; - hasRequiredApplicator = 1; - Object.defineProperty(applicator, "__esModule", { value: true }); - const additionalItems_1 = /*@__PURE__*/ requireAdditionalItems(); - const prefixItems_1 = /*@__PURE__*/ requirePrefixItems(); - const items_1 = /*@__PURE__*/ requireItems$1(); - const items2020_1 = /*@__PURE__*/ requireItems2020(); - const contains_1 = /*@__PURE__*/ requireContains$1(); - const dependencies_1 = /*@__PURE__*/ requireDependencies$1(); - const propertyNames_1 = /*@__PURE__*/ requirePropertyNames$1(); - const additionalProperties_1 = /*@__PURE__*/ requireAdditionalProperties(); - const properties_1 = /*@__PURE__*/ requireProperties$1(); - const patternProperties_1 = /*@__PURE__*/ requirePatternProperties(); - const not_1 = /*@__PURE__*/ requireNot$1(); - const anyOf_1 = /*@__PURE__*/ requireAnyOf$1(); - const oneOf_1 = /*@__PURE__*/ requireOneOf$1(); - const allOf_1 = /*@__PURE__*/ requireAllOf$1(); - const if_1 = /*@__PURE__*/ require_if$1(); - const thenElse_1 = /*@__PURE__*/ requireThenElse(); - function getApplicator(draft2020 = false) { - const applicator = [ - not_1.default, - anyOf_1.default, - oneOf_1.default, - allOf_1.default, - if_1.default, - thenElse_1.default, - propertyNames_1.default, - additionalProperties_1.default, - dependencies_1.default, - properties_1.default, - patternProperties_1.default, - ]; - if (draft2020) - applicator.push(prefixItems_1.default, items2020_1.default); - else - applicator.push(additionalItems_1.default, items_1.default); - applicator.push(contains_1.default); - return applicator; - } - applicator.default = getApplicator; - return applicator; -} - -var format$3 = {}; - -var format$2 = {}; - -var hasRequiredFormat$2; - -function requireFormat$2 () { - if (hasRequiredFormat$2) return format$2; - hasRequiredFormat$2 = 1; - Object.defineProperty(format$2, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must match format "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`, - }; - const def = { - keyword: "format", - type: ["number", "string"], - schemaType: "string", - $data: true, - error, - code(cxt, ruleType) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - const { opts, errSchemaPath, schemaEnv, self } = it; - if (!opts.validateFormats) - return; - if ($data) - validate$DataFormat(); - else - validateFormat(); - function validate$DataFormat() { - const fmts = gen.scopeValue("formats", { - ref: self.formats, - code: opts.code.formats, - }); - const fDef = gen.const("fDef", (0, codegen_1._) `${fmts}[${schemaCode}]`); - const fType = gen.let("fType"); - const format = gen.let("format"); - gen.if((0, codegen_1._) `typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || "string"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `"string"`).assign(format, fDef)); - cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); - function unknownFmt() { - if (opts.strictSchema === false) - return codegen_1.nil; - return (0, codegen_1._) `${schemaCode} && !${format}`; - } - function invalidFmt() { - const callFormat = schemaEnv.$async - ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` - : (0, codegen_1._) `${format}(${data})`; - const validData = (0, codegen_1._) `(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; - return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; - } - } - function validateFormat() { - const formatDef = self.formats[schema]; - if (!formatDef) { - unknownFormat(); - return; - } - if (formatDef === true) - return; - const [fmtType, format, fmtRef] = getFormat(formatDef); - if (fmtType === ruleType) - cxt.pass(validCondition()); - function unknownFormat() { - if (opts.strictSchema === false) { - self.logger.warn(unknownMsg()); - return; - } - throw new Error(unknownMsg()); - function unknownMsg() { - return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`; - } - } - function getFormat(fmtDef) { - const code = fmtDef instanceof RegExp - ? (0, codegen_1.regexpCode)(fmtDef) - : opts.code.formats - ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` - : undefined; - const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code }); - if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { - return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`]; - } - return ["string", fmtDef, fmt]; - } - function validCondition() { - if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { - if (!schemaEnv.$async) - throw new Error("async format in sync schema"); - return (0, codegen_1._) `await ${fmtRef}(${data})`; - } - return typeof format == "function" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`; - } - } - }, - }; - format$2.default = def; - return format$2; -} - -var hasRequiredFormat$1; - -function requireFormat$1 () { - if (hasRequiredFormat$1) return format$3; - hasRequiredFormat$1 = 1; - Object.defineProperty(format$3, "__esModule", { value: true }); - const format_1 = /*@__PURE__*/ requireFormat$2(); - const format = [format_1.default]; - format$3.default = format; - return format$3; -} - -var metadata = {}; - -var hasRequiredMetadata; - -function requireMetadata () { - if (hasRequiredMetadata) return metadata; - hasRequiredMetadata = 1; - Object.defineProperty(metadata, "__esModule", { value: true }); - metadata.contentVocabulary = metadata.metadataVocabulary = void 0; - metadata.metadataVocabulary = [ - "title", - "description", - "default", - "deprecated", - "readOnly", - "writeOnly", - "examples", - ]; - metadata.contentVocabulary = [ - "contentMediaType", - "contentEncoding", - "contentSchema", - ]; - return metadata; -} - -var hasRequiredDraft7; - -function requireDraft7 () { - if (hasRequiredDraft7) return draft7; - hasRequiredDraft7 = 1; - Object.defineProperty(draft7, "__esModule", { value: true }); - const core_1 = /*@__PURE__*/ requireCore$1(); - const validation_1 = /*@__PURE__*/ requireValidation$1(); - const applicator_1 = /*@__PURE__*/ requireApplicator(); - const format_1 = /*@__PURE__*/ requireFormat$1(); - const metadata_1 = /*@__PURE__*/ requireMetadata(); - const draft7Vocabularies = [ - core_1.default, - validation_1.default, - (0, applicator_1.default)(), - format_1.default, - metadata_1.metadataVocabulary, - metadata_1.contentVocabulary, - ]; - draft7.default = draft7Vocabularies; - return draft7; -} - -var discriminator = {}; - -var types$6 = {}; - -var hasRequiredTypes$2; - -function requireTypes$2 () { - if (hasRequiredTypes$2) return types$6; - hasRequiredTypes$2 = 1; - Object.defineProperty(types$6, "__esModule", { value: true }); - types$6.DiscrError = void 0; - var DiscrError; - (function (DiscrError) { - DiscrError["Tag"] = "tag"; - DiscrError["Mapping"] = "mapping"; - })(DiscrError || (types$6.DiscrError = DiscrError = {})); - return types$6; -} - -var hasRequiredDiscriminator; - -function requireDiscriminator () { - if (hasRequiredDiscriminator) return discriminator; - hasRequiredDiscriminator = 1; - Object.defineProperty(discriminator, "__esModule", { value: true }); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const types_1 = /*@__PURE__*/ requireTypes$2(); - const compile_1 = /*@__PURE__*/ requireCompile$2(); - const ref_error_1 = /*@__PURE__*/ requireRef_error(); - const util_1 = /*@__PURE__*/ requireUtil$4(); - const error = { - message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag - ? `tag "${tagName}" must be string` - : `value of tag "${tagName}" must be in oneOf`, - params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, - }; - const def = { - keyword: "discriminator", - type: "object", - schemaType: "object", - error, - code(cxt) { - const { gen, data, schema, parentSchema, it } = cxt; - const { oneOf } = parentSchema; - if (!it.opts.discriminator) { - throw new Error("discriminator: requires discriminator option"); - } - const tagName = schema.propertyName; - if (typeof tagName != "string") - throw new Error("discriminator: requires propertyName"); - if (schema.mapping) - throw new Error("discriminator: mapping is not supported"); - if (!oneOf) - throw new Error("discriminator: requires oneOf keyword"); - const valid = gen.let("valid", false); - const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`); - gen.if((0, codegen_1._) `typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); - cxt.ok(valid); - function validateMapping() { - const mapping = getMapping(); - gen.if(false); - for (const tagValue in mapping) { - gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`); - gen.assign(valid, applyTagSchema(mapping[tagValue])); - } - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); - gen.endIf(); - } - function applyTagSchema(schemaProp) { - const _valid = gen.name("valid"); - const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); - cxt.mergeEvaluated(schCxt, codegen_1.Name); - return _valid; - } - function getMapping() { - var _a; - const oneOfMapping = {}; - const topRequired = hasRequired(parentSchema); - let tagRequired = true; - for (let i = 0; i < oneOf.length; i++) { - let sch = oneOf[i]; - if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { - const ref = sch.$ref; - sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref); - if (sch instanceof compile_1.SchemaEnv) - sch = sch.schema; - if (sch === undefined) - throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref); - } - const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; - if (typeof propSch != "object") { - throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); - } - tagRequired = tagRequired && (topRequired || hasRequired(sch)); - addMappings(propSch, i); - } - if (!tagRequired) - throw new Error(`discriminator: "${tagName}" must be required`); - return oneOfMapping; - function hasRequired({ required }) { - return Array.isArray(required) && required.includes(tagName); - } - function addMappings(sch, i) { - if (sch.const) { - addMapping(sch.const, i); - } - else if (sch.enum) { - for (const tagValue of sch.enum) { - addMapping(tagValue, i); - } - } - else { - throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); - } - } - function addMapping(tagValue, i) { - if (typeof tagValue != "string" || tagValue in oneOfMapping) { - throw new Error(`discriminator: "${tagName}" values must be unique strings`); - } - oneOfMapping[tagValue] = i; - } - } - }, - }; - discriminator.default = def; - return discriminator; -} - -var $schema$2 = "http://json-schema.org/draft-07/schema#"; -var $id$2 = "http://json-schema.org/draft-07/schema#"; -var title$1 = "Core schema meta-schema"; -var definitions$1 = { - schemaArray: { - type: "array", - minItems: 1, - items: { - $ref: "#" - } - }, - nonNegativeInteger: { - type: "integer", - minimum: 0 - }, - nonNegativeIntegerDefault0: { - allOf: [ - { - $ref: "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - simpleTypes: { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - stringArray: { - type: "array", - items: { - type: "string" - }, - uniqueItems: true, - "default": [ - ] - } -}; -var type$2 = [ - "object", - "boolean" -]; -var properties$3 = { - $id: { - type: "string", - format: "uri-reference" - }, - $schema: { - type: "string", - format: "uri" - }, - $ref: { - type: "string", - format: "uri-reference" - }, - $comment: { - type: "string" - }, - title: { - type: "string" - }, - description: { - type: "string" - }, - "default": true, - readOnly: { - type: "boolean", - "default": false - }, - examples: { - type: "array", - items: true - }, - multipleOf: { - type: "number", - exclusiveMinimum: 0 - }, - maximum: { - type: "number" - }, - exclusiveMaximum: { - type: "number" - }, - minimum: { - type: "number" - }, - exclusiveMinimum: { - type: "number" - }, - maxLength: { - $ref: "#/definitions/nonNegativeInteger" - }, - minLength: { - $ref: "#/definitions/nonNegativeIntegerDefault0" - }, - pattern: { - type: "string", - format: "regex" - }, - additionalItems: { - $ref: "#" - }, - items: { - anyOf: [ - { - $ref: "#" - }, - { - $ref: "#/definitions/schemaArray" - } - ], - "default": true - }, - maxItems: { - $ref: "#/definitions/nonNegativeInteger" - }, - minItems: { - $ref: "#/definitions/nonNegativeIntegerDefault0" - }, - uniqueItems: { - type: "boolean", - "default": false - }, - contains: { - $ref: "#" - }, - maxProperties: { - $ref: "#/definitions/nonNegativeInteger" - }, - minProperties: { - $ref: "#/definitions/nonNegativeIntegerDefault0" - }, - required: { - $ref: "#/definitions/stringArray" - }, - additionalProperties: { - $ref: "#" - }, - definitions: { - type: "object", - additionalProperties: { - $ref: "#" - }, - "default": { - } - }, - properties: { - type: "object", - additionalProperties: { - $ref: "#" - }, - "default": { - } - }, - patternProperties: { - type: "object", - additionalProperties: { - $ref: "#" - }, - propertyNames: { - format: "regex" - }, - "default": { - } - }, - dependencies: { - type: "object", - additionalProperties: { - anyOf: [ - { - $ref: "#" - }, - { - $ref: "#/definitions/stringArray" - } - ] - } - }, - propertyNames: { - $ref: "#" - }, - "const": true, - "enum": { - type: "array", - items: true, - minItems: 1, - uniqueItems: true - }, - type: { - anyOf: [ - { - $ref: "#/definitions/simpleTypes" - }, - { - type: "array", - items: { - $ref: "#/definitions/simpleTypes" - }, - minItems: 1, - uniqueItems: true - } - ] - }, - format: { - type: "string" - }, - contentMediaType: { - type: "string" - }, - contentEncoding: { - type: "string" - }, - "if": { - $ref: "#" - }, - then: { - $ref: "#" - }, - "else": { - $ref: "#" - }, - allOf: { - $ref: "#/definitions/schemaArray" - }, - anyOf: { - $ref: "#/definitions/schemaArray" - }, - oneOf: { - $ref: "#/definitions/schemaArray" - }, - not: { - $ref: "#" - } -}; -var require$$3$1 = { - $schema: $schema$2, - $id: $id$2, - title: title$1, - definitions: definitions$1, - type: type$2, - properties: properties$3, - "default": true -}; - -var hasRequiredAjv$1; - -function requireAjv$1 () { - if (hasRequiredAjv$1) return ajv$2.exports; - hasRequiredAjv$1 = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv = void 0; - const core_1 = /*@__PURE__*/ requireCore$2(); - const draft7_1 = /*@__PURE__*/ requireDraft7(); - const discriminator_1 = /*@__PURE__*/ requireDiscriminator(); - const draft7MetaSchema = require$$3$1; - const META_SUPPORT_DATA = ["/properties"]; - const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; - class Ajv extends core_1.default { - _addVocabularies() { - super._addVocabularies(); - draft7_1.default.forEach((v) => this.addVocabulary(v)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - if (!this.opts.meta) - return; - const metaSchema = this.opts.$data - ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) - : draft7MetaSchema; - this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } - } - exports$1.Ajv = Ajv; - module.exports = exports$1 = Ajv; - module.exports.Ajv = Ajv; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.default = Ajv; - var validate_1 = /*@__PURE__*/ requireValidate$1(); - Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); - var codegen_1 = /*@__PURE__*/ requireCodegen(); - Object.defineProperty(exports$1, "_", { enumerable: true, get: function () { return codegen_1._; } }); - Object.defineProperty(exports$1, "str", { enumerable: true, get: function () { return codegen_1.str; } }); - Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); - Object.defineProperty(exports$1, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); - Object.defineProperty(exports$1, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); - Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); - var validation_error_1 = /*@__PURE__*/ requireValidation_error(); - Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } }); - var ref_error_1 = /*@__PURE__*/ requireRef_error(); - Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } }); - } (ajv$2, ajv$2.exports)); - return ajv$2.exports; -} - -var hasRequiredLimit; - -function requireLimit () { - if (hasRequiredLimit) return limit; - hasRequiredLimit = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.formatLimitDefinition = void 0; - const ajv_1 = /*@__PURE__*/ requireAjv$1(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const ops = codegen_1.operators; - const KWDs = { - formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, - formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }, - }; - const error = { - message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`, - params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, - }; - exports$1.formatLimitDefinition = { - keyword: Object.keys(KWDs), - type: "string", - schemaType: "string", - $data: true, - error, - code(cxt) { - const { gen, data, schemaCode, keyword, it } = cxt; - const { opts, self } = it; - if (!opts.validateFormats) - return; - const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, "format"); - if (fCxt.$data) - validate$DataFormat(); - else - validateFormat(); - function validate$DataFormat() { - const fmts = gen.scopeValue("formats", { - ref: self.formats, - code: opts.code.formats, - }); - const fmt = gen.const("fmt", (0, codegen_1._) `${fmts}[${fCxt.schemaCode}]`); - cxt.fail$data((0, codegen_1.or)((0, codegen_1._) `typeof ${fmt} != "object"`, (0, codegen_1._) `${fmt} instanceof RegExp`, (0, codegen_1._) `typeof ${fmt}.compare != "function"`, compareCode(fmt))); - } - function validateFormat() { - const format = fCxt.schema; - const fmtDef = self.formats[format]; - if (!fmtDef || fmtDef === true) - return; - if (typeof fmtDef != "object" || - fmtDef instanceof RegExp || - typeof fmtDef.compare != "function") { - throw new Error(`"${keyword}": format "${format}" does not define "compare" function`); - } - const fmt = gen.scopeValue("formats", { - key: format, - ref: fmtDef, - code: opts.code.formats ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : undefined, - }); - cxt.fail$data(compareCode(fmt)); - } - function compareCode(fmt) { - return (0, codegen_1._) `${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; - } - }, - dependencies: ["format"], - }; - const formatLimitPlugin = (ajv) => { - ajv.addKeyword(exports$1.formatLimitDefinition); - return ajv; - }; - exports$1.default = formatLimitPlugin; - } (limit)); - return limit; -} - -var hasRequiredDist$c; - -function requireDist$c () { - if (hasRequiredDist$c) return dist$c.exports; - hasRequiredDist$c = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - const formats_1 = requireFormats$1(); - const limit_1 = requireLimit(); - const codegen_1 = /*@__PURE__*/ requireCodegen(); - const fullName = new codegen_1.Name("fullFormats"); - const fastName = new codegen_1.Name("fastFormats"); - const formatsPlugin = (ajv, opts = { keywords: true }) => { - if (Array.isArray(opts)) { - addFormats(ajv, opts, formats_1.fullFormats, fullName); - return ajv; - } - const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; - const list = opts.formats || formats_1.formatNames; - addFormats(ajv, list, formats, exportName); - if (opts.keywords) - (0, limit_1.default)(ajv); - return ajv; - }; - formatsPlugin.get = (name, mode = "full") => { - const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats; - const f = formats[name]; - if (!f) - throw new Error(`Unknown format "${name}"`); - return f; - }; - function addFormats(ajv, list, fs, exportName) { - var _a; - var _b; - (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : (_b.formats = (0, codegen_1._) `require("ajv-formats/dist/formats").${exportName}`); - for (const f of list) - ajv.addFormat(f, fs[f]); - } - module.exports = exports$1 = formatsPlugin; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.default = formatsPlugin; - } (dist$c, dist$c.exports)); - return dist$c.exports; -} - -var distExports$1 = requireDist$c(); -var _addFormats = /*@__PURE__*/getDefaultExportFromCjs(distExports$1); - -function createDefaultAjvInstance() { - const ajv = new Ajv({ - strict: false, - validateFormats: true, - validateSchema: false, - allErrors: true - }); - const addFormats = _addFormats; - addFormats(ajv); - return ajv; -} -class AjvJsonSchemaValidator { - constructor(ajv) { - this._ajv = ajv ?? createDefaultAjvInstance(); - } - getValidator(schema) { - const ajvValidator = '$id' in schema && typeof schema.$id === 'string' - ? (this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema)) - : this._ajv.compile(schema); - return (input) => { - const valid = ajvValidator(input); - if (valid) { - return { - valid: true, - data: input, - errorMessage: undefined - }; - } - else { - return { - valid: false, - data: undefined, - errorMessage: this._ajv.errorsText(ajvValidator.errors) - }; - } - }; - } -} - -class ExperimentalServerTasks { - constructor(_server) { - this._server = _server; - } - requestStream(request, resultSchema, options) { - return this._server.requestStream(request, resultSchema, options); - } - createMessageStream(params, options) { - const clientCapabilities = this._server.getClientCapabilities(); - if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) { - throw new Error('Client does not support sampling tools capability.'); - } - if (params.messages.length > 0) { - const lastMessage = params.messages[params.messages.length - 1]; - const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content]; - const hasToolResults = lastContent.some(c => c.type === 'tool_result'); - const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined; - const previousContent = previousMessage - ? Array.isArray(previousMessage.content) - ? previousMessage.content - : [previousMessage.content] - : []; - const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use'); - if (hasToolResults) { - if (lastContent.some(c => c.type !== 'tool_result')) { - throw new Error('The last message must contain only tool_result content if any is present'); - } - if (!hasPreviousToolUse) { - throw new Error('tool_result blocks are not matching any tool_use from the previous message'); - } - } - if (hasPreviousToolUse) { - const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id)); - const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId)); - if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) { - throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match'); - } - } - } - return this.requestStream({ - method: 'sampling/createMessage', - params - }, CreateMessageResultSchema, options); - } - elicitInputStream(params, options) { - const clientCapabilities = this._server.getClientCapabilities(); - const mode = params.mode ?? 'form'; - switch (mode) { - case 'url': { - if (!clientCapabilities?.elicitation?.url) { - throw new Error('Client does not support url elicitation.'); - } - break; - } - case 'form': { - if (!clientCapabilities?.elicitation?.form) { - throw new Error('Client does not support form elicitation.'); - } - break; - } - } - const normalizedParams = mode === 'form' && params.mode === undefined ? { ...params, mode: 'form' } : params; - return this.requestStream({ - method: 'elicitation/create', - params: normalizedParams - }, ElicitResultSchema, options); - } - async getTask(taskId, options) { - return this._server.getTask({ taskId }, options); - } - async getTaskResult(taskId, resultSchema, options) { - return this._server.getTaskResult({ taskId }, resultSchema, options); - } - async listTasks(cursor, options) { - return this._server.listTasks(cursor ? { cursor } : undefined, options); - } - async cancelTask(taskId, options) { - return this._server.cancelTask({ taskId }, options); - } -} - -function assertToolsCallTaskCapability(requests, method, entityName) { - if (!requests) { - throw new Error(`${entityName} does not support task creation (required for ${method})`); - } - switch (method) { - case 'tools/call': - if (!requests.tools?.call) { - throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`); - } - break; - } -} -function assertClientRequestTaskCapability(requests, method, entityName) { - if (!requests) { - throw new Error(`${entityName} does not support task creation (required for ${method})`); - } - switch (method) { - case 'sampling/createMessage': - if (!requests.sampling?.createMessage) { - throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`); - } - break; - case 'elicitation/create': - if (!requests.elicitation?.create) { - throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`); - } - break; - } -} - -class Server extends Protocol { - constructor(_serverInfo, options) { - super(options); - this._serverInfo = _serverInfo; - this._loggingLevels = new Map(); - this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index) => [level, index])); - this.isMessageIgnored = (level, sessionId) => { - const currentLevel = this._loggingLevels.get(sessionId); - return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false; - }; - this._capabilities = options?.capabilities ?? {}; - this._instructions = options?.instructions; - this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator(); - this.setRequestHandler(InitializeRequestSchema, request => this._oninitialize(request)); - this.setNotificationHandler(InitializedNotificationSchema, () => this.oninitialized?.()); - if (this._capabilities.logging) { - this.setRequestHandler(SetLevelRequestSchema, async (request, extra) => { - const transportSessionId = extra.sessionId || extra.requestInfo?.headers['mcp-session-id'] || undefined; - const { level } = request.params; - const parseResult = LoggingLevelSchema.safeParse(level); - if (parseResult.success) { - this._loggingLevels.set(transportSessionId, parseResult.data); - } - return {}; - }); - } - } - get experimental() { - if (!this._experimental) { - this._experimental = { - tasks: new ExperimentalServerTasks(this) - }; - } - return this._experimental; - } - registerCapabilities(capabilities) { - if (this.transport) { - throw new Error('Cannot register capabilities after connecting to transport'); - } - this._capabilities = mergeCapabilities(this._capabilities, capabilities); - } - setRequestHandler(requestSchema, handler) { - const shape = getObjectShape(requestSchema); - const methodSchema = shape?.method; - if (!methodSchema) { - throw new Error('Schema is missing a method literal'); - } - let methodValue; - if (isZ4Schema(methodSchema)) { - const v4Schema = methodSchema; - const v4Def = v4Schema._zod?.def; - methodValue = v4Def?.value ?? v4Schema.value; - } - else { - const v3Schema = methodSchema; - const legacyDef = v3Schema._def; - methodValue = legacyDef?.value ?? v3Schema.value; - } - if (typeof methodValue !== 'string') { - throw new Error('Schema method literal must be a string'); - } - const method = methodValue; - if (method === 'tools/call') { - const wrappedHandler = async (request, extra) => { - const validatedRequest = safeParse$1(CallToolRequestSchema, request); - if (!validatedRequest.success) { - const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid tools/call request: ${errorMessage}`); - } - const { params } = validatedRequest.data; - const result = await Promise.resolve(handler(request, extra)); - if (params.task) { - const taskValidationResult = safeParse$1(CreateTaskResultSchema, result); - if (!taskValidationResult.success) { - const errorMessage = taskValidationResult.error instanceof Error - ? taskValidationResult.error.message - : String(taskValidationResult.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`); - } - return taskValidationResult.data; - } - const validationResult = safeParse$1(CallToolResultSchema, result); - if (!validationResult.success) { - const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid tools/call result: ${errorMessage}`); - } - return validationResult.data; - }; - return super.setRequestHandler(requestSchema, wrappedHandler); - } - return super.setRequestHandler(requestSchema, handler); - } - assertCapabilityForMethod(method) { - switch (method) { - case 'sampling/createMessage': - if (!this._clientCapabilities?.sampling) { - throw new Error(`Client does not support sampling (required for ${method})`); - } - break; - case 'elicitation/create': - if (!this._clientCapabilities?.elicitation) { - throw new Error(`Client does not support elicitation (required for ${method})`); - } - break; - case 'roots/list': - if (!this._clientCapabilities?.roots) { - throw new Error(`Client does not support listing roots (required for ${method})`); - } - break; - } - } - assertNotificationCapability(method) { - switch (method) { - case 'notifications/message': - if (!this._capabilities.logging) { - throw new Error(`Server does not support logging (required for ${method})`); - } - break; - case 'notifications/resources/updated': - case 'notifications/resources/list_changed': - if (!this._capabilities.resources) { - throw new Error(`Server does not support notifying about resources (required for ${method})`); - } - break; - case 'notifications/tools/list_changed': - if (!this._capabilities.tools) { - throw new Error(`Server does not support notifying of tool list changes (required for ${method})`); - } - break; - case 'notifications/prompts/list_changed': - if (!this._capabilities.prompts) { - throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`); - } - break; - case 'notifications/elicitation/complete': - if (!this._clientCapabilities?.elicitation?.url) { - throw new Error(`Client does not support URL elicitation (required for ${method})`); - } - break; - } - } - assertRequestHandlerCapability(method) { - if (!this._capabilities) { - return; - } - switch (method) { - case 'completion/complete': - if (!this._capabilities.completions) { - throw new Error(`Server does not support completions (required for ${method})`); - } - break; - case 'logging/setLevel': - if (!this._capabilities.logging) { - throw new Error(`Server does not support logging (required for ${method})`); - } - break; - case 'prompts/get': - case 'prompts/list': - if (!this._capabilities.prompts) { - throw new Error(`Server does not support prompts (required for ${method})`); - } - break; - case 'resources/list': - case 'resources/templates/list': - case 'resources/read': - if (!this._capabilities.resources) { - throw new Error(`Server does not support resources (required for ${method})`); - } - break; - case 'tools/call': - case 'tools/list': - if (!this._capabilities.tools) { - throw new Error(`Server does not support tools (required for ${method})`); - } - break; - case 'tasks/get': - case 'tasks/list': - case 'tasks/result': - case 'tasks/cancel': - if (!this._capabilities.tasks) { - throw new Error(`Server does not support tasks capability (required for ${method})`); - } - break; - } - } - assertTaskCapability(method) { - assertClientRequestTaskCapability(this._clientCapabilities?.tasks?.requests, method, 'Client'); - } - assertTaskHandlerCapability(method) { - if (!this._capabilities) { - return; - } - assertToolsCallTaskCapability(this._capabilities.tasks?.requests, method, 'Server'); - } - async _oninitialize(request) { - const requestedVersion = request.params.protocolVersion; - this._clientCapabilities = request.params.capabilities; - this._clientVersion = request.params.clientInfo; - const protocolVersion = SUPPORTED_PROTOCOL_VERSIONS.includes(requestedVersion) ? requestedVersion : LATEST_PROTOCOL_VERSION; - return { - protocolVersion, - capabilities: this.getCapabilities(), - serverInfo: this._serverInfo, - ...(this._instructions && { instructions: this._instructions }) - }; - } - getClientCapabilities() { - return this._clientCapabilities; - } - getClientVersion() { - return this._clientVersion; - } - getCapabilities() { - return this._capabilities; - } - async ping() { - return this.request({ method: 'ping' }, EmptyResultSchema); - } - async createMessage(params, options) { - if (params.tools || params.toolChoice) { - if (!this._clientCapabilities?.sampling?.tools) { - throw new Error('Client does not support sampling tools capability.'); - } - } - if (params.messages.length > 0) { - const lastMessage = params.messages[params.messages.length - 1]; - const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content]; - const hasToolResults = lastContent.some(c => c.type === 'tool_result'); - const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined; - const previousContent = previousMessage - ? Array.isArray(previousMessage.content) - ? previousMessage.content - : [previousMessage.content] - : []; - const hasPreviousToolUse = previousContent.some(c => c.type === 'tool_use'); - if (hasToolResults) { - if (lastContent.some(c => c.type !== 'tool_result')) { - throw new Error('The last message must contain only tool_result content if any is present'); - } - if (!hasPreviousToolUse) { - throw new Error('tool_result blocks are not matching any tool_use from the previous message'); - } - } - if (hasPreviousToolUse) { - const toolUseIds = new Set(previousContent.filter(c => c.type === 'tool_use').map(c => c.id)); - const toolResultIds = new Set(lastContent.filter(c => c.type === 'tool_result').map(c => c.toolUseId)); - if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every(id => toolResultIds.has(id))) { - throw new Error('ids of tool_result blocks and tool_use blocks from previous message do not match'); - } - } - } - if (params.tools) { - return this.request({ method: 'sampling/createMessage', params }, CreateMessageResultWithToolsSchema, options); - } - return this.request({ method: 'sampling/createMessage', params }, CreateMessageResultSchema, options); - } - async elicitInput(params, options) { - const mode = (params.mode ?? 'form'); - switch (mode) { - case 'url': { - if (!this._clientCapabilities?.elicitation?.url) { - throw new Error('Client does not support url elicitation.'); - } - const urlParams = params; - return this.request({ method: 'elicitation/create', params: urlParams }, ElicitResultSchema, options); - } - case 'form': { - if (!this._clientCapabilities?.elicitation?.form) { - throw new Error('Client does not support form elicitation.'); - } - const formParams = params.mode === 'form' ? params : { ...params, mode: 'form' }; - const result = await this.request({ method: 'elicitation/create', params: formParams }, ElicitResultSchema, options); - if (result.action === 'accept' && result.content && formParams.requestedSchema) { - try { - const validator = this._jsonSchemaValidator.getValidator(formParams.requestedSchema); - const validationResult = validator(result.content); - if (!validationResult.valid) { - throw new McpError(ErrorCode$1.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`); - } - } - catch (error) { - if (error instanceof McpError) { - throw error; - } - throw new McpError(ErrorCode$1.InternalError, `Error validating elicitation response: ${error instanceof Error ? error.message : String(error)}`); - } - } - return result; - } - } - } - createElicitationCompletionNotifier(elicitationId, options) { - if (!this._clientCapabilities?.elicitation?.url) { - throw new Error('Client does not support URL elicitation (required for notifications/elicitation/complete)'); - } - return () => this.notification({ - method: 'notifications/elicitation/complete', - params: { - elicitationId - } - }, options); - } - async listRoots(params, options) { - return this.request({ method: 'roots/list', params }, ListRootsResultSchema, options); - } - async sendLoggingMessage(params, sessionId) { - if (this._capabilities.logging) { - if (!this.isMessageIgnored(params.level, sessionId)) { - return this.notification({ method: 'notifications/message', params }); - } - } - } - async sendResourceUpdated(params) { - return this.notification({ - method: 'notifications/resources/updated', - params - }); - } - async sendResourceListChanged() { - return this.notification({ - method: 'notifications/resources/list_changed' - }); - } - async sendToolListChanged() { - return this.notification({ method: 'notifications/tools/list_changed' }); - } - async sendPromptListChanged() { - return this.notification({ method: 'notifications/prompts/list_changed' }); - } -} - -const COMPLETABLE_SYMBOL = Symbol.for('mcp.completable'); -function isCompletable(schema) { - return !!schema && typeof schema === 'object' && COMPLETABLE_SYMBOL in schema; -} -function getCompleter(schema) { - const meta = schema[COMPLETABLE_SYMBOL]; - return meta?.complete; -} -var McpZodTypeKind; -(function (McpZodTypeKind) { - McpZodTypeKind["Completable"] = "McpCompletable"; -})(McpZodTypeKind || (McpZodTypeKind = {})); - -const TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/; -function validateToolName(name) { - const warnings = []; - if (name.length === 0) { - return { - isValid: false, - warnings: ['Tool name cannot be empty'] - }; - } - if (name.length > 128) { - return { - isValid: false, - warnings: [`Tool name exceeds maximum length of 128 characters (current: ${name.length})`] - }; - } - if (name.includes(' ')) { - warnings.push('Tool name contains spaces, which may cause parsing issues'); - } - if (name.includes(',')) { - warnings.push('Tool name contains commas, which may cause parsing issues'); - } - if (name.startsWith('-') || name.endsWith('-')) { - warnings.push('Tool name starts or ends with a dash, which may cause parsing issues in some contexts'); - } - if (name.startsWith('.') || name.endsWith('.')) { - warnings.push('Tool name starts or ends with a dot, which may cause parsing issues in some contexts'); - } - if (!TOOL_NAME_REGEX.test(name)) { - const invalidChars = name - .split('') - .filter(char => !/[A-Za-z0-9._-]/.test(char)) - .filter((char, index, arr) => arr.indexOf(char) === index); - warnings.push(`Tool name contains invalid characters: ${invalidChars.map(c => `"${c}"`).join(', ')}`, 'Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)'); - return { - isValid: false, - warnings - }; - } - return { - isValid: true, - warnings - }; -} -function issueToolNameWarning(name, warnings) { - if (warnings.length > 0) { - console.warn(`Tool name validation warning for "${name}":`); - for (const warning of warnings) { - console.warn(` - ${warning}`); - } - console.warn('Tool registration will proceed, but this may cause compatibility issues.'); - console.warn('Consider updating the tool name to conform to the MCP tool naming standard.'); - console.warn('See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.'); - } -} -function validateAndWarnToolName(name) { - const result = validateToolName(name); - issueToolNameWarning(name, result.warnings); - return result.isValid; -} - -class ExperimentalMcpServerTasks { - constructor(_mcpServer) { - this._mcpServer = _mcpServer; - } - registerToolTask(name, config, handler) { - const execution = { taskSupport: 'required', ...config.execution }; - if (execution.taskSupport === 'forbidden') { - throw new Error(`Cannot register task-based tool '${name}' with taskSupport 'forbidden'. Use registerTool() instead.`); - } - const mcpServerInternal = this._mcpServer; - return mcpServerInternal._createRegisteredTool(name, config.title, config.description, config.inputSchema, config.outputSchema, config.annotations, execution, config._meta, handler); - } -} - -class McpServer { - constructor(serverInfo, options) { - this._registeredResources = {}; - this._registeredResourceTemplates = {}; - this._registeredTools = {}; - this._registeredPrompts = {}; - this._toolHandlersInitialized = false; - this._completionHandlerInitialized = false; - this._resourceHandlersInitialized = false; - this._promptHandlersInitialized = false; - this.server = new Server(serverInfo, options); - } - get experimental() { - if (!this._experimental) { - this._experimental = { - tasks: new ExperimentalMcpServerTasks(this) - }; - } - return this._experimental; - } - async connect(transport) { - return await this.server.connect(transport); - } - async close() { - await this.server.close(); - } - setToolRequestHandlers() { - if (this._toolHandlersInitialized) { - return; - } - this.server.assertCanSetRequestHandler(getMethodValue(ListToolsRequestSchema)); - this.server.assertCanSetRequestHandler(getMethodValue(CallToolRequestSchema)); - this.server.registerCapabilities({ - tools: { - listChanged: true - } - }); - this.server.setRequestHandler(ListToolsRequestSchema, () => ({ - tools: Object.entries(this._registeredTools) - .filter(([, tool]) => tool.enabled) - .map(([name, tool]) => { - const toolDefinition = { - name, - title: tool.title, - description: tool.description, - inputSchema: (() => { - const obj = normalizeObjectSchema(tool.inputSchema); - return obj - ? toJsonSchemaCompat(obj, { - strictUnions: true, - pipeStrategy: 'input' - }) - : EMPTY_OBJECT_JSON_SCHEMA; - })(), - annotations: tool.annotations, - execution: tool.execution, - _meta: tool._meta - }; - if (tool.outputSchema) { - const obj = normalizeObjectSchema(tool.outputSchema); - if (obj) { - toolDefinition.outputSchema = toJsonSchemaCompat(obj, { - strictUnions: true, - pipeStrategy: 'output' - }); - } - } - return toolDefinition; - }) - })); - this.server.setRequestHandler(CallToolRequestSchema, async (request, extra) => { - try { - const tool = this._registeredTools[request.params.name]; - if (!tool) { - throw new McpError(ErrorCode$1.InvalidParams, `Tool ${request.params.name} not found`); - } - if (!tool.enabled) { - throw new McpError(ErrorCode$1.InvalidParams, `Tool ${request.params.name} disabled`); - } - const isTaskRequest = !!request.params.task; - const taskSupport = tool.execution?.taskSupport; - const isTaskHandler = 'createTask' in tool.handler; - if ((taskSupport === 'required' || taskSupport === 'optional') && !isTaskHandler) { - throw new McpError(ErrorCode$1.InternalError, `Tool ${request.params.name} has taskSupport '${taskSupport}' but was not registered with registerToolTask`); - } - if (taskSupport === 'required' && !isTaskRequest) { - throw new McpError(ErrorCode$1.MethodNotFound, `Tool ${request.params.name} requires task augmentation (taskSupport: 'required')`); - } - if (taskSupport === 'optional' && !isTaskRequest && isTaskHandler) { - return await this.handleAutomaticTaskPolling(tool, request, extra); - } - const args = await this.validateToolInput(tool, request.params.arguments, request.params.name); - const result = await this.executeToolHandler(tool, args, extra); - if (isTaskRequest) { - return result; - } - await this.validateToolOutput(tool, result, request.params.name); - return result; - } - catch (error) { - if (error instanceof McpError) { - if (error.code === ErrorCode$1.UrlElicitationRequired) { - throw error; - } - } - return this.createToolError(error instanceof Error ? error.message : String(error)); - } - }); - this._toolHandlersInitialized = true; - } - createToolError(errorMessage) { - return { - content: [ - { - type: 'text', - text: errorMessage - } - ], - isError: true - }; - } - async validateToolInput(tool, args, toolName) { - if (!tool.inputSchema) { - return undefined; - } - const inputObj = normalizeObjectSchema(tool.inputSchema); - const schemaToParse = inputObj ?? tool.inputSchema; - const parseResult = await safeParseAsync$1(schemaToParse, args); - if (!parseResult.success) { - const error = 'error' in parseResult ? parseResult.error : 'Unknown error'; - const errorMessage = getParseErrorMessage(error); - throw new McpError(ErrorCode$1.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${errorMessage}`); - } - return parseResult.data; - } - async validateToolOutput(tool, result, toolName) { - if (!tool.outputSchema) { - return; - } - if (!('content' in result)) { - return; - } - if (result.isError) { - return; - } - if (!result.structuredContent) { - throw new McpError(ErrorCode$1.InvalidParams, `Output validation error: Tool ${toolName} has an output schema but no structured content was provided`); - } - const outputObj = normalizeObjectSchema(tool.outputSchema); - const parseResult = await safeParseAsync$1(outputObj, result.structuredContent); - if (!parseResult.success) { - const error = 'error' in parseResult ? parseResult.error : 'Unknown error'; - const errorMessage = getParseErrorMessage(error); - throw new McpError(ErrorCode$1.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`); - } - } - async executeToolHandler(tool, args, extra) { - const handler = tool.handler; - const isTaskHandler = 'createTask' in handler; - if (isTaskHandler) { - if (!extra.taskStore) { - throw new Error('No task store provided.'); - } - const taskExtra = { ...extra, taskStore: extra.taskStore }; - if (tool.inputSchema) { - const typedHandler = handler; - return await Promise.resolve(typedHandler.createTask(args, taskExtra)); - } - else { - const typedHandler = handler; - return await Promise.resolve(typedHandler.createTask(taskExtra)); - } - } - if (tool.inputSchema) { - const typedHandler = handler; - return await Promise.resolve(typedHandler(args, extra)); - } - else { - const typedHandler = handler; - return await Promise.resolve(typedHandler(extra)); - } - } - async handleAutomaticTaskPolling(tool, request, extra) { - if (!extra.taskStore) { - throw new Error('No task store provided for task-capable tool.'); - } - const args = await this.validateToolInput(tool, request.params.arguments, request.params.name); - const handler = tool.handler; - const taskExtra = { ...extra, taskStore: extra.taskStore }; - const createTaskResult = args - ? await Promise.resolve(handler.createTask(args, taskExtra)) - : - await Promise.resolve(handler.createTask(taskExtra)); - const taskId = createTaskResult.task.taskId; - let task = createTaskResult.task; - const pollInterval = task.pollInterval ?? 5000; - while (task.status !== 'completed' && task.status !== 'failed' && task.status !== 'cancelled') { - await new Promise(resolve => setTimeout(resolve, pollInterval)); - const updatedTask = await extra.taskStore.getTask(taskId); - if (!updatedTask) { - throw new McpError(ErrorCode$1.InternalError, `Task ${taskId} not found during polling`); - } - task = updatedTask; - } - return (await extra.taskStore.getTaskResult(taskId)); - } - setCompletionRequestHandler() { - if (this._completionHandlerInitialized) { - return; - } - this.server.assertCanSetRequestHandler(getMethodValue(CompleteRequestSchema)); - this.server.registerCapabilities({ - completions: {} - }); - this.server.setRequestHandler(CompleteRequestSchema, async (request) => { - switch (request.params.ref.type) { - case 'ref/prompt': - assertCompleteRequestPrompt(request); - return this.handlePromptCompletion(request, request.params.ref); - case 'ref/resource': - assertCompleteRequestResourceTemplate(request); - return this.handleResourceCompletion(request, request.params.ref); - default: - throw new McpError(ErrorCode$1.InvalidParams, `Invalid completion reference: ${request.params.ref}`); - } - }); - this._completionHandlerInitialized = true; - } - async handlePromptCompletion(request, ref) { - const prompt = this._registeredPrompts[ref.name]; - if (!prompt) { - throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${ref.name} not found`); - } - if (!prompt.enabled) { - throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${ref.name} disabled`); - } - if (!prompt.argsSchema) { - return EMPTY_COMPLETION_RESULT; - } - const promptShape = getObjectShape(prompt.argsSchema); - const field = promptShape?.[request.params.argument.name]; - if (!isCompletable(field)) { - return EMPTY_COMPLETION_RESULT; - } - const completer = getCompleter(field); - if (!completer) { - return EMPTY_COMPLETION_RESULT; - } - const suggestions = await completer(request.params.argument.value, request.params.context); - return createCompletionResult(suggestions); - } - async handleResourceCompletion(request, ref) { - const template = Object.values(this._registeredResourceTemplates).find(t => t.resourceTemplate.uriTemplate.toString() === ref.uri); - if (!template) { - if (this._registeredResources[ref.uri]) { - return EMPTY_COMPLETION_RESULT; - } - throw new McpError(ErrorCode$1.InvalidParams, `Resource template ${request.params.ref.uri} not found`); - } - const completer = template.resourceTemplate.completeCallback(request.params.argument.name); - if (!completer) { - return EMPTY_COMPLETION_RESULT; - } - const suggestions = await completer(request.params.argument.value, request.params.context); - return createCompletionResult(suggestions); - } - setResourceRequestHandlers() { - if (this._resourceHandlersInitialized) { - return; - } - this.server.assertCanSetRequestHandler(getMethodValue(ListResourcesRequestSchema)); - this.server.assertCanSetRequestHandler(getMethodValue(ListResourceTemplatesRequestSchema)); - this.server.assertCanSetRequestHandler(getMethodValue(ReadResourceRequestSchema)); - this.server.registerCapabilities({ - resources: { - listChanged: true - } - }); - this.server.setRequestHandler(ListResourcesRequestSchema, async (request, extra) => { - const resources = Object.entries(this._registeredResources) - .filter(([_, resource]) => resource.enabled) - .map(([uri, resource]) => ({ - uri, - name: resource.name, - ...resource.metadata - })); - const templateResources = []; - for (const template of Object.values(this._registeredResourceTemplates)) { - if (!template.resourceTemplate.listCallback) { - continue; - } - const result = await template.resourceTemplate.listCallback(extra); - for (const resource of result.resources) { - templateResources.push({ - ...template.metadata, - ...resource - }); - } - } - return { resources: [...resources, ...templateResources] }; - }); - this.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => { - const resourceTemplates = Object.entries(this._registeredResourceTemplates).map(([name, template]) => ({ - name, - uriTemplate: template.resourceTemplate.uriTemplate.toString(), - ...template.metadata - })); - return { resourceTemplates }; - }); - this.server.setRequestHandler(ReadResourceRequestSchema, async (request, extra) => { - const uri = new URL(request.params.uri); - const resource = this._registeredResources[uri.toString()]; - if (resource) { - if (!resource.enabled) { - throw new McpError(ErrorCode$1.InvalidParams, `Resource ${uri} disabled`); - } - return resource.readCallback(uri, extra); - } - for (const template of Object.values(this._registeredResourceTemplates)) { - const variables = template.resourceTemplate.uriTemplate.match(uri.toString()); - if (variables) { - return template.readCallback(uri, variables, extra); - } - } - throw new McpError(ErrorCode$1.InvalidParams, `Resource ${uri} not found`); - }); - this._resourceHandlersInitialized = true; - } - setPromptRequestHandlers() { - if (this._promptHandlersInitialized) { - return; - } - this.server.assertCanSetRequestHandler(getMethodValue(ListPromptsRequestSchema)); - this.server.assertCanSetRequestHandler(getMethodValue(GetPromptRequestSchema)); - this.server.registerCapabilities({ - prompts: { - listChanged: true - } - }); - this.server.setRequestHandler(ListPromptsRequestSchema, () => ({ - prompts: Object.entries(this._registeredPrompts) - .filter(([, prompt]) => prompt.enabled) - .map(([name, prompt]) => { - return { - name, - title: prompt.title, - description: prompt.description, - arguments: prompt.argsSchema ? promptArgumentsFromSchema(prompt.argsSchema) : undefined - }; - }) - })); - this.server.setRequestHandler(GetPromptRequestSchema, async (request, extra) => { - const prompt = this._registeredPrompts[request.params.name]; - if (!prompt) { - throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${request.params.name} not found`); - } - if (!prompt.enabled) { - throw new McpError(ErrorCode$1.InvalidParams, `Prompt ${request.params.name} disabled`); - } - if (prompt.argsSchema) { - const argsObj = normalizeObjectSchema(prompt.argsSchema); - const parseResult = await safeParseAsync$1(argsObj, request.params.arguments); - if (!parseResult.success) { - const error = 'error' in parseResult ? parseResult.error : 'Unknown error'; - const errorMessage = getParseErrorMessage(error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid arguments for prompt ${request.params.name}: ${errorMessage}`); - } - const args = parseResult.data; - const cb = prompt.callback; - return await Promise.resolve(cb(args, extra)); - } - else { - const cb = prompt.callback; - return await Promise.resolve(cb(extra)); - } - }); - this._promptHandlersInitialized = true; - } - resource(name, uriOrTemplate, ...rest) { - let metadata; - if (typeof rest[0] === 'object') { - metadata = rest.shift(); - } - const readCallback = rest[0]; - if (typeof uriOrTemplate === 'string') { - if (this._registeredResources[uriOrTemplate]) { - throw new Error(`Resource ${uriOrTemplate} is already registered`); - } - const registeredResource = this._createRegisteredResource(name, undefined, uriOrTemplate, metadata, readCallback); - this.setResourceRequestHandlers(); - this.sendResourceListChanged(); - return registeredResource; - } - else { - if (this._registeredResourceTemplates[name]) { - throw new Error(`Resource template ${name} is already registered`); - } - const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, undefined, uriOrTemplate, metadata, readCallback); - this.setResourceRequestHandlers(); - this.sendResourceListChanged(); - return registeredResourceTemplate; - } - } - registerResource(name, uriOrTemplate, config, readCallback) { - if (typeof uriOrTemplate === 'string') { - if (this._registeredResources[uriOrTemplate]) { - throw new Error(`Resource ${uriOrTemplate} is already registered`); - } - const registeredResource = this._createRegisteredResource(name, config.title, uriOrTemplate, config, readCallback); - this.setResourceRequestHandlers(); - this.sendResourceListChanged(); - return registeredResource; - } - else { - if (this._registeredResourceTemplates[name]) { - throw new Error(`Resource template ${name} is already registered`); - } - const registeredResourceTemplate = this._createRegisteredResourceTemplate(name, config.title, uriOrTemplate, config, readCallback); - this.setResourceRequestHandlers(); - this.sendResourceListChanged(); - return registeredResourceTemplate; - } - } - _createRegisteredResource(name, title, uri, metadata, readCallback) { - const registeredResource = { - name, - title, - metadata, - readCallback, - enabled: true, - disable: () => registeredResource.update({ enabled: false }), - enable: () => registeredResource.update({ enabled: true }), - remove: () => registeredResource.update({ uri: null }), - update: updates => { - if (typeof updates.uri !== 'undefined' && updates.uri !== uri) { - delete this._registeredResources[uri]; - if (updates.uri) - this._registeredResources[updates.uri] = registeredResource; - } - if (typeof updates.name !== 'undefined') - registeredResource.name = updates.name; - if (typeof updates.title !== 'undefined') - registeredResource.title = updates.title; - if (typeof updates.metadata !== 'undefined') - registeredResource.metadata = updates.metadata; - if (typeof updates.callback !== 'undefined') - registeredResource.readCallback = updates.callback; - if (typeof updates.enabled !== 'undefined') - registeredResource.enabled = updates.enabled; - this.sendResourceListChanged(); - } - }; - this._registeredResources[uri] = registeredResource; - return registeredResource; - } - _createRegisteredResourceTemplate(name, title, template, metadata, readCallback) { - const registeredResourceTemplate = { - resourceTemplate: template, - title, - metadata, - readCallback, - enabled: true, - disable: () => registeredResourceTemplate.update({ enabled: false }), - enable: () => registeredResourceTemplate.update({ enabled: true }), - remove: () => registeredResourceTemplate.update({ name: null }), - update: updates => { - if (typeof updates.name !== 'undefined' && updates.name !== name) { - delete this._registeredResourceTemplates[name]; - if (updates.name) - this._registeredResourceTemplates[updates.name] = registeredResourceTemplate; - } - if (typeof updates.title !== 'undefined') - registeredResourceTemplate.title = updates.title; - if (typeof updates.template !== 'undefined') - registeredResourceTemplate.resourceTemplate = updates.template; - if (typeof updates.metadata !== 'undefined') - registeredResourceTemplate.metadata = updates.metadata; - if (typeof updates.callback !== 'undefined') - registeredResourceTemplate.readCallback = updates.callback; - if (typeof updates.enabled !== 'undefined') - registeredResourceTemplate.enabled = updates.enabled; - this.sendResourceListChanged(); - } - }; - this._registeredResourceTemplates[name] = registeredResourceTemplate; - const variableNames = template.uriTemplate.variableNames; - const hasCompleter = Array.isArray(variableNames) && variableNames.some(v => !!template.completeCallback(v)); - if (hasCompleter) { - this.setCompletionRequestHandler(); - } - return registeredResourceTemplate; - } - _createRegisteredPrompt(name, title, description, argsSchema, callback) { - const registeredPrompt = { - title, - description, - argsSchema: argsSchema === undefined ? undefined : objectFromShape(argsSchema), - callback, - enabled: true, - disable: () => registeredPrompt.update({ enabled: false }), - enable: () => registeredPrompt.update({ enabled: true }), - remove: () => registeredPrompt.update({ name: null }), - update: updates => { - if (typeof updates.name !== 'undefined' && updates.name !== name) { - delete this._registeredPrompts[name]; - if (updates.name) - this._registeredPrompts[updates.name] = registeredPrompt; - } - if (typeof updates.title !== 'undefined') - registeredPrompt.title = updates.title; - if (typeof updates.description !== 'undefined') - registeredPrompt.description = updates.description; - if (typeof updates.argsSchema !== 'undefined') - registeredPrompt.argsSchema = objectFromShape(updates.argsSchema); - if (typeof updates.callback !== 'undefined') - registeredPrompt.callback = updates.callback; - if (typeof updates.enabled !== 'undefined') - registeredPrompt.enabled = updates.enabled; - this.sendPromptListChanged(); - } - }; - this._registeredPrompts[name] = registeredPrompt; - if (argsSchema) { - const hasCompletable = Object.values(argsSchema).some(field => { - const inner = field instanceof ZodOptional$1 ? field._def?.innerType : field; - return isCompletable(inner); - }); - if (hasCompletable) { - this.setCompletionRequestHandler(); - } - } - return registeredPrompt; - } - _createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, execution, _meta, handler) { - validateAndWarnToolName(name); - const registeredTool = { - title, - description, - inputSchema: getZodSchemaObject(inputSchema), - outputSchema: getZodSchemaObject(outputSchema), - annotations, - execution, - _meta, - handler: handler, - enabled: true, - disable: () => registeredTool.update({ enabled: false }), - enable: () => registeredTool.update({ enabled: true }), - remove: () => registeredTool.update({ name: null }), - update: updates => { - if (typeof updates.name !== 'undefined' && updates.name !== name) { - if (typeof updates.name === 'string') { - validateAndWarnToolName(updates.name); - } - delete this._registeredTools[name]; - if (updates.name) - this._registeredTools[updates.name] = registeredTool; - } - if (typeof updates.title !== 'undefined') - registeredTool.title = updates.title; - if (typeof updates.description !== 'undefined') - registeredTool.description = updates.description; - if (typeof updates.paramsSchema !== 'undefined') - registeredTool.inputSchema = objectFromShape(updates.paramsSchema); - if (typeof updates.outputSchema !== 'undefined') - registeredTool.outputSchema = objectFromShape(updates.outputSchema); - if (typeof updates.callback !== 'undefined') - registeredTool.handler = updates.callback; - if (typeof updates.annotations !== 'undefined') - registeredTool.annotations = updates.annotations; - if (typeof updates._meta !== 'undefined') - registeredTool._meta = updates._meta; - if (typeof updates.enabled !== 'undefined') - registeredTool.enabled = updates.enabled; - this.sendToolListChanged(); - } - }; - this._registeredTools[name] = registeredTool; - this.setToolRequestHandlers(); - this.sendToolListChanged(); - return registeredTool; - } - tool(name, ...rest) { - if (this._registeredTools[name]) { - throw new Error(`Tool ${name} is already registered`); - } - let description; - let inputSchema; - let outputSchema; - let annotations; - if (typeof rest[0] === 'string') { - description = rest.shift(); - } - if (rest.length > 1) { - const firstArg = rest[0]; - if (isZodRawShapeCompat(firstArg)) { - inputSchema = rest.shift(); - if (rest.length > 1 && typeof rest[0] === 'object' && rest[0] !== null && !isZodRawShapeCompat(rest[0])) { - annotations = rest.shift(); - } - } - else if (typeof firstArg === 'object' && firstArg !== null) { - if (Object.values(firstArg).some(v => typeof v === 'object' && v !== null)) { - throw new Error(`Tool ${name} expected a Zod schema or ToolAnnotations, but received an unrecognized object`); - } - annotations = rest.shift(); - } - } - const callback = rest[0]; - return this._createRegisteredTool(name, undefined, description, inputSchema, outputSchema, annotations, { taskSupport: 'forbidden' }, undefined, callback); - } - registerTool(name, config, cb) { - if (this._registeredTools[name]) { - throw new Error(`Tool ${name} is already registered`); - } - const { title, description, inputSchema, outputSchema, annotations, _meta } = config; - return this._createRegisteredTool(name, title, description, inputSchema, outputSchema, annotations, { taskSupport: 'forbidden' }, _meta, cb); - } - prompt(name, ...rest) { - if (this._registeredPrompts[name]) { - throw new Error(`Prompt ${name} is already registered`); - } - let description; - if (typeof rest[0] === 'string') { - description = rest.shift(); - } - let argsSchema; - if (rest.length > 1) { - argsSchema = rest.shift(); - } - const cb = rest[0]; - const registeredPrompt = this._createRegisteredPrompt(name, undefined, description, argsSchema, cb); - this.setPromptRequestHandlers(); - this.sendPromptListChanged(); - return registeredPrompt; - } - registerPrompt(name, config, cb) { - if (this._registeredPrompts[name]) { - throw new Error(`Prompt ${name} is already registered`); - } - const { title, description, argsSchema } = config; - const registeredPrompt = this._createRegisteredPrompt(name, title, description, argsSchema, cb); - this.setPromptRequestHandlers(); - this.sendPromptListChanged(); - return registeredPrompt; - } - isConnected() { - return this.server.transport !== undefined; - } - async sendLoggingMessage(params, sessionId) { - return this.server.sendLoggingMessage(params, sessionId); - } - sendResourceListChanged() { - if (this.isConnected()) { - this.server.sendResourceListChanged(); - } - } - sendToolListChanged() { - if (this.isConnected()) { - this.server.sendToolListChanged(); - } - } - sendPromptListChanged() { - if (this.isConnected()) { - this.server.sendPromptListChanged(); - } - } -} -const EMPTY_OBJECT_JSON_SCHEMA = { - type: 'object', - properties: {} -}; -function isZodTypeLike(value) { - return (value !== null && - typeof value === 'object' && - 'parse' in value && - typeof value.parse === 'function' && - 'safeParse' in value && - typeof value.safeParse === 'function'); -} -function isZodSchemaInstance(obj) { - return '_def' in obj || '_zod' in obj || isZodTypeLike(obj); -} -function isZodRawShapeCompat(obj) { - if (typeof obj !== 'object' || obj === null) { - return false; - } - if (isZodSchemaInstance(obj)) { - return false; - } - if (Object.keys(obj).length === 0) { - return true; - } - return Object.values(obj).some(isZodTypeLike); -} -function getZodSchemaObject(schema) { - if (!schema) { - return undefined; - } - if (isZodRawShapeCompat(schema)) { - return objectFromShape(schema); - } - if (!isZodSchemaInstance(schema)) { - throw new Error('inputSchema must be a Zod schema or raw shape, received an unrecognized object'); - } - return schema; -} -function promptArgumentsFromSchema(schema) { - const shape = getObjectShape(schema); - if (!shape) - return []; - return Object.entries(shape).map(([name, field]) => { - const description = getSchemaDescription(field); - const isOptional = isSchemaOptional(field); - return { - name, - description, - required: !isOptional - }; - }); -} -function getMethodValue(schema) { - const shape = getObjectShape(schema); - const methodSchema = shape?.method; - if (!methodSchema) { - throw new Error('Schema is missing a method literal'); - } - const value = getLiteralValue(methodSchema); - if (typeof value === 'string') { - return value; - } - throw new Error('Schema method literal must be a string'); -} -function createCompletionResult(suggestions) { - return { - completion: { - values: suggestions.slice(0, 100), - total: suggestions.length, - hasMore: suggestions.length > 100 - } - }; -} -const EMPTY_COMPLETION_RESULT = { - completion: { - values: [], - hasMore: false - } -}; - -class ReadBuffer { - append(chunk) { - this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk; - } - readMessage() { - if (!this._buffer) { - return null; - } - const index = this._buffer.indexOf('\n'); - if (index === -1) { - return null; - } - const line = this._buffer.toString('utf8', 0, index).replace(/\r$/, ''); - this._buffer = this._buffer.subarray(index + 1); - return deserializeMessage(line); - } - clear() { - this._buffer = undefined; - } -} -function deserializeMessage(line) { - return JSONRPCMessageSchema.parse(JSON.parse(line)); -} -function serializeMessage(message) { - return JSON.stringify(message) + '\n'; -} - -class StdioServerTransport { - constructor(_stdin = process$2.stdin, _stdout = process$2.stdout) { - this._stdin = _stdin; - this._stdout = _stdout; - this._readBuffer = new ReadBuffer(); - this._started = false; - this._ondata = (chunk) => { - this._readBuffer.append(chunk); - this.processReadBuffer(); - }; - this._onerror = (error) => { - this.onerror?.(error); - }; - } - async start() { - if (this._started) { - throw new Error('StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.'); - } - this._started = true; - this._stdin.on('data', this._ondata); - this._stdin.on('error', this._onerror); - } - processReadBuffer() { - while (true) { - try { - const message = this._readBuffer.readMessage(); - if (message === null) { - break; - } - this.onmessage?.(message); - } - catch (error) { - this.onerror?.(error); - } - } - } - async close() { - this._stdin.off('data', this._ondata); - this._stdin.off('error', this._onerror); - const remainingDataListeners = this._stdin.listenerCount('data'); - if (remainingDataListeners === 0) { - this._stdin.pause(); - } - this._readBuffer.clear(); - this.onclose?.(); - } - send(message) { - return new Promise(resolve => { - const json = serializeMessage(message); - if (this._stdout.write(json)) { - resolve(); - } - else { - this._stdout.once('drain', resolve); - } - }); - } -} - -var crossSpawn = {exports: {}}; - -var windows; -var hasRequiredWindows; - -function requireWindows () { - if (hasRequiredWindows) return windows; - hasRequiredWindows = 1; - windows = isexe; - isexe.sync = sync; - var fs = require$$0$3; - function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT; - if (!pathext) { - return true - } - pathext = pathext.split(';'); - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase(); - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false - } - function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) - } - function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)); - }); - } - function sync (path, options) { - return checkStat(fs.statSync(path), path, options) - } - return windows; -} - -var mode; -var hasRequiredMode; - -function requireMode () { - if (hasRequiredMode) return mode; - hasRequiredMode = 1; - mode = isexe; - isexe.sync = sync; - var fs = require$$0$3; - function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)); - }); - } - function sync (path, options) { - return checkStat(fs.statSync(path), options) - } - function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) - } - function checkMode (stat, options) { - var mod = stat.mode; - var uid = stat.uid; - var gid = stat.gid; - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid(); - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid(); - var u = parseInt('100', 8); - var g = parseInt('010', 8); - var o = parseInt('001', 8); - var ug = u | g; - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0; - return ret - } - return mode; -} - -var isexe_1; -var hasRequiredIsexe; - -function requireIsexe () { - if (hasRequiredIsexe) return isexe_1; - hasRequiredIsexe = 1; - var core; - if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) { - core = requireWindows(); - } else { - core = requireMode(); - } - isexe_1 = isexe; - isexe.sync = sync; - function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options; - options = {}; - } - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er); - } else { - resolve(is); - } - }); - }) - } - core(path, options || {}, function (er, is) { - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null; - is = false; - } - } - cb(er, is); - }); - } - function sync (path, options) { - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } - } - return isexe_1; -} - -var which_1; -var hasRequiredWhich; - -function requireWhich () { - if (hasRequiredWhich) return which_1; - hasRequiredWhich = 1; - const isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys'; - const path = require$$0$4; - const COLON = isWindows ? ';' : ':'; - const isexe = requireIsexe(); - const getNotFoundError = (cmd) => - Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }); - const getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON; - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] - : ( - [ - ...(isWindows ? [process.cwd()] : []), - ...(opt.path || process.env.PATH || - '').split(colon), - ] - ); - const pathExtExe = isWindows - ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' - : ''; - const pathExt = isWindows ? pathExtExe.split(colon) : ['']; - if (isWindows) { - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift(''); - } - return { - pathEnv, - pathExt, - pathExtExe, - } - }; - const which = (cmd, opt, cb) => { - if (typeof opt === 'function') { - cb = opt; - opt = {}; - } - if (!opt) - opt = {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - const step = i => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) - : reject(getNotFoundError(cmd)) - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path.join(pathPart, cmd); - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd; - resolve(subStep(p, i, 0)); - }); - const subStep = (p, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)) - const ext = pathExt[ii]; - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext); - else - return resolve(p + ext) - } - return resolve(subStep(p, i, ii + 1)) - }); - }); - return cb ? step(0).then(res => cb(null, res), cb) : step(0) - }; - const whichSync = (cmd, opt) => { - opt = opt || {}; - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); - const found = []; - for (let i = 0; i < pathEnv.length; i ++) { - const ppRaw = pathEnv[i]; - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; - const pCmd = path.join(pathPart, cmd); - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd; - for (let j = 0; j < pathExt.length; j ++) { - const cur = p + pathExt[j]; - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }); - if (is) { - if (opt.all) - found.push(cur); - else - return cur - } - } catch (ex) {} - } - } - if (opt.all && found.length) - return found - if (opt.nothrow) - return null - throw getNotFoundError(cmd) - }; - which_1 = which; - which.sync = whichSync; - return which_1; -} - -var pathKey = {exports: {}}; - -var hasRequiredPathKey; - -function requirePathKey () { - if (hasRequiredPathKey) return pathKey.exports; - hasRequiredPathKey = 1; - const pathKey$1 = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - if (platform !== 'win32') { - return 'PATH'; - } - return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; - }; - pathKey.exports = pathKey$1; - pathKey.exports.default = pathKey$1; - return pathKey.exports; -} - -var resolveCommand_1; -var hasRequiredResolveCommand; - -function requireResolveCommand () { - if (hasRequiredResolveCommand) return resolveCommand_1; - hasRequiredResolveCommand = 1; - const path = require$$0$4; - const which = requireWhich(); - const getPathKey = requirePathKey(); - function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - } - } - let resolved; - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - return resolved; - } - function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); - } - resolveCommand_1 = resolveCommand; - return resolveCommand_1; -} - -var _escape = {}; - -var hasRequired_escape; - -function require_escape () { - if (hasRequired_escape) return _escape; - hasRequired_escape = 1; - const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - function escapeCommand(arg) { - arg = arg.replace(metaCharsRegExp, '^$1'); - return arg; - } - function escapeArgument(arg, doubleEscapeMetaChars) { - arg = `${arg}`; - arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'); - arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1'); - arg = `"${arg}"`; - arg = arg.replace(metaCharsRegExp, '^$1'); - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - return arg; - } - _escape.command = escapeCommand; - _escape.argument = escapeArgument; - return _escape; -} - -var shebangRegex; -var hasRequiredShebangRegex; - -function requireShebangRegex () { - if (hasRequiredShebangRegex) return shebangRegex; - hasRequiredShebangRegex = 1; - shebangRegex = /^#!(.*)/; - return shebangRegex; -} - -var shebangCommand; -var hasRequiredShebangCommand; - -function requireShebangCommand () { - if (hasRequiredShebangCommand) return shebangCommand; - hasRequiredShebangCommand = 1; - const shebangRegex = requireShebangRegex(); - shebangCommand = (string = '') => { - const match = string.match(shebangRegex); - if (!match) { - return null; - } - const [path, argument] = match[0].replace(/#! ?/, '').split(' '); - const binary = path.split('/').pop(); - if (binary === 'env') { - return argument; - } - return argument ? `${binary} ${argument}` : binary; - }; - return shebangCommand; -} - -var readShebang_1; -var hasRequiredReadShebang; - -function requireReadShebang () { - if (hasRequiredReadShebang) return readShebang_1; - hasRequiredReadShebang = 1; - const fs = require$$0$3; - const shebangCommand = requireShebangCommand(); - function readShebang(command) { - const size = 150; - const buffer = Buffer.alloc(size); - let fd; - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { } - return shebangCommand(buffer.toString()); - } - readShebang_1 = readShebang; - return readShebang_1; -} - -var parse_1$1; -var hasRequiredParse$1; - -function requireParse$1 () { - if (hasRequiredParse$1) return parse_1$1; - hasRequiredParse$1 = 1; - const path = require$$0$4; - const resolveCommand = requireResolveCommand(); - const escape = require_escape(); - const readShebang = requireReadShebang(); - const isWin = process.platform === 'win32'; - const isExecutableRegExp = /\.(?:com|exe)$/i; - const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - const shebang = parsed.file && readShebang(parsed.file); - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - return resolveCommand(parsed); - } - return parsed.file; - } - function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - const commandFile = detectShebang(parsed); - const needsShell = !isExecutableRegExp.test(commandFile); - if (parsed.options.forceShell || needsShell) { - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - parsed.command = path.normalize(parsed.command); - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; - } - return parsed; - } - function parse(command, args, options) { - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - args = args ? args.slice(0) : []; - options = Object.assign({}, options); - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - return options.shell ? parsed : parseNonShell(parsed); - } - parse_1$1 = parse; - return parse_1$1; -} - -var enoent; -var hasRequiredEnoent; - -function requireEnoent () { - if (hasRequiredEnoent) return enoent; - hasRequiredEnoent = 1; - const isWin = process.platform === 'win32'; - function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); - } - function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - const originalEmit = cp.emit; - cp.emit = function (name, arg1) { - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed); - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - return originalEmit.apply(cp, arguments); - }; - } - function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - return null; - } - function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - return null; - } - enoent = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, - }; - return enoent; -} - -var hasRequiredCrossSpawn; - -function requireCrossSpawn () { - if (hasRequiredCrossSpawn) return crossSpawn.exports; - hasRequiredCrossSpawn = 1; - const cp = require$$0$5; - const parse = requireParse$1(); - const enoent = requireEnoent(); - function spawn(command, args, options) { - const parsed = parse(command, args, options); - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - enoent.hookChildProcess(spawned, parsed); - return spawned; - } - function spawnSync(command, args, options) { - const parsed = parse(command, args, options); - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - return result; - } - crossSpawn.exports = spawn; - crossSpawn.exports.spawn = spawn; - crossSpawn.exports.sync = spawnSync; - crossSpawn.exports._parse = parse; - crossSpawn.exports._enoent = enoent; - return crossSpawn.exports; -} - -var crossSpawnExports = requireCrossSpawn(); -var spawn = /*@__PURE__*/getDefaultExportFromCjs(crossSpawnExports); - -const DEFAULT_INHERITED_ENV_VARS = process$2.platform === 'win32' - ? [ - 'APPDATA', - 'HOMEDRIVE', - 'HOMEPATH', - 'LOCALAPPDATA', - 'PATH', - 'PROCESSOR_ARCHITECTURE', - 'SYSTEMDRIVE', - 'SYSTEMROOT', - 'TEMP', - 'USERNAME', - 'USERPROFILE', - 'PROGRAMFILES' - ] - : - ['HOME', 'LOGNAME', 'PATH', 'SHELL', 'TERM', 'USER']; -function getDefaultEnvironment() { - const env = {}; - for (const key of DEFAULT_INHERITED_ENV_VARS) { - const value = process$2.env[key]; - if (value === undefined) { - continue; - } - if (value.startsWith('()')) { - continue; - } - env[key] = value; - } - return env; -} -class StdioClientTransport { - constructor(server) { - this._readBuffer = new ReadBuffer(); - this._stderrStream = null; - this._serverParams = server; - if (server.stderr === 'pipe' || server.stderr === 'overlapped') { - this._stderrStream = new PassThrough(); - } - } - async start() { - if (this._process) { - throw new Error('StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.'); - } - return new Promise((resolve, reject) => { - this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], { - env: { - ...getDefaultEnvironment(), - ...this._serverParams.env - }, - stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'], - shell: false, - windowsHide: process$2.platform === 'win32' && isElectron(), - cwd: this._serverParams.cwd - }); - this._process.on('error', error => { - reject(error); - this.onerror?.(error); - }); - this._process.on('spawn', () => { - resolve(); - }); - this._process.on('close', _code => { - this._process = undefined; - this.onclose?.(); - }); - this._process.stdin?.on('error', error => { - this.onerror?.(error); - }); - this._process.stdout?.on('data', chunk => { - this._readBuffer.append(chunk); - this.processReadBuffer(); - }); - this._process.stdout?.on('error', error => { - this.onerror?.(error); - }); - if (this._stderrStream && this._process.stderr) { - this._process.stderr.pipe(this._stderrStream); - } - }); - } - get stderr() { - if (this._stderrStream) { - return this._stderrStream; - } - return this._process?.stderr ?? null; - } - get pid() { - return this._process?.pid ?? null; - } - processReadBuffer() { - while (true) { - try { - const message = this._readBuffer.readMessage(); - if (message === null) { - break; - } - this.onmessage?.(message); - } - catch (error) { - this.onerror?.(error); - } - } - } - async close() { - if (this._process) { - const processToClose = this._process; - this._process = undefined; - const closePromise = new Promise(resolve => { - processToClose.once('close', () => { - resolve(); - }); - }); - try { - processToClose.stdin?.end(); - } - catch { - } - await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]); - if (processToClose.exitCode === null) { - try { - processToClose.kill('SIGTERM'); - } - catch { - } - await Promise.race([closePromise, new Promise(resolve => setTimeout(resolve, 2000).unref())]); - } - if (processToClose.exitCode === null) { - try { - processToClose.kill('SIGKILL'); - } - catch { - } - } - } - this._readBuffer.clear(); - } - send(message) { - return new Promise(resolve => { - if (!this._process?.stdin) { - throw new Error('Not connected'); - } - const json = serializeMessage(message); - if (this._process.stdin.write(json)) { - resolve(); - } - else { - this._process.stdin.once('drain', resolve); - } - }); - } -} -function isElectron() { - return 'type' in process$2; -} - -class ExperimentalClientTasks { - constructor(_client) { - this._client = _client; - } - async *callToolStream(params, resultSchema = CallToolResultSchema, options) { - const clientInternal = this._client; - const optionsWithTask = { - ...options, - task: options?.task ?? (clientInternal.isToolTask(params.name) ? {} : undefined) - }; - const stream = clientInternal.requestStream({ method: 'tools/call', params }, resultSchema, optionsWithTask); - const validator = clientInternal.getToolOutputValidator(params.name); - for await (const message of stream) { - if (message.type === 'result' && validator) { - const result = message.result; - if (!result.structuredContent && !result.isError) { - yield { - type: 'error', - error: new McpError(ErrorCode$1.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`) - }; - return; - } - if (result.structuredContent) { - try { - const validationResult = validator(result.structuredContent); - if (!validationResult.valid) { - yield { - type: 'error', - error: new McpError(ErrorCode$1.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`) - }; - return; - } - } - catch (error) { - if (error instanceof McpError) { - yield { type: 'error', error }; - return; - } - yield { - type: 'error', - error: new McpError(ErrorCode$1.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`) - }; - return; - } - } - } - yield message; - } - } - async getTask(taskId, options) { - return this._client.getTask({ taskId }, options); - } - async getTaskResult(taskId, resultSchema, options) { - return this._client.getTaskResult({ taskId }, resultSchema, options); - } - async listTasks(cursor, options) { - return this._client.listTasks(cursor ? { cursor } : undefined, options); - } - async cancelTask(taskId, options) { - return this._client.cancelTask({ taskId }, options); - } - requestStream(request, resultSchema, options) { - return this._client.requestStream(request, resultSchema, options); - } -} - -function applyElicitationDefaults(schema, data) { - if (!schema || data === null || typeof data !== 'object') - return; - if (schema.type === 'object' && schema.properties && typeof schema.properties === 'object') { - const obj = data; - const props = schema.properties; - for (const key of Object.keys(props)) { - const propSchema = props[key]; - if (obj[key] === undefined && Object.prototype.hasOwnProperty.call(propSchema, 'default')) { - obj[key] = propSchema.default; - } - if (obj[key] !== undefined) { - applyElicitationDefaults(propSchema, obj[key]); - } - } - } - if (Array.isArray(schema.anyOf)) { - for (const sub of schema.anyOf) { - if (typeof sub !== 'boolean') { - applyElicitationDefaults(sub, data); - } - } - } - if (Array.isArray(schema.oneOf)) { - for (const sub of schema.oneOf) { - if (typeof sub !== 'boolean') { - applyElicitationDefaults(sub, data); - } - } - } -} -function getSupportedElicitationModes(capabilities) { - if (!capabilities) { - return { supportsFormMode: false, supportsUrlMode: false }; - } - const hasFormCapability = capabilities.form !== undefined; - const hasUrlCapability = capabilities.url !== undefined; - const supportsFormMode = hasFormCapability || (!hasFormCapability && !hasUrlCapability); - const supportsUrlMode = hasUrlCapability; - return { supportsFormMode, supportsUrlMode }; -} -let Client$1 = class Client extends Protocol { - constructor(_clientInfo, options) { - super(options); - this._clientInfo = _clientInfo; - this._cachedToolOutputValidators = new Map(); - this._cachedKnownTaskTools = new Set(); - this._cachedRequiredTaskTools = new Set(); - this._listChangedDebounceTimers = new Map(); - this._capabilities = options?.capabilities ?? {}; - this._jsonSchemaValidator = options?.jsonSchemaValidator ?? new AjvJsonSchemaValidator(); - if (options?.listChanged) { - this._pendingListChangedConfig = options.listChanged; - } - } - _setupListChangedHandlers(config) { - if (config.tools && this._serverCapabilities?.tools?.listChanged) { - this._setupListChangedHandler('tools', ToolListChangedNotificationSchema, config.tools, async () => { - const result = await this.listTools(); - return result.tools; - }); - } - if (config.prompts && this._serverCapabilities?.prompts?.listChanged) { - this._setupListChangedHandler('prompts', PromptListChangedNotificationSchema, config.prompts, async () => { - const result = await this.listPrompts(); - return result.prompts; - }); - } - if (config.resources && this._serverCapabilities?.resources?.listChanged) { - this._setupListChangedHandler('resources', ResourceListChangedNotificationSchema, config.resources, async () => { - const result = await this.listResources(); - return result.resources; - }); - } - } - get experimental() { - if (!this._experimental) { - this._experimental = { - tasks: new ExperimentalClientTasks(this) - }; - } - return this._experimental; - } - registerCapabilities(capabilities) { - if (this.transport) { - throw new Error('Cannot register capabilities after connecting to transport'); - } - this._capabilities = mergeCapabilities(this._capabilities, capabilities); - } - setRequestHandler(requestSchema, handler) { - const shape = getObjectShape(requestSchema); - const methodSchema = shape?.method; - if (!methodSchema) { - throw new Error('Schema is missing a method literal'); - } - let methodValue; - if (isZ4Schema(methodSchema)) { - const v4Schema = methodSchema; - const v4Def = v4Schema._zod?.def; - methodValue = v4Def?.value ?? v4Schema.value; - } - else { - const v3Schema = methodSchema; - const legacyDef = v3Schema._def; - methodValue = legacyDef?.value ?? v3Schema.value; - } - if (typeof methodValue !== 'string') { - throw new Error('Schema method literal must be a string'); - } - const method = methodValue; - if (method === 'elicitation/create') { - const wrappedHandler = async (request, extra) => { - const validatedRequest = safeParse$1(ElicitRequestSchema, request); - if (!validatedRequest.success) { - const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid elicitation request: ${errorMessage}`); - } - const { params } = validatedRequest.data; - params.mode = params.mode ?? 'form'; - const { supportsFormMode, supportsUrlMode } = getSupportedElicitationModes(this._capabilities.elicitation); - if (params.mode === 'form' && !supportsFormMode) { - throw new McpError(ErrorCode$1.InvalidParams, 'Client does not support form-mode elicitation requests'); - } - if (params.mode === 'url' && !supportsUrlMode) { - throw new McpError(ErrorCode$1.InvalidParams, 'Client does not support URL-mode elicitation requests'); - } - const result = await Promise.resolve(handler(request, extra)); - if (params.task) { - const taskValidationResult = safeParse$1(CreateTaskResultSchema, result); - if (!taskValidationResult.success) { - const errorMessage = taskValidationResult.error instanceof Error - ? taskValidationResult.error.message - : String(taskValidationResult.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`); - } - return taskValidationResult.data; - } - const validationResult = safeParse$1(ElicitResultSchema, result); - if (!validationResult.success) { - const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid elicitation result: ${errorMessage}`); - } - const validatedResult = validationResult.data; - const requestedSchema = params.mode === 'form' ? params.requestedSchema : undefined; - if (params.mode === 'form' && validatedResult.action === 'accept' && validatedResult.content && requestedSchema) { - if (this._capabilities.elicitation?.form?.applyDefaults) { - try { - applyElicitationDefaults(requestedSchema, validatedResult.content); - } - catch { - } - } - } - return validatedResult; - }; - return super.setRequestHandler(requestSchema, wrappedHandler); - } - if (method === 'sampling/createMessage') { - const wrappedHandler = async (request, extra) => { - const validatedRequest = safeParse$1(CreateMessageRequestSchema, request); - if (!validatedRequest.success) { - const errorMessage = validatedRequest.error instanceof Error ? validatedRequest.error.message : String(validatedRequest.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid sampling request: ${errorMessage}`); - } - const { params } = validatedRequest.data; - const result = await Promise.resolve(handler(request, extra)); - if (params.task) { - const taskValidationResult = safeParse$1(CreateTaskResultSchema, result); - if (!taskValidationResult.success) { - const errorMessage = taskValidationResult.error instanceof Error - ? taskValidationResult.error.message - : String(taskValidationResult.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid task creation result: ${errorMessage}`); - } - return taskValidationResult.data; - } - const hasTools = params.tools || params.toolChoice; - const resultSchema = hasTools ? CreateMessageResultWithToolsSchema : CreateMessageResultSchema; - const validationResult = safeParse$1(resultSchema, result); - if (!validationResult.success) { - const errorMessage = validationResult.error instanceof Error ? validationResult.error.message : String(validationResult.error); - throw new McpError(ErrorCode$1.InvalidParams, `Invalid sampling result: ${errorMessage}`); - } - return validationResult.data; - }; - return super.setRequestHandler(requestSchema, wrappedHandler); - } - return super.setRequestHandler(requestSchema, handler); - } - assertCapability(capability, method) { - if (!this._serverCapabilities?.[capability]) { - throw new Error(`Server does not support ${capability} (required for ${method})`); - } - } - async connect(transport, options) { - await super.connect(transport); - if (transport.sessionId !== undefined) { - return; - } - try { - const result = await this.request({ - method: 'initialize', - params: { - protocolVersion: LATEST_PROTOCOL_VERSION, - capabilities: this._capabilities, - clientInfo: this._clientInfo - } - }, InitializeResultSchema, options); - if (result === undefined) { - throw new Error(`Server sent invalid initialize result: ${result}`); - } - if (!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion)) { - throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`); - } - this._serverCapabilities = result.capabilities; - this._serverVersion = result.serverInfo; - if (transport.setProtocolVersion) { - transport.setProtocolVersion(result.protocolVersion); - } - this._instructions = result.instructions; - await this.notification({ - method: 'notifications/initialized' - }); - if (this._pendingListChangedConfig) { - this._setupListChangedHandlers(this._pendingListChangedConfig); - this._pendingListChangedConfig = undefined; - } - } - catch (error) { - void this.close(); - throw error; - } - } - getServerCapabilities() { - return this._serverCapabilities; - } - getServerVersion() { - return this._serverVersion; - } - getInstructions() { - return this._instructions; - } - assertCapabilityForMethod(method) { - switch (method) { - case 'logging/setLevel': - if (!this._serverCapabilities?.logging) { - throw new Error(`Server does not support logging (required for ${method})`); - } - break; - case 'prompts/get': - case 'prompts/list': - if (!this._serverCapabilities?.prompts) { - throw new Error(`Server does not support prompts (required for ${method})`); - } - break; - case 'resources/list': - case 'resources/templates/list': - case 'resources/read': - case 'resources/subscribe': - case 'resources/unsubscribe': - if (!this._serverCapabilities?.resources) { - throw new Error(`Server does not support resources (required for ${method})`); - } - if (method === 'resources/subscribe' && !this._serverCapabilities.resources.subscribe) { - throw new Error(`Server does not support resource subscriptions (required for ${method})`); - } - break; - case 'tools/call': - case 'tools/list': - if (!this._serverCapabilities?.tools) { - throw new Error(`Server does not support tools (required for ${method})`); - } - break; - case 'completion/complete': - if (!this._serverCapabilities?.completions) { - throw new Error(`Server does not support completions (required for ${method})`); - } - break; - } - } - assertNotificationCapability(method) { - switch (method) { - case 'notifications/roots/list_changed': - if (!this._capabilities.roots?.listChanged) { - throw new Error(`Client does not support roots list changed notifications (required for ${method})`); - } - break; - } - } - assertRequestHandlerCapability(method) { - if (!this._capabilities) { - return; - } - switch (method) { - case 'sampling/createMessage': - if (!this._capabilities.sampling) { - throw new Error(`Client does not support sampling capability (required for ${method})`); - } - break; - case 'elicitation/create': - if (!this._capabilities.elicitation) { - throw new Error(`Client does not support elicitation capability (required for ${method})`); - } - break; - case 'roots/list': - if (!this._capabilities.roots) { - throw new Error(`Client does not support roots capability (required for ${method})`); - } - break; - case 'tasks/get': - case 'tasks/list': - case 'tasks/result': - case 'tasks/cancel': - if (!this._capabilities.tasks) { - throw new Error(`Client does not support tasks capability (required for ${method})`); - } - break; - } - } - assertTaskCapability(method) { - assertToolsCallTaskCapability(this._serverCapabilities?.tasks?.requests, method, 'Server'); - } - assertTaskHandlerCapability(method) { - if (!this._capabilities) { - return; - } - assertClientRequestTaskCapability(this._capabilities.tasks?.requests, method, 'Client'); - } - async ping(options) { - return this.request({ method: 'ping' }, EmptyResultSchema, options); - } - async complete(params, options) { - return this.request({ method: 'completion/complete', params }, CompleteResultSchema, options); - } - async setLoggingLevel(level, options) { - return this.request({ method: 'logging/setLevel', params: { level } }, EmptyResultSchema, options); - } - async getPrompt(params, options) { - return this.request({ method: 'prompts/get', params }, GetPromptResultSchema, options); - } - async listPrompts(params, options) { - return this.request({ method: 'prompts/list', params }, ListPromptsResultSchema, options); - } - async listResources(params, options) { - return this.request({ method: 'resources/list', params }, ListResourcesResultSchema, options); - } - async listResourceTemplates(params, options) { - return this.request({ method: 'resources/templates/list', params }, ListResourceTemplatesResultSchema, options); - } - async readResource(params, options) { - return this.request({ method: 'resources/read', params }, ReadResourceResultSchema, options); - } - async subscribeResource(params, options) { - return this.request({ method: 'resources/subscribe', params }, EmptyResultSchema, options); - } - async unsubscribeResource(params, options) { - return this.request({ method: 'resources/unsubscribe', params }, EmptyResultSchema, options); - } - async callTool(params, resultSchema = CallToolResultSchema, options) { - if (this.isToolTaskRequired(params.name)) { - throw new McpError(ErrorCode$1.InvalidRequest, `Tool "${params.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`); - } - const result = await this.request({ method: 'tools/call', params }, resultSchema, options); - const validator = this.getToolOutputValidator(params.name); - if (validator) { - if (!result.structuredContent && !result.isError) { - throw new McpError(ErrorCode$1.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`); - } - if (result.structuredContent) { - try { - const validationResult = validator(result.structuredContent); - if (!validationResult.valid) { - throw new McpError(ErrorCode$1.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`); - } - } - catch (error) { - if (error instanceof McpError) { - throw error; - } - throw new McpError(ErrorCode$1.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`); - } - } - } - return result; - } - isToolTask(toolName) { - if (!this._serverCapabilities?.tasks?.requests?.tools?.call) { - return false; - } - return this._cachedKnownTaskTools.has(toolName); - } - isToolTaskRequired(toolName) { - return this._cachedRequiredTaskTools.has(toolName); - } - cacheToolMetadata(tools) { - this._cachedToolOutputValidators.clear(); - this._cachedKnownTaskTools.clear(); - this._cachedRequiredTaskTools.clear(); - for (const tool of tools) { - if (tool.outputSchema) { - const toolValidator = this._jsonSchemaValidator.getValidator(tool.outputSchema); - this._cachedToolOutputValidators.set(tool.name, toolValidator); - } - const taskSupport = tool.execution?.taskSupport; - if (taskSupport === 'required' || taskSupport === 'optional') { - this._cachedKnownTaskTools.add(tool.name); - } - if (taskSupport === 'required') { - this._cachedRequiredTaskTools.add(tool.name); - } - } - } - getToolOutputValidator(toolName) { - return this._cachedToolOutputValidators.get(toolName); - } - async listTools(params, options) { - const result = await this.request({ method: 'tools/list', params }, ListToolsResultSchema, options); - this.cacheToolMetadata(result.tools); - return result; - } - _setupListChangedHandler(listType, notificationSchema, options, fetcher) { - const parseResult = ListChangedOptionsBaseSchema.safeParse(options); - if (!parseResult.success) { - throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`); - } - if (typeof options.onChanged !== 'function') { - throw new Error(`Invalid ${listType} listChanged options: onChanged must be a function`); - } - const { autoRefresh, debounceMs } = parseResult.data; - const { onChanged } = options; - const refresh = async () => { - if (!autoRefresh) { - onChanged(null, null); - return; - } - try { - const items = await fetcher(); - onChanged(null, items); - } - catch (e) { - const error = e instanceof Error ? e : new Error(String(e)); - onChanged(error, null); - } - }; - const handler = () => { - if (debounceMs) { - const existingTimer = this._listChangedDebounceTimers.get(listType); - if (existingTimer) { - clearTimeout(existingTimer); - } - const timer = setTimeout(refresh, debounceMs); - this._listChangedDebounceTimers.set(listType, timer); - } - else { - refresh(); - } - }; - this.setNotificationHandler(notificationSchema, handler); - } - async sendRootsListChanged() { - return this.notification({ method: 'notifications/roots/list_changed' }); - } -}; - -var uri_all$1 = {exports: {}}; - -var uri_all = uri_all$1.exports; - -var hasRequiredUri_all; - -function requireUri_all () { - if (hasRequiredUri_all) return uri_all$1.exports; - hasRequiredUri_all = 1; - (function (module, exports$1) { - (function (global, factory) { - factory(exports$1) ; - }(uri_all, (function (exports$1) { function merge() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { - sets[_key] = arguments[_key]; - } - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } - } - function subexp(str) { - return "(?:" + str + ")"; - } - function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); - } - function toUpperCase(str) { - return str.toUpperCase(); - } - function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; - } - function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; - } - function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - DIGIT$$ = "[0-9]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$); - subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"); - subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"); - var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"); - subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"); - subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"); - var PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")); - subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"); - subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"); - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") - }; - } - var URI_PROTOCOL = buildExps(false); - var IRI_PROTOCOL = buildExps(true); - var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - return _arr; - } - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; - }(); - var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - return arr2; - } else { - return Array.from(arr); - } - }; - var maxInt = 2147483647; - var base = 36; - var tMin = 1; - var tMax = 26; - var skew = 38; - var damp = 700; - var initialBias = 72; - var initialN = 128; - var delimiter = '-'; - var regexPunycode = /^xn--/; - var regexNonASCII = /[^\0-\x7E]/; - var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; - var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }; - var baseMinusTMin = base - tMin; - var floor = Math.floor; - var stringFromCharCode = String.fromCharCode; - function error$1(type) { - throw new RangeError(errors[type]); - } - function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - result = parts[0] + '@'; - string = parts[1]; - } - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); - }; - var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; - }; - var digitToBasic = function digitToBasic(digit, flag) { - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - }; - var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - }; - var decode = function decode(input) { - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - for (var j = 0; j < basic; ++j) { - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) { - var oldi = i; - for (var w = 1, k = base;; k += base) { - if (index >= inputLength) { - error$1('invalid-input'); - } - var digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (digit < t) { - break; - } - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - w *= baseMinusT; - } - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - n += floor(i / out); - i %= out; - output.splice(i++, 0, n); - } - return String.fromCodePoint.apply(String, output); - }; - var encode = function encode(input) { - var output = []; - input = ucs2decode(input); - var inputLength = input.length; - var n = initialN; - var delta = 0; - var bias = initialBias; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - var basicLength = output.length; - var handledCPCount = basicLength; - if (basicLength) { - output.push(delimiter); - } - while (handledCPCount < inputLength) { - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - delta += (m - n) * handledCPCountPlusOne; - n = m; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - var q = delta; - for (var k = base;; k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - ++delta; - ++n; - } - return output.join(''); - }; - var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); - }; - var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); - }; - var punycode = { - 'version': '2.1.0', - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - /** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ - var SCHEMES = {}; - function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; - } - function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; - } - function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; - } - function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; - } - function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } - } - function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } - } - var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; - var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; - function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - _normalizeComponentEncoding(components, protocol); - } - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; - } - function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; - } - var RDS1 = /^\.\.?\//; - var RDS2 = /^\/\.(\/|$)/; - var RDS3 = /^\/\.\.(\/|$)/; - var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; - function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); - } - function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - if (protocol.IPV6ADDRESS.test(components.host)) ; - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); - } - function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); - relative = parse(serialize(relative, options), options); - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; - } - function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); - } - function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; - } - function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; - } - function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); - } - function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); - } - var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - if (!components.path) { - components.path = "/"; - } - return components; - } - }; - var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize - }; - function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; - } - var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse(components, options) { - var wsComponents = components; - wsComponents.secure = isSecure(wsComponents); - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function serialize(wsComponents, options) { - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; - wsComponents.secure = undefined; - } - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split('?'), - _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), - path = _wsComponents$resourc2[0], - query = _wsComponents$resourc2[1]; - wsComponents.path = path && path !== '/' ? path : undefined; - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - wsComponents.fragment = undefined; - return wsComponents; - } - }; - var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize - }; - var O = {}; - var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]"; - var HEXDIG$$ = "[0-9A-Fa-f]"; - var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); - var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; - var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; - var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); - var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; - var UNRESERVED = new RegExp(UNRESERVED$$, "g"); - var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); - var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); - var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); - var NOT_HFVALUE = NOT_HFNAME; - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; - } - var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } - }; - var URN_PARSE = /^([^\:]+)\:(.*)/; - var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } - }; - var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; - var handler$6 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } - }; - SCHEMES[handler.scheme] = handler; - SCHEMES[handler$1.scheme] = handler$1; - SCHEMES[handler$2.scheme] = handler$2; - SCHEMES[handler$3.scheme] = handler$3; - SCHEMES[handler$4.scheme] = handler$4; - SCHEMES[handler$5.scheme] = handler$5; - SCHEMES[handler$6.scheme] = handler$6; - exports$1.SCHEMES = SCHEMES; - exports$1.pctEncChar = pctEncChar; - exports$1.pctDecChars = pctDecChars; - exports$1.parse = parse; - exports$1.removeDotSegments = removeDotSegments; - exports$1.serialize = serialize; - exports$1.resolveComponents = resolveComponents; - exports$1.resolve = resolve; - exports$1.normalize = normalize; - exports$1.equal = equal; - exports$1.escapeComponent = escapeComponent; - exports$1.unescapeComponent = unescapeComponent; - Object.defineProperty(exports$1, '__esModule', { value: true }); - }))); - } (uri_all$1, uri_all$1.exports)); - return uri_all$1.exports; -} - -var ucs2length; -var hasRequiredUcs2length; - -function requireUcs2length () { - if (hasRequiredUcs2length) return ucs2length; - hasRequiredUcs2length = 1; - ucs2length = function ucs2length(str) { - var length = 0 - , len = str.length - , pos = 0 - , value; - while (pos < len) { - length++; - value = str.charCodeAt(pos++); - if (value >= 0xD800 && value <= 0xDBFF && pos < len) { - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; - } - } - return length; - }; - return ucs2length; -} - -var util$3; -var hasRequiredUtil$3; - -function requireUtil$3 () { - if (hasRequiredUtil$3) return util$3; - hasRequiredUtil$3 = 1; - util$3 = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: requireFastDeepEqual(), - ucs2length: requireUcs2length(), - varOccurences: varOccurences, - varReplace: varReplace, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer - }; - function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; - } - function checkDataType(dataType, data, strictNumbers, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + - (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } - } - function checkDataTypes(dataTypes, data, strictNumbers) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); - return code; - } - } - var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); - function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; - } - function endCompiling(schema, root, baseId) { - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); - } - function compIndex(schema, root, baseId) { - for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; - var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; - var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; - var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; - var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; - var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - formats_1 = formats; - function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); - } - formats.fast = { - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, - uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER - }; - formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER - }; - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - function date(str) { - var matches = str.match(DATE); - if (!matches) return false; - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); - } - function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); - } - var DATE_TIME_SEPARATOR = /t|\s/i; - function date_time(str) { - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); - } - var NOT_URI_FRAGMENT = /\/|:/; - function uri(str) { - return NOT_URI_FRAGMENT.test(str) && URI.test(str); - } - var Z_ANCHOR = /[^\\]\\Z/; - function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } - } - return formats_1; -} - -var ref; -var hasRequiredRef; - -function requireRef () { - if (hasRequiredRef) return ref; - hasRequiredRef = 1; - ref = function generate_ref(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $async, $refCode; - if ($schema == '#' || $schema == '#/') { - if (it.isRoot) { - $async = it.async; - $refCode = 'validate'; - } else { - $async = it.root.schema.$async === true; - $refCode = 'root.refVal[0]'; - } - } else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === undefined) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == 'fail') { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; - } - if (it.opts.verbose) { - out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - if ($breakOnError) { - out += ' if (false) { '; - } - } else if (it.opts.missingRefs == 'ignore') { - it.logger.warn($message); - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - throw new it.MissingRefError(it.baseId, $schema, $message); - } - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ''; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += ' ' + ($code) + ' '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - } - } else { - $async = $refVal.$async === true || (it.async && $refVal.$async !== false); - $refCode = $refVal.code; - } - } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.opts.passContext) { - out += ' ' + ($refCode) + '.call(this, '; - } else { - out += ' ' + ($refCode) + '( '; - } - out += ' ' + ($data) + ', (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) throw new Error('async schema referenced by sync schema'); - if ($breakOnError) { - out += ' var ' + ($valid) + '; '; - } - out += ' try { await ' + (__callValidate) + '; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = true; '; - } - out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = false; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($valid) + ') { '; - } - } else { - out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; - if ($breakOnError) { - out += ' else { '; - } - } - } - return out; - }; - return ref; -} - -var allOf; -var hasRequiredAllOf; - -function requireAllOf () { - if (hasRequiredAllOf) return allOf; - hasRequiredAllOf = 1; - allOf = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - return out; - }; - return allOf; -} - -var anyOf; -var hasRequiredAnyOf; - -function requireAnyOf () { - if (hasRequiredAnyOf) return anyOf; - hasRequiredAnyOf = 1; - anyOf = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; - }; - return anyOf; -} - -var comment; -var hasRequiredComment; - -function requireComment () { - if (hasRequiredComment) return comment; - hasRequiredComment = 1; - comment = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; - }; - return comment; -} - -var _const; -var hasRequired_const; - -function require_const () { - if (hasRequired_const) return _const; - hasRequired_const = 1; - _const = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return _const; -} - -var contains$1; -var hasRequiredContains; - -function requireContains () { - if (hasRequiredContains) return contains$1; - hasRequiredContains = 1; - contains$1 = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - return out; - }; - return contains$1; -} - -var dependencies; -var hasRequiredDependencies; - -function requireDependencies () { - if (hasRequiredDependencies) return dependencies; - hasRequiredDependencies = 1; - dependencies = function generate_dependencies(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $schemaDeps = {}, - $propertyDeps = {}, - $ownProperties = it.opts.ownProperties; - for ($property in $schema) { - if ($property == '__proto__') continue; - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } - out += 'var ' + ($errs) + ' = errors;'; - var $currentErrorPath = it.errorPath; - out += 'var missing' + ($lvl) + ';'; - for (var $property in $propertyDeps) { - $deps = $propertyDeps[$property]; - if ($deps.length) { - out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - if ($breakOnError) { - out += ' && ( '; - var arr1 = $deps; - if (arr1) { - var $propertyKey, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $propertyKey = arr1[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ')) { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - out += ' ) { '; - var arr2 = $deps; - if (arr2) { - var $propertyKey, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $propertyKey = arr2[i2 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - } - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; - for (var $property in $schemaDeps) { - var $sch = $schemaDeps[$property]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; - }; - return dependencies; -} - -var _enum; -var hasRequired_enum; - -function require_enum () { - if (hasRequired_enum) return _enum; - hasRequired_enum = 1; - _enum = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return _enum; -} - -var format$1; -var hasRequiredFormat; - -function requireFormat () { - if (hasRequiredFormat) return format$1; - hasRequiredFormat = 1; - format$1 = function generate_format(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; - } else { - out += ' ' + ($format) + '(' + ($data) + ') '; - } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; - } - out += ') { '; - } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return format$1; -} - -var _if; -var hasRequired_if; - -function require_if () { - if (hasRequired_if) return _if; - hasRequired_if = 1; - _if = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } - out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; - } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; - } - out += ' if (!' + ($valid) + ') { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; - }; - return _if; -} - -var items; -var hasRequiredItems; - -function requireItems () { - if (hasRequiredItems) return items; - hasRequiredItems = 1; - items = function generate_items(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' }'; - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; - }; - return items; -} - -var _limit; -var hasRequired_limit; - -function require_limit () { - if (hasRequired_limit) return _limit; - hasRequired_limit = 1; - _limit = function generate__limit(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == 'maximum', - $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if (!($isData || typeof $schema == 'number' || $schema === undefined)) { - throw new Error($keyword + ' must be number'); - } - if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { - throw new Error($exclusiveKeyword + ' must be number or boolean'); - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return _limit; -} - -var _limitItems; -var hasRequired_limitItems; - -function require_limitItems () { - if (hasRequired_limitItems) return _limitItems; - hasRequired_limitItems = 1; - _limitItems = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return _limitItems; -} - -var _limitLength; -var hasRequired_limitLength; - -function require_limitLength () { - if (hasRequired_limitLength) return _limitLength; - hasRequired_limitLength = 1; - _limitLength = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return _limitLength; -} - -var _limitProperties; -var hasRequired_limitProperties; - -function require_limitProperties () { - if (hasRequired_limitProperties) return _limitProperties; - hasRequired_limitProperties = 1; - _limitProperties = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return _limitProperties; -} - -var multipleOf; -var hasRequiredMultipleOf; - -function requireMultipleOf () { - if (hasRequiredMultipleOf) return multipleOf; - hasRequiredMultipleOf = 1; - multipleOf = function generate_multipleOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!($isData || typeof $schema == 'number')) { - throw new Error($keyword + ' must be number'); - } - out += 'var division' + ($lvl) + ';if ('; - if ($isData) { - out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; - } - out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; - if (it.opts.multipleOfPrecision) { - out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return multipleOf; -} - -var not; -var hasRequiredNot; - -function requireNot () { - if (hasRequiredNot) return not; - hasRequiredNot = 1; - not = function generate_not(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; - } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - } else { - out += ' var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if ($breakOnError) { - out += ' if (false) { '; - } - } - return out; - }; - return not; -} - -var oneOf; -var hasRequiredOneOf; - -function requireOneOf () { - if (hasRequiredOneOf) return oneOf; - hasRequiredOneOf = 1; - oneOf = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; - } - out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match exactly one schema in oneOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; - if (it.opts.allErrors) { - out += ' } '; - } - return out; - }; - return oneOf; -} - -var pattern; -var hasRequiredPattern; - -function requirePattern () { - if (hasRequiredPattern) return pattern; - hasRequiredPattern = 1; - pattern = function generate_pattern(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp'; - if ($isData) { - out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($valid) + ') {'; - } else { - var $regexp = it.usePattern($schema); - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match pattern "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; - }; - return pattern; -} - -var properties$2; -var hasRequiredProperties; - -function requireProperties () { - if (hasRequiredProperties) return properties$2; - hasRequiredProperties = 1; - properties$2 = function generate_properties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl; - var $schemaKeys = Object.keys($schema || {}).filter(notProto), - $pProperties = it.schema.patternProperties || {}, - $pPropertyKeys = Object.keys($pProperties).filter(notProto), - $aProperties = it.schema.additionalProperties, - $someProperties = $schemaKeys.length || $pPropertyKeys.length, - $noAdditional = $aProperties === false, - $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, - $removeAdditional = it.opts.removeAdditional, - $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - var $required = it.schema.required; - if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { - var $requiredHash = it.util.toHash($required); - } - function notProto(p) { - return p !== '__proto__'; - } - out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined;'; - } - if ($checkAdditional) { - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - if ($someProperties) { - out += ' var isAdditional' + ($lvl) + ' = !(false '; - if ($schemaKeys.length) { - if ($schemaKeys.length > 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } - } - } - } - if ($pPropertyKeys.length) { - var arr2 = $pPropertyKeys; - if (arr2) { - var $pProperty, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $pProperty = arr2[$i += 1]; - out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; - } - } - } - out += ' ); if (isAdditional' + ($lvl) + ') { '; - } - if ($removeAdditional == 'all') { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - var $currentErrorPath = it.errorPath; - var $additionalProperty = '\' + ' + $key + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - } - if ($noAdditional) { - if ($removeAdditional) { - out += ' delete ' + ($data) + '[' + ($key) + ']; '; - } else { - out += ' ' + ($nextValid) + ' = false; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalProperties'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is an invalid additional property'; - } else { - out += 'should NOT have additional properties'; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - out += ' break; '; - } - } - } else if ($additionalIsSchema) { - if ($removeAdditional == 'failing') { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - } else { - $it.schema = $aProperties; - $it.schemaPath = it.schemaPath + '.additionalProperties'; - $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; - $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - } - } - it.errorPath = $currentErrorPath; - } - if ($someProperties) { - out += ' } '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - var $useDefaults = it.opts.useDefaults && !it.compositeRule; - if ($schemaKeys.length) { - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - return out; - }; - return properties$2; -} - -var propertyNames; -var hasRequiredPropertyNames; - -function requirePropertyNames () { - if (hasRequiredPropertyNames) return propertyNames; - hasRequiredPropertyNames = 1; - propertyNames = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } - } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += ') { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; - } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; - }; - return required$1; -} - -var uniqueItems; -var hasRequiredUniqueItems; - -function requireUniqueItems () { - if (hasRequiredUniqueItems) return uniqueItems; - hasRequiredUniqueItems = 1; - uniqueItems = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; - } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; - } - out += ' } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; - }; - return uniqueItems; -} - -var dotjs; -var hasRequiredDotjs; - -function requireDotjs () { - if (hasRequiredDotjs) return dotjs; - hasRequiredDotjs = 1; - dotjs = { - '$ref': requireRef(), - allOf: requireAllOf(), - anyOf: requireAnyOf(), - '$comment': requireComment(), - const: require_const(), - contains: requireContains(), - dependencies: requireDependencies(), - 'enum': require_enum(), - format: requireFormat(), - 'if': require_if(), - items: requireItems(), - maximum: require_limit(), - minimum: require_limit(), - maxItems: require_limitItems(), - minItems: require_limitItems(), - maxLength: require_limitLength(), - minLength: require_limitLength(), - maxProperties: require_limitProperties(), - minProperties: require_limitProperties(), - multipleOf: requireMultipleOf(), - not: requireNot(), - oneOf: requireOneOf(), - pattern: requirePattern(), - properties: requireProperties(), - propertyNames: requirePropertyNames(), - required: requireRequired(), - uniqueItems: requireUniqueItems(), - validate: requireValidate() - }; - return dotjs; -} - -var rules; -var hasRequiredRules; - -function requireRules () { - if (hasRequiredRules) return rules; - hasRequiredRules = 1; - var ruleModules = requireDotjs() - , toHash = requireUtil$3().toHash; - rules = function rules() { - var RULES = [ - { type: 'number', - rules: [ { 'maximum': ['exclusiveMaximum'] }, - { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, - { type: 'string', - rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, - { type: 'array', - rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, - { type: 'object', - rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', - { 'properties': ['additionalProperties', 'patternProperties'] } ] }, - { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } - ]; - var ALL = [ 'type', '$comment' ]; - var KEYWORDS = [ - '$schema', '$id', 'id', '$data', '$async', 'title', - 'description', 'default', 'definitions', - 'examples', 'readOnly', 'writeOnly', - 'contentMediaType', 'contentEncoding', - 'additionalItems', 'then', 'else' - ]; - var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; - RULES.all = toHash(ALL); - RULES.types = toHash(TYPES); - RULES.forEach(function (group) { - group.rules = group.rules.map(function (keyword) { - var implKeywords; - if (typeof keyword == 'object') { - var key = Object.keys(keyword)[0]; - implKeywords = keyword[key]; - keyword = key; - implKeywords.forEach(function (k) { - ALL.push(k); - RULES.all[k] = true; - }); - } - ALL.push(keyword); - var rule = RULES.all[keyword] = { - keyword: keyword, - code: ruleModules[keyword], - implements: implKeywords - }; - return rule; - }); - RULES.all.$comment = { - keyword: '$comment', - code: ruleModules.$comment - }; - if (group.type) RULES.types[group.type] = group; - }); - RULES.keywords = toHash(ALL.concat(KEYWORDS)); - RULES.custom = {}; - return RULES; - }; - return rules; -} - -var data$v; -var hasRequiredData$1; - -function requireData$1 () { - if (hasRequiredData$1) return data$v; - hasRequiredData$1 = 1; - var KEYWORDS = [ - 'multipleOf', - 'maximum', - 'exclusiveMaximum', - 'minimum', - 'exclusiveMinimum', - 'maxLength', - 'minLength', - 'pattern', - 'additionalItems', - 'maxItems', - 'minItems', - 'uniqueItems', - 'maxProperties', - 'minProperties', - 'required', - 'additionalProperties', - 'enum', - 'format', - 'const' - ]; - data$v = function (metaSchema, keywordsJsonPointers) { - for (var i=0; i 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __values$1(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read$1(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { error }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spreadArray$1(to, from2, pack) { - if (arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) { - if (ar || !(i in from2)) { - if (!ar) ar = Array.prototype.slice.call(from2, 0, i); - ar[i] = from2[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from2)); -} -function __await$1(v) { - return this instanceof __await$1 ? (this.v = v, this) : new __await$1(v); -} -function __asyncGenerator$1(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - 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); - } - } - function step(r) { - r.value instanceof __await$1 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncValues$1(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values$1 === "function" ? __values$1(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - 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); - }); - }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve({ value: v2, done: d }); - }, reject); - } -} -function isFunction(value) { - return typeof value === "function"; -} -function createErrorClass(createImpl) { - var _super = function(instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} -var UnsubscriptionError = createErrorClass(function(_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) { - return i + 1 + ") " + err.toString(); - }).join("\n ") : ""; - this.name = "UnsubscriptionError"; - this.errors = errors; - }; -}); -function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} -var Subscription = (function() { - function Subscription2(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription2.prototype.unsubscribe = function() { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = __values$1(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); - } finally { - if (e_1) throw e_1.error; - } - } - } else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = __values$1(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError) { - errors = __spreadArray$1(__spreadArray$1([], __read$1(errors)), __read$1(err.errors)); - } else { - errors.push(err); - } - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); - } finally { - if (e_2) throw e_2.error; - } - } - } - if (errors) { - throw new UnsubscriptionError(errors); - } - } - }; - Subscription2.prototype.add = function(teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } else { - if (teardown instanceof Subscription2) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription2.prototype._hasParent = function(parent) { - var _parentage = this._parentage; - return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); - }; - Subscription2.prototype._addParent = function(parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription2.prototype._removeParent = function(parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - }; - Subscription2.prototype.remove = function(teardown) { - var _finalizers = this._finalizers; - _finalizers && arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription2) { - teardown._removeParent(this); - } - }; - Subscription2.EMPTY = (function() { - var empty = new Subscription2(); - empty.closed = true; - return empty; - })(); - return Subscription2; -})(); -var EMPTY_SUBSCRIPTION = Subscription.EMPTY; -function isSubscription(value) { - return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe); -} -function execFinalizer(finalizer) { - if (isFunction(finalizer)) { - finalizer(); - } else { - finalizer.unsubscribe(); - } -} -var config$2 = { - Promise: void 0}; -var timeoutProvider = { - setTimeout: function(handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - return setTimeout.apply(void 0, __spreadArray$1([handler, timeout], __read$1(args))); - }, - clearTimeout: function(handle) { - return (clearTimeout)(handle); - }, - delegate: void 0 -}; -function reportUnhandledError(err) { - timeoutProvider.setTimeout(function() { - { - throw err; - } - }); -} -function noop() { -} -function errorContext(cb) { - { - cb(); - } -} -var Subscriber = (function(_super) { - __extends$1(Subscriber2, _super); - function Subscriber2(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (isSubscription(destination)) { - destination.add(_this); - } - } else { - _this.destination = EMPTY_OBSERVER; - } - return _this; - } - Subscriber2.create = function(next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber2.prototype.next = function(value) { - if (this.isStopped) ; else { - this._next(value); - } - }; - Subscriber2.prototype.error = function(err) { - if (this.isStopped) ; else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber2.prototype.complete = function() { - if (this.isStopped) ; else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber2.prototype.unsubscribe = function() { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber2.prototype._next = function(value) { - this.destination.next(value); - }; - Subscriber2.prototype._error = function(err) { - try { - this.destination.error(err); - } finally { - this.unsubscribe(); - } - }; - Subscriber2.prototype._complete = function() { - try { - this.destination.complete(); - } finally { - this.unsubscribe(); - } - }; - return Subscriber2; -})(Subscription); -var ConsumerObserver = (function() { - function ConsumerObserver2(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver2.prototype.next = function(value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver2.prototype.error = function(err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } catch (error) { - handleUnhandledError(error); - } - } else { - handleUnhandledError(err); - } - }; - ConsumerObserver2.prototype.complete = function() { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver2; -})(); -var SafeSubscriber = (function(_super) { - __extends$1(SafeSubscriber2, _super); - function SafeSubscriber2(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0, - error: error !== null && error !== void 0 ? error : void 0, - complete: complete !== null && complete !== void 0 ? complete : void 0 - }; - } else { - { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber2; -})(Subscriber); -function handleUnhandledError(error) { - { - reportUnhandledError(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -var EMPTY_OBSERVER = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop -}; -var observable = (function() { - return typeof Symbol === "function" && Symbol.observable || "@@observable"; -})(); -function identity(x) { - return x; -} -function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); -} -function pipeFromArray(fns) { - if (fns.length === 0) { - return identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function(prev, fn) { - return fn(prev); - }, input); - }; -} -var Observable = (function() { - function Observable2(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - Observable2.prototype.lift = function(operator) { - var observable2 = new Observable2(); - observable2.source = this; - observable2.operator = operator; - return observable2; - }; - Observable2.prototype.subscribe = function(observerOrNext, error, complete) { - var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - errorContext(function() { - var _a = _this, operator = _a.operator, source = _a.source; - subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber)); - }); - return subscriber; - }; - Observable2.prototype._trySubscribe = function(sink) { - try { - return this._subscribe(sink); - } catch (err) { - sink.error(err); - } - }; - Observable2.prototype.forEach = function(next, promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function(resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function(value) { - try { - next(value); - } catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve - }); - _this.subscribe(subscriber); - }); - }; - Observable2.prototype._subscribe = function(subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - }; - Observable2.prototype[observable] = function() { - return this; - }; - Observable2.prototype.pipe = function() { - var operations = []; - for (var _i = 0; _i < arguments.length; _i++) { - operations[_i] = arguments[_i]; - } - return pipeFromArray(operations)(this); - }; - Observable2.prototype.toPromise = function(promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function(resolve, reject) { - var value; - _this.subscribe(function(x) { - return value = x; - }, function(err) { - return reject(err); - }, function() { - return resolve(value); - }); - }); - }; - Observable2.create = function(subscribe) { - return new Observable2(subscribe); - }; - return Observable2; -})(); -function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config$2.Promise) !== null && _a !== void 0 ? _a : Promise; -} -function isObserver(value) { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); -} -function isSubscriber(value) { - return value && value instanceof Subscriber || isObserver(value) && isSubscription(value); -} -function hasLift(source) { - return isFunction(source === null || source === void 0 ? void 0 : source.lift); -} -function operate(init) { - return function(source) { - if (hasLift(source)) { - return source.lift(function(liftedSource) { - try { - return init(liftedSource, this); - } catch (err) { - this.error(err); - } - }); - } - throw new TypeError("Unable to lift unknown Observable type"); - }; -} -function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -var OperatorSubscriber = (function(_super) { - __extends$1(OperatorSubscriber2, _super); - function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext ? function(value) { - try { - onNext(value); - } catch (err) { - destination.error(err); - } - } : _super.prototype._next; - _this._error = onError ? function(err) { - try { - onError(err); - } catch (err2) { - destination.error(err2); - } finally { - this.unsubscribe(); - } - } : _super.prototype._error; - _this._complete = onComplete ? function() { - try { - onComplete(); - } catch (err) { - destination.error(err); - } finally { - this.unsubscribe(); - } - } : _super.prototype._complete; - return _this; - } - OperatorSubscriber2.prototype.unsubscribe = function() { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber2; -})(Subscriber); -var ObjectUnsubscribedError = createErrorClass(function(_super) { - return function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = "ObjectUnsubscribedError"; - this.message = "object unsubscribed"; - }; -}); -var Subject = (function(_super) { - __extends$1(Subject2, _super); - function Subject2() { - var _this = _super.call(this) || this; - _this.closed = false; - _this.currentObservers = null; - _this.observers = []; - _this.isStopped = false; - _this.hasError = false; - _this.thrownError = null; - return _this; - } - Subject2.prototype.lift = function(operator) { - var subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - }; - Subject2.prototype._throwIfClosed = function() { - if (this.closed) { - throw new ObjectUnsubscribedError(); - } - }; - Subject2.prototype.next = function(value) { - var _this = this; - errorContext(function() { - var e_1, _a; - _this._throwIfClosed(); - if (!_this.isStopped) { - if (!_this.currentObservers) { - _this.currentObservers = Array.from(_this.observers); - } - try { - for (var _b = __values$1(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { - var observer = _c.value; - observer.next(value); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - }; - Subject2.prototype.error = function(err) { - var _this = this; - errorContext(function() { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.hasError = _this.isStopped = true; - _this.thrownError = err; - var observers = _this.observers; - while (observers.length) { - observers.shift().error(err); - } - } - }); - }; - Subject2.prototype.complete = function() { - var _this = this; - errorContext(function() { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.isStopped = true; - var observers = _this.observers; - while (observers.length) { - observers.shift().complete(); - } - } - }); - }; - Subject2.prototype.unsubscribe = function() { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - }; - Object.defineProperty(Subject2.prototype, "observed", { - get: function() { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - }, - enumerable: false, - configurable: true - }); - Subject2.prototype._trySubscribe = function(subscriber) { - this._throwIfClosed(); - return _super.prototype._trySubscribe.call(this, subscriber); - }; - Subject2.prototype._subscribe = function(subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - }; - Subject2.prototype._innerSubscribe = function(subscriber) { - var _this = this; - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; - if (hasError || isStopped) { - return EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription(function() { - _this.currentObservers = null; - arrRemove(observers, subscriber); - }); - }; - Subject2.prototype._checkFinalizedStatuses = function(subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; - if (hasError) { - subscriber.error(thrownError); - } else if (isStopped) { - subscriber.complete(); - } - }; - Subject2.prototype.asObservable = function() { - var observable2 = new Observable(); - observable2.source = this; - return observable2; - }; - Subject2.create = function(destination, source) { - return new AnonymousSubject(destination, source); - }; - return Subject2; -})(Observable); -var AnonymousSubject = (function(_super) { - __extends$1(AnonymousSubject2, _super); - function AnonymousSubject2(destination, source) { - var _this = _super.call(this) || this; - _this.destination = destination; - _this.source = source; - return _this; - } - AnonymousSubject2.prototype.next = function(value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - }; - AnonymousSubject2.prototype.error = function(err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - }; - AnonymousSubject2.prototype.complete = function() { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - AnonymousSubject2.prototype._subscribe = function(subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; - }; - return AnonymousSubject2; -})(Subject); -var dateTimestampProvider = { - now: function() { - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: void 0 -}; -var ReplaySubject = (function(_super) { - __extends$1(ReplaySubject2, _super); - function ReplaySubject2(_bufferSize, _windowTime, _timestampProvider) { - if (_bufferSize === void 0) { - _bufferSize = Infinity; - } - if (_windowTime === void 0) { - _windowTime = Infinity; - } - if (_timestampProvider === void 0) { - _timestampProvider = dateTimestampProvider; - } - var _this = _super.call(this) || this; - _this._bufferSize = _bufferSize; - _this._windowTime = _windowTime; - _this._timestampProvider = _timestampProvider; - _this._buffer = []; - _this._infiniteTimeWindow = true; - _this._infiniteTimeWindow = _windowTime === Infinity; - _this._bufferSize = Math.max(1, _bufferSize); - _this._windowTime = Math.max(1, _windowTime); - return _this; - } - ReplaySubject2.prototype.next = function(value) { - var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - _super.prototype.next.call(this, value); - }; - ReplaySubject2.prototype._subscribe = function(subscriber) { - this._throwIfClosed(); - this._trimBuffer(); - var subscription = this._innerSubscribe(subscriber); - var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; - var copy = _buffer.slice(); - for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i]); - } - this._checkFinalizedStatuses(subscriber); - return subscription; - }; - ReplaySubject2.prototype._trimBuffer = function() { - var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; - var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - if (!_infiniteTimeWindow) { - var now = _timestampProvider.now(); - var last2 = 0; - for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { - last2 = i; - } - last2 && _buffer.splice(0, last2 + 1); - } - }; - return ReplaySubject2; -})(Subject); -var Action$1 = (function(_super) { - __extends$1(Action2, _super); - function Action2(scheduler, work) { - return _super.call(this) || this; - } - Action2.prototype.schedule = function(state, delay2) { - return this; - }; - return Action2; -})(Subscription); -var intervalProvider = { - setInterval: function(handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - return setInterval.apply(void 0, __spreadArray$1([handler, timeout], __read$1(args))); - }, - clearInterval: function(handle) { - return (clearInterval)(handle); - }, - delegate: void 0 -}; -var AsyncAction = (function(_super) { - __extends$1(AsyncAction2, _super); - function AsyncAction2(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.pending = false; - return _this; - } - AsyncAction2.prototype.schedule = function(state, delay2) { - var _a; - if (delay2 === void 0) { - delay2 = 0; - } - if (this.closed) { - return this; - } - this.state = state; - var id = this.id; - var scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay2); - } - this.pending = true; - this.delay = delay2; - this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay2); - return this; - }; - AsyncAction2.prototype.requestAsyncId = function(scheduler, _id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay2); - }; - AsyncAction2.prototype.recycleAsyncId = function(_scheduler, id, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - if (delay2 != null && this.delay === delay2 && this.pending === false) { - return id; - } - if (id != null) { - intervalProvider.clearInterval(id); - } - return void 0; - }; - AsyncAction2.prototype.execute = function(state, delay2) { - if (this.closed) { - return new Error("executing a cancelled action"); - } - this.pending = false; - var error = this._execute(state, delay2); - if (error) { - return error; - } else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - }; - AsyncAction2.prototype._execute = function(state, _delay) { - var errored = false; - var errorValue; - try { - this.work(state); - } catch (e) { - errored = true; - errorValue = e ? e : new Error("Scheduled action threw falsy error"); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - }; - AsyncAction2.prototype.unsubscribe = function() { - if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; - var actions = scheduler.actions; - this.work = this.state = this.scheduler = null; - this.pending = false; - arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - _super.prototype.unsubscribe.call(this); - } - }; - return AsyncAction2; -})(Action$1); -var Scheduler = (function() { - function Scheduler2(schedulerActionCtor, now) { - if (now === void 0) { - now = Scheduler2.now; - } - this.schedulerActionCtor = schedulerActionCtor; - this.now = now; - } - Scheduler2.prototype.schedule = function(work, delay2, state) { - if (delay2 === void 0) { - delay2 = 0; - } - return new this.schedulerActionCtor(this, work).schedule(state, delay2); - }; - Scheduler2.now = dateTimestampProvider.now; - return Scheduler2; -})(); -var AsyncScheduler = (function(_super) { - __extends$1(AsyncScheduler2, _super); - function AsyncScheduler2(SchedulerAction, now) { - if (now === void 0) { - now = Scheduler.now; - } - var _this = _super.call(this, SchedulerAction, now) || this; - _this.actions = []; - _this._active = false; - return _this; - } - AsyncScheduler2.prototype.flush = function(action) { - var actions = this.actions; - if (this._active) { - actions.push(action); - return; - } - var error; - this._active = true; - do { - if (error = action.execute(action.state, action.delay)) { - break; - } - } while (action = actions.shift()); - this._active = false; - if (error) { - while (action = actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsyncScheduler2; -})(Scheduler); -var asyncScheduler = new AsyncScheduler(AsyncAction); -var async = asyncScheduler; -var EMPTY = new Observable(function(subscriber) { - return subscriber.complete(); -}); -function isScheduler(value) { - return value && isFunction(value.schedule); -} -function last(arr) { - return arr[arr.length - 1]; -} -function popScheduler(args) { - return isScheduler(last(args)) ? args.pop() : void 0; -} -function popNumber(args, defaultValue) { - return typeof last(args) === "number" ? args.pop() : defaultValue; -} -var isArrayLike = (function(x) { - return x && typeof x.length === "number" && typeof x !== "function"; -}); -function isPromise(value) { - return isFunction(value === null || value === void 0 ? void 0 : value.then); -} -function isInteropObservable(input) { - return isFunction(input[observable]); -} -function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} -function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === "object" ? "an invalid object" : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); -} -function getSymbolIterator() { - if (typeof Symbol !== "function" || !Symbol.iterator) { - return "@@iterator"; - } - return Symbol.iterator; -} -var iterator = getSymbolIterator(); -function isIterable(input) { - return isFunction(input === null || input === void 0 ? void 0 : input[iterator]); -} -function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator$1(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator$1(this, function(_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - return [4, __await$1(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, __await$1(void 0)]; - case 4: - return [2, _b.sent()]; - case 5: - return [4, __await$1(value)]; - case 6: - return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: - return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: - return [2]; - } - }); - }); -} -function isReadableStreamLike(obj) { - return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); -} -function innerFrom(input) { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw createInvalidObservableTypeError(input); -} -function fromInteropObservable(obj) { - return new Observable(function(subscriber) { - var obs = obj[observable](); - if (isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError("Provided object does not correctly implement Symbol.observable"); - }); -} -function fromArrayLike(array) { - return new Observable(function(subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -function fromPromise(promise) { - return new Observable(function(subscriber) { - promise.then(function(value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function(err) { - return subscriber.error(err); - }).then(null, reportUnhandledError); - }); -} -function fromIterable(iterable) { - return new Observable(function(subscriber) { - var e_1, _a; - try { - for (var iterable_1 = __values$1(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); - } finally { - if (e_1) throw e_1.error; - } - } - subscriber.complete(); - }); -} -function fromAsyncIterable(asyncIterable) { - return new Observable(function(subscriber) { - process$1(asyncIterable, subscriber).catch(function(err) { - return subscriber.error(err); - }); - }); -} -function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); -} -function process$1(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return __awaiter$1(this, void 0, void 0, function() { - var value, e_2_1; - return __generator$1(this, function(_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = __asyncValues$1(asyncIterable); - _b.label = 1; - case 1: - return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: - return [3, 1]; - case 4: - return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { error: e_2_1 }; - return [3, 11]; - case 6: - _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: - return [3, 10]; - case 9: - if (e_2) throw e_2.error; - return [7]; - case 10: - return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); -} -function executeSchedule(parentSubscription, scheduler, work, delay2, repeat) { - if (delay2 === void 0) { - delay2 = 0; - } - if (repeat === void 0) { - repeat = false; - } - var scheduleSubscription = scheduler.schedule(function() { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay2)); - } else { - this.unsubscribe(); - } - }, delay2); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } -} -function observeOn(scheduler, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return executeSchedule(subscriber, scheduler, function() { - return subscriber.next(value); - }, delay2); - }, function() { - return executeSchedule(subscriber, scheduler, function() { - return subscriber.complete(); - }, delay2); - }, function(err) { - return executeSchedule(subscriber, scheduler, function() { - return subscriber.error(err); - }, delay2); - })); - }); -} -function subscribeOn(scheduler, delay2) { - if (delay2 === void 0) { - delay2 = 0; - } - return operate(function(source, subscriber) { - subscriber.add(scheduler.schedule(function() { - return source.subscribe(subscriber); - }, delay2)); - }); -} -function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -function scheduleArray(input, scheduler) { - return new Observable(function(subscriber) { - var i = 0; - return scheduler.schedule(function() { - if (i === input.length) { - subscriber.complete(); - } else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} -function scheduleIterable(input, scheduler) { - return new Observable(function(subscriber) { - var iterator2; - executeSchedule(subscriber, scheduler, function() { - iterator2 = input[iterator](); - executeSchedule(subscriber, scheduler, function() { - var _a; - var value; - var done; - try { - _a = iterator2.next(), value = _a.value, done = _a.done; - } catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } else { - subscriber.next(value); - } - }, 0, true); - }); - return function() { - return isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return(); - }; - }); -} -function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error("Iterable cannot be null"); - } - return new Observable(function(subscriber) { - executeSchedule(subscriber, scheduler, function() { - var iterator2 = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, function() { - iterator2.next().then(function(result) { - if (result.done) { - subscriber.complete(); - } else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} -function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); -} -function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); -} -function from(input, scheduler) { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); -} -function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return from(args, scheduler); -} -var EmptyError = createErrorClass(function(_super) { - return function EmptyErrorImpl() { - _super(this); - this.name = "EmptyError"; - this.message = "no elements in sequence"; - }; -}); -function lastValueFrom(source, config2) { - var hasConfig = typeof config2 === "object"; - return new Promise(function(resolve, reject) { - var _hasValue = false; - var _value; - source.subscribe({ - next: function(value) { - _value = value; - _hasValue = true; - }, - error: reject, - complete: function() { - if (_hasValue) { - resolve(_value); - } else if (hasConfig) { - resolve(config2.defaultValue); - } else { - reject(new EmptyError()); - } - } - }); - }); -} -function firstValueFrom(source, config2) { - return new Promise(function(resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function(value) { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: function() { - { - reject(new EmptyError()); - } - } - }); - source.subscribe(subscriber); - }); -} -function isValidDate(value) { - return value instanceof Date && !isNaN(value); -} -function map(project, thisArg) { - return operate(function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); -} -var isArray = Array.isArray; -function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, __spreadArray$1([], __read$1(args))) : fn(args); -} -function mapOneOrManyArgs(fn) { - return map(function(args) { - return callOrApply(fn, args); - }); -} -function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { - var buffer = []; - var active = 0; - var index = 0; - var isComplete = false; - var checkComplete = function() { - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - var outerNext = function(value) { - return active < concurrent ? doInnerSub(value) : buffer.push(value); - }; - var doInnerSub = function(value) { - expand && subscriber.next(value); - active++; - var innerComplete = false; - innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function(innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } else { - subscriber.next(innerValue); - } - }, function() { - innerComplete = true; - }, void 0, function() { - if (innerComplete) { - try { - active--; - var _loop_1 = function() { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) ; else { - doInnerSub(bufferedValue); - } - }; - while (buffer.length && active < concurrent) { - _loop_1(); - } - checkComplete(); - } catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(createOperatorSubscriber(subscriber, outerNext, function() { - isComplete = true; - checkComplete(); - })); - return function() { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; -} -function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - if (isFunction(resultSelector)) { - return mergeMap(function(a, i) { - return map(function(b, ii) { - return resultSelector(a, b, i, ii); - })(innerFrom(project(a, i))); - }, concurrent); - } else if (typeof resultSelector === "number") { - concurrent = resultSelector; - } - return operate(function(source, subscriber) { - return mergeInternals(source, subscriber, project, concurrent); - }); -} -function mergeAll(concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - return mergeMap(identity, concurrent); -} -function concatAll() { - return mergeAll(1); -} -function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return concatAll()(from(args, popScheduler(args))); -} -function defer(observableFactory) { - return new Observable(function(subscriber) { - innerFrom(observableFactory()).subscribe(subscriber); - }); -} -var nodeEventEmitterMethods = ["addListener", "removeListener"]; -var eventTargetMethods = ["addEventListener", "removeEventListener"]; -var jqueryMethods = ["on", "off"]; -function fromEvent(target, eventName, options, resultSelector) { - if (isFunction(options)) { - resultSelector = options; - options = void 0; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); - } - var _a = __read$1(isEventTarget(target) ? eventTargetMethods.map(function(methodName) { - return function(handler) { - return target[methodName](eventName, handler, options); - }; - }) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [], 2), add = _a[0], remove = _a[1]; - if (!add) { - if (isArrayLike(target)) { - return mergeMap(function(subTarget) { - return fromEvent(subTarget, eventName, options); - })(innerFrom(target)); - } - } - if (!add) { - throw new TypeError("Invalid event target"); - } - return new Observable(function(subscriber) { - var handler = function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return subscriber.next(1 < args.length ? args : args[0]); - }; - add(handler); - return function() { - return remove(handler); - }; - }); -} -function toCommonHandlerRegistry(target, eventName) { - return function(methodName) { - return function(handler) { - return target[methodName](eventName, handler); - }; - }; -} -function isNodeStyleEventEmitter(target) { - return isFunction(target.addListener) && isFunction(target.removeListener); -} -function isJQueryStyleEventEmitter(target) { - return isFunction(target.on) && isFunction(target.off); -} -function isEventTarget(target) { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); -} -function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { - dueTime = 0; - } - if (scheduler === void 0) { - scheduler = async; - } - return new Observable(function(subscriber) { - var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - var n = 0; - return scheduler.schedule(function() { - if (!subscriber.closed) { - subscriber.next(n++); - { - subscriber.complete(); - } - } - }, due); - }); -} -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - var sources = args; - return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler)); -} -var NEVER = new Observable(noop); -var isArray3 = Array.isArray; -function argsOrArgArray(args) { - return args.length === 1 && isArray3(args[0]) ? args[0] : args; -} -function filter(predicate, thisArg) { - return operate(function(source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - return predicate.call(thisArg, value, index++) && subscriber.next(value); - })); - }); -} -function race() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); -} -function raceInit(sources) { - return function(subscriber) { - var subscriptions = []; - var _loop_1 = function(i2) { - subscriptions.push(innerFrom(sources[i2]).subscribe(createOperatorSubscriber(subscriber, function(value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i2 && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - _loop_1(i); - } - }; -} -function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { - startBufferEvery = null; - } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return operate(function(source, subscriber) { - var buffers = []; - var count = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values$1(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (toEmit) { - try { - for (var toEmit_1 = __values$1(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); - } finally { - if (e_2) throw e_2.error; - } - } - } - }, function() { - var e_3, _a; - try { - for (var buffers_2 = __values$1(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); - } finally { - if (e_3) throw e_3.error; - } - } - subscriber.complete(); - }, void 0, function() { - buffers = null; - })); - }); -} -function catchError(selector) { - return operate(function(source, subscriber) { - var innerSub = null; - var syncUnsub = false; - var handledResult; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, void 0, void 0, function(err) { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); -} -function concatMap(project, resultSelector) { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); -} -function defaultIfEmpty(defaultValue) { - return operate(function(source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - subscriber.next(value); - }, function() { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); -} -function take(count) { - return count <= 0 ? function() { - return EMPTY; - } : operate(function(source, subscriber) { - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); -} -function ignoreElements() { - return operate(function(source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, noop)); - }); -} -function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { - keySelector = identity; - } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return operate(function(source, subscriber) { - var previousKey; - var first2 = true; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var currentKey = keySelector(value); - if (first2 || !comparator(previousKey, currentKey)) { - first2 = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); -} -function defaultCompare(a, b) { - return a === b; -} -function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { - errorFactory = defaultErrorFactory; - } - return operate(function(source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - hasValue = true; - subscriber.next(value); - }, function() { - return hasValue ? subscriber.complete() : subscriber.error(errorFactory()); - })); - }); -} -function defaultErrorFactory() { - return new EmptyError(); -} -function first(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function(source) { - return source.pipe(predicate ? filter(function(v, i) { - return predicate(v, i, source); - }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function() { - return new EmptyError(); - })); - }; -} -function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { - concurrent = Infinity; - } - return operate(function(source, subscriber) { - var state = seed; - return mergeInternals(source, subscriber, function(value, index) { - return accumulator(state, value, index); - }, concurrent, function(value) { - state = value; - }, false, void 0, function() { - return state = null; - }); - }); -} -function raceWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return !otherSources.length ? identity : operate(function(source, subscriber) { - raceInit(__spreadArray$1([source], __read$1(otherSources)))(subscriber); - }); -} -function retry(configOrCount) { - if (configOrCount === void 0) { - configOrCount = Infinity; - } - var config2; - if (configOrCount && typeof configOrCount === "object") { - config2 = configOrCount; - } else { - config2 = { - count: configOrCount - }; - } - var _a = config2.count, count = _a === void 0 ? Infinity : _a, delay2 = config2.delay, _b = config2.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; - return count <= 0 ? identity : operate(function(source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function() { - var syncUnsub = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, function(value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, void 0, function(err) { - if (soFar++ < count) { - var resub_1 = function() { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } else { - syncUnsub = true; - } - }; - if (delay2 != null) { - var notifier = typeof delay2 === "number" ? timer(delay2) : innerFrom(delay2(err, soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function() { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function() { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } else { - resub_1(); - } - } else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} -function startWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - var scheduler = popScheduler(values); - return operate(function(source, subscriber) { - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); - }); -} -function switchMap(project, resultSelector) { - return operate(function(source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function() { - return isComplete && !innerSubscriber && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, function(innerValue) { - return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); - }, function() { - innerSubscriber = null; - checkComplete(); - })); - }, function() { - isComplete = true; - checkComplete(); - })); - }); -} -function takeUntil(notifier) { - return operate(function(source, subscriber) { - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function() { - return subscriber.complete(); - }, noop)); - !subscriber.closed && source.subscribe(subscriber); - }); -} -function tap(observerOrNext, error, complete) { - var tapObserver = isFunction(observerOrNext) || error || complete ? { next: observerOrNext, error, complete } : observerOrNext; - return tapObserver ? operate(function(source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(createOperatorSubscriber(subscriber, function(value) { - var _a2; - (_a2 = tapObserver.next) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, value); - subscriber.next(value); - }, function() { - var _a2; - isUnsub = false; - (_a2 = tapObserver.complete) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); - subscriber.complete(); - }, function(err) { - var _a2; - isUnsub = false; - (_a2 = tapObserver.error) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver, err); - subscriber.error(err); - }, function() { - var _a2, _b; - if (isUnsub) { - (_a2 = tapObserver.unsubscribe) === null || _a2 === void 0 ? void 0 : _a2.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) : identity; -} - -/** -MIT License -Copyright (c) 2021 Jason Miller -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ -function mitt_default(n) { - return { all: n = n || new Map(), on: function(t, e) { - var i = n.get(t); - i ? i.push(e) : n.set(t, [e]); - }, off: function(t, e) { - var i = n.get(t); - i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, [])); - }, emit: function(t, e) { - var i = n.get(t); - i && i.slice().map(function(n2) { - n2(e); - }), (i = n.get("*")) && i.slice().map(function(n2) { - n2(t, e); - }); - } }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -Symbol.dispose ??= Symbol('dispose'); -Symbol.asyncDispose ??= Symbol('asyncDispose'); -const disposeSymbol = Symbol.dispose; -const asyncDisposeSymbol = Symbol.asyncDispose; -class DisposableStackPolyfill { - #disposed = false; - #stack = []; - get disposed() { - return this.#disposed; - } - dispose() { - this[disposeSymbol](); - } - use(value) { - if (value && typeof value[disposeSymbol] === 'function') { - this.#stack.push(value); - } - return value; - } - adopt(value, onDispose) { - this.#stack.push({ - [disposeSymbol]() { - onDispose(value); - }, - }); - return value; - } - defer(onDispose) { - this.#stack.push({ - [disposeSymbol]() { - onDispose(); - }, - }); - } - move() { - if (this.#disposed) { - throw new ReferenceError('A disposed stack can not use anything new'); - } - const stack = new DisposableStackPolyfill(); - stack.#stack = this.#stack; - this.#stack = []; - this.#disposed = true; - return stack; - } - [disposeSymbol]() { - if (this.#disposed) { - return; - } - this.#disposed = true; - const errors = []; - for (const resource of this.#stack.reverse()) { - try { - resource[disposeSymbol](); - } - catch (e) { - errors.push(e); - } - } - if (errors.length === 1) { - throw errors[0]; - } - else if (errors.length > 1) { - let suppressed = null; - for (const error of errors) { - if (suppressed === null) { - suppressed = error; - } - else { - suppressed = new SuppressedErrorPolyfill(error, suppressed); - } - } - throw suppressed; - } - } - [Symbol.toStringTag] = 'DisposableStack'; -} -const DisposableStack = globalThis.DisposableStack ?? DisposableStackPolyfill; -class AsyncDisposableStackPolyfill { - #disposed = false; - #stack = []; - get disposed() { - return this.#disposed; - } - async disposeAsync() { - await this[asyncDisposeSymbol](); - } - use(value) { - if (value) { - const asyncDispose = value[asyncDisposeSymbol]; - const dispose = value[disposeSymbol]; - if (typeof asyncDispose === 'function') { - this.#stack.push(value); - } - else if (typeof dispose === 'function') { - this.#stack.push({ - [asyncDisposeSymbol]: async () => { - value[disposeSymbol](); - }, - }); - } - } - return value; - } - adopt(value, onDispose) { - this.#stack.push({ - [asyncDisposeSymbol]() { - return onDispose(value); - }, - }); - return value; - } - defer(onDispose) { - this.#stack.push({ - [asyncDisposeSymbol]() { - return onDispose(); - }, - }); - } - move() { - if (this.#disposed) { - throw new ReferenceError('A disposed stack can not use anything new'); - } - const stack = new AsyncDisposableStackPolyfill(); - stack.#stack = this.#stack; - this.#stack = []; - this.#disposed = true; - return stack; - } - async [asyncDisposeSymbol]() { - if (this.#disposed) { - return; - } - this.#disposed = true; - const errors = []; - for (const resource of this.#stack.reverse()) { - try { - await resource[asyncDisposeSymbol](); - } - catch (e) { - errors.push(e); - } - } - if (errors.length === 1) { - throw errors[0]; - } - else if (errors.length > 1) { - let suppressed = null; - for (const error of errors) { - if (suppressed === null) { - suppressed = error; - } - else { - suppressed = new SuppressedErrorPolyfill(error, suppressed); - } - } - throw suppressed; - } - } - [Symbol.toStringTag] = 'AsyncDisposableStack'; -} -const AsyncDisposableStack = globalThis.AsyncDisposableStack ?? AsyncDisposableStackPolyfill; -class SuppressedErrorPolyfill extends Error { - #error; - #suppressed; - constructor(error, suppressed, message = 'An error was suppressed during disposal') { - super(message); - this.name = 'SuppressedError'; - this.#error = error; - this.#suppressed = suppressed; - } - get error() { - return this.#error; - } - get suppressed() { - return this.#suppressed; - } -} - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class EventEmitter { - #emitter; - #handlers = new Map(); - constructor(emitter = mitt_default(new Map())) { - this.#emitter = emitter; - } - on(type, handler) { - const handlers = this.#handlers.get(type); - if (handlers === undefined) { - this.#handlers.set(type, [handler]); - } - else { - handlers.push(handler); - } - this.#emitter.on(type, handler); - return this; - } - off(type, handler) { - const handlers = this.#handlers.get(type) ?? []; - if (handler === undefined) { - for (const handler of handlers) { - this.#emitter.off(type, handler); - } - this.#handlers.delete(type); - return this; - } - const index = handlers.lastIndexOf(handler); - if (index > -1) { - this.#emitter.off(type, ...handlers.splice(index, 1)); - } - return this; - } - emit(type, event) { - this.#emitter.emit(type, event); - return this.listenerCount(type) > 0; - } - once(type, handler) { - const onceHandler = eventData => { - handler(eventData); - this.off(type, onceHandler); - }; - return this.on(type, onceHandler); - } - listenerCount(type) { - return this.#handlers.get(type)?.length || 0; - } - removeAllListeners(type) { - if (type !== undefined) { - return this.off(type); - } - this[disposeSymbol](); - return this; - } - [disposeSymbol]() { - for (const [type, handlers] of this.#handlers) { - for (const handler of handlers) { - this.#emitter.off(type, handler); - } - } - this.#handlers.clear(); - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const isNode = !!(typeof process !== 'undefined' && process.version); -const environment = { - value: { - get fs() { - throw new Error('fs is not available in this environment'); - }, - get ScreenRecorder() { - throw new Error('ScreenRecorder is not available in this environment'); - }, - }, -}; - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const assert = (value, message) => { - if (!value) { - throw new Error(message); - } -}; - -/** - * @license - * Copyright 2024 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function stringToTypedArray(string, base64Encoded = false) { - if (base64Encoded) { - if ('fromBase64' in Uint8Array) { - return Uint8Array.fromBase64(string); - } - if (typeof Buffer === 'function') { - return Buffer.from(string, 'base64'); - } - return Uint8Array.from(atob(string), m => { - return m.codePointAt(0); - }); - } - return new TextEncoder().encode(string); -} -function stringToBase64(str) { - return typedArrayToBase64(new TextEncoder().encode(str)); -} -function typedArrayToBase64(typedArray) { - const chunkSize = 65534; - const chunks = []; - for (let i = 0; i < typedArray.length; i += chunkSize) { - const chunk = typedArray.subarray(i, i + chunkSize); - chunks.push(String.fromCodePoint.apply(null, chunk)); - } - const binaryString = chunks.join(''); - return btoa(binaryString); -} -function mergeUint8Arrays(items) { - let length = 0; - for (const item of items) { - length += item.length; - } - const result = new Uint8Array(length); - let offset = 0; - for (const item of items) { - result.set(item, offset); - offset += item.length; - } - return result; -} - -/** - * @license - * Copyright 2025 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const packageVersion = '24.40.0'; - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -let debugModule = null; -async function importDebug() { - if (!debugModule) { - debugModule = (await Promise.resolve().then(function () { return index; })).default; - } - return debugModule; -} -const debug$1 = (prefix) => { - if (isNode) { - return async (...logArgs) => { - (await importDebug())(prefix)(logArgs); - }; - } - return (...logArgs) => { - const debugLevel = globalThis.__PUPPETEER_DEBUG; - if (!debugLevel) { - return; - } - const everythingShouldBeLogged = debugLevel === '*'; - const prefixMatchesDebugLevel = everythingShouldBeLogged || - (debugLevel.endsWith('*') - ? prefix.startsWith(debugLevel) - : prefix === debugLevel); - if (!prefixMatchesDebugLevel) { - return; - } - console.log(`${prefix}:`, ...logArgs); - }; -}; - -/** - * @license - * Copyright 2018 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class PuppeteerError extends Error { - constructor(message, options) { - super(message, options); - this.name = this.constructor.name; - } - get [Symbol.toStringTag]() { - return this.constructor.name; - } -} -let TimeoutError$1 = class TimeoutError extends PuppeteerError { -}; -class TouchError extends PuppeteerError { -} -class ProtocolError extends PuppeteerError { - #code; - #originalMessage = ''; - set code(code) { - this.#code = code; - } - get code() { - return this.#code; - } - set originalMessage(originalMessage) { - this.#originalMessage = originalMessage; - } - get originalMessage() { - return this.#originalMessage; - } -} -class UnsupportedOperation extends PuppeteerError { -} -class TargetCloseError extends ProtocolError { -} -class ConnectionClosedError extends ProtocolError { -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const paperFormats = { - letter: { - cm: { width: 21.59, height: 27.94 }, - in: { width: 8.5, height: 11 }, - }, - legal: { - cm: { width: 21.59, height: 35.56 }, - in: { width: 8.5, height: 14 }, - }, - tabloid: { - cm: { width: 27.94, height: 43.18 }, - in: { width: 11, height: 17 }, - }, - ledger: { - cm: { width: 43.18, height: 27.94 }, - in: { width: 17, height: 11 }, - }, - a0: { - cm: { width: 84.1, height: 118.9 }, - in: { width: 33.1102, height: 46.811 }, - }, - a1: { - cm: { width: 59.4, height: 84.1 }, - in: { width: 23.3858, height: 33.1102 }, - }, - a2: { - cm: { width: 42, height: 59.4 }, - in: { width: 16.5354, height: 23.3858 }, - }, - a3: { - cm: { width: 29.7, height: 42 }, - in: { width: 11.6929, height: 16.5354 }, - }, - a4: { - cm: { width: 21, height: 29.7 }, - in: { width: 8.2677, height: 11.6929 }, - }, - a5: { - cm: { width: 14.8, height: 21 }, - in: { width: 5.8268, height: 8.2677 }, - }, - a6: { - cm: { width: 10.5, height: 14.8 }, - in: { width: 4.1339, height: 5.8268 }, - }, -}; - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const debugError = debug$1('puppeteer:error'); -const DEFAULT_VIEWPORT = Object.freeze({ width: 800, height: 600 }); -const SOURCE_URL = Symbol('Source URL for Puppeteer evaluation scripts'); -class PuppeteerURL { - static INTERNAL_URL = 'pptr:internal'; - static fromCallSite(functionName, site) { - const url = new PuppeteerURL(); - url.#functionName = functionName; - url.#siteString = site.toString(); - return url; - } - static parse = (url) => { - url = url.slice('pptr:'.length); - const [functionName = '', siteString = ''] = url.split(';'); - const puppeteerUrl = new PuppeteerURL(); - puppeteerUrl.#functionName = functionName; - puppeteerUrl.#siteString = decodeURIComponent(siteString); - return puppeteerUrl; - }; - static isPuppeteerURL = (url) => { - return url.startsWith('pptr:'); - }; - #functionName; - #siteString; - get functionName() { - return this.#functionName; - } - get siteString() { - return this.#siteString; - } - toString() { - return `pptr:${[ - this.#functionName, - encodeURIComponent(this.#siteString), - ].join(';')}`; - } -} -const withSourcePuppeteerURLIfNone = (functionName, object) => { - if (Object.prototype.hasOwnProperty.call(object, SOURCE_URL)) { - return object; - } - const original = Error.prepareStackTrace; - Error.prepareStackTrace = (_, stack) => { - return stack[2]; - }; - const site = new Error().stack; - Error.prepareStackTrace = original; - return Object.assign(object, { - [SOURCE_URL]: PuppeteerURL.fromCallSite(functionName, site), - }); -}; -const getSourcePuppeteerURLIfAvailable = (object) => { - if (Object.prototype.hasOwnProperty.call(object, SOURCE_URL)) { - return object[SOURCE_URL]; - } - return undefined; -}; -const isString = (obj) => { - return typeof obj === 'string' || obj instanceof String; -}; -const isNumber = (obj) => { - return typeof obj === 'number' || obj instanceof Number; -}; -function evaluationString( -fun, ...args) { - if (isString(fun)) { - assert(args.length === 0, 'Cannot evaluate a string with arguments'); - return fun; - } - function serializeArgument(arg) { - if (Object.is(arg, undefined)) { - return 'undefined'; - } - return JSON.stringify(arg); - } - return `(${fun})(${args.map(serializeArgument).join(',')})`; -} -async function getReadableAsTypedArray(readable, path) { - const buffers = []; - const reader = readable.getReader(); - if (path) { - const fileHandle = await environment.value.fs.promises.open(path, 'w+'); - try { - while (true) { - const { done, value } = await reader.read(); - if (done) { - break; - } - buffers.push(value); - await fileHandle.writeFile(value); - } - } - finally { - await fileHandle.close(); - } - } - else { - while (true) { - const { done, value } = await reader.read(); - if (done) { - break; - } - buffers.push(value); - } - } - try { - const concat = mergeUint8Arrays(buffers); - if (concat.length === 0) { - return null; - } - return concat; - } - catch (error) { - debugError(error); - return null; - } -} -async function getReadableFromProtocolStream(client, handle) { - return new ReadableStream({ - async pull(controller) { - const { data, base64Encoded, eof } = await client.send('IO.read', { - handle, - }); - controller.enqueue(stringToTypedArray(data, base64Encoded ?? false)); - if (eof) { - await client.send('IO.close', { handle }); - controller.close(); - } - }, - }); -} -const VALID_DIALOG_TYPES = new Set([ - 'alert', - 'confirm', - 'prompt', - 'beforeunload', -]); -function validateDialogType(type) { - let dialogType = null; - if (VALID_DIALOG_TYPES.has(type)) { - dialogType = type; - } - assert(dialogType, `Unknown javascript dialog type: ${type}`); - return dialogType; -} -function timeout(ms, cause) { - return ms === 0 - ? NEVER - : timer(ms).pipe(map(() => { - throw new TimeoutError$1(`Timed out after waiting ${ms}ms`, { cause }); - })); -} -const UTILITY_WORLD_NAME = '__puppeteer_utility_world__' + packageVersion; -const SOURCE_URL_REGEX = /^[\x20\t]*\/\/[@#] sourceURL=\s{0,10}(\S*?)\s{0,10}$/m; -function getSourceUrlComment(url) { - return `//# sourceURL=${url}`; -} -const NETWORK_IDLE_TIME = 500; -function parsePDFOptions(options = {}, lengthUnit = 'in') { - const defaults = { - scale: 1, - displayHeaderFooter: false, - headerTemplate: '', - footerTemplate: '', - printBackground: false, - landscape: false, - pageRanges: '', - preferCSSPageSize: false, - omitBackground: false, - outline: false, - tagged: true, - waitForFonts: true, - }; - let width = 8.5; - let height = 11; - if (options.format) { - const format = paperFormats[options.format.toLowerCase()][lengthUnit]; - assert(format, 'Unknown paper format: ' + options.format); - width = format.width; - height = format.height; - } - else { - width = convertPrintParameterToInches(options.width, lengthUnit) ?? width; - height = - convertPrintParameterToInches(options.height, lengthUnit) ?? height; - } - const margin = { - top: convertPrintParameterToInches(options.margin?.top, lengthUnit) || 0, - left: convertPrintParameterToInches(options.margin?.left, lengthUnit) || 0, - bottom: convertPrintParameterToInches(options.margin?.bottom, lengthUnit) || 0, - right: convertPrintParameterToInches(options.margin?.right, lengthUnit) || 0, - }; - if (options.outline) { - options.tagged = true; - } - return { - ...defaults, - ...options, - width, - height, - margin, - }; -} -const unitToPixels = { - px: 1, - in: 96, - cm: 37.8, - mm: 3.78, -}; -function convertPrintParameterToInches(parameter, lengthUnit = 'in') { - if (typeof parameter === 'undefined') { - return undefined; - } - let pixels; - if (isNumber(parameter)) { - pixels = parameter; - } - else if (isString(parameter)) { - const text = parameter; - let unit = text.substring(text.length - 2).toLowerCase(); - let valueText = ''; - if (unit in unitToPixels) { - valueText = text.substring(0, text.length - 2); - } - else { - unit = 'px'; - valueText = text; - } - const value = Number(valueText); - assert(!isNaN(value), 'Failed to parse parameter value: ' + text); - pixels = value * unitToPixels[unit]; - } - else { - throw new Error('page.pdf() Cannot handle parameter type: ' + typeof parameter); - } - return pixels / unitToPixels[lengthUnit]; -} -function fromEmitterEvent(emitter, eventName) { - return new Observable(subscriber => { - const listener = (event) => { - subscriber.next(event); - }; - emitter.on(eventName, listener); - return () => { - emitter.off(eventName, listener); - }; - }); -} -function fromAbortSignal(signal, cause) { - return signal - ? fromEvent(signal, 'abort').pipe(map(() => { - if (signal.reason instanceof Error) { - signal.reason.cause = cause; - throw signal.reason; - } - throw new Error(signal.reason, { cause }); - })) - : NEVER; -} -function filterAsync(predicate) { - return mergeMap((value) => { - return from(Promise.resolve(predicate(value))).pipe(filter(isMatch => { - return isMatch; - }), map(() => { - return value; - })); - }); -} - -const WEB_PERMISSION_TO_PROTOCOL_PERMISSION = new Map([ - ['accelerometer', 'sensors'], - ['ambient-light-sensor', 'sensors'], - ['background-sync', 'backgroundSync'], - ['camera', 'videoCapture'], - ['clipboard-read', 'clipboardReadWrite'], - ['clipboard-sanitized-write', 'clipboardSanitizedWrite'], - ['clipboard-write', 'clipboardReadWrite'], - ['geolocation', 'geolocation'], - ['gyroscope', 'sensors'], - ['idle-detection', 'idleDetection'], - ['keyboard-lock', 'keyboardLock'], - ['magnetometer', 'sensors'], - ['microphone', 'audioCapture'], - ['midi', 'midi'], - ['notifications', 'notifications'], - ['payment-handler', 'paymentHandler'], - ['persistent-storage', 'durableStorage'], - ['pointer-lock', 'pointerLock'], - ['midi-sysex', 'midiSysex'], -]); -let Browser$1 = class Browser extends EventEmitter { - constructor() { - super(); - } - async waitForTarget(predicate, options = {}) { - const { timeout: ms = 30000, signal } = options; - return await firstValueFrom(merge(fromEmitterEvent(this, "targetcreated" ), fromEmitterEvent(this, "targetchanged" ), from(this.targets())).pipe(filterAsync(predicate), raceWith(fromAbortSignal(signal), timeout(ms)))); - } - async pages(includeAll = false) { - const contextPages = await Promise.all(this.browserContexts().map(context => { - return context.pages(includeAll); - })); - return contextPages.reduce((acc, x) => { - return acc.concat(x); - }, []); - } - async cookies() { - return await this.defaultBrowserContext().cookies(); - } - async setCookie(...cookies) { - return await this.defaultBrowserContext().setCookie(...cookies); - } - async deleteCookie(...cookies) { - return await this.defaultBrowserContext().deleteCookie(...cookies); - } - async deleteMatchingCookies(...filters) { - return await this.defaultBrowserContext().deleteMatchingCookies(...filters); - } - async setPermission(origin, ...permissions) { - return await this.defaultBrowserContext().setPermission(origin, ...permissions); - } - isConnected() { - return this.connected; - } - [disposeSymbol]() { - if (this.process()) { - return void this.close().catch(debugError); - } - return void this.disconnect().catch(debugError); - } - [asyncDisposeSymbol]() { - if (this.process()) { - return this.close(); - } - return this.disconnect(); - } -}; - -/** - * @license - * Copyright 2024 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class Deferred { - static create(opts) { - return new Deferred(opts); - } - static async race(awaitables) { - const deferredWithTimeout = new Set(); - try { - const promises = awaitables.map(value => { - if (value instanceof Deferred) { - if (value.#timeoutId) { - deferredWithTimeout.add(value); - } - return value.valueOrThrow(); - } - return value; - }); - return await Promise.race(promises); - } - finally { - for (const deferred of deferredWithTimeout) { - deferred.reject(new Error('Timeout cleared')); - } - } - } - #isResolved = false; - #isRejected = false; - #value; - #resolve; - #taskPromise = new Promise(resolve => { - this.#resolve = resolve; - }); - #timeoutId; - #timeoutError; - constructor(opts) { - if (opts && opts.timeout > 0) { - this.#timeoutError = new TimeoutError$1(opts.message); - this.#timeoutId = setTimeout(() => { - this.reject(this.#timeoutError); - }, opts.timeout); - } - } - #finish(value) { - clearTimeout(this.#timeoutId); - this.#value = value; - this.#resolve(); - } - resolve(value) { - if (this.#isRejected || this.#isResolved) { - return; - } - this.#isResolved = true; - this.#finish(value); - } - reject(error) { - if (this.#isRejected || this.#isResolved) { - return; - } - this.#isRejected = true; - this.#finish(error); - } - resolved() { - return this.#isResolved; - } - finished() { - return this.#isResolved || this.#isRejected; - } - value() { - return this.#value; - } - #promise; - valueOrThrow() { - if (!this.#promise) { - this.#promise = (async () => { - await this.#taskPromise; - if (this.#isRejected) { - throw this.#value; - } - return this.#value; - })(); - } - return this.#promise; - } -} - -/** - * @license - * Copyright 2024 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -let Mutex$2 = class Mutex { - static Guard = class Guard { - #mutex; - #onRelease; - constructor(mutex, onRelease) { - this.#mutex = mutex; - this.#onRelease = onRelease; - } - [disposeSymbol]() { - this.#onRelease?.(); - return this.#mutex.release(); - } - }; - #locked = false; - #acquirers = []; - async acquire(onRelease) { - if (!this.#locked) { - this.#locked = true; - return new Mutex.Guard(this); - } - const deferred = Deferred.create(); - this.#acquirers.push(deferred.resolve.bind(deferred)); - await deferred.valueOrThrow(); - return new Mutex.Guard(this, onRelease); - } - release() { - const resolve = this.#acquirers.shift(); - if (!resolve) { - this.#locked = false; - return; - } - resolve(); - } -}; - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class BrowserContext extends EventEmitter { - constructor() { - super(); - } - #pageScreenshotMutex; - #screenshotOperationsCount = 0; - startScreenshot() { - const mutex = this.#pageScreenshotMutex || new Mutex$2(); - this.#pageScreenshotMutex = mutex; - this.#screenshotOperationsCount++; - return mutex.acquire(() => { - this.#screenshotOperationsCount--; - if (this.#screenshotOperationsCount === 0) { - this.#pageScreenshotMutex = undefined; - } - }); - } - waitForScreenshotOperations() { - return this.#pageScreenshotMutex?.acquire(); - } - async waitForTarget(predicate, options = {}) { - const { timeout: ms = 30000 } = options; - return await firstValueFrom(merge(fromEmitterEvent(this, "targetcreated" ), fromEmitterEvent(this, "targetchanged" ), from(this.targets())).pipe(filterAsync(predicate), raceWith(timeout(ms)))); - } - async deleteCookie(...cookies) { - return await this.setCookie(...cookies.map(cookie => { - return { - ...cookie, - expires: 1, - }; - })); - } - async deleteMatchingCookies(...filters) { - const cookies = await this.cookies(); - const cookiesToDelete = cookies.filter(cookie => { - return filters.some(filter => { - if (filter.name === cookie.name) { - if (filter.domain !== undefined && filter.domain === cookie.domain) { - return true; - } - if (filter.path !== undefined && filter.path === cookie.path) { - return true; - } - if (filter.partitionKey !== undefined && - cookie.partitionKey !== undefined) { - if (typeof cookie.partitionKey !== 'object') { - throw new Error('Unexpected string partition key'); - } - if (typeof filter.partitionKey === 'string') { - if (filter.partitionKey === cookie.partitionKey?.sourceOrigin) { - return true; - } - } - else { - if (filter.partitionKey.sourceOrigin === - cookie.partitionKey?.sourceOrigin) { - return true; - } - } - } - if (filter.url !== undefined) { - const url = new URL(filter.url); - if (url.hostname === cookie.domain && - url.pathname === cookie.path) { - return true; - } - } - return true; - } - return false; - }); - }); - await this.deleteCookie(...cookiesToDelete); - } - get closed() { - return !this.browser().browserContexts().includes(this); - } - get id() { - return undefined; - } - [disposeSymbol]() { - return void this.close().catch(debugError); - } - [asyncDisposeSymbol]() { - return this.close(); - } -} - -var CDPSessionEvent; -(function (CDPSessionEvent) { - CDPSessionEvent.Disconnected = Symbol('CDPSession.Disconnected'); - CDPSessionEvent.Swapped = Symbol('CDPSession.Swapped'); - CDPSessionEvent.Ready = Symbol('CDPSession.Ready'); - CDPSessionEvent.SessionAttached = 'sessionattached'; - CDPSessionEvent.SessionDetached = 'sessiondetached'; -})(CDPSessionEvent || (CDPSessionEvent = {})); -class CDPSession extends EventEmitter { - constructor() { - super(); - } - parentSession() { - return undefined; - } -} - -/** - * @license - * Copyright 2025 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class DeviceRequestPrompt { - devices = []; -} - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class Dialog { - #type; - #message; - #defaultValue; - handled = false; - constructor(type, message, defaultValue = '') { - this.#type = type; - this.#message = message; - this.#defaultValue = defaultValue; - } - type() { - return this.#type; - } - message() { - return this.#message; - } - defaultValue() { - return this.#defaultValue; - } - async accept(promptText) { - assert(!this.handled, 'Cannot accept dialog which is already handled!'); - this.handled = true; - await this.handle({ - accept: true, - text: promptText, - }); - } - async dismiss() { - assert(!this.handled, 'Cannot dismiss dialog which is already handled!'); - this.handled = true; - await this.handle({ - accept: false, - }); - } -} - -class AsyncIterableUtil { - static async *map(iterable, map) { - for await (const value of iterable) { - yield await map(value); - } - } - static async *flatMap(iterable, map) { - for await (const value of iterable) { - yield* map(value); - } - } - static async collect(iterable) { - const result = []; - for await (const value of iterable) { - result.push(value); - } - return result; - } - static async first(iterable) { - for await (const value of iterable) { - return value; - } - return; - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const _isElementHandle = Symbol('_isElementHandle'); - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function isErrorLike$1(obj) { - return (typeof obj === 'object' && obj !== null && 'name' in obj && 'message' in obj); -} -function rewriteError$1(error, message, originalMessage) { - error.message = message; - error.originalMessage = originalMessage ?? error.originalMessage; - return error; -} -function createProtocolErrorMessage(object) { - let message = object.error.message; - if (object.error && - typeof object.error === 'object' && - 'data' in object.error) { - message += ` ${object.error.data}`; - } - return message; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const createdFunctions = new Map(); -const createFunction = (functionValue) => { - let fn = createdFunctions.get(functionValue); - if (fn) { - return fn; - } - fn = new Function(`return ${functionValue}`)(); - createdFunctions.set(functionValue, fn); - return fn; -}; -function stringifyFunction(fn) { - let value = fn.toString(); - if (value.match(/^(async )*function(\(|\s)/) || - value.match(/^(async )*function\s*\*\s*/)) { - return value; - } - const isArrow = value.startsWith('(') || - value.match(/^async\s*\(/) || - value.match(/^(async)*\s*(?:[$_\p{ID_Start}])(?:[$\u200C\u200D\p{ID_Continue}])*\s*=>/u); - if (isArrow) { - return value; - } - let prefix = 'function '; - if (value.startsWith('async ')) { - prefix = `async ${prefix}`; - value = value.substring('async '.length); - } - return `${prefix}${value}`; -} -const interpolateFunction = (fn, replacements) => { - let value = stringifyFunction(fn); - for (const [name, jsValue] of Object.entries(replacements)) { - value = value.replace(new RegExp(`PLACEHOLDER\\(\\s*(?:'${name}'|"${name}")\\s*\\)`, 'g'), - `(${jsValue})`); - } - return createFunction(value); -}; - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __addDisposableResource$d = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$d = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -const DEFAULT_BATCH_SIZE = 20; -async function* fastTransposeIteratorHandle(iterator, size) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - const array = __addDisposableResource$d(env_1, await iterator.evaluateHandle(async (iterator, size) => { - const results = []; - while (results.length < size) { - const result = await iterator.next(); - if (result.done) { - break; - } - results.push(result.value); - } - return results; - }, size), false); - const properties = (await array.getProperties()); - const handles = properties.values(); - const stack = __addDisposableResource$d(env_1, new DisposableStack(), false); - stack.defer(() => { - for (const handle_1 of handles) { - const env_2 = { stack: [], error: void 0, hasError: false }; - try { - const handle = __addDisposableResource$d(env_2, handle_1, false); - handle[disposeSymbol](); - } - catch (e_2) { - env_2.error = e_2; - env_2.hasError = true; - } - finally { - __disposeResources$d(env_2); - } - } - }); - yield* handles; - return properties.size === 0; - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$d(env_1); - } -} -async function* transposeIteratorHandle(iterator) { - let size = DEFAULT_BATCH_SIZE; - while (!(yield* fastTransposeIteratorHandle(iterator, size))) { - size <<= 1; - } -} -async function* transposeIterableHandle(handle) { - const env_3 = { stack: [], error: void 0, hasError: false }; - try { - const generatorHandle = __addDisposableResource$d(env_3, await handle.evaluateHandle(iterable => { - return (async function* () { - yield* iterable; - })(); - }), false); - yield* transposeIteratorHandle(generatorHandle); - } - catch (e_3) { - env_3.error = e_3; - env_3.hasError = true; - } - finally { - __disposeResources$d(env_3); - } -} - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class LazyArg { - static create = (get) => { - return new LazyArg(get); - }; - #get; - constructor(get) { - this.#get = get; - } - async get(context) { - return await this.#get(context); - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __addDisposableResource$c = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$c = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -class QueryHandler { - static querySelectorAll; - static querySelector; - static get _querySelector() { - if (this.querySelector) { - return this.querySelector; - } - if (!this.querySelectorAll) { - throw new Error('Cannot create default `querySelector`.'); - } - return (this.querySelector = interpolateFunction(async (node, selector, PuppeteerUtil) => { - const querySelectorAll = PLACEHOLDER('querySelectorAll'); - const results = querySelectorAll(node, selector, PuppeteerUtil); - for await (const result of results) { - return result; - } - return null; - }, { - querySelectorAll: stringifyFunction(this.querySelectorAll), - })); - } - static get _querySelectorAll() { - if (this.querySelectorAll) { - return this.querySelectorAll; - } - if (!this.querySelector) { - throw new Error('Cannot create default `querySelectorAll`.'); - } - return (this.querySelectorAll = interpolateFunction(async function* (node, selector, PuppeteerUtil) { - const querySelector = PLACEHOLDER('querySelector'); - const result = await querySelector(node, selector, PuppeteerUtil); - if (result) { - yield result; - } - }, { - querySelector: stringifyFunction(this.querySelector), - })); - } - static async *queryAll(element, selector) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - const handle = __addDisposableResource$c(env_1, await element.evaluateHandle(this._querySelectorAll, selector, LazyArg.create(context => { - return context.puppeteerUtil; - })), false); - yield* transposeIterableHandle(handle); - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$c(env_1); - } - } - static async queryOne(element, selector) { - const env_2 = { stack: [], error: void 0, hasError: false }; - try { - const result = __addDisposableResource$c(env_2, await element.evaluateHandle(this._querySelector, selector, LazyArg.create(context => { - return context.puppeteerUtil; - })), false); - if (!(_isElementHandle in result)) { - return null; - } - return result.move(); - } - catch (e_2) { - env_2.error = e_2; - env_2.hasError = true; - } - finally { - __disposeResources$c(env_2); - } - } - static async waitFor(elementOrFrame, selector, options) { - const env_3 = { stack: [], error: void 0, hasError: false }; - try { - let frame; - const element = __addDisposableResource$c(env_3, await (async () => { - if (!(_isElementHandle in elementOrFrame)) { - frame = elementOrFrame; - return; - } - frame = elementOrFrame.frame; - return await frame.isolatedRealm().adoptHandle(elementOrFrame); - })(), false); - const { visible = false, hidden = false, timeout, signal } = options; - const polling = visible || hidden ? "raf" : options.polling; - try { - const env_4 = { stack: [], error: void 0, hasError: false }; - try { - signal?.throwIfAborted(); - const handle = __addDisposableResource$c(env_4, await frame.isolatedRealm().waitForFunction(async (PuppeteerUtil, query, selector, root, visible) => { - const querySelector = PuppeteerUtil.createFunction(query); - const node = await querySelector(root ?? document, selector, PuppeteerUtil); - return PuppeteerUtil.checkVisibility(node, visible); - }, { - polling, - root: element, - timeout, - signal, - }, LazyArg.create(context => { - return context.puppeteerUtil; - }), stringifyFunction(this._querySelector), selector, element, visible ? true : hidden ? false : undefined), false); - if (signal?.aborted) { - throw signal.reason; - } - if (!(_isElementHandle in handle)) { - return null; - } - return await frame.mainRealm().transferHandle(handle); - } - catch (e_3) { - env_4.error = e_3; - env_4.hasError = true; - } - finally { - __disposeResources$c(env_4); - } - } - catch (error) { - if (!isErrorLike$1(error)) { - throw error; - } - if (error.name === 'AbortError') { - throw error; - } - const waitForSelectorError = new (error instanceof TimeoutError$1 ? TimeoutError$1 : Error)(`Waiting for selector \`${selector}\` failed`); - waitForSelectorError.cause = error; - throw waitForSelectorError; - } - } - catch (e_4) { - env_3.error = e_4; - env_3.hasError = true; - } - finally { - __disposeResources$c(env_3); - } - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const isKnownAttribute = (attribute) => { - return ['name', 'role'].includes(attribute); -}; -const ATTRIBUTE_REGEXP = /\[\s*(?\w+)\s*=\s*(?"|')(?\\.|.*?(?=\k))\k\s*\]/g; -const parseARIASelector = (selector) => { - if (selector.length > 10_000) { - throw new Error(`Selector ${selector} is too long`); - } - const queryOptions = {}; - const defaultName = selector.replace(ATTRIBUTE_REGEXP, (_, attribute, __, value) => { - assert(isKnownAttribute(attribute), `Unknown aria attribute "${attribute}" in selector`); - queryOptions[attribute] = value; - return ''; - }); - if (defaultName && !queryOptions.name) { - queryOptions.name = defaultName; - } - return queryOptions; -}; -class ARIAQueryHandler extends QueryHandler { - static querySelector = async (node, selector, { ariaQuerySelector }) => { - return await ariaQuerySelector(node, selector); - }; - static async *queryAll(element, selector) { - const { name, role } = parseARIASelector(selector); - yield* element.queryAXTree(name, role); - } - static queryOne = async (element, selector) => { - return ((await AsyncIterableUtil.first(this.queryAll(element, selector))) ?? null); - }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class CSSQueryHandler extends QueryHandler { - static querySelector = (element, selector, { cssQuerySelector }) => { - return cssQuerySelector(element, selector); - }; - static querySelectorAll = (element, selector, { cssQuerySelectorAll }) => { - return cssQuerySelectorAll(element, selector); - }; -} - -const source = "\"use strict\";var g=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var Y=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,o)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let s of B(e))!Y.call(t,s)&&s!==r&&g(t,s,{get:()=>e[s],enumerable:!(o=X(e,s))||o.enumerable});return t};var J=t=>G(g({},\"__esModule\",{value:!0}),t);var pe={};l(pe,{default:()=>he});module.exports=J(pe);var N=class extends Error{constructor(e,r){super(e,r),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},p=class extends N{};var c=class t{static create(e){return new t(e)}static async race(e){let r=new Set;try{let o=e.map(s=>s instanceof t?(s.#s&&r.add(s),s.valueOrThrow()):s);return await Promise.race(o)}finally{for(let o of r)o.reject(new Error(\"Timeout cleared\"))}}#e=!1;#r=!1;#o;#t;#a=new Promise(e=>{this.#t=e});#s;#i;constructor(e){e&&e.timeout>0&&(this.#i=new p(e.message),this.#s=setTimeout(()=>{this.reject(this.#i)},e.timeout))}#l(e){clearTimeout(this.#s),this.#o=e,this.#t()}resolve(e){this.#r||this.#e||(this.#e=!0,this.#l(e))}reject(e){this.#r||this.#e||(this.#r=!0,this.#l(e))}resolved(){return this.#e}finished(){return this.#e||this.#r}value(){return this.#o}#n;valueOrThrow(){return this.#n||(this.#n=(async()=>{if(await this.#a,this.#r)throw this.#o;return this.#o})()),this.#n}};var L=new Map,W=t=>{let e=L.get(t);return e||(e=new Function(`return ${t}`)(),L.set(t,e),e)};var b={};l(b,{ariaQuerySelector:()=>z,ariaQuerySelectorAll:()=>x});var z=(t,e)=>globalThis.__ariaQuerySelector(t,e),x=async function*(t,e){yield*await globalThis.__ariaQuerySelectorAll(t,e)};var E={};l(E,{cssQuerySelector:()=>K,cssQuerySelectorAll:()=>Z});var K=(t,e)=>t.querySelector(e),Z=function(t,e){return t.querySelectorAll(e)};var A={};l(A,{customQuerySelectors:()=>P});var v=class{#e=new Map;register(e,r){if(!r.queryOne&&r.queryAll){let o=r.queryAll;r.queryOne=(s,i)=>{for(let n of o(s,i))return n;return null}}else if(r.queryOne&&!r.queryAll){let o=r.queryOne;r.queryAll=(s,i)=>{let n=o(s,i);return n?[n]:[]}}else if(!r.queryOne||!r.queryAll)throw new Error(\"At least one query method must be defined.\");this.#e.set(e,{querySelector:r.queryOne,querySelectorAll:r.queryAll})}unregister(e){this.#e.delete(e)}get(e){return this.#e.get(e)}clear(){this.#e.clear()}},P=new v;var R={};l(R,{pierceQuerySelector:()=>ee,pierceQuerySelectorAll:()=>te});var ee=(t,e)=>{let r=null,o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&!r&&n.matches(e)&&(r=n)}while(!r&&i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r},te=(t,e)=>{let r=[],o=s=>{let i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);do{let n=i.currentNode;n.shadowRoot&&o(n.shadowRoot),!(n instanceof ShadowRoot)&&n!==s&&n.matches(e)&&r.push(n)}while(i.nextNode())};return t instanceof Document&&(t=t.documentElement),o(t),r};var u=(t,e)=>{if(!t)throw new Error(e)};var y=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=new MutationObserver(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())}),this.#o.observe(this.#r,{childList:!0,subtree:!0,attributes:!0})}async stop(){u(this.#t,\"Polling never started.\"),this.#t.finished()||this.#t.reject(new Error(\"Polling stopped\")),this.#o&&(this.#o.disconnect(),this.#o=void 0)}result(){return u(this.#t,\"Polling never started.\"),this.#t.valueOrThrow()}},w=class{#e;#r;constructor(e){this.#e=e}async start(){let e=this.#r=c.create(),r=await this.#e();if(r){e.resolve(r);return}let o=async()=>{if(e.finished())return;let s=await this.#e();if(!s){window.requestAnimationFrame(o);return}e.resolve(s),await this.stop()};window.requestAnimationFrame(o)}async stop(){u(this.#r,\"Polling never started.\"),this.#r.finished()||this.#r.reject(new Error(\"Polling stopped\"))}result(){return u(this.#r,\"Polling never started.\"),this.#r.valueOrThrow()}},T=class{#e;#r;#o;#t;constructor(e,r){this.#e=e,this.#r=r}async start(){let e=this.#t=c.create(),r=await this.#e();if(r){e.resolve(r);return}this.#o=setInterval(async()=>{let o=await this.#e();o&&(e.resolve(o),await this.stop())},this.#r)}async stop(){u(this.#t,\"Polling never started.\"),this.#t.finished()||this.#t.reject(new Error(\"Polling stopped\")),this.#o&&(clearInterval(this.#o),this.#o=void 0)}result(){return u(this.#t,\"Polling never started.\"),this.#t.valueOrThrow()}};var _={};l(_,{PCombinator:()=>H,pQuerySelector:()=>fe,pQuerySelectorAll:()=>$});var a=class{static async*map(e,r){for await(let o of e)yield await r(o)}static async*flatMap(e,r){for await(let o of e)yield*r(o)}static async collect(e){let r=[];for await(let o of e)r.push(o);return r}static async first(e){for await(let r of e)return r}};var C={};l(C,{textQuerySelectorAll:()=>m});var re=new Set([\"checkbox\",\"image\",\"radio\"]),oe=t=>t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&!re.has(t.type),se=new Set([\"SCRIPT\",\"STYLE\"]),f=t=>!se.has(t.nodeName)&&!document.head?.contains(t),I=new WeakMap,F=t=>{for(;t;)I.delete(t),t instanceof ShadowRoot?t=t.host:t=t.parentNode},j=new WeakSet,ne=new MutationObserver(t=>{for(let e of t)F(e.target)}),d=t=>{let e=I.get(t);if(e||(e={full:\"\",immediate:[]},!f(t)))return e;let r=\"\";if(oe(t))e.full=t.value,e.immediate.push(t.value),t.addEventListener(\"input\",o=>{F(o.target)},{once:!0,capture:!0});else{for(let o=t.firstChild;o;o=o.nextSibling){if(o.nodeType===Node.TEXT_NODE){e.full+=o.nodeValue??\"\",r+=o.nodeValue??\"\";continue}r&&e.immediate.push(r),r=\"\",o.nodeType===Node.ELEMENT_NODE&&(e.full+=d(o).full)}r&&e.immediate.push(r),t instanceof Element&&t.shadowRoot&&(e.full+=d(t.shadowRoot).full),j.has(t)||(ne.observe(t,{childList:!0,characterData:!0,subtree:!0}),j.add(t))}return I.set(t,e),e};var m=function*(t,e){let r=!1;for(let o of t.childNodes)if(o instanceof Element&&f(o)){let s;o.shadowRoot?s=m(o.shadowRoot,e):s=m(o,e);for(let i of s)yield i,r=!0}r||t instanceof Element&&f(t)&&d(t).full.includes(e)&&(yield t)};var k={};l(k,{checkVisibility:()=>le,pierce:()=>S,pierceAll:()=>O});var ie=[\"hidden\",\"collapse\"],le=(t,e)=>{if(!t)return e===!1;if(e===void 0)return t;let r=t.nodeType===Node.TEXT_NODE?t.parentElement:t,o=window.getComputedStyle(r),s=o&&!ie.includes(o.visibility)&&!ae(r);return e===s?t:!1};function ae(t){let e=t.getBoundingClientRect();return e.width===0||e.height===0}var ce=t=>\"shadowRoot\"in t&&t.shadowRoot instanceof ShadowRoot;function*S(t){ce(t)?yield t.shadowRoot:yield t}function*O(t){t=S(t).next().value,yield t;let e=[document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT)];for(let r of e){let o;for(;o=r.nextNode();)o.shadowRoot&&(yield o.shadowRoot,e.push(document.createTreeWalker(o.shadowRoot,NodeFilter.SHOW_ELEMENT)))}}var D={};l(D,{xpathQuerySelectorAll:()=>q});var q=function*(t,e,r=-1){let s=(t.ownerDocument||document).evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),i=[],n;for(;(n=s.iterateNext())&&(i.push(n),!(r&&i.length===r)););for(let h=0;h(r.Descendent=\">>>\",r.Child=\">>>>\",r))(H||{}),V=t=>\"querySelectorAll\"in t,Q=class{#e;#r=[];#o=void 0;elements;constructor(e,r){this.elements=[e],this.#e=r,this.#t()}async run(){for(typeof this.#o==\"string\"&&this.#o.trimStart()===\":scope\"&&this.#t();this.#o!==void 0;this.#t()){let e=this.#o;typeof e==\"string\"?e[0]&&ue.test(e[0])?this.elements=a.flatMap(this.elements,async function*(r){V(r)&&(yield*r.querySelectorAll(e))}):this.elements=a.flatMap(this.elements,async function*(r){if(!r.parentElement){if(!V(r))return;yield*r.querySelectorAll(e);return}let o=0;for(let s of r.parentElement.children)if(++o,s===r)break;yield*r.parentElement.querySelectorAll(`:scope>:nth-child(${o})${e}`)}):this.elements=a.flatMap(this.elements,async function*(r){switch(e.name){case\"text\":yield*m(r,e.value);break;case\"xpath\":yield*q(r,e.value);break;case\"aria\":yield*x(r,e.value);break;default:let o=P.get(e.name);if(!o)throw new Error(`Unknown selector type: ${e.name}`);yield*o.querySelectorAll(r,e.value)}})}}#t(){if(this.#r.length!==0){this.#o=this.#r.shift();return}if(this.#e.length===0){this.#o=void 0;return}let e=this.#e.shift();switch(e){case\">>>>\":{this.elements=a.flatMap(this.elements,S),this.#t();break}case\">>>\":{this.elements=a.flatMap(this.elements,O),this.#t();break}default:this.#r=e,this.#t();break}}},M=class{#e=new WeakMap;calculate(e,r=[]){if(e===null)return r;e instanceof ShadowRoot&&(e=e.host);let o=this.#e.get(e);if(o)return[...o,...r];let s=0;for(let n=e.previousSibling;n;n=n.previousSibling)++s;let i=this.calculate(e.parentNode,[s]);return this.#e.set(e,i),[...i,...r]}},U=(t,e)=>{if(t.length+e.length===0)return 0;let[r=-1,...o]=t,[s=-1,...i]=e;return r===s?U(o,i):r[o,r.calculate(o)]).sort(([,o],[,s])=>U(o,s)).map(([o])=>o)},$=function(t,e){let r=JSON.parse(e);if(r.some(o=>{let s=0;return o.some(i=>(typeof i==\"string\"?++s:s=0,s>1))}))throw new Error(\"Multiple deep combinators found in sequence.\");return de(a.flatMap(r,o=>{let s=new Q(t,o);return s.run(),s.elements}))},fe=async function(t,e){for await(let r of $(t,e))return r;return null};var me=Object.freeze({...b,...A,...R,..._,...C,...k,...D,...E,Deferred:c,createFunction:W,createTextContent:d,IntervalPoller:T,isSuitableNodeForTextMatching:f,MutationPoller:y,RAFPoller:w}),he=me;\n"; - -/** - * @license - * Copyright 2024 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class ScriptInjector { - #updated = false; - #amendments = new Set(); - append(statement) { - this.#update(() => { - this.#amendments.add(statement); - }); - } - pop(statement) { - this.#update(() => { - this.#amendments.delete(statement); - }); - } - inject(inject, force = false) { - if (this.#updated || force) { - inject(this.#get()); - } - this.#updated = false; - } - #update(callback) { - callback(); - this.#updated = true; - } - #get() { - return `(() => { - const module = {}; - ${source} - ${[...this.#amendments] - .map(statement => { - return `(${statement})(module.exports.default);`; - }) - .join('')} - return module.exports.default; - })()`; - } -} -const scriptInjector = new ScriptInjector(); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class CustomQueryHandlerRegistry { - #handlers = new Map(); - get(name) { - const handler = this.#handlers.get(name); - return handler ? handler[1] : undefined; - } - register(name, handler) { - assert(!this.#handlers.has(name), `Cannot register over existing handler: ${name}`); - assert(/^[a-zA-Z]+$/.test(name), `Custom query handler names may only contain [a-zA-Z]`); - assert(handler.queryAll || handler.queryOne, `At least one query method must be implemented.`); - const Handler = class extends QueryHandler { - static querySelectorAll = interpolateFunction((node, selector, PuppeteerUtil) => { - return PuppeteerUtil.customQuerySelectors - .get(PLACEHOLDER('name')) - .querySelectorAll(node, selector); - }, { name: JSON.stringify(name) }); - static querySelector = interpolateFunction((node, selector, PuppeteerUtil) => { - return PuppeteerUtil.customQuerySelectors - .get(PLACEHOLDER('name')) - .querySelector(node, selector); - }, { name: JSON.stringify(name) }); - }; - const registerScript = interpolateFunction((PuppeteerUtil) => { - PuppeteerUtil.customQuerySelectors.register(PLACEHOLDER('name'), { - queryAll: PLACEHOLDER('queryAll'), - queryOne: PLACEHOLDER('queryOne'), - }); - }, { - name: JSON.stringify(name), - queryAll: handler.queryAll - ? stringifyFunction(handler.queryAll) - : String(undefined), - queryOne: handler.queryOne - ? stringifyFunction(handler.queryOne) - : String(undefined), - }).toString(); - this.#handlers.set(name, [registerScript, Handler]); - scriptInjector.append(registerScript); - } - unregister(name) { - const handler = this.#handlers.get(name); - if (!handler) { - throw new Error(`Cannot unregister unknown handler: ${name}`); - } - scriptInjector.pop(handler[0]); - this.#handlers.delete(name); - } - names() { - return [...this.#handlers.keys()]; - } - clear() { - for (const [registerScript] of this.#handlers) { - scriptInjector.pop(registerScript); - } - this.#handlers.clear(); - } -} -const customQueryHandlers = new CustomQueryHandlerRegistry(); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class PierceQueryHandler extends QueryHandler { - static querySelector = (element, selector, { pierceQuerySelector }) => { - return pierceQuerySelector(element, selector); - }; - static querySelectorAll = (element, selector, { pierceQuerySelectorAll }) => { - return pierceQuerySelectorAll(element, selector); - }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class PQueryHandler extends QueryHandler { - static querySelectorAll = (element, selector, { pQuerySelectorAll }) => { - return pQuerySelectorAll(element, selector); - }; - static querySelector = (element, selector, { pQuerySelector }) => { - return pQuerySelector(element, selector); - }; -} - -/** -MIT License -Copyright (c) 2020 Lea Verou -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ -var TOKENS = { - attribute: /\[\s*(?:(?\*|[-\w\P{ASCII}]*)\|)?(?[-\w\P{ASCII}]+)\s*(?:(?\W?=)\s*(?.+?)\s*(\s(?[iIsS]))?\s*)?\]/gu, - id: /#(?[-\w\P{ASCII}]+)/gu, - class: /\.(?[-\w\P{ASCII}]+)/gu, - comma: /\s*,\s*/g, - combinator: /\s*[\s>+~]\s*/g, - "pseudo-element": /::(?[-\w\P{ASCII}]+)(?:\((?¶*)\))?/gu, - "pseudo-class": /:(?[-\w\P{ASCII}]+)(?:\((?¶*)\))?/gu, - universal: /(?:(?\*|[-\w\P{ASCII}]*)\|)?\*/gu, - type: /(?:(?\*|[-\w\P{ASCII}]*)\|)?(?[-\w\P{ASCII}]+)/gu -}; -var TRIM_TOKENS = new Set(["combinator", "comma"]); -var getArgumentPatternByType = (type) => { - switch (type) { - case "pseudo-element": - case "pseudo-class": - return new RegExp(TOKENS[type].source.replace("(?\xB6*)", "(?.*)"), "gu"); - default: - return TOKENS[type]; - } -}; -function gobbleParens(text, offset) { - let nesting = 0; - let result = ""; - for (; offset < text.length; offset++) { - const char = text[offset]; - switch (char) { - case "(": - ++nesting; - break; - case ")": - --nesting; - break; - } - result += char; - if (nesting === 0) { - return result; - } - } - return result; -} -function tokenizeBy(text, grammar = TOKENS) { - if (!text) { - return []; - } - const tokens = [text]; - for (const [type, pattern] of Object.entries(grammar)) { - for (let i = 0; i < tokens.length; i++) { - const token = tokens[i]; - if (typeof token !== "string") { - continue; - } - pattern.lastIndex = 0; - const match = pattern.exec(token); - if (!match) { - continue; - } - const from = match.index - 1; - const args = []; - const content = match[0]; - const before = token.slice(0, from + 1); - if (before) { - args.push(before); - } - args.push({ - ...match.groups, - type, - content - }); - const after = token.slice(from + content.length + 1); - if (after) { - args.push(after); - } - tokens.splice(i, 1, ...args); - } - } - let offset = 0; - for (const token of tokens) { - switch (typeof token) { - case "string": - throw new Error(`Unexpected sequence ${token} found at index ${offset}`); - case "object": - offset += token.content.length; - token.pos = [offset - token.content.length, offset]; - if (TRIM_TOKENS.has(token.type)) { - token.content = token.content.trim() || " "; - } - break; - } - } - return tokens; -} -var STRING_PATTERN = /(['"])([^\\\n]*?)\1/g; -var ESCAPE_PATTERN = /\\./g; -function tokenize(selector, grammar = TOKENS) { - selector = selector.trim(); - if (selector === "") { - return []; - } - const replacements = []; - selector = selector.replace(ESCAPE_PATTERN, (value, offset) => { - replacements.push({ value, offset }); - return "\uE000".repeat(value.length); - }); - selector = selector.replace(STRING_PATTERN, (value, quote, content, offset) => { - replacements.push({ value, offset }); - return `${quote}${"\uE001".repeat(content.length)}${quote}`; - }); - { - let pos = 0; - let offset; - while ((offset = selector.indexOf("(", pos)) > -1) { - const value = gobbleParens(selector, offset); - replacements.push({ value, offset }); - selector = `${selector.substring(0, offset)}(${"\xB6".repeat(value.length - 2)})${selector.substring(offset + value.length)}`; - pos = offset + value.length; - } - } - const tokens = tokenizeBy(selector, grammar); - const changedTokens = new Set(); - for (const replacement of replacements.reverse()) { - for (const token of tokens) { - const { offset, value } = replacement; - if (!(token.pos[0] <= offset && offset + value.length <= token.pos[1])) { - continue; - } - const { content } = token; - const tokenOffset = offset - token.pos[0]; - token.content = content.slice(0, tokenOffset) + value + content.slice(tokenOffset + value.length); - if (token.content !== content) { - changedTokens.add(token); - } - } - } - for (const token of changedTokens) { - const pattern = getArgumentPatternByType(token.type); - if (!pattern) { - throw new Error(`Unknown token type: ${token.type}`); - } - pattern.lastIndex = 0; - const match = pattern.exec(token.content); - if (!match) { - throw new Error(`Unable to parse content for ${token.type}: ${token.content}`); - } - Object.assign(token, match.groups); - } - return tokens; -} -function stringify(listOrNode) { - if (Array.isArray(listOrNode)) { - return listOrNode.map((token) => token.content).join(""); - } - switch (listOrNode.type) { - case "list": - return listOrNode.list.map(stringify).join(","); - case "relative": - return listOrNode.combinator + stringify(listOrNode.right); - case "complex": - return stringify(listOrNode.left) + listOrNode.combinator + stringify(listOrNode.right); - case "compound": - return listOrNode.list.map(stringify).join(""); - default: - return listOrNode.content; - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -TOKENS['nesting'] = /&/g; -TOKENS['combinator'] = /\s*(>>>>?|[\s>+~])\s*/g; -const ESCAPE_REGEXP = /\\[\s\S]/g; -const unquote = (text) => { - if (text.length <= 1) { - return text; - } - if ((text[0] === '"' || text[0] === "'") && text.endsWith(text[0])) { - text = text.slice(1, -1); - } - return text.replace(ESCAPE_REGEXP, match => { - return match[1]; - }); -}; -function parsePSelectors(selector) { - let isPureCSS = true; - let hasAria = false; - let hasPseudoClasses = false; - const tokens = tokenize(selector); - if (tokens.length === 0) { - return [[], isPureCSS, hasPseudoClasses, false]; - } - let compoundSelector = []; - let complexSelector = [compoundSelector]; - const selectors = [complexSelector]; - const storage = []; - for (const token of tokens) { - switch (token.type) { - case 'combinator': - switch (token.content) { - case ">>>" : - isPureCSS = false; - if (storage.length) { - compoundSelector.push(stringify(storage)); - storage.splice(0); - } - compoundSelector = []; - complexSelector.push(">>>" ); - complexSelector.push(compoundSelector); - continue; - case ">>>>" : - isPureCSS = false; - if (storage.length) { - compoundSelector.push(stringify(storage)); - storage.splice(0); - } - compoundSelector = []; - complexSelector.push(">>>>" ); - complexSelector.push(compoundSelector); - continue; - } - break; - case 'pseudo-element': - if (!token.name.startsWith('-p-')) { - break; - } - isPureCSS = false; - if (storage.length) { - compoundSelector.push(stringify(storage)); - storage.splice(0); - } - const name = token.name.slice(3); - if (name === 'aria') { - hasAria = true; - } - compoundSelector.push({ - name, - value: unquote(token.argument ?? ''), - }); - continue; - case 'pseudo-class': - hasPseudoClasses = true; - break; - case 'comma': - if (storage.length) { - compoundSelector.push(stringify(storage)); - storage.splice(0); - } - compoundSelector = []; - complexSelector = [compoundSelector]; - selectors.push(complexSelector); - continue; - } - storage.push(token); - } - if (storage.length) { - compoundSelector.push(stringify(storage)); - } - return [selectors, isPureCSS, hasPseudoClasses, hasAria]; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class TextQueryHandler extends QueryHandler { - static querySelectorAll = (element, selector, { textQuerySelectorAll }) => { - return textQuerySelectorAll(element, selector); - }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class XPathQueryHandler extends QueryHandler { - static querySelectorAll = (element, selector, { xpathQuerySelectorAll }) => { - return xpathQuerySelectorAll(element, selector); - }; - static querySelector = (element, selector, { xpathQuerySelectorAll }) => { - for (const result of xpathQuerySelectorAll(element, selector, 1)) { - return result; - } - return null; - }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const BUILTIN_QUERY_HANDLERS = { - aria: ARIAQueryHandler, - pierce: PierceQueryHandler, - xpath: XPathQueryHandler, - text: TextQueryHandler, -}; -const QUERY_SEPARATORS = ['=', '/']; -function getQueryHandlerAndSelector(selector) { - for (const handlerMap of [ - customQueryHandlers.names().map(name => { - return [name, customQueryHandlers.get(name)]; - }), - Object.entries(BUILTIN_QUERY_HANDLERS), - ]) { - for (const [name, QueryHandler] of handlerMap) { - for (const separator of QUERY_SEPARATORS) { - const prefix = `${name}${separator}`; - if (selector.startsWith(prefix)) { - selector = selector.slice(prefix.length); - return { - updatedSelector: selector, - polling: name === 'aria' ? "raf" : "mutation" , - QueryHandler, - }; - } - } - } - } - try { - const [pSelector, isPureCSS, hasPseudoClasses, hasAria] = parsePSelectors(selector); - if (isPureCSS) { - return { - updatedSelector: selector, - polling: hasPseudoClasses - ? "raf" - : "mutation" , - QueryHandler: CSSQueryHandler, - }; - } - return { - updatedSelector: JSON.stringify(pSelector), - polling: hasAria ? "raf" : "mutation" , - QueryHandler: PQueryHandler, - }; - } - catch { - return { - updatedSelector: selector, - polling: "mutation" , - QueryHandler: CSSQueryHandler, - }; - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __addDisposableResource$b = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$b = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -const instances = new WeakSet(); -function moveable(Class, _) { - let hasDispose = false; - if (Class.prototype[disposeSymbol]) { - const dispose = Class.prototype[disposeSymbol]; - Class.prototype[disposeSymbol] = function () { - if (instances.has(this)) { - instances.delete(this); - return; - } - return dispose.call(this); - }; - hasDispose = true; - } - if (Class.prototype[asyncDisposeSymbol]) { - const asyncDispose = Class.prototype[asyncDisposeSymbol]; - Class.prototype[asyncDisposeSymbol] = function () { - if (instances.has(this)) { - instances.delete(this); - return; - } - return asyncDispose.call(this); - }; - hasDispose = true; - } - if (hasDispose) { - Class.prototype.move = function () { - instances.add(this); - return this; - }; - } - return Class; -} -function throwIfDisposed(message = value => { - return `Attempted to use disposed ${value.constructor.name}.`; -}) { - return (target, _) => { - return function (...args) { - if (this.disposed) { - throw new Error(message(this)); - } - return target.call(this, ...args); - }; - }; -} -function invokeAtMostOnceForArguments(target, _) { - const cache = new WeakMap(); - let cacheDepth = -1; - return function (...args) { - if (cacheDepth === -1) { - cacheDepth = args.length; - } - if (cacheDepth !== args.length) { - throw new Error('Memoized method was called with the wrong number of arguments'); - } - let freshArguments = false; - let cacheIterator = cache; - for (const arg of args) { - if (cacheIterator.has(arg)) { - cacheIterator = cacheIterator.get(arg); - } - else { - freshArguments = true; - cacheIterator.set(arg, new WeakMap()); - cacheIterator = cacheIterator.get(arg); - } - } - if (!freshArguments) { - return; - } - return target.call(this, ...args); - }; -} -function guarded(getKey = function () { - return this; -}) { - return (target, _) => { - const mutexes = new WeakMap(); - return async function (...args) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - const key = getKey.call(this); - let mutex = mutexes.get(key); - if (!mutex) { - mutex = new Mutex$2(); - mutexes.set(key, mutex); - } - const _ = __addDisposableResource$b(env_1, await mutex.acquire(), true); - return await target.call(this, ...args); - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - const result_1 = __disposeResources$b(env_1); - if (result_1) - await result_1; - } - }; - }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __runInitializers$8 = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; -var __esDecorate$8 = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -var __addDisposableResource$a = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$a = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -let JSHandle = (() => { - let _classDecorators = [moveable]; - let _classDescriptor; - let _classExtraInitializers = []; - let _classThis; - let _instanceExtraInitializers = []; - let _getProperty_decorators; - let _getProperties_decorators; - (class { - static { _classThis = this; } - static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0; - __esDecorate$8(this, null, _getProperty_decorators, { kind: "method", name: "getProperty", static: false, private: false, access: { has: obj => "getProperty" in obj, get: obj => obj.getProperty }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$8(this, null, _getProperties_decorators, { kind: "method", name: "getProperties", static: false, private: false, access: { has: obj => "getProperties" in obj, get: obj => obj.getProperties }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$8(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers); - _classThis = _classDescriptor.value; - if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); - __runInitializers$8(_classThis, _classExtraInitializers); - } - constructor() { - __runInitializers$8(this, _instanceExtraInitializers); - } - async evaluate(pageFunction, ...args) { - pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction); - return await this.realm.evaluate(pageFunction, this, ...args); - } - async evaluateHandle(pageFunction, ...args) { - pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction); - return await this.realm.evaluateHandle(pageFunction, this, ...args); - } - async getProperty(propertyName) { - return await this.evaluateHandle((object, propertyName) => { - return object[propertyName]; - }, propertyName); - } - async getProperties() { - const propertyNames = await this.evaluate(object => { - const enumerableProperties = []; - const descriptors = Object.getOwnPropertyDescriptors(object); - for (const propertyName in descriptors) { - if (descriptors[propertyName]?.enumerable) { - enumerableProperties.push(propertyName); - } - } - return enumerableProperties; - }); - const map = new Map(); - const results = await Promise.all(propertyNames.map(key => { - return this.getProperty(key); - })); - for (const [key, value] of Object.entries(propertyNames)) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - const handle = __addDisposableResource$a(env_1, results[key], false); - if (handle) { - map.set(value, handle.move()); - } - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$a(env_1); - } - } - return map; - } - [(_getProperty_decorators = [throwIfDisposed()], _getProperties_decorators = [throwIfDisposed()], disposeSymbol)]() { - return void this.dispose().catch(debugError); - } - [asyncDisposeSymbol]() { - return this.dispose(); - } - }); - return _classThis; -})(); - -var __addDisposableResource$9 = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$9 = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -var LocatorEvent; -(function (LocatorEvent) { - LocatorEvent["Action"] = "action"; -})(LocatorEvent || (LocatorEvent = {})); -class Locator extends EventEmitter { - static race(locators) { - return RaceLocator.create(locators); - } - visibility = null; - _timeout = 30000; - #ensureElementIsInTheViewport = true; - #waitForEnabled = true; - #waitForStableBoundingBox = true; - operators = { - conditions: (conditions, signal) => { - return mergeMap((handle) => { - return merge(...conditions.map(condition => { - return condition(handle, signal); - })).pipe(defaultIfEmpty(handle)); - }); - }, - retryAndRaceWithSignalAndTimer: (signal, cause) => { - const candidates = []; - if (signal) { - candidates.push(fromAbortSignal(signal, cause)); - } - candidates.push(timeout(this._timeout, cause)); - return pipe(retry({ delay: RETRY_DELAY }), raceWith(...candidates)); - }, - }; - get timeout() { - return this._timeout; - } - setTimeout(timeout) { - const locator = this._clone(); - locator._timeout = timeout; - return locator; - } - setVisibility(visibility) { - const locator = this._clone(); - locator.visibility = visibility; - return locator; - } - setWaitForEnabled(value) { - const locator = this._clone(); - locator.#waitForEnabled = value; - return locator; - } - setEnsureElementIsInTheViewport(value) { - const locator = this._clone(); - locator.#ensureElementIsInTheViewport = value; - return locator; - } - setWaitForStableBoundingBox(value) { - const locator = this._clone(); - locator.#waitForStableBoundingBox = value; - return locator; - } - copyOptions(locator) { - this._timeout = locator._timeout; - this.visibility = locator.visibility; - this.#waitForEnabled = locator.#waitForEnabled; - this.#ensureElementIsInTheViewport = locator.#ensureElementIsInTheViewport; - this.#waitForStableBoundingBox = locator.#waitForStableBoundingBox; - return this; - } - #waitForEnabledIfNeeded = (handle, signal) => { - if (!this.#waitForEnabled) { - return EMPTY; - } - return from(handle.frame.waitForFunction(element => { - if (!(element instanceof HTMLElement)) { - return true; - } - const isNativeFormControl = [ - 'BUTTON', - 'INPUT', - 'SELECT', - 'TEXTAREA', - 'OPTION', - 'OPTGROUP', - ].includes(element.nodeName); - return !isNativeFormControl || !element.hasAttribute('disabled'); - }, { - timeout: this._timeout, - signal, - }, handle)).pipe(ignoreElements()); - }; - #waitForStableBoundingBoxIfNeeded = (handle) => { - if (!this.#waitForStableBoundingBox) { - return EMPTY; - } - return defer(() => { - return from(handle.evaluate(element => { - return new Promise(resolve => { - window.requestAnimationFrame(() => { - const rect1 = element.getBoundingClientRect(); - window.requestAnimationFrame(() => { - const rect2 = element.getBoundingClientRect(); - resolve([ - { - x: rect1.x, - y: rect1.y, - width: rect1.width, - height: rect1.height, - }, - { - x: rect2.x, - y: rect2.y, - width: rect2.width, - height: rect2.height, - }, - ]); - }); - }); - }); - })); - }).pipe(first(([rect1, rect2]) => { - return (rect1.x === rect2.x && - rect1.y === rect2.y && - rect1.width === rect2.width && - rect1.height === rect2.height); - }), retry({ delay: RETRY_DELAY }), ignoreElements()); - }; - #ensureElementIsInTheViewportIfNeeded = (handle) => { - if (!this.#ensureElementIsInTheViewport) { - return EMPTY; - } - return from(handle.isIntersectingViewport({ threshold: 0 })).pipe(filter(isIntersectingViewport => { - return !isIntersectingViewport; - }), mergeMap(() => { - return from(handle.scrollIntoView()); - }), mergeMap(() => { - return defer(() => { - return from(handle.isIntersectingViewport({ threshold: 0 })); - }).pipe(first(identity), retry({ delay: RETRY_DELAY }), ignoreElements()); - })); - }; - #click(options) { - const signal = options?.signal; - const cause = new Error('Locator.click'); - return this._wait(options).pipe(this.operators.conditions([ - this.#ensureElementIsInTheViewportIfNeeded, - this.#waitForStableBoundingBoxIfNeeded, - this.#waitForEnabledIfNeeded, - ], signal), tap(() => { - return this.emit(LocatorEvent.Action, undefined); - }), mergeMap(handle => { - return from(handle.click(options)).pipe(catchError(err => { - void handle.dispose().catch(debugError); - throw err; - })); - }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause)); - } - #fill(value, options) { - const signal = options?.signal; - const typingThreshold = options?.typingThreshold ?? 100; - const cause = new Error('Locator.fill'); - return this._wait(options).pipe(this.operators.conditions([ - this.#ensureElementIsInTheViewportIfNeeded, - this.#waitForStableBoundingBoxIfNeeded, - this.#waitForEnabledIfNeeded, - ], signal), tap(() => { - return this.emit(LocatorEvent.Action, undefined); - }), mergeMap(handle => { - return from(handle.evaluate(el => { - if (el instanceof HTMLSelectElement) { - return 'select'; - } - if (el instanceof HTMLTextAreaElement) { - return 'typeable-input'; - } - if (el instanceof HTMLInputElement) { - if (new Set([ - 'textarea', - 'text', - 'url', - 'tel', - 'search', - 'password', - 'number', - 'email', - ]).has(el.type)) { - return 'typeable-input'; - } - else { - return 'other-input'; - } - } - if (el.isContentEditable) { - return 'contenteditable'; - } - return 'unknown'; - })) - .pipe(mergeMap(inputType => { - const fillDirectly = () => { - return from(handle.focus()).pipe(mergeMap(() => { - return from(handle.evaluate((input, newValue) => { - const element = input; - const currentValue = element.isContentEditable - ? element.innerText - : element.value; - if (currentValue === newValue) { - return; - } - if (element.isContentEditable) { - element.innerText = newValue; - } - else { - element.value = newValue; - } - element.dispatchEvent(new Event('input', { bubbles: true })); - element.dispatchEvent(new Event('change', { bubbles: true })); - }, value)); - })); - }; - switch (inputType) { - case 'select': - return from(handle.select(value).then(noop)); - case 'contenteditable': - case 'typeable-input': - if (value.length < typingThreshold) { - return from(handle.evaluate((input, newValue) => { - const element = input; - const currentValue = element.isContentEditable - ? element.innerText - : input.value; - if (newValue.length <= currentValue.length || - !newValue.startsWith(currentValue)) { - if (element.isContentEditable) { - element.innerText = ''; - } - else { - input.value = ''; - } - return newValue; - } - if (element.isContentEditable) { - element.innerText = ''; - element.innerText = currentValue; - } - else { - input.value = ''; - input.value = currentValue; - } - return newValue.substring(currentValue.length); - }, value)).pipe(mergeMap(textToType => { - if (!textToType) { - return of(undefined); - } - return from(handle.type(textToType)); - })); - } - return fillDirectly(); - case 'other-input': - return fillDirectly(); - case 'unknown': - throw new Error(`Element cannot be filled out.`); - } - })) - .pipe(catchError(err => { - void handle.dispose().catch(debugError); - throw err; - })); - }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause)); - } - #hover(options) { - const signal = options?.signal; - const cause = new Error('Locator.hover'); - return this._wait(options).pipe(this.operators.conditions([ - this.#ensureElementIsInTheViewportIfNeeded, - this.#waitForStableBoundingBoxIfNeeded, - ], signal), tap(() => { - return this.emit(LocatorEvent.Action, undefined); - }), mergeMap(handle => { - return from(handle.hover()).pipe(catchError(err => { - void handle.dispose().catch(debugError); - throw err; - })); - }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause)); - } - #scroll(options) { - const signal = options?.signal; - const cause = new Error('Locator.scroll'); - return this._wait(options).pipe(this.operators.conditions([ - this.#ensureElementIsInTheViewportIfNeeded, - this.#waitForStableBoundingBoxIfNeeded, - ], signal), tap(() => { - return this.emit(LocatorEvent.Action, undefined); - }), mergeMap(handle => { - return from(handle.evaluate((el, scrollTop, scrollLeft) => { - if (scrollTop !== undefined) { - el.scrollTop = scrollTop; - } - if (scrollLeft !== undefined) { - el.scrollLeft = scrollLeft; - } - }, options?.scrollTop, options?.scrollLeft)).pipe(catchError(err => { - void handle.dispose().catch(debugError); - throw err; - })); - }), this.operators.retryAndRaceWithSignalAndTimer(signal, cause)); - } - clone() { - return this._clone(); - } - async waitHandle(options) { - const cause = new Error('Locator.waitHandle'); - return await firstValueFrom(this._wait(options).pipe(this.operators.retryAndRaceWithSignalAndTimer(options?.signal, cause))); - } - async wait(options) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - const handle = __addDisposableResource$9(env_1, await this.waitHandle(options), false); - return await handle.jsonValue(); - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$9(env_1); - } - } - map(mapper) { - return new MappedLocator(this._clone(), handle => { - return handle.evaluateHandle(mapper); - }); - } - filter(predicate) { - return new FilteredLocator(this._clone(), async (handle, signal) => { - await handle.frame.waitForFunction(predicate, { signal, timeout: this._timeout }, handle); - return true; - }); - } - filterHandle(predicate) { - return new FilteredLocator(this._clone(), predicate); - } - mapHandle(mapper) { - return new MappedLocator(this._clone(), mapper); - } - click(options) { - return firstValueFrom(this.#click(options)); - } - fill(value, options) { - return firstValueFrom(this.#fill(value, options)); - } - hover(options) { - return firstValueFrom(this.#hover(options)); - } - scroll(options) { - return firstValueFrom(this.#scroll(options)); - } -} -class FunctionLocator extends Locator { - static create(pageOrFrame, func) { - return new FunctionLocator(pageOrFrame, func).setTimeout('getDefaultTimeout' in pageOrFrame - ? pageOrFrame.getDefaultTimeout() - : pageOrFrame.page().getDefaultTimeout()); - } - #pageOrFrame; - #func; - constructor(pageOrFrame, func) { - super(); - this.#pageOrFrame = pageOrFrame; - this.#func = func; - } - _clone() { - return new FunctionLocator(this.#pageOrFrame, this.#func); - } - _wait(options) { - const signal = options?.signal; - return defer(() => { - return from(this.#pageOrFrame.waitForFunction(this.#func, { - timeout: this.timeout, - signal, - })); - }).pipe(throwIfEmpty()); - } -} -class DelegatedLocator extends Locator { - #delegate; - constructor(delegate) { - super(); - this.#delegate = delegate; - this.copyOptions(this.#delegate); - } - get delegate() { - return this.#delegate; - } - setTimeout(timeout) { - const locator = super.setTimeout(timeout); - locator.#delegate = this.#delegate.setTimeout(timeout); - return locator; - } - setVisibility(visibility) { - const locator = super.setVisibility(visibility); - locator.#delegate = locator.#delegate.setVisibility(visibility); - return locator; - } - setWaitForEnabled(value) { - const locator = super.setWaitForEnabled(value); - locator.#delegate = this.#delegate.setWaitForEnabled(value); - return locator; - } - setEnsureElementIsInTheViewport(value) { - const locator = super.setEnsureElementIsInTheViewport(value); - locator.#delegate = this.#delegate.setEnsureElementIsInTheViewport(value); - return locator; - } - setWaitForStableBoundingBox(value) { - const locator = super.setWaitForStableBoundingBox(value); - locator.#delegate = this.#delegate.setWaitForStableBoundingBox(value); - return locator; - } -} -class FilteredLocator extends DelegatedLocator { - #predicate; - constructor(base, predicate) { - super(base); - this.#predicate = predicate; - } - _clone() { - return new FilteredLocator(this.delegate.clone(), this.#predicate).copyOptions(this); - } - _wait(options) { - return this.delegate._wait(options).pipe(mergeMap(handle => { - return from(Promise.resolve(this.#predicate(handle, options?.signal))).pipe(filter(value => { - return value; - }), map(() => { - return handle; - })); - }), throwIfEmpty()); - } -} -class MappedLocator extends DelegatedLocator { - #mapper; - constructor(base, mapper) { - super(base); - this.#mapper = mapper; - } - _clone() { - return new MappedLocator(this.delegate.clone(), this.#mapper).copyOptions(this); - } - _wait(options) { - return this.delegate._wait(options).pipe(mergeMap(handle => { - return from(Promise.resolve(this.#mapper(handle, options?.signal))); - })); - } -} -class NodeLocator extends Locator { - static create(pageOrFrame, selector) { - return new NodeLocator(pageOrFrame, selector).setTimeout('getDefaultTimeout' in pageOrFrame - ? pageOrFrame.getDefaultTimeout() - : pageOrFrame.page().getDefaultTimeout()); - } - static createFromHandle(pageOrFrame, handle) { - return new NodeLocator(pageOrFrame, handle).setTimeout('getDefaultTimeout' in pageOrFrame - ? pageOrFrame.getDefaultTimeout() - : pageOrFrame.page().getDefaultTimeout()); - } - #pageOrFrame; - #selectorOrHandle; - constructor(pageOrFrame, selectorOrHandle) { - super(); - this.#pageOrFrame = pageOrFrame; - this.#selectorOrHandle = selectorOrHandle; - } - #waitForVisibilityIfNeeded = (handle) => { - if (!this.visibility) { - return EMPTY; - } - return (() => { - switch (this.visibility) { - case 'hidden': - return defer(() => { - return from(handle.isHidden()); - }); - case 'visible': - return defer(() => { - return from(handle.isVisible()); - }); - } - })().pipe(first(identity), retry({ delay: RETRY_DELAY }), ignoreElements()); - }; - _clone() { - return new NodeLocator(this.#pageOrFrame, - this.#selectorOrHandle).copyOptions(this); - } - _wait(options) { - const signal = options?.signal; - return defer(() => { - if (typeof this.#selectorOrHandle === 'string') { - return from(this.#pageOrFrame.waitForSelector(this.#selectorOrHandle, { - visible: false, - timeout: this._timeout, - signal, - })); - } - else { - return of(this.#selectorOrHandle); - } - }).pipe(filter((value) => { - return value !== null; - }), throwIfEmpty(), this.operators.conditions([this.#waitForVisibilityIfNeeded], signal)); - } -} -function checkLocatorArray(locators) { - for (const locator of locators) { - if (!(locator instanceof Locator)) { - throw new Error('Unknown locator for race candidate'); - } - } - return locators; -} -class RaceLocator extends Locator { - static create(locators) { - const array = checkLocatorArray(locators); - return new RaceLocator(array); - } - #locators; - constructor(locators) { - super(); - this.#locators = locators; - } - _clone() { - return new RaceLocator(this.#locators.map(locator => { - return locator.clone(); - })).copyOptions(this); - } - _wait(options) { - return race(...this.#locators.map(locator => { - return locator._wait(options); - })); - } -} -const RETRY_DELAY = 100; - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __runInitializers$7 = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; -var __esDecorate$7 = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -var __addDisposableResource$8 = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$8 = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -var __setFunctionName$3 = (undefined && undefined.__setFunctionName) || function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; -function bindIsolatedHandle(target, _) { - return async function (...args) { - if (this.realm === this.frame.isolatedRealm()) { - return await target.call(this, ...args); - } - let adoptedThis; - if (this['isolatedHandle']) { - adoptedThis = this['isolatedHandle']; - } - else { - this['isolatedHandle'] = adoptedThis = await this.frame - .isolatedRealm() - .adoptHandle(this); - } - const result = await target.call(adoptedThis, ...args); - if (result === adoptedThis) { - return this; - } - if (result instanceof JSHandle) { - return await this.realm.transferHandle(result); - } - if (Array.isArray(result)) { - await Promise.all(result.map(async (item, index, result) => { - if (item instanceof JSHandle) { - result[index] = await this.realm.transferHandle(item); - } - })); - } - if (result instanceof Map) { - await Promise.all([...result.entries()].map(async ([key, value]) => { - if (value instanceof JSHandle) { - result.set(key, await this.realm.transferHandle(value)); - } - })); - } - return result; - }; -} -let ElementHandle = (() => { - let _classSuper = JSHandle; - let _instanceExtraInitializers = []; - let _getProperty_decorators; - let _getProperties_decorators; - let _jsonValue_decorators; - let _$_decorators; - let _$$_decorators; - let _private_$$_decorators; - let _private_$$_descriptor; - let _waitForSelector_decorators; - let _isVisible_decorators; - let _isHidden_decorators; - let _toElement_decorators; - let _clickablePoint_decorators; - let _hover_decorators; - let _click_decorators; - let _drag_decorators; - let _dragEnter_decorators; - let _dragOver_decorators; - let _drop_decorators; - let _dragAndDrop_decorators; - let _select_decorators; - let _tap_decorators; - let _touchStart_decorators; - let _touchMove_decorators; - let _touchEnd_decorators; - let _focus_decorators; - let _type_decorators; - let _press_decorators; - let _boundingBox_decorators; - let _boxModel_decorators; - let _screenshot_decorators; - let _isIntersectingViewport_decorators; - let _scrollIntoView_decorators; - let _asLocator_decorators; - return class ElementHandle extends _classSuper { - static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; - _getProperty_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _getProperties_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _jsonValue_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _$_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _$$_decorators = [throwIfDisposed()]; - _private_$$_decorators = [bindIsolatedHandle]; - _waitForSelector_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _isVisible_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _isHidden_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _toElement_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _clickablePoint_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _hover_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _click_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _drag_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _dragEnter_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _dragOver_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _drop_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _dragAndDrop_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _select_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _tap_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _touchStart_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _touchMove_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _touchEnd_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _focus_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _type_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _press_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _boundingBox_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _boxModel_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _screenshot_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _isIntersectingViewport_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _scrollIntoView_decorators = [throwIfDisposed(), bindIsolatedHandle]; - _asLocator_decorators = [throwIfDisposed()]; - __esDecorate$7(this, null, _getProperty_decorators, { kind: "method", name: "getProperty", static: false, private: false, access: { has: obj => "getProperty" in obj, get: obj => obj.getProperty }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _getProperties_decorators, { kind: "method", name: "getProperties", static: false, private: false, access: { has: obj => "getProperties" in obj, get: obj => obj.getProperties }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _jsonValue_decorators, { kind: "method", name: "jsonValue", static: false, private: false, access: { has: obj => "jsonValue" in obj, get: obj => obj.jsonValue }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _$_decorators, { kind: "method", name: "$", static: false, private: false, access: { has: obj => "$" in obj, get: obj => obj.$ }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _$$_decorators, { kind: "method", name: "$$", static: false, private: false, access: { has: obj => "$$" in obj, get: obj => obj.$$ }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, _private_$$_descriptor = { value: __setFunctionName$3(async function (selector) { - return await this.#$$impl(selector); - }, "#$$") }, _private_$$_decorators, { kind: "method", name: "#$$", static: false, private: true, access: { has: obj => #$$ in obj, get: obj => obj.#$$ }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _waitForSelector_decorators, { kind: "method", name: "waitForSelector", static: false, private: false, access: { has: obj => "waitForSelector" in obj, get: obj => obj.waitForSelector }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _isVisible_decorators, { kind: "method", name: "isVisible", static: false, private: false, access: { has: obj => "isVisible" in obj, get: obj => obj.isVisible }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _isHidden_decorators, { kind: "method", name: "isHidden", static: false, private: false, access: { has: obj => "isHidden" in obj, get: obj => obj.isHidden }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _toElement_decorators, { kind: "method", name: "toElement", static: false, private: false, access: { has: obj => "toElement" in obj, get: obj => obj.toElement }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _clickablePoint_decorators, { kind: "method", name: "clickablePoint", static: false, private: false, access: { has: obj => "clickablePoint" in obj, get: obj => obj.clickablePoint }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _hover_decorators, { kind: "method", name: "hover", static: false, private: false, access: { has: obj => "hover" in obj, get: obj => obj.hover }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _click_decorators, { kind: "method", name: "click", static: false, private: false, access: { has: obj => "click" in obj, get: obj => obj.click }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _drag_decorators, { kind: "method", name: "drag", static: false, private: false, access: { has: obj => "drag" in obj, get: obj => obj.drag }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _dragEnter_decorators, { kind: "method", name: "dragEnter", static: false, private: false, access: { has: obj => "dragEnter" in obj, get: obj => obj.dragEnter }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _dragOver_decorators, { kind: "method", name: "dragOver", static: false, private: false, access: { has: obj => "dragOver" in obj, get: obj => obj.dragOver }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _drop_decorators, { kind: "method", name: "drop", static: false, private: false, access: { has: obj => "drop" in obj, get: obj => obj.drop }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _dragAndDrop_decorators, { kind: "method", name: "dragAndDrop", static: false, private: false, access: { has: obj => "dragAndDrop" in obj, get: obj => obj.dragAndDrop }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _select_decorators, { kind: "method", name: "select", static: false, private: false, access: { has: obj => "select" in obj, get: obj => obj.select }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _tap_decorators, { kind: "method", name: "tap", static: false, private: false, access: { has: obj => "tap" in obj, get: obj => obj.tap }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _touchStart_decorators, { kind: "method", name: "touchStart", static: false, private: false, access: { has: obj => "touchStart" in obj, get: obj => obj.touchStart }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _touchMove_decorators, { kind: "method", name: "touchMove", static: false, private: false, access: { has: obj => "touchMove" in obj, get: obj => obj.touchMove }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _touchEnd_decorators, { kind: "method", name: "touchEnd", static: false, private: false, access: { has: obj => "touchEnd" in obj, get: obj => obj.touchEnd }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _focus_decorators, { kind: "method", name: "focus", static: false, private: false, access: { has: obj => "focus" in obj, get: obj => obj.focus }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _type_decorators, { kind: "method", name: "type", static: false, private: false, access: { has: obj => "type" in obj, get: obj => obj.type }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _press_decorators, { kind: "method", name: "press", static: false, private: false, access: { has: obj => "press" in obj, get: obj => obj.press }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _boundingBox_decorators, { kind: "method", name: "boundingBox", static: false, private: false, access: { has: obj => "boundingBox" in obj, get: obj => obj.boundingBox }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _boxModel_decorators, { kind: "method", name: "boxModel", static: false, private: false, access: { has: obj => "boxModel" in obj, get: obj => obj.boxModel }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _screenshot_decorators, { kind: "method", name: "screenshot", static: false, private: false, access: { has: obj => "screenshot" in obj, get: obj => obj.screenshot }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _isIntersectingViewport_decorators, { kind: "method", name: "isIntersectingViewport", static: false, private: false, access: { has: obj => "isIntersectingViewport" in obj, get: obj => obj.isIntersectingViewport }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _scrollIntoView_decorators, { kind: "method", name: "scrollIntoView", static: false, private: false, access: { has: obj => "scrollIntoView" in obj, get: obj => obj.scrollIntoView }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$7(this, null, _asLocator_decorators, { kind: "method", name: "asLocator", static: false, private: false, access: { has: obj => "asLocator" in obj, get: obj => obj.asLocator }, metadata: _metadata }, null, _instanceExtraInitializers); - if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); - } - isolatedHandle = __runInitializers$7(this, _instanceExtraInitializers); - handle; - constructor(handle) { - super(); - this.handle = handle; - this[_isElementHandle] = true; - } - get id() { - return this.handle.id; - } - get disposed() { - return this.handle.disposed; - } - async getProperty(propertyName) { - return await this.handle.getProperty(propertyName); - } - async getProperties() { - return await this.handle.getProperties(); - } - async evaluate(pageFunction, ...args) { - pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction); - return await this.handle.evaluate(pageFunction, ...args); - } - async evaluateHandle(pageFunction, ...args) { - pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction); - return await this.handle.evaluateHandle(pageFunction, ...args); - } - async jsonValue() { - return await this.handle.jsonValue(); - } - toString() { - return this.handle.toString(); - } - remoteObject() { - return this.handle.remoteObject(); - } - async dispose() { - await Promise.all([this.handle.dispose(), this.isolatedHandle?.dispose()]); - } - asElement() { - return this; - } - async $(selector) { - const { updatedSelector, QueryHandler } = getQueryHandlerAndSelector(selector); - return (await QueryHandler.queryOne(this, updatedSelector)); - } - async $$(selector, options) { - if (options?.isolate === false) { - return await this.#$$impl(selector); - } - return await this.#$$(selector); - } - get #$$() { return _private_$$_descriptor.value; } - async #$$impl(selector) { - const { updatedSelector, QueryHandler } = getQueryHandlerAndSelector(selector); - return await AsyncIterableUtil.collect(QueryHandler.queryAll(this, updatedSelector)); - } - async $eval(selector, pageFunction, ...args) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - pageFunction = withSourcePuppeteerURLIfNone(this.$eval.name, pageFunction); - const elementHandle = __addDisposableResource$8(env_1, await this.$(selector), false); - if (!elementHandle) { - throw new Error(`Error: failed to find element matching selector "${selector}"`); - } - return await elementHandle.evaluate(pageFunction, ...args); - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$8(env_1); - } - } - async $$eval(selector, pageFunction, ...args) { - const env_2 = { stack: [], error: void 0, hasError: false }; - try { - pageFunction = withSourcePuppeteerURLIfNone(this.$$eval.name, pageFunction); - const results = await this.$$(selector); - const elements = __addDisposableResource$8(env_2, await this.evaluateHandle((_, ...elements) => { - return elements; - }, ...results), false); - const [result] = await Promise.all([ - elements.evaluate(pageFunction, ...args), - ...results.map(results => { - return results.dispose(); - }), - ]); - return result; - } - catch (e_2) { - env_2.error = e_2; - env_2.hasError = true; - } - finally { - __disposeResources$8(env_2); - } - } - async waitForSelector(selector, options = {}) { - const { updatedSelector, QueryHandler, polling } = getQueryHandlerAndSelector(selector); - return (await QueryHandler.waitFor(this, updatedSelector, { - polling, - ...options, - })); - } - async #checkVisibility(visibility) { - return await this.evaluate(async (element, PuppeteerUtil, visibility) => { - return Boolean(PuppeteerUtil.checkVisibility(element, visibility)); - }, LazyArg.create(context => { - return context.puppeteerUtil; - }), visibility); - } - async isVisible() { - return await this.#checkVisibility(true); - } - async isHidden() { - return await this.#checkVisibility(false); - } - async toElement(tagName) { - const isMatchingTagName = await this.evaluate((node, tagName) => { - return node.nodeName === tagName.toUpperCase(); - }, tagName); - if (!isMatchingTagName) { - throw new Error(`Element is not a(n) \`${tagName}\` element`); - } - return this; - } - async clickablePoint(offset) { - const box = await this.#clickableBox(); - if (!box) { - throw new Error('Node is either not clickable or not an Element'); - } - if (offset !== undefined) { - return { - x: box.x + offset.x, - y: box.y + offset.y, - }; - } - return { - x: box.x + box.width / 2, - y: box.y + box.height / 2, - }; - } - async hover() { - await this.scrollIntoViewIfNeeded(); - const { x, y } = await this.clickablePoint(); - await this.frame.page().mouse.move(x, y); - } - async click(options = {}) { - await this.scrollIntoViewIfNeeded(); - const { x, y } = await this.clickablePoint(options.offset); - try { - await this.frame.page().mouse.click(x, y, options); - } - finally { - if (options.debugHighlight) { - await this.frame.page().evaluate((x, y) => { - const highlight = document.createElement('div'); - highlight.innerHTML = ``; - highlight.addEventListener('animationend', () => { - highlight.remove(); - }, { once: true }); - document.body.append(highlight); - }, x, y); - } - } - } - async drag(target) { - await this.scrollIntoViewIfNeeded(); - const page = this.frame.page(); - if (page.isDragInterceptionEnabled()) { - const source = await this.clickablePoint(); - if (target instanceof ElementHandle) { - target = await target.clickablePoint(); - } - return await page.mouse.drag(source, target); - } - try { - if (!page._isDragging) { - page._isDragging = true; - await this.hover(); - await page.mouse.down(); - } - if (target instanceof ElementHandle) { - await target.hover(); - } - else { - await page.mouse.move(target.x, target.y); - } - } - catch (error) { - page._isDragging = false; - throw error; - } - } - async dragEnter(data = { items: [], dragOperationsMask: 1 }) { - const page = this.frame.page(); - await this.scrollIntoViewIfNeeded(); - const target = await this.clickablePoint(); - await page.mouse.dragEnter(target, data); - } - async dragOver(data = { items: [], dragOperationsMask: 1 }) { - const page = this.frame.page(); - await this.scrollIntoViewIfNeeded(); - const target = await this.clickablePoint(); - await page.mouse.dragOver(target, data); - } - async drop(dataOrElement = { - items: [], - dragOperationsMask: 1, - }) { - const page = this.frame.page(); - if ('items' in dataOrElement) { - await this.scrollIntoViewIfNeeded(); - const destination = await this.clickablePoint(); - await page.mouse.drop(destination, dataOrElement); - } - else { - await dataOrElement.drag(this); - page._isDragging = false; - await page.mouse.up(); - } - } - async dragAndDrop(target, options) { - const page = this.frame.page(); - assert(page.isDragInterceptionEnabled(), 'Drag Interception is not enabled!'); - await this.scrollIntoViewIfNeeded(); - const startPoint = await this.clickablePoint(); - const targetPoint = await target.clickablePoint(); - await page.mouse.dragAndDrop(startPoint, targetPoint, options); - } - async select(...values) { - for (const value of values) { - assert(isString(value), 'Values must be strings. Found value "' + - value + - '" of type "' + - typeof value + - '"'); - } - return await this.evaluate((element, vals) => { - const values = new Set(vals); - if (!(element instanceof HTMLSelectElement)) { - throw new Error('Element is not a '); - const path = environment.value.path; - if (path) { - files = files.map(filePath => { - if (path.win32.isAbsolute(filePath) || - path.posix.isAbsolute(filePath)) { - return filePath; - } - else { - return path.resolve(filePath); - } - }); - } - if (files.length === 0) { - await this.evaluate(element => { - element.files = new DataTransfer().files; - element.dispatchEvent(new Event('input', { bubbles: true, composed: true })); - element.dispatchEvent(new Event('change', { bubbles: true })); - }); - return; - } - const { node: { backendNodeId }, } = await this.client.send('DOM.describeNode', { - objectId: this.id, - }); - await this.client.send('DOM.setFileInputFiles', { - objectId: this.id, - files, - backendNodeId, - }); - } - async autofill(data) { - const nodeInfo = await this.client.send('DOM.describeNode', { - objectId: this.handle.id, - }); - const fieldId = nodeInfo.node.backendNodeId; - const frameId = this.frame._id; - await this.client.send('Autofill.trigger', { - fieldId, - frameId, - card: data.creditCard, - }); - } - async *queryAXTree(name, role) { - const { nodes } = await this.client.send('Accessibility.queryAXTree', { - objectId: this.id, - accessibleName: name, - role, - }); - const results = nodes.filter(node => { - if (node.ignored) { - return false; - } - if (!node.role) { - return false; - } - if (NON_ELEMENT_NODE_ROLES.has(node.role.value)) { - return false; - } - return true; - }); - return yield* AsyncIterableUtil.map(results, node => { - return this.realm.adoptBackendNode(node.backendDOMNodeId); - }); - } - async backendNodeId() { - if (this.#backendNodeId) { - return this.#backendNodeId; - } - const { node } = await this.client.send('DOM.describeNode', { - objectId: this.handle.id, - }); - this.#backendNodeId = node.backendNodeId; - return this.#backendNodeId; - } - }; -})(); - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __addDisposableResource$3 = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$3 = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -const ariaQuerySelectorBinding = new Binding$2('__ariaQuerySelector', ARIAQueryHandler.queryOne, ''); -const ariaQuerySelectorAllBinding = new Binding$2('__ariaQuerySelectorAll', (async (element, selector) => { - const results = ARIAQueryHandler.queryAll(element, selector); - return await element.realm.evaluateHandle((...elements) => { - return elements; - }, ...(await AsyncIterableUtil.collect(results))); -}), ''); -let ExecutionContext$1 = class ExecutionContext extends EventEmitter { - #client; - #world; - #id; - #name; - #disposables = new DisposableStack(); - constructor(client, contextPayload, world) { - super(); - this.#client = client; - this.#world = world; - this.#id = contextPayload.id; - if (contextPayload.name) { - this.#name = contextPayload.name; - } - const clientEmitter = this.#disposables.use(new EventEmitter(this.#client)); - clientEmitter.on('Runtime.bindingCalled', this.#onBindingCalled.bind(this)); - clientEmitter.on('Runtime.executionContextDestroyed', async (event) => { - if (event.executionContextId === this.#id) { - this[disposeSymbol](); - } - }); - clientEmitter.on('Runtime.executionContextsCleared', async () => { - this[disposeSymbol](); - }); - clientEmitter.on('Runtime.consoleAPICalled', this.#onConsoleAPI.bind(this)); - clientEmitter.on(CDPSessionEvent.Disconnected, () => { - this[disposeSymbol](); - }); - } - #bindings = new Map(); - #mutex = new Mutex$2(); - async #addBinding(binding) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - if (this.#bindings.has(binding.name)) { - return; - } - const _ = __addDisposableResource$3(env_1, await this.#mutex.acquire(), false); - try { - await this.#client.send('Runtime.addBinding', this.#name - ? { - name: CDP_BINDING_PREFIX + binding.name, - executionContextName: this.#name, - } - : { - name: CDP_BINDING_PREFIX + binding.name, - executionContextId: this.#id, - }); - await this.evaluate(addPageBinding, 'internal', binding.name, CDP_BINDING_PREFIX); - this.#bindings.set(binding.name, binding); - } - catch (error) { - if (error instanceof Error) { - if (error.message.includes('Execution context was destroyed')) { - return; - } - if (error.message.includes('Cannot find context with specified id')) { - return; - } - } - debugError(error); - } - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$3(env_1); - } - } - async #onBindingCalled(event) { - if (event.executionContextId !== this.#id) { - return; - } - let payload; - try { - payload = JSON.parse(event.payload); - } - catch { - return; - } - const { type, name, seq, args, isTrivial } = payload; - if (type !== 'internal') { - this.emit('bindingcalled', event); - return; - } - if (!this.#bindings.has(name)) { - this.emit('bindingcalled', event); - return; - } - try { - const binding = this.#bindings.get(name); - await binding?.run(this, seq, args, isTrivial); - } - catch (err) { - debugError(err); - } - } - get id() { - return this.#id; - } - #onConsoleAPI(event) { - if (event.executionContextId !== this.#id) { - return; - } - this.emit('consoleapicalled', event); - } - #bindingsInstalled = false; - #puppeteerUtil; - get puppeteerUtil() { - let promise = Promise.resolve(); - if (!this.#bindingsInstalled) { - promise = Promise.all([ - this.#addBindingWithoutThrowing(ariaQuerySelectorBinding), - this.#addBindingWithoutThrowing(ariaQuerySelectorAllBinding), - ]); - this.#bindingsInstalled = true; - } - scriptInjector.inject(script => { - if (this.#puppeteerUtil) { - void this.#puppeteerUtil.then(handle => { - void handle.dispose(); - }); - } - this.#puppeteerUtil = promise.then(() => { - return this.evaluateHandle(script); - }); - }, !this.#puppeteerUtil); - return this.#puppeteerUtil; - } - async #addBindingWithoutThrowing(binding) { - try { - await this.#addBinding(binding); - } - catch (err) { - debugError(err); - } - } - async evaluate(pageFunction, ...args) { - return await this.#evaluate(true, pageFunction, ...args); - } - async evaluateHandle(pageFunction, ...args) { - return await this.#evaluate(false, pageFunction, ...args); - } - async #evaluate(returnByValue, pageFunction, ...args) { - const sourceUrlComment = getSourceUrlComment(getSourcePuppeteerURLIfAvailable(pageFunction)?.toString() ?? - PuppeteerURL.INTERNAL_URL); - if (isString(pageFunction)) { - const contextId = this.#id; - const expression = pageFunction; - const expressionWithSourceUrl = SOURCE_URL_REGEX.test(expression) - ? expression - : `${expression}\n${sourceUrlComment}\n`; - const { exceptionDetails, result: remoteObject } = await this.#client - .send('Runtime.evaluate', { - expression: expressionWithSourceUrl, - contextId, - returnByValue, - awaitPromise: true, - userGesture: true, - }) - .catch(rewriteError); - if (exceptionDetails) { - throw createEvaluationError(exceptionDetails); - } - if (returnByValue) { - return valueFromPrimitiveRemoteObject(remoteObject); - } - return this.#world.createCdpHandle(remoteObject); - } - const functionDeclaration = stringifyFunction(pageFunction); - const functionDeclarationWithSourceUrl = SOURCE_URL_REGEX.test(functionDeclaration) - ? functionDeclaration - : `${functionDeclaration}\n${sourceUrlComment}\n`; - let callFunctionOnPromise; - try { - callFunctionOnPromise = this.#client.send('Runtime.callFunctionOn', { - functionDeclaration: functionDeclarationWithSourceUrl, - executionContextId: this.#id, - arguments: args.some(arg => { - return arg instanceof LazyArg; - }) - ? await Promise.all(args.map(arg => { - return convertArgumentAsync(this, arg); - })) - : args.map(arg => { - return convertArgument(this, arg); - }), - returnByValue, - awaitPromise: true, - userGesture: true, - }); - } - catch (error) { - if (error instanceof TypeError && - error.message.startsWith('Converting circular structure to JSON')) { - error.message += ' Recursive objects are not allowed.'; - } - throw error; - } - const { exceptionDetails, result: remoteObject } = await callFunctionOnPromise.catch(rewriteError); - if (exceptionDetails) { - throw createEvaluationError(exceptionDetails); - } - if (returnByValue) { - return valueFromPrimitiveRemoteObject(remoteObject); - } - return this.#world.createCdpHandle(remoteObject); - async function convertArgumentAsync(context, arg) { - if (arg instanceof LazyArg) { - arg = await arg.get(context); - } - return convertArgument(context, arg); - } - function convertArgument(context, arg) { - if (typeof arg === 'bigint') { - return { unserializableValue: `${arg.toString()}n` }; - } - if (Object.is(arg, -0)) { - return { unserializableValue: '-0' }; - } - if (Object.is(arg, Infinity)) { - return { unserializableValue: 'Infinity' }; - } - if (Object.is(arg, -Infinity)) { - return { unserializableValue: '-Infinity' }; - } - if (Object.is(arg, NaN)) { - return { unserializableValue: 'NaN' }; - } - const objectHandle = arg && (arg instanceof CdpJSHandle || arg instanceof CdpElementHandle) - ? arg - : null; - if (objectHandle) { - if (objectHandle.realm !== context.#world) { - throw new Error('JSHandles can be evaluated only in the context they were created!'); - } - if (objectHandle.disposed) { - throw new Error('JSHandle is disposed!'); - } - if (objectHandle.remoteObject().unserializableValue) { - return { - unserializableValue: objectHandle.remoteObject().unserializableValue, - }; - } - if (!objectHandle.remoteObject().objectId) { - return { value: objectHandle.remoteObject().value }; - } - return { objectId: objectHandle.remoteObject().objectId }; - } - return { value: arg }; - } - } - [disposeSymbol]() { - this.#disposables.dispose(); - this.emit('disposed', undefined); - } -}; -const rewriteError = (error) => { - if (error.message.includes('Object reference chain is too long')) { - return { result: { type: 'undefined' } }; - } - if (error.message.includes("Object couldn't be returned by value")) { - return { result: { type: 'undefined' } }; - } - if (error.message.endsWith('Cannot find context with specified id') || - error.message.endsWith('Inspected target navigated or closed')) { - throw new Error('Execution context was destroyed, most likely because of a navigation.'); - } - throw error; -}; - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var FrameManagerEvent; -(function (FrameManagerEvent) { - FrameManagerEvent.FrameAttached = Symbol('FrameManager.FrameAttached'); - FrameManagerEvent.FrameNavigated = Symbol('FrameManager.FrameNavigated'); - FrameManagerEvent.FrameDetached = Symbol('FrameManager.FrameDetached'); - FrameManagerEvent.FrameSwapped = Symbol('FrameManager.FrameSwapped'); - FrameManagerEvent.LifecycleEvent = Symbol('FrameManager.LifecycleEvent'); - FrameManagerEvent.FrameNavigatedWithinDocument = Symbol('FrameManager.FrameNavigatedWithinDocument'); - FrameManagerEvent.ConsoleApiCalled = Symbol('FrameManager.ConsoleApiCalled'); - FrameManagerEvent.BindingCalled = Symbol('FrameManager.BindingCalled'); -})(FrameManagerEvent || (FrameManagerEvent = {})); - -/** - * @license - * Copyright 2019 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class IsolatedWorld extends Realm { - #context; - #emitter = new EventEmitter(); - #frameOrWorker; - constructor(frameOrWorker, timeoutSettings) { - super(timeoutSettings); - this.#frameOrWorker = frameOrWorker; - } - get environment() { - return this.#frameOrWorker; - } - get client() { - return this.#frameOrWorker.client; - } - get emitter() { - return this.#emitter; - } - setContext(context) { - this.#context?.[disposeSymbol](); - context.once('disposed', this.#onContextDisposed.bind(this)); - context.on('consoleapicalled', this.#onContextConsoleApiCalled.bind(this)); - context.on('bindingcalled', this.#onContextBindingCalled.bind(this)); - this.#context = context; - this.#emitter.emit('context', context); - void this.taskManager.rerunAll(); - } - #onContextDisposed() { - this.#context = undefined; - if ('clearDocumentHandle' in this.#frameOrWorker) { - this.#frameOrWorker.clearDocumentHandle(); - } - } - #onContextConsoleApiCalled(event) { - this.#emitter.emit('consoleapicalled', event); - } - #onContextBindingCalled(event) { - this.#emitter.emit('bindingcalled', event); - } - hasContext() { - return !!this.#context; - } - get context() { - return this.#context; - } - #executionContext() { - if (this.disposed) { - throw new Error(`Execution context is not available in detached frame or worker "${this.environment.url()}" (are you trying to evaluate?)`); - } - return this.#context; - } - async #waitForExecutionContext() { - const error = new Error('Execution context was destroyed'); - const result = await firstValueFrom(fromEmitterEvent(this.#emitter, 'context').pipe(raceWith(fromEmitterEvent(this.#emitter, 'disposed').pipe(map(() => { - throw error; - })), timeout(this.timeoutSettings.timeout())))); - return result; - } - async evaluateHandle(pageFunction, ...args) { - pageFunction = withSourcePuppeteerURLIfNone(this.evaluateHandle.name, pageFunction); - let context = this.#executionContext(); - if (!context) { - context = await this.#waitForExecutionContext(); - } - return await context.evaluateHandle(pageFunction, ...args); - } - async evaluate(pageFunction, ...args) { - pageFunction = withSourcePuppeteerURLIfNone(this.evaluate.name, pageFunction); - let context = this.#executionContext(); - if (!context) { - context = await this.#waitForExecutionContext(); - } - return await context.evaluate(pageFunction, ...args); - } - async adoptBackendNode(backendNodeId) { - let context = this.#executionContext(); - if (!context) { - context = await this.#waitForExecutionContext(); - } - const { object } = await this.client.send('DOM.resolveNode', { - backendNodeId: backendNodeId, - executionContextId: context.id, - }); - return this.createCdpHandle(object); - } - async adoptHandle(handle) { - if (handle.realm === this) { - return (await handle.evaluateHandle(value => { - return value; - })); - } - const nodeInfo = await this.client.send('DOM.describeNode', { - objectId: handle.id, - }); - return (await this.adoptBackendNode(nodeInfo.node.backendNodeId)); - } - async transferHandle(handle) { - if (handle.realm === this) { - return handle; - } - if (handle.remoteObject().objectId === undefined) { - return handle; - } - const info = await this.client.send('DOM.describeNode', { - objectId: handle.remoteObject().objectId, - }); - const newHandle = (await this.adoptBackendNode(info.node.backendNodeId)); - await handle.dispose(); - return newHandle; - } - createCdpHandle(remoteObject) { - if (remoteObject.subtype === 'node') { - return new CdpElementHandle(this, remoteObject); - } - return new CdpJSHandle(this, remoteObject); - } - [disposeSymbol]() { - this.#context?.[disposeSymbol](); - this.#emitter.emit('disposed', undefined); - super[disposeSymbol](); - this.#emitter.removeAllListeners(); - } -} - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const MAIN_WORLD = Symbol('mainWorld'); -const PUPPETEER_WORLD = Symbol('puppeteerWorld'); - -/** - * @license - * Copyright 2019 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const puppeteerToProtocolLifecycle = new Map([ - ['load', 'load'], - ['domcontentloaded', 'DOMContentLoaded'], - ['networkidle0', 'networkIdle'], - ['networkidle2', 'networkAlmostIdle'], -]); -class LifecycleWatcher { - #expectedLifecycle; - #frame; - #timeout; - #navigationRequest = null; - #subscriptions = new DisposableStack(); - #initialLoaderId; - #terminationDeferred; - #sameDocumentNavigationDeferred = Deferred.create(); - #lifecycleDeferred = Deferred.create(); - #newDocumentNavigationDeferred = Deferred.create(); - #error = new Error('LifecycleWatcher terminated'); - #hasSameDocumentNavigation; - #swapped; - #navigationResponseReceived; - constructor(networkManager, frame, waitUntil, timeout, signal) { - if (Array.isArray(waitUntil)) { - waitUntil = waitUntil.slice(); - } - else if (typeof waitUntil === 'string') { - waitUntil = [waitUntil]; - } - this.#initialLoaderId = frame._loaderId; - this.#expectedLifecycle = waitUntil.map(value => { - const protocolEvent = puppeteerToProtocolLifecycle.get(value); - assert(protocolEvent, 'Unknown value for options.waitUntil: ' + value); - return protocolEvent; - }); - signal?.addEventListener('abort', () => { - if (signal.reason instanceof Error) { - signal.reason.cause = this.#error; - } - this.#terminationDeferred.reject(signal.reason); - }); - this.#frame = frame; - this.#timeout = timeout; - const frameManagerEmitter = this.#subscriptions.use(new EventEmitter(frame._frameManager)); - frameManagerEmitter.on(FrameManagerEvent.LifecycleEvent, this.#checkLifecycleComplete.bind(this)); - const frameEmitter = this.#subscriptions.use(new EventEmitter(frame)); - frameEmitter.on(FrameEvent.FrameNavigatedWithinDocument, this.#navigatedWithinDocument.bind(this)); - frameEmitter.on(FrameEvent.FrameNavigated, this.#navigated.bind(this)); - frameEmitter.on(FrameEvent.FrameSwapped, this.#frameSwapped.bind(this)); - frameEmitter.on(FrameEvent.FrameSwappedByActivation, this.#frameSwapped.bind(this)); - frameEmitter.on(FrameEvent.FrameDetached, this.#onFrameDetached.bind(this)); - const networkManagerEmitter = this.#subscriptions.use(new EventEmitter(networkManager)); - networkManagerEmitter.on(NetworkManagerEvent.Request, this.#onRequest.bind(this)); - networkManagerEmitter.on(NetworkManagerEvent.Response, this.#onResponse.bind(this)); - networkManagerEmitter.on(NetworkManagerEvent.RequestFailed, this.#onRequestFailed.bind(this)); - this.#terminationDeferred = Deferred.create({ - timeout: this.#timeout, - message: `Navigation timeout of ${this.#timeout} ms exceeded`, - }); - this.#checkLifecycleComplete(); - } - #onRequest(request) { - if (request.frame() !== this.#frame || !request.isNavigationRequest()) { - return; - } - this.#navigationRequest = request; - this.#navigationResponseReceived?.resolve(); - this.#navigationResponseReceived = Deferred.create(); - if (request.response() !== null) { - this.#navigationResponseReceived?.resolve(); - } - } - #onRequestFailed(request) { - if (this.#navigationRequest?.id !== request.id) { - return; - } - this.#navigationResponseReceived?.resolve(); - } - #onResponse(response) { - if (this.#navigationRequest?.id !== response.request().id) { - return; - } - this.#navigationResponseReceived?.resolve(); - } - #onFrameDetached(frame) { - if (this.#frame === frame) { - this.#error.message = 'Navigating frame was detached'; - this.#terminationDeferred.resolve(this.#error); - return; - } - this.#checkLifecycleComplete(); - } - async navigationResponse() { - await this.#navigationResponseReceived?.valueOrThrow(); - return this.#navigationRequest ? this.#navigationRequest.response() : null; - } - sameDocumentNavigationPromise() { - return this.#sameDocumentNavigationDeferred.valueOrThrow(); - } - newDocumentNavigationPromise() { - return this.#newDocumentNavigationDeferred.valueOrThrow(); - } - lifecyclePromise() { - return this.#lifecycleDeferred.valueOrThrow(); - } - terminationPromise() { - return this.#terminationDeferred.valueOrThrow(); - } - #navigatedWithinDocument() { - this.#hasSameDocumentNavigation = true; - this.#checkLifecycleComplete(); - } - #navigated(navigationType) { - if (navigationType === 'BackForwardCacheRestore') { - return this.#frameSwapped(); - } - this.#checkLifecycleComplete(); - } - #frameSwapped() { - this.#swapped = true; - this.#checkLifecycleComplete(); - } - #checkLifecycleComplete() { - if (!checkLifecycle(this.#frame, this.#expectedLifecycle)) { - return; - } - this.#lifecycleDeferred.resolve(); - if (this.#hasSameDocumentNavigation) { - this.#sameDocumentNavigationDeferred.resolve(undefined); - } - if (this.#swapped || this.#frame._loaderId !== this.#initialLoaderId) { - this.#newDocumentNavigationDeferred.resolve(undefined); - } - function checkLifecycle(frame, expectedLifecycle) { - for (const event of expectedLifecycle) { - if (!frame._lifecycleEvents.has(event)) { - return false; - } - } - for (const child of frame.childFrames()) { - if (child._hasStartedLoading && - !checkLifecycle(child, expectedLifecycle)) { - return false; - } - } - return true; - } - } - dispose() { - this.#subscriptions.dispose(); - this.#error.cause = new Error('LifecycleWatcher disposed'); - this.#terminationDeferred.resolve(this.#error); - } -} - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __runInitializers$2 = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; -var __esDecorate$2 = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -let CdpFrame = (() => { - let _classSuper = Frame; - let _instanceExtraInitializers = []; - let _goto_decorators; - let _waitForNavigation_decorators; - let _setContent_decorators; - let _addPreloadScript_decorators; - let _addExposedFunctionBinding_decorators; - let _removeExposedFunctionBinding_decorators; - let _waitForDevicePrompt_decorators; - return class CdpFrame extends _classSuper { - static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; - __esDecorate$2(this, null, _goto_decorators, { kind: "method", name: "goto", static: false, private: false, access: { has: obj => "goto" in obj, get: obj => obj.goto }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$2(this, null, _waitForNavigation_decorators, { kind: "method", name: "waitForNavigation", static: false, private: false, access: { has: obj => "waitForNavigation" in obj, get: obj => obj.waitForNavigation }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$2(this, null, _setContent_decorators, { kind: "method", name: "setContent", static: false, private: false, access: { has: obj => "setContent" in obj, get: obj => obj.setContent }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$2(this, null, _addPreloadScript_decorators, { kind: "method", name: "addPreloadScript", static: false, private: false, access: { has: obj => "addPreloadScript" in obj, get: obj => obj.addPreloadScript }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$2(this, null, _addExposedFunctionBinding_decorators, { kind: "method", name: "addExposedFunctionBinding", static: false, private: false, access: { has: obj => "addExposedFunctionBinding" in obj, get: obj => obj.addExposedFunctionBinding }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$2(this, null, _removeExposedFunctionBinding_decorators, { kind: "method", name: "removeExposedFunctionBinding", static: false, private: false, access: { has: obj => "removeExposedFunctionBinding" in obj, get: obj => obj.removeExposedFunctionBinding }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate$2(this, null, _waitForDevicePrompt_decorators, { kind: "method", name: "waitForDevicePrompt", static: false, private: false, access: { has: obj => "waitForDevicePrompt" in obj, get: obj => obj.waitForDevicePrompt }, metadata: _metadata }, null, _instanceExtraInitializers); - if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); - } - #url = (__runInitializers$2(this, _instanceExtraInitializers), ''); - #detached = false; - #client; - _frameManager; - _loaderId = ''; - _lifecycleEvents = new Set(); - _id; - _parentId; - accessibility; - worlds; - constructor(frameManager, frameId, parentFrameId, client) { - super(); - this._frameManager = frameManager; - this.#url = ''; - this._id = frameId; - this._parentId = parentFrameId; - this.#detached = false; - this.#client = client; - this._loaderId = ''; - this.worlds = { - [MAIN_WORLD]: new IsolatedWorld(this, this._frameManager.timeoutSettings), - [PUPPETEER_WORLD]: new IsolatedWorld(this, this._frameManager.timeoutSettings), - }; - this.accessibility = new Accessibility(this.worlds[MAIN_WORLD], frameId); - this.on(FrameEvent.FrameSwappedByActivation, () => { - this._onLoadingStarted(); - this._onLoadingStopped(); - }); - this.worlds[MAIN_WORLD].emitter.on('consoleapicalled', this.#onMainWorldConsoleApiCalled.bind(this)); - this.worlds[MAIN_WORLD].emitter.on('bindingcalled', this.#onMainWorldBindingCalled.bind(this)); - } - #onMainWorldConsoleApiCalled(event) { - this._frameManager.emit(FrameManagerEvent.ConsoleApiCalled, [ - this.worlds[MAIN_WORLD], - event, - ]); - } - #onMainWorldBindingCalled(event) { - this._frameManager.emit(FrameManagerEvent.BindingCalled, [ - this.worlds[MAIN_WORLD], - event, - ]); - } - _client() { - return this.#client; - } - updateId(id) { - this._id = id; - } - updateClient(client) { - this.#client = client; - } - page() { - return this._frameManager.page(); - } - async goto(url, options = {}) { - const { referer = this._frameManager.networkManager.extraHTTPHeaders()['referer'], referrerPolicy = this._frameManager.networkManager.extraHTTPHeaders()['referer-policy'], waitUntil = ['load'], timeout = this._frameManager.timeoutSettings.navigationTimeout(), } = options; - let ensureNewDocumentNavigation = false; - const watcher = new LifecycleWatcher(this._frameManager.networkManager, this, waitUntil, timeout); - let error = await Deferred.race([ - navigate(this.#client, url, referer, referrerPolicy ? referrerPolicyToProtocol(referrerPolicy) : undefined, this._id), - watcher.terminationPromise(), - ]); - if (!error) { - error = await Deferred.race([ - watcher.terminationPromise(), - ensureNewDocumentNavigation - ? watcher.newDocumentNavigationPromise() - : watcher.sameDocumentNavigationPromise(), - ]); - } - try { - if (error) { - throw error; - } - return await watcher.navigationResponse(); - } - finally { - watcher.dispose(); - } - async function navigate(client, url, referrer, referrerPolicy, frameId) { - try { - const response = await client.send('Page.navigate', { - url, - referrer, - frameId, - referrerPolicy, - }); - ensureNewDocumentNavigation = !!response.loaderId; - if (response.errorText === 'net::ERR_HTTP_RESPONSE_CODE_FAILURE') { - return null; - } - return response.errorText - ? new Error(`${response.errorText} at ${url}`) - : null; - } - catch (error) { - if (isErrorLike$1(error)) { - return error; - } - throw error; - } - } - } - async waitForNavigation(options = {}) { - const { waitUntil = ['load'], timeout = this._frameManager.timeoutSettings.navigationTimeout(), signal, } = options; - const watcher = new LifecycleWatcher(this._frameManager.networkManager, this, waitUntil, timeout, signal); - const error = await Deferred.race([ - watcher.terminationPromise(), - ...(options.ignoreSameDocumentNavigation - ? [] - : [watcher.sameDocumentNavigationPromise()]), - watcher.newDocumentNavigationPromise(), - ]); - try { - if (error) { - throw error; - } - const result = await Deferred.race([watcher.terminationPromise(), watcher.navigationResponse()]); - if (result instanceof Error) { - throw error; - } - return result || null; - } - finally { - watcher.dispose(); - } - } - get client() { - return this.#client; - } - mainRealm() { - return this.worlds[MAIN_WORLD]; - } - isolatedRealm() { - return this.worlds[PUPPETEER_WORLD]; - } - async setContent(html, options = {}) { - const { waitUntil = ['load'], timeout = this._frameManager.timeoutSettings.navigationTimeout(), } = options; - await this.setFrameContent(html); - const watcher = new LifecycleWatcher(this._frameManager.networkManager, this, waitUntil, timeout); - const error = await Deferred.race([ - watcher.terminationPromise(), - watcher.lifecyclePromise(), - ]); - watcher.dispose(); - if (error) { - throw error; - } - } - url() { - return this.#url; - } - parentFrame() { - return this._frameManager._frameTree.parentFrame(this._id) || null; - } - childFrames() { - return this._frameManager._frameTree.childFrames(this._id); - } - #deviceRequestPromptManager() { - return this._frameManager._deviceRequestPromptManager(this.#client); - } - async addPreloadScript(preloadScript) { - const parentFrame = this.parentFrame(); - if (parentFrame && this.#client === parentFrame.client) { - return; - } - if (preloadScript.getIdForFrame(this)) { - return; - } - const { identifier } = await this.#client.send('Page.addScriptToEvaluateOnNewDocument', { - source: preloadScript.source, - }); - preloadScript.setIdForFrame(this, identifier); - } - async addExposedFunctionBinding(binding) { - if (this !== this._frameManager.mainFrame() && !this._hasStartedLoading) { - return; - } - await Promise.all([ - this.#client.send('Runtime.addBinding', { - name: CDP_BINDING_PREFIX + binding.name, - }), - this.evaluate(binding.initSource).catch(debugError), - ]); - } - async removeExposedFunctionBinding(binding) { - if (this !== this._frameManager.mainFrame() && !this._hasStartedLoading) { - return; - } - await Promise.all([ - this.#client.send('Runtime.removeBinding', { - name: CDP_BINDING_PREFIX + binding.name, - }), - this.evaluate(name => { - globalThis[name] = undefined; - }, binding.name).catch(debugError), - ]); - } - async waitForDevicePrompt(options = {}) { - return await this.#deviceRequestPromptManager().waitForDevicePrompt(options); - } - _navigated(framePayload) { - this._name = framePayload.name; - this.#url = `${framePayload.url}${framePayload.urlFragment || ''}`; - } - _navigatedWithinDocument(url) { - this.#url = url; - } - _onLifecycleEvent(loaderId, name) { - if (name === 'init') { - this._loaderId = loaderId; - this._lifecycleEvents.clear(); - } - this._lifecycleEvents.add(name); - } - _onLoadingStopped() { - this._lifecycleEvents.add('DOMContentLoaded'); - this._lifecycleEvents.add('load'); - } - _onLoadingStarted() { - this._hasStartedLoading = true; - } - get detached() { - return this.#detached; - } - [(_goto_decorators = [throwIfDetached], _waitForNavigation_decorators = [throwIfDetached], _setContent_decorators = [throwIfDetached], _addPreloadScript_decorators = [throwIfDetached], _addExposedFunctionBinding_decorators = [throwIfDetached], _removeExposedFunctionBinding_decorators = [throwIfDetached], _waitForDevicePrompt_decorators = [throwIfDetached], disposeSymbol)]() { - if (this.#detached) { - return; - } - this.#detached = true; - this.worlds[MAIN_WORLD][disposeSymbol](); - this.worlds[PUPPETEER_WORLD][disposeSymbol](); - } - exposeFunction() { - throw new UnsupportedOperation(); - } - async frameElement() { - const parent = this.parentFrame(); - if (!parent) { - return null; - } - const { backendNodeId } = await parent.client.send('DOM.getFrameOwner', { - frameId: this._id, - }); - return (await parent - .mainRealm() - .adoptBackendNode(backendNodeId)); - } - }; -})(); -function referrerPolicyToProtocol(referrerPolicy) { - return referrerPolicy.replaceAll(/-./g, match => { - return match[1].toUpperCase(); - }); -} - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class FrameTree { - #frames = new Map(); - #parentIds = new Map(); - #childIds = new Map(); - #mainFrame; - #isMainFrameStale = false; - #waitRequests = new Map(); - getMainFrame() { - return this.#mainFrame; - } - getById(frameId) { - return this.#frames.get(frameId); - } - waitForFrame(frameId) { - const frame = this.getById(frameId); - if (frame) { - return Promise.resolve(frame); - } - const deferred = Deferred.create(); - const callbacks = this.#waitRequests.get(frameId) || new Set(); - callbacks.add(deferred); - return deferred.valueOrThrow(); - } - frames() { - return Array.from(this.#frames.values()); - } - addFrame(frame) { - this.#frames.set(frame._id, frame); - if (frame._parentId) { - this.#parentIds.set(frame._id, frame._parentId); - if (!this.#childIds.has(frame._parentId)) { - this.#childIds.set(frame._parentId, new Set()); - } - this.#childIds.get(frame._parentId).add(frame._id); - } - else if (!this.#mainFrame || this.#isMainFrameStale) { - this.#mainFrame = frame; - this.#isMainFrameStale = false; - } - this.#waitRequests.get(frame._id)?.forEach(request => { - return request.resolve(frame); - }); - } - removeFrame(frame) { - this.#frames.delete(frame._id); - this.#parentIds.delete(frame._id); - if (frame._parentId) { - this.#childIds.get(frame._parentId)?.delete(frame._id); - } - else { - this.#isMainFrameStale = true; - } - } - childFrames(frameId) { - const childIds = this.#childIds.get(frameId); - if (!childIds) { - return []; - } - return Array.from(childIds) - .map(id => { - return this.getById(id); - }) - .filter((frame) => { - return frame !== undefined; - }); - } - parentFrame(frameId) { - const parentId = this.#parentIds.get(frameId); - return parentId ? this.getById(parentId) : undefined; - } -} - -class CdpHTTPRequest extends HTTPRequest { - id; - #client; - #isNavigationRequest; - #url; - #resourceType; - #method; - #hasPostData = false; - #postData; - #headers = {}; - #frame; - #initiator; - get client() { - return this.#client; - } - set client(newClient) { - this.#client = newClient; - } - constructor(client, frame, interceptionId, allowInterception, data, redirectChain) { - super(); - this.#client = client; - this.id = data.requestId; - this.#isNavigationRequest = - data.requestId === data.loaderId && data.type === 'Document'; - this._interceptionId = interceptionId; - this.#url = data.request.url + (data.request.urlFragment ?? ''); - this.#resourceType = (data.type || 'other').toLowerCase(); - this.#method = data.request.method; - if (data.request.postDataEntries && - data.request.postDataEntries.length > 0) { - this.#postData = new TextDecoder().decode(mergeUint8Arrays(data.request.postDataEntries - .map(entry => { - return entry.bytes ? stringToTypedArray(entry.bytes, true) : null; - }) - .filter((entry) => { - return entry !== null; - }))); - } - else { - this.#postData = data.request.postData; - } - this.#hasPostData = data.request.hasPostData ?? false; - this.#frame = frame; - this._redirectChain = redirectChain; - this.#initiator = data.initiator; - this.interception.enabled = allowInterception; - this.updateHeaders(data.request.headers); - } - updateHeaders(headers) { - for (const [key, value] of Object.entries(headers)) { - this.#headers[key.toLowerCase()] = value; - } - } - url() { - return this.#url; - } - resourceType() { - return this.#resourceType; - } - method() { - return this.#method; - } - postData() { - return this.#postData; - } - hasPostData() { - return this.#hasPostData; - } - async fetchPostData() { - try { - const result = await this.#client.send('Network.getRequestPostData', { - requestId: this.id, - }); - return result.postData; - } - catch (err) { - debugError(err); - return; - } - } - headers() { - return structuredClone(this.#headers); - } - response() { - return this._response; - } - frame() { - return this.#frame; - } - isNavigationRequest() { - return this.#isNavigationRequest; - } - initiator() { - return this.#initiator; - } - redirectChain() { - return this._redirectChain.slice(); - } - failure() { - if (!this._failureText) { - return null; - } - return { - errorText: this._failureText, - }; - } - canBeIntercepted() { - return !this.url().startsWith('data:') && !this._fromMemoryCache; - } - async _continue(overrides = {}) { - const { url, method, postData, headers } = overrides; - this.interception.handled = true; - const postDataBinaryBase64 = postData - ? stringToBase64(postData) - : undefined; - if (this._interceptionId === undefined) { - throw new Error('HTTPRequest is missing _interceptionId needed for Fetch.continueRequest'); - } - await this.#client - .send('Fetch.continueRequest', { - requestId: this._interceptionId, - url, - method, - postData: postDataBinaryBase64, - headers: headers ? headersArray(headers) : undefined, - }) - .catch(error => { - this.interception.handled = false; - return handleError(error); - }); - } - async _respond(response) { - this.interception.handled = true; - let parsedBody; - if (response.body) { - parsedBody = HTTPRequest.getResponse(response.body); - } - const responseHeaders = {}; - if (response.headers) { - for (const header of Object.keys(response.headers)) { - const value = response.headers[header]; - responseHeaders[header.toLowerCase()] = Array.isArray(value) - ? value.map(item => { - return String(item); - }) - : String(value); - } - } - if (response.contentType) { - responseHeaders['content-type'] = response.contentType; - } - if (parsedBody?.contentLength && !('content-length' in responseHeaders)) { - responseHeaders['content-length'] = String(parsedBody.contentLength); - } - const status = response.status || 200; - if (this._interceptionId === undefined) { - throw new Error('HTTPRequest is missing _interceptionId needed for Fetch.fulfillRequest'); - } - await this.#client - .send('Fetch.fulfillRequest', { - requestId: this._interceptionId, - responseCode: status, - responsePhrase: STATUS_TEXTS[status], - responseHeaders: headersArray(responseHeaders), - body: parsedBody?.base64, - }) - .catch(error => { - this.interception.handled = false; - return handleError(error); - }); - } - async _abort(errorReason) { - this.interception.handled = true; - if (this._interceptionId === undefined) { - throw new Error('HTTPRequest is missing _interceptionId needed for Fetch.failRequest'); - } - await this.#client - .send('Fetch.failRequest', { - requestId: this._interceptionId, - errorReason: errorReason || 'Failed', - }) - .catch(handleError); - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class SecurityDetails { - #subjectName; - #issuer; - #validFrom; - #validTo; - #protocol; - #sanList; - constructor(securityPayload) { - this.#subjectName = securityPayload.subjectName; - this.#issuer = securityPayload.issuer; - this.#validFrom = securityPayload.validFrom; - this.#validTo = securityPayload.validTo; - this.#protocol = securityPayload.protocol; - this.#sanList = securityPayload.sanList; - } - issuer() { - return this.#issuer; - } - validFrom() { - return this.#validFrom; - } - validTo() { - return this.#validTo; - } - protocol() { - return this.#protocol; - } - subjectName() { - return this.#subjectName; - } - subjectAlternativeNames() { - return this.#sanList; - } -} - -class CdpHTTPResponse extends HTTPResponse { - #request; - #contentPromise = null; - #bodyLoadedDeferred = Deferred.create(); - #remoteAddress; - #status; - #statusText; - #fromDiskCache; - #fromServiceWorker; - #headers = {}; - #securityDetails; - #timing; - constructor(request, responsePayload, extraInfo) { - super(); - this.#request = request; - this.#remoteAddress = { - ip: responsePayload.remoteIPAddress, - port: responsePayload.remotePort, - }; - this.#statusText = - this.#parseStatusTextFromExtraInfo(extraInfo) || - responsePayload.statusText; - this.#fromDiskCache = !!responsePayload.fromDiskCache; - this.#fromServiceWorker = !!responsePayload.fromServiceWorker; - this.#status = extraInfo ? extraInfo.statusCode : responsePayload.status; - const headers = extraInfo ? extraInfo.headers : responsePayload.headers; - for (const [key, value] of Object.entries(headers)) { - this.#headers[key.toLowerCase()] = value; - } - this.#securityDetails = responsePayload.securityDetails - ? new SecurityDetails(responsePayload.securityDetails) - : null; - this.#timing = responsePayload.timing || null; - } - #parseStatusTextFromExtraInfo(extraInfo) { - if (!extraInfo || !extraInfo.headersText) { - return; - } - const firstLine = extraInfo.headersText.split('\r', 1)[0]; - if (!firstLine || firstLine.length > 1_000) { - return; - } - const match = firstLine.match(/[^ ]* [^ ]* (.*)/); - if (!match) { - return; - } - const statusText = match[1]; - if (!statusText) { - return; - } - return statusText; - } - _resolveBody(err) { - if (err) { - return this.#bodyLoadedDeferred.reject(err); - } - return this.#bodyLoadedDeferred.resolve(); - } - remoteAddress() { - return this.#remoteAddress; - } - url() { - return this.#request.url(); - } - status() { - return this.#status; - } - statusText() { - return this.#statusText; - } - headers() { - return this.#headers; - } - securityDetails() { - return this.#securityDetails; - } - timing() { - return this.#timing; - } - content() { - if (!this.#contentPromise) { - this.#contentPromise = this.#bodyLoadedDeferred - .valueOrThrow() - .then(async () => { - try { - const response = await this.#request.client.send('Network.getResponseBody', { - requestId: this.#request.id, - }); - return stringToTypedArray(response.body, response.base64Encoded); - } - catch (error) { - if (error instanceof ProtocolError && - error.originalMessage === - 'No resource with given identifier found') { - throw new ProtocolError('Could not load response body for this request. This might happen if the request is a preflight request.'); - } - throw error; - } - }); - } - return this.#contentPromise; - } - request() { - return this.#request; - } - fromCache() { - return this.#fromDiskCache || this.#request._fromMemoryCache; - } - fromServiceWorker() { - return this.#fromServiceWorker; - } - frame() { - return this.#request.frame(); - } -} - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class NetworkEventManager { - #requestWillBeSentMap = new Map(); - #requestPausedMap = new Map(); - #httpRequestsMap = new Map(); - #requestWillBeSentExtraInfoMap = new Map(); - #responseReceivedExtraInfoMap = new Map(); - #queuedRedirectInfoMap = new Map(); - #queuedEventGroupMap = new Map(); - forget(networkRequestId) { - this.#requestWillBeSentMap.delete(networkRequestId); - this.#requestPausedMap.delete(networkRequestId); - this.#requestWillBeSentExtraInfoMap.delete(networkRequestId); - this.#queuedEventGroupMap.delete(networkRequestId); - this.#queuedRedirectInfoMap.delete(networkRequestId); - this.#responseReceivedExtraInfoMap.delete(networkRequestId); - } - requestExtraInfo(networkRequestId) { - if (!this.#requestWillBeSentExtraInfoMap.has(networkRequestId)) { - this.#requestWillBeSentExtraInfoMap.set(networkRequestId, []); - } - return this.#requestWillBeSentExtraInfoMap.get(networkRequestId); - } - responseExtraInfo(networkRequestId) { - if (!this.#responseReceivedExtraInfoMap.has(networkRequestId)) { - this.#responseReceivedExtraInfoMap.set(networkRequestId, []); - } - return this.#responseReceivedExtraInfoMap.get(networkRequestId); - } - queuedRedirectInfo(fetchRequestId) { - if (!this.#queuedRedirectInfoMap.has(fetchRequestId)) { - this.#queuedRedirectInfoMap.set(fetchRequestId, []); - } - return this.#queuedRedirectInfoMap.get(fetchRequestId); - } - queueRedirectInfo(fetchRequestId, redirectInfo) { - this.queuedRedirectInfo(fetchRequestId).push(redirectInfo); - } - takeQueuedRedirectInfo(fetchRequestId) { - return this.queuedRedirectInfo(fetchRequestId).shift(); - } - inFlightRequestsCount() { - let inFlightRequestCounter = 0; - for (const request of this.#httpRequestsMap.values()) { - if (!request.response()) { - inFlightRequestCounter++; - } - } - return inFlightRequestCounter; - } - storeRequestWillBeSent(networkRequestId, event) { - this.#requestWillBeSentMap.set(networkRequestId, event); - } - getRequestWillBeSent(networkRequestId) { - return this.#requestWillBeSentMap.get(networkRequestId); - } - forgetRequestWillBeSent(networkRequestId) { - this.#requestWillBeSentMap.delete(networkRequestId); - } - getRequestPaused(networkRequestId) { - return this.#requestPausedMap.get(networkRequestId); - } - forgetRequestPaused(networkRequestId) { - this.#requestPausedMap.delete(networkRequestId); - } - storeRequestPaused(networkRequestId, event) { - this.#requestPausedMap.set(networkRequestId, event); - } - getRequest(networkRequestId) { - return this.#httpRequestsMap.get(networkRequestId); - } - storeRequest(networkRequestId, request) { - this.#httpRequestsMap.set(networkRequestId, request); - } - forgetRequest(networkRequestId) { - this.#httpRequestsMap.delete(networkRequestId); - } - getQueuedEventGroup(networkRequestId) { - return this.#queuedEventGroupMap.get(networkRequestId); - } - queueEventGroup(networkRequestId, event) { - this.#queuedEventGroupMap.set(networkRequestId, event); - } - forgetQueuedEventGroup(networkRequestId) { - this.#queuedEventGroupMap.delete(networkRequestId); - } - printState() { - function replacer(_key, value) { - if (value instanceof Map) { - return { - dataType: 'Map', - value: Array.from(value.entries()), - }; - } - else if (value instanceof CdpHTTPRequest) { - return { - dataType: 'CdpHTTPRequest', - value: `${value.id}: ${value.url()}`, - }; - } - { - return value; - } - } - console.log('httpRequestsMap', JSON.stringify(this.#httpRequestsMap, replacer, 2)); - console.log('requestWillBeSentMap', JSON.stringify(this.#requestWillBeSentMap, replacer, 2)); - console.log('requestWillBeSentMap', JSON.stringify(this.#responseReceivedExtraInfoMap, replacer, 2)); - console.log('requestWillBeSentMap', JSON.stringify(this.#requestPausedMap, replacer, 2)); - } -} - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -let NetworkManager$1 = class NetworkManager extends EventEmitter { - #frameManager; - #networkEventManager = new NetworkEventManager(); - #extraHTTPHeaders; - #credentials = null; - #attemptedAuthentications = new Set(); - #userRequestInterceptionEnabled = false; - #protocolRequestInterceptionEnabled; - #userCacheDisabled; - #emulatedNetworkConditions; - #userAgent; - #userAgentMetadata; - #platform; - #handlers = [ - ['Fetch.requestPaused', this.#onRequestPaused], - ['Fetch.authRequired', this.#onAuthRequired], - ['Network.requestWillBeSent', this.#onRequestWillBeSent], - ['Network.requestWillBeSentExtraInfo', this.#onRequestWillBeSentExtraInfo], - ['Network.requestServedFromCache', this.#onRequestServedFromCache], - ['Network.responseReceived', this.#onResponseReceived], - ['Network.loadingFinished', this.#onLoadingFinished], - ['Network.loadingFailed', this.#onLoadingFailed], - ['Network.responseReceivedExtraInfo', this.#onResponseReceivedExtraInfo], - [CDPSessionEvent.Disconnected, this.#removeClient], - ]; - #clients = new Map(); - #networkEnabled = true; - constructor(frameManager, networkEnabled) { - super(); - this.#frameManager = frameManager; - this.#networkEnabled = networkEnabled ?? true; - } - #canIgnoreError(error) { - return (isErrorLike$1(error) && - (isTargetClosedError(error) || - error.message.includes('Not supported') || - error.message.includes("wasn't found"))); - } - async addClient(client) { - if (!this.#networkEnabled || this.#clients.has(client)) { - return; - } - const subscriptions = new DisposableStack(); - this.#clients.set(client, subscriptions); - const clientEmitter = subscriptions.use(new EventEmitter(client)); - for (const [event, handler] of this.#handlers) { - clientEmitter.on(event, (arg) => { - return handler.bind(this)(client, arg); - }); - } - try { - await Promise.all([ - client.send('Network.enable'), - this.#applyExtraHTTPHeaders(client), - this.#applyNetworkConditions(client), - this.#applyProtocolCacheDisabled(client), - this.#applyProtocolRequestInterception(client), - this.#applyUserAgent(client), - ]); - } - catch (error) { - if (this.#canIgnoreError(error)) { - return; - } - throw error; - } - } - async #removeClient(client) { - this.#clients.get(client)?.dispose(); - this.#clients.delete(client); - } - async authenticate(credentials) { - this.#credentials = credentials; - const enabled = this.#userRequestInterceptionEnabled || !!this.#credentials; - if (enabled === this.#protocolRequestInterceptionEnabled) { - return; - } - this.#protocolRequestInterceptionEnabled = enabled; - await this.#applyToAllClients(this.#applyProtocolRequestInterception.bind(this)); - } - async setExtraHTTPHeaders(headers) { - const extraHTTPHeaders = {}; - for (const [key, value] of Object.entries(headers)) { - assert(isString(value), `Expected value of header "${key}" to be String, but "${typeof value}" is found.`); - extraHTTPHeaders[key.toLowerCase()] = value; - } - this.#extraHTTPHeaders = extraHTTPHeaders; - await this.#applyToAllClients(this.#applyExtraHTTPHeaders.bind(this)); - } - async #applyExtraHTTPHeaders(client) { - if (this.#extraHTTPHeaders === undefined) { - return; - } - try { - await client.send('Network.setExtraHTTPHeaders', { - headers: this.#extraHTTPHeaders, - }); - } - catch (error) { - if (this.#canIgnoreError(error)) { - return; - } - throw error; - } - } - extraHTTPHeaders() { - return Object.assign({}, this.#extraHTTPHeaders); - } - inFlightRequestsCount() { - return this.#networkEventManager.inFlightRequestsCount(); - } - async setOfflineMode(value) { - if (!this.#emulatedNetworkConditions) { - this.#emulatedNetworkConditions = { - offline: false, - upload: -1, - download: -1, - latency: 0, - }; - } - this.#emulatedNetworkConditions.offline = value; - await this.#applyToAllClients(this.#applyNetworkConditions.bind(this)); - } - async emulateNetworkConditions(networkConditions) { - if (!this.#emulatedNetworkConditions) { - this.#emulatedNetworkConditions = { - offline: networkConditions?.offline ?? false, - upload: -1, - download: -1, - latency: 0, - }; - } - this.#emulatedNetworkConditions.upload = networkConditions - ? networkConditions.upload - : -1; - this.#emulatedNetworkConditions.download = networkConditions - ? networkConditions.download - : -1; - this.#emulatedNetworkConditions.latency = networkConditions - ? networkConditions.latency - : 0; - this.#emulatedNetworkConditions.offline = - networkConditions?.offline ?? false; - await this.#applyToAllClients(this.#applyNetworkConditions.bind(this)); - } - async #applyToAllClients(fn) { - await Promise.all(Array.from(this.#clients.keys()).map(client => { - return fn(client); - })); - } - async #applyNetworkConditions(client) { - if (this.#emulatedNetworkConditions === undefined) { - return; - } - try { - await client.send('Network.emulateNetworkConditions', { - offline: this.#emulatedNetworkConditions.offline, - latency: this.#emulatedNetworkConditions.latency, - uploadThroughput: this.#emulatedNetworkConditions.upload, - downloadThroughput: this.#emulatedNetworkConditions.download, - }); - } - catch (error) { - if (this.#canIgnoreError(error)) { - return; - } - throw error; - } - } - async setUserAgent(userAgent, userAgentMetadata, platform) { - this.#userAgent = userAgent; - this.#userAgentMetadata = userAgentMetadata; - this.#platform = platform; - await this.#applyToAllClients(this.#applyUserAgent.bind(this)); - } - async #applyUserAgent(client) { - if (this.#userAgent === undefined) { - return; - } - try { - await client.send('Network.setUserAgentOverride', { - userAgent: this.#userAgent, - userAgentMetadata: this.#userAgentMetadata, - platform: this.#platform, - }); - } - catch (error) { - if (this.#canIgnoreError(error)) { - return; - } - throw error; - } - } - async setCacheEnabled(enabled) { - this.#userCacheDisabled = !enabled; - await this.#applyToAllClients(this.#applyProtocolCacheDisabled.bind(this)); - } - async setRequestInterception(value) { - this.#userRequestInterceptionEnabled = value; - const enabled = this.#userRequestInterceptionEnabled || !!this.#credentials; - if (enabled === this.#protocolRequestInterceptionEnabled) { - return; - } - this.#protocolRequestInterceptionEnabled = enabled; - await this.#applyToAllClients(this.#applyProtocolRequestInterception.bind(this)); - } - async #applyProtocolRequestInterception(client) { - if (this.#protocolRequestInterceptionEnabled === undefined) { - return; - } - if (this.#userCacheDisabled === undefined) { - this.#userCacheDisabled = false; - } - try { - if (this.#protocolRequestInterceptionEnabled) { - await Promise.all([ - this.#applyProtocolCacheDisabled(client), - client.send('Fetch.enable', { - handleAuthRequests: true, - patterns: [{ urlPattern: '*' }], - }), - ]); - } - else { - await Promise.all([ - this.#applyProtocolCacheDisabled(client), - client.send('Fetch.disable'), - ]); - } - } - catch (error) { - if (this.#canIgnoreError(error)) { - return; - } - throw error; - } - } - async #applyProtocolCacheDisabled(client) { - if (this.#userCacheDisabled === undefined) { - return; - } - try { - await client.send('Network.setCacheDisabled', { - cacheDisabled: this.#userCacheDisabled, - }); - } - catch (error) { - if (this.#canIgnoreError(error)) { - return; - } - throw error; - } - } - #onRequestWillBeSent(client, event) { - if (this.#userRequestInterceptionEnabled && - !event.request.url.startsWith('data:')) { - const { requestId: networkRequestId } = event; - this.#networkEventManager.storeRequestWillBeSent(networkRequestId, event); - const requestPausedEvent = this.#networkEventManager.getRequestPaused(networkRequestId); - if (requestPausedEvent) { - const { requestId: fetchRequestId } = requestPausedEvent; - this.#patchRequestEventHeaders(event, requestPausedEvent); - this.#onRequest(client, event, fetchRequestId); - this.#networkEventManager.forgetRequestPaused(networkRequestId); - } - return; - } - this.#onRequest(client, event, undefined); - } - #onAuthRequired(client, event) { - let response = 'Default'; - if (this.#attemptedAuthentications.has(event.requestId)) { - response = 'CancelAuth'; - } - else if (this.#credentials) { - response = 'ProvideCredentials'; - this.#attemptedAuthentications.add(event.requestId); - } - const { username, password } = this.#credentials || { - username: undefined, - password: undefined, - }; - client - .send('Fetch.continueWithAuth', { - requestId: event.requestId, - authChallengeResponse: { response, username, password }, - }) - .catch(debugError); - } - #onRequestPaused(client, event) { - if (!this.#userRequestInterceptionEnabled && - this.#protocolRequestInterceptionEnabled) { - client - .send('Fetch.continueRequest', { - requestId: event.requestId, - }) - .catch(debugError); - } - const { networkId: networkRequestId, requestId: fetchRequestId } = event; - if (!networkRequestId) { - this.#onRequestWithoutNetworkInstrumentation(client, event); - return; - } - const requestWillBeSentEvent = (() => { - const requestWillBeSentEvent = this.#networkEventManager.getRequestWillBeSent(networkRequestId); - if (requestWillBeSentEvent && - (requestWillBeSentEvent.request.url !== event.request.url || - requestWillBeSentEvent.request.method !== event.request.method)) { - this.#networkEventManager.forgetRequestWillBeSent(networkRequestId); - return; - } - return requestWillBeSentEvent; - })(); - if (requestWillBeSentEvent) { - this.#patchRequestEventHeaders(requestWillBeSentEvent, event); - this.#onRequest(client, requestWillBeSentEvent, fetchRequestId); - } - else { - this.#networkEventManager.storeRequestPaused(networkRequestId, event); - } - } - #patchRequestEventHeaders(requestWillBeSentEvent, requestPausedEvent) { - requestWillBeSentEvent.request.headers = { - ...requestWillBeSentEvent.request.headers, - ...requestPausedEvent.request.headers, - }; - } - #onRequestWithoutNetworkInstrumentation(client, event) { - const frame = event.frameId - ? this.#frameManager.frame(event.frameId) - : null; - const request = new CdpHTTPRequest(client, frame, event.requestId, this.#userRequestInterceptionEnabled, event, []); - this.emit(NetworkManagerEvent.Request, request); - void request.finalizeInterceptions(); - } - #onRequest(client, event, fetchRequestId, fromMemoryCache = false) { - let redirectChain = []; - if (event.redirectResponse) { - let redirectResponseExtraInfo = null; - if (event.redirectHasExtraInfo) { - redirectResponseExtraInfo = this.#networkEventManager - .responseExtraInfo(event.requestId) - .shift(); - if (!redirectResponseExtraInfo) { - this.#networkEventManager.queueRedirectInfo(event.requestId, { - event, - fetchRequestId, - }); - return; - } - } - const request = this.#networkEventManager.getRequest(event.requestId); - if (request) { - this.#handleRequestRedirect(client, request, event.redirectResponse, redirectResponseExtraInfo); - redirectChain = request._redirectChain; - const extraInfo = this.#networkEventManager - .requestExtraInfo(event.requestId) - .shift(); - if (extraInfo) { - request.updateHeaders(extraInfo.headers); - } - } - } - const frame = event.frameId - ? this.#frameManager.frame(event.frameId) - : null; - const request = new CdpHTTPRequest(client, frame, fetchRequestId, this.#userRequestInterceptionEnabled, event, redirectChain); - const extraInfo = this.#networkEventManager - .requestExtraInfo(event.requestId) - .shift(); - if (extraInfo) { - request.updateHeaders(extraInfo.headers); - } - request._fromMemoryCache = fromMemoryCache; - this.#networkEventManager.storeRequest(event.requestId, request); - this.emit(NetworkManagerEvent.Request, request); - void request.finalizeInterceptions(); - } - #onRequestWillBeSentExtraInfo(_client, event) { - const request = this.#networkEventManager.getRequest(event.requestId); - if (request) { - request.updateHeaders(event.headers); - } - else { - this.#networkEventManager.requestExtraInfo(event.requestId).push(event); - } - } - #onRequestServedFromCache(client, event) { - const requestWillBeSentEvent = this.#networkEventManager.getRequestWillBeSent(event.requestId); - let request = this.#networkEventManager.getRequest(event.requestId); - if (request) { - request._fromMemoryCache = true; - } - if (!request && requestWillBeSentEvent) { - this.#onRequest(client, requestWillBeSentEvent, undefined, true); - request = this.#networkEventManager.getRequest(event.requestId); - } - if (!request) { - debugError(new Error(`Request ${event.requestId} was served from cache but we could not find the corresponding request object`)); - return; - } - this.emit(NetworkManagerEvent.RequestServedFromCache, request); - } - #handleRequestRedirect(_client, request, responsePayload, extraInfo) { - const response = new CdpHTTPResponse(request, responsePayload, extraInfo); - request._response = response; - request._redirectChain.push(request); - response._resolveBody(new Error('Response body is unavailable for redirect responses')); - this.#forgetRequest(request, false); - this.emit(NetworkManagerEvent.Response, response); - this.emit(NetworkManagerEvent.RequestFinished, request); - } - #emitResponseEvent(_client, responseReceived, extraInfo) { - const request = this.#networkEventManager.getRequest(responseReceived.requestId); - if (!request) { - return; - } - const extraInfos = this.#networkEventManager.responseExtraInfo(responseReceived.requestId); - if (extraInfos.length) { - debugError(new Error('Unexpected extraInfo events for request ' + - responseReceived.requestId)); - } - if (responseReceived.response.fromDiskCache) { - extraInfo = null; - } - const response = new CdpHTTPResponse(request, responseReceived.response, extraInfo); - request._response = response; - this.emit(NetworkManagerEvent.Response, response); - } - #onResponseReceived(client, event) { - const request = this.#networkEventManager.getRequest(event.requestId); - let extraInfo = null; - if (request && !request._fromMemoryCache && event.hasExtraInfo) { - extraInfo = this.#networkEventManager - .responseExtraInfo(event.requestId) - .shift(); - if (!extraInfo) { - this.#networkEventManager.queueEventGroup(event.requestId, { - responseReceivedEvent: event, - }); - return; - } - } - this.#emitResponseEvent(client, event, extraInfo); - } - #onResponseReceivedExtraInfo(client, event) { - const redirectInfo = this.#networkEventManager.takeQueuedRedirectInfo(event.requestId); - if (redirectInfo) { - this.#networkEventManager.responseExtraInfo(event.requestId).push(event); - this.#onRequest(client, redirectInfo.event, redirectInfo.fetchRequestId); - return; - } - const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId); - if (queuedEvents) { - this.#networkEventManager.forgetQueuedEventGroup(event.requestId); - this.#emitResponseEvent(client, queuedEvents.responseReceivedEvent, event); - if (queuedEvents.loadingFinishedEvent) { - this.#emitLoadingFinished(client, queuedEvents.loadingFinishedEvent); - } - if (queuedEvents.loadingFailedEvent) { - this.#emitLoadingFailed(client, queuedEvents.loadingFailedEvent); - } - return; - } - this.#networkEventManager.responseExtraInfo(event.requestId).push(event); - } - #forgetRequest(request, events) { - const requestId = request.id; - const interceptionId = request._interceptionId; - this.#networkEventManager.forgetRequest(requestId); - if (interceptionId !== undefined) { - this.#attemptedAuthentications.delete(interceptionId); - } - if (events) { - this.#networkEventManager.forget(requestId); - } - } - #onLoadingFinished(client, event) { - const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId); - if (queuedEvents) { - queuedEvents.loadingFinishedEvent = event; - } - else { - this.#emitLoadingFinished(client, event); - } - } - #emitLoadingFinished(client, event) { - const request = this.#networkEventManager.getRequest(event.requestId); - if (!request) { - return; - } - this.#adoptCdpSessionIfNeeded(client, request); - if (request.response()) { - request.response()?._resolveBody(); - } - this.#forgetRequest(request, true); - this.emit(NetworkManagerEvent.RequestFinished, request); - } - #onLoadingFailed(client, event) { - const queuedEvents = this.#networkEventManager.getQueuedEventGroup(event.requestId); - if (queuedEvents) { - queuedEvents.loadingFailedEvent = event; - } - else { - this.#emitLoadingFailed(client, event); - } - } - #emitLoadingFailed(client, event) { - const request = this.#networkEventManager.getRequest(event.requestId); - if (!request) { - return; - } - this.#adoptCdpSessionIfNeeded(client, request); - request._failureText = event.errorText; - const response = request.response(); - if (response) { - response._resolveBody(); - } - this.#forgetRequest(request, true); - this.emit(NetworkManagerEvent.RequestFailed, request); - } - #adoptCdpSessionIfNeeded(client, request) { - if (client !== request.client) { - request.client = client; - } - } -}; - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const TIME_FOR_WAITING_FOR_SWAP = 100; -let FrameManager$1 = class FrameManager extends EventEmitter { - #page; - #networkManager; - #timeoutSettings; - #isolatedWorlds = new Set(); - #client; - #scriptsToEvaluateOnNewDocument = new Map(); - #bindings = new Set(); - _frameTree = new FrameTree(); - #frameNavigatedReceived = new Set(); - #deviceRequestPromptManagerMap = new WeakMap(); - #frameTreeHandled; - get timeoutSettings() { - return this.#timeoutSettings; - } - get networkManager() { - return this.#networkManager; - } - get client() { - return this.#client; - } - constructor(client, page, timeoutSettings) { - super(); - this.#client = client; - this.#page = page; - this.#networkManager = new NetworkManager$1(this, page.browser().isNetworkEnabled()); - this.#timeoutSettings = timeoutSettings; - this.setupEventListeners(this.#client); - client.once(CDPSessionEvent.Disconnected, () => { - this.#onClientDisconnect().catch(debugError); - }); - } - async #onClientDisconnect() { - const mainFrame = this._frameTree.getMainFrame(); - if (!mainFrame) { - return; - } - if (!this.#page.browser().connected) { - this.#removeFramesRecursively(mainFrame); - return; - } - for (const child of mainFrame.childFrames()) { - this.#removeFramesRecursively(child); - } - const swapped = Deferred.create({ - timeout: TIME_FOR_WAITING_FOR_SWAP, - message: 'Frame was not swapped', - }); - mainFrame.once(FrameEvent.FrameSwappedByActivation, () => { - swapped.resolve(); - }); - try { - await swapped.valueOrThrow(); - } - catch { - this.#removeFramesRecursively(mainFrame); - } - } - async swapFrameTree(client) { - this.#client = client; - const frame = this._frameTree.getMainFrame(); - if (frame) { - this.#frameNavigatedReceived.add(this.#client.target()._targetId); - this._frameTree.removeFrame(frame); - frame.updateId(this.#client.target()._targetId); - this._frameTree.addFrame(frame); - frame.updateClient(client); - } - this.setupEventListeners(client); - client.once(CDPSessionEvent.Disconnected, () => { - this.#onClientDisconnect().catch(debugError); - }); - await this.initialize(client, frame); - await this.#networkManager.addClient(client); - if (frame) { - frame.emit(FrameEvent.FrameSwappedByActivation, undefined); - } - } - async registerSpeculativeSession(client) { - await this.#networkManager.addClient(client); - } - setupEventListeners(session) { - session.on('Page.frameAttached', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onFrameAttached(session, event.frameId, event.parentFrameId); - }); - session.on('Page.frameNavigated', async (event) => { - this.#frameNavigatedReceived.add(event.frame.id); - await this.#frameTreeHandled?.valueOrThrow(); - void this.#onFrameNavigated(event.frame, event.type); - }); - session.on('Page.navigatedWithinDocument', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onFrameNavigatedWithinDocument(event.frameId, event.url); - }); - session.on('Page.frameDetached', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onFrameDetached(event.frameId, event.reason); - }); - session.on('Page.frameStartedLoading', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onFrameStartedLoading(event.frameId); - }); - session.on('Page.frameStoppedLoading', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onFrameStoppedLoading(event.frameId); - }); - session.on('Runtime.executionContextCreated', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onExecutionContextCreated(event.context, session); - }); - session.on('Page.lifecycleEvent', async (event) => { - await this.#frameTreeHandled?.valueOrThrow(); - this.#onLifecycleEvent(event); - }); - } - async initialize(client, frame) { - try { - this.#frameTreeHandled?.resolve(); - this.#frameTreeHandled = Deferred.create(); - await Promise.all([ - this.#networkManager.addClient(client), - client.send('Page.enable'), - client.send('Page.getFrameTree').then(({ frameTree }) => { - this.#handleFrameTree(client, frameTree); - this.#frameTreeHandled?.resolve(); - }), - client.send('Page.setLifecycleEventsEnabled', { enabled: true }), - client.send('Runtime.enable').then(() => { - return this.#createIsolatedWorld(client, UTILITY_WORLD_NAME); - }), - ...(frame - ? Array.from(this.#scriptsToEvaluateOnNewDocument.values()) - : []).map(script => { - return frame?.addPreloadScript(script); - }), - ...(frame ? Array.from(this.#bindings.values()) : []).map(binding => { - return frame?.addExposedFunctionBinding(binding); - }), - ]); - } - catch (error) { - this.#frameTreeHandled?.resolve(); - if (isErrorLike$1(error) && isTargetClosedError(error)) { - return; - } - throw error; - } - } - page() { - return this.#page; - } - mainFrame() { - const mainFrame = this._frameTree.getMainFrame(); - assert(mainFrame, 'Requesting main frame too early!'); - return mainFrame; - } - frames() { - return Array.from(this._frameTree.frames()); - } - frame(frameId) { - return this._frameTree.getById(frameId) || null; - } - async addExposedFunctionBinding(binding) { - this.#bindings.add(binding); - await Promise.all(this.frames().map(async (frame) => { - return await frame.addExposedFunctionBinding(binding); - })); - } - async removeExposedFunctionBinding(binding) { - this.#bindings.delete(binding); - await Promise.all(this.frames().map(async (frame) => { - return await frame.removeExposedFunctionBinding(binding); - })); - } - async evaluateOnNewDocument(source) { - const { identifier } = await this.mainFrame() - ._client() - .send('Page.addScriptToEvaluateOnNewDocument', { - source, - }); - const preloadScript = new CdpPreloadScript(this.mainFrame(), identifier, source); - this.#scriptsToEvaluateOnNewDocument.set(identifier, preloadScript); - await Promise.all(this.frames().map(async (frame) => { - return await frame.addPreloadScript(preloadScript); - })); - return { identifier }; - } - async removeScriptToEvaluateOnNewDocument(identifier) { - const preloadScript = this.#scriptsToEvaluateOnNewDocument.get(identifier); - if (!preloadScript) { - throw new Error(`Script to evaluate on new document with id ${identifier} not found`); - } - this.#scriptsToEvaluateOnNewDocument.delete(identifier); - await Promise.all(this.frames().map(frame => { - const identifier = preloadScript.getIdForFrame(frame); - if (!identifier) { - return; - } - return frame - ._client() - .send('Page.removeScriptToEvaluateOnNewDocument', { - identifier, - }) - .catch(debugError); - })); - } - onAttachedToTarget(target) { - if (target._getTargetInfo().type !== 'iframe') { - return; - } - const frame = this.frame(target._getTargetInfo().targetId); - if (frame) { - frame.updateClient(target._session()); - } - this.setupEventListeners(target._session()); - void this.initialize(target._session(), frame).catch(debugError); - } - _deviceRequestPromptManager(client) { - let manager = this.#deviceRequestPromptManagerMap.get(client); - if (manager === undefined) { - manager = new CdpDeviceRequestPromptManager(client, this.#timeoutSettings); - this.#deviceRequestPromptManagerMap.set(client, manager); - } - return manager; - } - #onLifecycleEvent(event) { - const frame = this.frame(event.frameId); - if (!frame) { - return; - } - frame._onLifecycleEvent(event.loaderId, event.name); - this.emit(FrameManagerEvent.LifecycleEvent, frame); - frame.emit(FrameEvent.LifecycleEvent, undefined); - } - #onFrameStartedLoading(frameId) { - const frame = this.frame(frameId); - if (!frame) { - return; - } - frame._onLoadingStarted(); - } - #onFrameStoppedLoading(frameId) { - const frame = this.frame(frameId); - if (!frame) { - return; - } - frame._onLoadingStopped(); - this.emit(FrameManagerEvent.LifecycleEvent, frame); - frame.emit(FrameEvent.LifecycleEvent, undefined); - } - #handleFrameTree(session, frameTree) { - if (frameTree.frame.parentId) { - this.#onFrameAttached(session, frameTree.frame.id, frameTree.frame.parentId); - } - if (!this.#frameNavigatedReceived.has(frameTree.frame.id)) { - void this.#onFrameNavigated(frameTree.frame, 'Navigation'); - } - else { - this.#frameNavigatedReceived.delete(frameTree.frame.id); - } - if (!frameTree.childFrames) { - return; - } - for (const child of frameTree.childFrames) { - this.#handleFrameTree(session, child); - } - } - #onFrameAttached(session, frameId, parentFrameId) { - let frame = this.frame(frameId); - if (frame) { - const parentFrame = this.frame(parentFrameId); - if (session && parentFrame && frame.client !== parentFrame?.client) { - frame.updateClient(session); - } - return; - } - frame = new CdpFrame(this, frameId, parentFrameId, session); - this._frameTree.addFrame(frame); - this.emit(FrameManagerEvent.FrameAttached, frame); - } - async #onFrameNavigated(framePayload, navigationType) { - const frameId = framePayload.id; - const isMainFrame = !framePayload.parentId; - let frame = this._frameTree.getById(frameId); - if (frame) { - for (const child of frame.childFrames()) { - this.#removeFramesRecursively(child); - } - } - if (isMainFrame) { - if (frame) { - this._frameTree.removeFrame(frame); - frame._id = frameId; - } - else { - frame = new CdpFrame(this, frameId, undefined, this.#client); - } - this._frameTree.addFrame(frame); - } - frame = await this._frameTree.waitForFrame(frameId); - frame._navigated(framePayload); - this.emit(FrameManagerEvent.FrameNavigated, frame); - frame.emit(FrameEvent.FrameNavigated, navigationType); - } - async #createIsolatedWorld(session, name) { - const key = `${session.id()}:${name}`; - if (this.#isolatedWorlds.has(key)) { - return; - } - await session.send('Page.addScriptToEvaluateOnNewDocument', { - source: `//# sourceURL=${PuppeteerURL.INTERNAL_URL}`, - worldName: name, - }); - await Promise.all(this.frames() - .filter(frame => { - return frame.client === session; - }) - .map(frame => { - return session - .send('Page.createIsolatedWorld', { - frameId: frame._id, - worldName: name, - grantUniveralAccess: true, - }) - .catch(debugError); - })); - this.#isolatedWorlds.add(key); - } - #onFrameNavigatedWithinDocument(frameId, url) { - const frame = this.frame(frameId); - if (!frame) { - return; - } - frame._navigatedWithinDocument(url); - this.emit(FrameManagerEvent.FrameNavigatedWithinDocument, frame); - frame.emit(FrameEvent.FrameNavigatedWithinDocument, undefined); - this.emit(FrameManagerEvent.FrameNavigated, frame); - frame.emit(FrameEvent.FrameNavigated, 'Navigation'); - } - #onFrameDetached(frameId, reason) { - const frame = this.frame(frameId); - if (!frame) { - return; - } - switch (reason) { - case 'remove': - this.#removeFramesRecursively(frame); - break; - case 'swap': - this.emit(FrameManagerEvent.FrameSwapped, frame); - frame.emit(FrameEvent.FrameSwapped, undefined); - break; - } - } - #onExecutionContextCreated(contextPayload, session) { - const auxData = contextPayload.auxData; - const frameId = auxData && auxData.frameId; - const frame = typeof frameId === 'string' ? this.frame(frameId) : undefined; - let world; - if (frame) { - if (frame.client !== session) { - return; - } - if (contextPayload.auxData && contextPayload.auxData['isDefault']) { - world = frame.worlds[MAIN_WORLD]; - } - else if (contextPayload.name === UTILITY_WORLD_NAME) { - world = frame.worlds[PUPPETEER_WORLD]; - } - } - if (!world) { - return; - } - const context = new ExecutionContext$1(frame?.client || this.#client, contextPayload, world); - world.setContext(context); - } - #removeFramesRecursively(frame) { - for (const child of frame.childFrames()) { - this.#removeFramesRecursively(child); - } - frame[disposeSymbol](); - this._frameTree.removeFrame(frame); - this.emit(FrameManagerEvent.FrameDetached, frame); - frame.emit(FrameEvent.FrameDetached, frame); - } -}; - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const _keyDefinitions = { - '0': { keyCode: 48, key: '0', code: 'Digit0' }, - '1': { keyCode: 49, key: '1', code: 'Digit1' }, - '2': { keyCode: 50, key: '2', code: 'Digit2' }, - '3': { keyCode: 51, key: '3', code: 'Digit3' }, - '4': { keyCode: 52, key: '4', code: 'Digit4' }, - '5': { keyCode: 53, key: '5', code: 'Digit5' }, - '6': { keyCode: 54, key: '6', code: 'Digit6' }, - '7': { keyCode: 55, key: '7', code: 'Digit7' }, - '8': { keyCode: 56, key: '8', code: 'Digit8' }, - '9': { keyCode: 57, key: '9', code: 'Digit9' }, - Power: { key: 'Power', code: 'Power' }, - Eject: { key: 'Eject', code: 'Eject' }, - Abort: { keyCode: 3, code: 'Abort', key: 'Cancel' }, - Help: { keyCode: 6, code: 'Help', key: 'Help' }, - Backspace: { keyCode: 8, code: 'Backspace', key: 'Backspace' }, - Tab: { keyCode: 9, code: 'Tab', key: 'Tab' }, - Numpad5: { - keyCode: 12, - shiftKeyCode: 101, - key: 'Clear', - code: 'Numpad5', - shiftKey: '5', - location: 3, - }, - NumpadEnter: { - keyCode: 13, - code: 'NumpadEnter', - key: 'Enter', - text: '\r', - location: 3, - }, - Enter: { keyCode: 13, code: 'Enter', key: 'Enter', text: '\r' }, - '\r': { keyCode: 13, code: 'Enter', key: 'Enter', text: '\r' }, - '\n': { keyCode: 13, code: 'Enter', key: 'Enter', text: '\r' }, - ShiftLeft: { keyCode: 16, code: 'ShiftLeft', key: 'Shift', location: 1 }, - ShiftRight: { keyCode: 16, code: 'ShiftRight', key: 'Shift', location: 2 }, - ControlLeft: { - keyCode: 17, - code: 'ControlLeft', - key: 'Control', - location: 1, - }, - ControlRight: { - keyCode: 17, - code: 'ControlRight', - key: 'Control', - location: 2, - }, - AltLeft: { keyCode: 18, code: 'AltLeft', key: 'Alt', location: 1 }, - AltRight: { keyCode: 18, code: 'AltRight', key: 'Alt', location: 2 }, - Pause: { keyCode: 19, code: 'Pause', key: 'Pause' }, - CapsLock: { keyCode: 20, code: 'CapsLock', key: 'CapsLock' }, - Escape: { keyCode: 27, code: 'Escape', key: 'Escape' }, - Convert: { keyCode: 28, code: 'Convert', key: 'Convert' }, - NonConvert: { keyCode: 29, code: 'NonConvert', key: 'NonConvert' }, - Space: { keyCode: 32, code: 'Space', key: ' ' }, - Numpad9: { - keyCode: 33, - shiftKeyCode: 105, - key: 'PageUp', - code: 'Numpad9', - shiftKey: '9', - location: 3, - }, - PageUp: { keyCode: 33, code: 'PageUp', key: 'PageUp' }, - Numpad3: { - keyCode: 34, - shiftKeyCode: 99, - key: 'PageDown', - code: 'Numpad3', - shiftKey: '3', - location: 3, - }, - PageDown: { keyCode: 34, code: 'PageDown', key: 'PageDown' }, - End: { keyCode: 35, code: 'End', key: 'End' }, - Numpad1: { - keyCode: 35, - shiftKeyCode: 97, - key: 'End', - code: 'Numpad1', - shiftKey: '1', - location: 3, - }, - Home: { keyCode: 36, code: 'Home', key: 'Home' }, - Numpad7: { - keyCode: 36, - shiftKeyCode: 103, - key: 'Home', - code: 'Numpad7', - shiftKey: '7', - location: 3, - }, - ArrowLeft: { keyCode: 37, code: 'ArrowLeft', key: 'ArrowLeft' }, - Numpad4: { - keyCode: 37, - shiftKeyCode: 100, - key: 'ArrowLeft', - code: 'Numpad4', - shiftKey: '4', - location: 3, - }, - Numpad8: { - keyCode: 38, - shiftKeyCode: 104, - key: 'ArrowUp', - code: 'Numpad8', - shiftKey: '8', - location: 3, - }, - ArrowUp: { keyCode: 38, code: 'ArrowUp', key: 'ArrowUp' }, - ArrowRight: { keyCode: 39, code: 'ArrowRight', key: 'ArrowRight' }, - Numpad6: { - keyCode: 39, - shiftKeyCode: 102, - key: 'ArrowRight', - code: 'Numpad6', - shiftKey: '6', - location: 3, - }, - Numpad2: { - keyCode: 40, - shiftKeyCode: 98, - key: 'ArrowDown', - code: 'Numpad2', - shiftKey: '2', - location: 3, - }, - ArrowDown: { keyCode: 40, code: 'ArrowDown', key: 'ArrowDown' }, - Select: { keyCode: 41, code: 'Select', key: 'Select' }, - Open: { keyCode: 43, code: 'Open', key: 'Execute' }, - PrintScreen: { keyCode: 44, code: 'PrintScreen', key: 'PrintScreen' }, - Insert: { keyCode: 45, code: 'Insert', key: 'Insert' }, - Numpad0: { - keyCode: 45, - shiftKeyCode: 96, - key: 'Insert', - code: 'Numpad0', - shiftKey: '0', - location: 3, - }, - Delete: { keyCode: 46, code: 'Delete', key: 'Delete' }, - NumpadDecimal: { - keyCode: 46, - shiftKeyCode: 110, - code: 'NumpadDecimal', - key: '\u0000', - shiftKey: '.', - location: 3, - }, - Digit0: { keyCode: 48, code: 'Digit0', shiftKey: ')', key: '0' }, - Digit1: { keyCode: 49, code: 'Digit1', shiftKey: '!', key: '1' }, - Digit2: { keyCode: 50, code: 'Digit2', shiftKey: '@', key: '2' }, - Digit3: { keyCode: 51, code: 'Digit3', shiftKey: '#', key: '3' }, - Digit4: { keyCode: 52, code: 'Digit4', shiftKey: '$', key: '4' }, - Digit5: { keyCode: 53, code: 'Digit5', shiftKey: '%', key: '5' }, - Digit6: { keyCode: 54, code: 'Digit6', shiftKey: '^', key: '6' }, - Digit7: { keyCode: 55, code: 'Digit7', shiftKey: '&', key: '7' }, - Digit8: { keyCode: 56, code: 'Digit8', shiftKey: '*', key: '8' }, - Digit9: { keyCode: 57, code: 'Digit9', shiftKey: '(', key: '9' }, - KeyA: { keyCode: 65, code: 'KeyA', shiftKey: 'A', key: 'a' }, - KeyB: { keyCode: 66, code: 'KeyB', shiftKey: 'B', key: 'b' }, - KeyC: { keyCode: 67, code: 'KeyC', shiftKey: 'C', key: 'c' }, - KeyD: { keyCode: 68, code: 'KeyD', shiftKey: 'D', key: 'd' }, - KeyE: { keyCode: 69, code: 'KeyE', shiftKey: 'E', key: 'e' }, - KeyF: { keyCode: 70, code: 'KeyF', shiftKey: 'F', key: 'f' }, - KeyG: { keyCode: 71, code: 'KeyG', shiftKey: 'G', key: 'g' }, - KeyH: { keyCode: 72, code: 'KeyH', shiftKey: 'H', key: 'h' }, - KeyI: { keyCode: 73, code: 'KeyI', shiftKey: 'I', key: 'i' }, - KeyJ: { keyCode: 74, code: 'KeyJ', shiftKey: 'J', key: 'j' }, - KeyK: { keyCode: 75, code: 'KeyK', shiftKey: 'K', key: 'k' }, - KeyL: { keyCode: 76, code: 'KeyL', shiftKey: 'L', key: 'l' }, - KeyM: { keyCode: 77, code: 'KeyM', shiftKey: 'M', key: 'm' }, - KeyN: { keyCode: 78, code: 'KeyN', shiftKey: 'N', key: 'n' }, - KeyO: { keyCode: 79, code: 'KeyO', shiftKey: 'O', key: 'o' }, - KeyP: { keyCode: 80, code: 'KeyP', shiftKey: 'P', key: 'p' }, - KeyQ: { keyCode: 81, code: 'KeyQ', shiftKey: 'Q', key: 'q' }, - KeyR: { keyCode: 82, code: 'KeyR', shiftKey: 'R', key: 'r' }, - KeyS: { keyCode: 83, code: 'KeyS', shiftKey: 'S', key: 's' }, - KeyT: { keyCode: 84, code: 'KeyT', shiftKey: 'T', key: 't' }, - KeyU: { keyCode: 85, code: 'KeyU', shiftKey: 'U', key: 'u' }, - KeyV: { keyCode: 86, code: 'KeyV', shiftKey: 'V', key: 'v' }, - KeyW: { keyCode: 87, code: 'KeyW', shiftKey: 'W', key: 'w' }, - KeyX: { keyCode: 88, code: 'KeyX', shiftKey: 'X', key: 'x' }, - KeyY: { keyCode: 89, code: 'KeyY', shiftKey: 'Y', key: 'y' }, - KeyZ: { keyCode: 90, code: 'KeyZ', shiftKey: 'Z', key: 'z' }, - MetaLeft: { keyCode: 91, code: 'MetaLeft', key: 'Meta', location: 1 }, - MetaRight: { keyCode: 92, code: 'MetaRight', key: 'Meta', location: 2 }, - ContextMenu: { keyCode: 93, code: 'ContextMenu', key: 'ContextMenu' }, - NumpadMultiply: { - keyCode: 106, - code: 'NumpadMultiply', - key: '*', - location: 3, - }, - NumpadAdd: { keyCode: 107, code: 'NumpadAdd', key: '+', location: 3 }, - NumpadSubtract: { - keyCode: 109, - code: 'NumpadSubtract', - key: '-', - location: 3, - }, - NumpadDivide: { keyCode: 111, code: 'NumpadDivide', key: '/', location: 3 }, - F1: { keyCode: 112, code: 'F1', key: 'F1' }, - F2: { keyCode: 113, code: 'F2', key: 'F2' }, - F3: { keyCode: 114, code: 'F3', key: 'F3' }, - F4: { keyCode: 115, code: 'F4', key: 'F4' }, - F5: { keyCode: 116, code: 'F5', key: 'F5' }, - F6: { keyCode: 117, code: 'F6', key: 'F6' }, - F7: { keyCode: 118, code: 'F7', key: 'F7' }, - F8: { keyCode: 119, code: 'F8', key: 'F8' }, - F9: { keyCode: 120, code: 'F9', key: 'F9' }, - F10: { keyCode: 121, code: 'F10', key: 'F10' }, - F11: { keyCode: 122, code: 'F11', key: 'F11' }, - F12: { keyCode: 123, code: 'F12', key: 'F12' }, - F13: { keyCode: 124, code: 'F13', key: 'F13' }, - F14: { keyCode: 125, code: 'F14', key: 'F14' }, - F15: { keyCode: 126, code: 'F15', key: 'F15' }, - F16: { keyCode: 127, code: 'F16', key: 'F16' }, - F17: { keyCode: 128, code: 'F17', key: 'F17' }, - F18: { keyCode: 129, code: 'F18', key: 'F18' }, - F19: { keyCode: 130, code: 'F19', key: 'F19' }, - F20: { keyCode: 131, code: 'F20', key: 'F20' }, - F21: { keyCode: 132, code: 'F21', key: 'F21' }, - F22: { keyCode: 133, code: 'F22', key: 'F22' }, - F23: { keyCode: 134, code: 'F23', key: 'F23' }, - F24: { keyCode: 135, code: 'F24', key: 'F24' }, - NumLock: { keyCode: 144, code: 'NumLock', key: 'NumLock' }, - ScrollLock: { keyCode: 145, code: 'ScrollLock', key: 'ScrollLock' }, - AudioVolumeMute: { - keyCode: 173, - code: 'AudioVolumeMute', - key: 'AudioVolumeMute', - }, - AudioVolumeDown: { - keyCode: 174, - code: 'AudioVolumeDown', - key: 'AudioVolumeDown', - }, - AudioVolumeUp: { keyCode: 175, code: 'AudioVolumeUp', key: 'AudioVolumeUp' }, - MediaTrackNext: { - keyCode: 176, - code: 'MediaTrackNext', - key: 'MediaTrackNext', - }, - MediaTrackPrevious: { - keyCode: 177, - code: 'MediaTrackPrevious', - key: 'MediaTrackPrevious', - }, - MediaStop: { keyCode: 178, code: 'MediaStop', key: 'MediaStop' }, - MediaPlayPause: { - keyCode: 179, - code: 'MediaPlayPause', - key: 'MediaPlayPause', - }, - Semicolon: { keyCode: 186, code: 'Semicolon', shiftKey: ':', key: ';' }, - Equal: { keyCode: 187, code: 'Equal', shiftKey: '+', key: '=' }, - NumpadEqual: { keyCode: 187, code: 'NumpadEqual', key: '=', location: 3 }, - Comma: { keyCode: 188, code: 'Comma', shiftKey: '<', key: ',' }, - Minus: { keyCode: 189, code: 'Minus', shiftKey: '_', key: '-' }, - Period: { keyCode: 190, code: 'Period', shiftKey: '>', key: '.' }, - Slash: { keyCode: 191, code: 'Slash', shiftKey: '?', key: '/' }, - Backquote: { keyCode: 192, code: 'Backquote', shiftKey: '~', key: '`' }, - BracketLeft: { keyCode: 219, code: 'BracketLeft', shiftKey: '{', key: '[' }, - Backslash: { keyCode: 220, code: 'Backslash', shiftKey: '|', key: '\\' }, - BracketRight: { keyCode: 221, code: 'BracketRight', shiftKey: '}', key: ']' }, - Quote: { keyCode: 222, code: 'Quote', shiftKey: '"', key: "'" }, - AltGraph: { keyCode: 225, code: 'AltGraph', key: 'AltGraph' }, - Props: { keyCode: 247, code: 'Props', key: 'CrSel' }, - Cancel: { keyCode: 3, key: 'Cancel', code: 'Abort' }, - Clear: { keyCode: 12, key: 'Clear', code: 'Numpad5', location: 3 }, - Shift: { keyCode: 16, key: 'Shift', code: 'ShiftLeft', location: 1 }, - Control: { keyCode: 17, key: 'Control', code: 'ControlLeft', location: 1 }, - Alt: { keyCode: 18, key: 'Alt', code: 'AltLeft', location: 1 }, - Accept: { keyCode: 30, key: 'Accept' }, - ModeChange: { keyCode: 31, key: 'ModeChange' }, - ' ': { keyCode: 32, key: ' ', code: 'Space' }, - Print: { keyCode: 42, key: 'Print' }, - Execute: { keyCode: 43, key: 'Execute', code: 'Open' }, - '\u0000': { keyCode: 46, key: '\u0000', code: 'NumpadDecimal', location: 3 }, - a: { keyCode: 65, key: 'a', code: 'KeyA' }, - b: { keyCode: 66, key: 'b', code: 'KeyB' }, - c: { keyCode: 67, key: 'c', code: 'KeyC' }, - d: { keyCode: 68, key: 'd', code: 'KeyD' }, - e: { keyCode: 69, key: 'e', code: 'KeyE' }, - f: { keyCode: 70, key: 'f', code: 'KeyF' }, - g: { keyCode: 71, key: 'g', code: 'KeyG' }, - h: { keyCode: 72, key: 'h', code: 'KeyH' }, - i: { keyCode: 73, key: 'i', code: 'KeyI' }, - j: { keyCode: 74, key: 'j', code: 'KeyJ' }, - k: { keyCode: 75, key: 'k', code: 'KeyK' }, - l: { keyCode: 76, key: 'l', code: 'KeyL' }, - m: { keyCode: 77, key: 'm', code: 'KeyM' }, - n: { keyCode: 78, key: 'n', code: 'KeyN' }, - o: { keyCode: 79, key: 'o', code: 'KeyO' }, - p: { keyCode: 80, key: 'p', code: 'KeyP' }, - q: { keyCode: 81, key: 'q', code: 'KeyQ' }, - r: { keyCode: 82, key: 'r', code: 'KeyR' }, - s: { keyCode: 83, key: 's', code: 'KeyS' }, - t: { keyCode: 84, key: 't', code: 'KeyT' }, - u: { keyCode: 85, key: 'u', code: 'KeyU' }, - v: { keyCode: 86, key: 'v', code: 'KeyV' }, - w: { keyCode: 87, key: 'w', code: 'KeyW' }, - x: { keyCode: 88, key: 'x', code: 'KeyX' }, - y: { keyCode: 89, key: 'y', code: 'KeyY' }, - z: { keyCode: 90, key: 'z', code: 'KeyZ' }, - Meta: { keyCode: 91, key: 'Meta', code: 'MetaLeft', location: 1 }, - '*': { keyCode: 106, key: '*', code: 'NumpadMultiply', location: 3 }, - '+': { keyCode: 107, key: '+', code: 'NumpadAdd', location: 3 }, - '-': { keyCode: 109, key: '-', code: 'NumpadSubtract', location: 3 }, - '/': { keyCode: 111, key: '/', code: 'NumpadDivide', location: 3 }, - ';': { keyCode: 186, key: ';', code: 'Semicolon' }, - '=': { keyCode: 187, key: '=', code: 'Equal' }, - ',': { keyCode: 188, key: ',', code: 'Comma' }, - '.': { keyCode: 190, key: '.', code: 'Period' }, - '`': { keyCode: 192, key: '`', code: 'Backquote' }, - '[': { keyCode: 219, key: '[', code: 'BracketLeft' }, - '\\': { keyCode: 220, key: '\\', code: 'Backslash' }, - ']': { keyCode: 221, key: ']', code: 'BracketRight' }, - "'": { keyCode: 222, key: "'", code: 'Quote' }, - Attn: { keyCode: 246, key: 'Attn' }, - CrSel: { keyCode: 247, key: 'CrSel', code: 'Props' }, - ExSel: { keyCode: 248, key: 'ExSel' }, - EraseEof: { keyCode: 249, key: 'EraseEof' }, - Play: { keyCode: 250, key: 'Play' }, - ZoomOut: { keyCode: 251, key: 'ZoomOut' }, - ')': { keyCode: 48, key: ')', code: 'Digit0' }, - '!': { keyCode: 49, key: '!', code: 'Digit1' }, - '@': { keyCode: 50, key: '@', code: 'Digit2' }, - '#': { keyCode: 51, key: '#', code: 'Digit3' }, - $: { keyCode: 52, key: '$', code: 'Digit4' }, - '%': { keyCode: 53, key: '%', code: 'Digit5' }, - '^': { keyCode: 54, key: '^', code: 'Digit6' }, - '&': { keyCode: 55, key: '&', code: 'Digit7' }, - '(': { keyCode: 57, key: '(', code: 'Digit9' }, - A: { keyCode: 65, key: 'A', code: 'KeyA' }, - B: { keyCode: 66, key: 'B', code: 'KeyB' }, - C: { keyCode: 67, key: 'C', code: 'KeyC' }, - D: { keyCode: 68, key: 'D', code: 'KeyD' }, - E: { keyCode: 69, key: 'E', code: 'KeyE' }, - F: { keyCode: 70, key: 'F', code: 'KeyF' }, - G: { keyCode: 71, key: 'G', code: 'KeyG' }, - H: { keyCode: 72, key: 'H', code: 'KeyH' }, - I: { keyCode: 73, key: 'I', code: 'KeyI' }, - J: { keyCode: 74, key: 'J', code: 'KeyJ' }, - K: { keyCode: 75, key: 'K', code: 'KeyK' }, - L: { keyCode: 76, key: 'L', code: 'KeyL' }, - M: { keyCode: 77, key: 'M', code: 'KeyM' }, - N: { keyCode: 78, key: 'N', code: 'KeyN' }, - O: { keyCode: 79, key: 'O', code: 'KeyO' }, - P: { keyCode: 80, key: 'P', code: 'KeyP' }, - Q: { keyCode: 81, key: 'Q', code: 'KeyQ' }, - R: { keyCode: 82, key: 'R', code: 'KeyR' }, - S: { keyCode: 83, key: 'S', code: 'KeyS' }, - T: { keyCode: 84, key: 'T', code: 'KeyT' }, - U: { keyCode: 85, key: 'U', code: 'KeyU' }, - V: { keyCode: 86, key: 'V', code: 'KeyV' }, - W: { keyCode: 87, key: 'W', code: 'KeyW' }, - X: { keyCode: 88, key: 'X', code: 'KeyX' }, - Y: { keyCode: 89, key: 'Y', code: 'KeyY' }, - Z: { keyCode: 90, key: 'Z', code: 'KeyZ' }, - ':': { keyCode: 186, key: ':', code: 'Semicolon' }, - '<': { keyCode: 188, key: '<', code: 'Comma' }, - _: { keyCode: 189, key: '_', code: 'Minus' }, - '>': { keyCode: 190, key: '>', code: 'Period' }, - '?': { keyCode: 191, key: '?', code: 'Slash' }, - '~': { keyCode: 192, key: '~', code: 'Backquote' }, - '{': { keyCode: 219, key: '{', code: 'BracketLeft' }, - '|': { keyCode: 220, key: '|', code: 'Backslash' }, - '}': { keyCode: 221, key: '}', code: 'BracketRight' }, - '"': { keyCode: 222, key: '"', code: 'Quote' }, - SoftLeft: { key: 'SoftLeft', code: 'SoftLeft', location: 4 }, - SoftRight: { key: 'SoftRight', code: 'SoftRight', location: 4 }, - Camera: { keyCode: 44, key: 'Camera', code: 'Camera', location: 4 }, - Call: { key: 'Call', code: 'Call', location: 4 }, - EndCall: { keyCode: 95, key: 'EndCall', code: 'EndCall', location: 4 }, - VolumeDown: { - keyCode: 182, - key: 'VolumeDown', - code: 'VolumeDown', - location: 4, - }, - VolumeUp: { keyCode: 183, key: 'VolumeUp', code: 'VolumeUp', location: 4 }, -}; - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class CdpKeyboard extends Keyboard { - #client; - #pressedKeys = new Set(); - _modifiers = 0; - constructor(client) { - super(); - this.#client = client; - } - updateClient(client) { - this.#client = client; - } - async down(key, options = { - text: undefined, - commands: [], - }) { - const description = this.#keyDescriptionForString(key); - const autoRepeat = this.#pressedKeys.has(description.code); - this.#pressedKeys.add(description.code); - this._modifiers |= this.#modifierBit(description.key); - const text = options.text === undefined ? description.text : options.text; - await this.#client.send('Input.dispatchKeyEvent', { - type: text ? 'keyDown' : 'rawKeyDown', - modifiers: this._modifiers, - windowsVirtualKeyCode: description.keyCode, - code: description.code, - key: description.key, - text: text, - unmodifiedText: text, - autoRepeat, - location: description.location, - isKeypad: description.location === 3, - commands: options.commands, - }); - } - #modifierBit(key) { - if (key === 'Alt') { - return 1; - } - if (key === 'Control') { - return 2; - } - if (key === 'Meta') { - return 4; - } - if (key === 'Shift') { - return 8; - } - return 0; - } - #keyDescriptionForString(keyString) { - const shift = this._modifiers & 8; - const description = { - key: '', - keyCode: 0, - code: '', - text: '', - location: 0, - }; - const definition = _keyDefinitions[keyString]; - assert(definition, `Unknown key: "${keyString}"`); - if (definition.key) { - description.key = definition.key; - } - if (shift && definition.shiftKey) { - description.key = definition.shiftKey; - } - if (definition.keyCode) { - description.keyCode = definition.keyCode; - } - if (shift && definition.shiftKeyCode) { - description.keyCode = definition.shiftKeyCode; - } - if (definition.code) { - description.code = definition.code; - } - if (definition.location) { - description.location = definition.location; - } - if (description.key.length === 1) { - description.text = description.key; - } - if (definition.text) { - description.text = definition.text; - } - if (shift && definition.shiftText) { - description.text = definition.shiftText; - } - if (this._modifiers & -9) { - description.text = ''; - } - return description; - } - async up(key) { - const description = this.#keyDescriptionForString(key); - this._modifiers &= ~this.#modifierBit(description.key); - this.#pressedKeys.delete(description.code); - await this.#client.send('Input.dispatchKeyEvent', { - type: 'keyUp', - modifiers: this._modifiers, - key: description.key, - windowsVirtualKeyCode: description.keyCode, - code: description.code, - location: description.location, - }); - } - async sendCharacter(char) { - await this.#client.send('Input.insertText', { text: char }); - } - charIsKey(char) { - return !!_keyDefinitions[char]; - } - async type(text, options = {}) { - const delay = options.delay || undefined; - for (const char of text) { - if (this.charIsKey(char)) { - await this.press(char, { delay }); - } - else { - if (delay) { - await new Promise(f => { - return setTimeout(f, delay); - }); - } - await this.sendCharacter(char); - } - } - } - async press(key, options = {}) { - const { delay = null } = options; - await this.down(key, options); - if (delay) { - await new Promise(f => { - return setTimeout(f, options.delay); - }); - } - await this.up(key); - } -} -const getFlag = (button) => { - switch (button) { - case MouseButton.Left: - return 1 ; - case MouseButton.Right: - return 2 ; - case MouseButton.Middle: - return 4 ; - case MouseButton.Back: - return 8 ; - case MouseButton.Forward: - return 16 ; - } -}; -const getButtonFromPressedButtons = (buttons) => { - if (buttons & 1 ) { - return MouseButton.Left; - } - else if (buttons & 2 ) { - return MouseButton.Right; - } - else if (buttons & 4 ) { - return MouseButton.Middle; - } - else if (buttons & 8 ) { - return MouseButton.Back; - } - else if (buttons & 16 ) { - return MouseButton.Forward; - } - return 'none'; -}; -class CdpMouse extends Mouse { - #client; - #keyboard; - constructor(client, keyboard) { - super(); - this.#client = client; - this.#keyboard = keyboard; - } - updateClient(client) { - this.#client = client; - } - #_state = { - position: { x: 0, y: 0 }, - buttons: 0 , - }; - get #state() { - return Object.assign({ ...this.#_state }, ...this.#transactions); - } - #transactions = []; - #createTransaction() { - const transaction = {}; - this.#transactions.push(transaction); - const popTransaction = () => { - this.#transactions.splice(this.#transactions.indexOf(transaction), 1); - }; - return { - update: (updates) => { - Object.assign(transaction, updates); - }, - commit: () => { - this.#_state = { ...this.#_state, ...transaction }; - popTransaction(); - }, - rollback: popTransaction, - }; - } - async #withTransaction(action) { - const { update, commit, rollback } = this.#createTransaction(); - try { - await action(update); - commit(); - } - catch (error) { - rollback(); - throw error; - } - } - async reset() { - const actions = []; - for (const [flag, button] of [ - [1 , MouseButton.Left], - [4 , MouseButton.Middle], - [2 , MouseButton.Right], - [16 , MouseButton.Forward], - [8 , MouseButton.Back], - ]) { - if (this.#state.buttons & flag) { - actions.push(this.up({ button: button })); - } - } - if (this.#state.position.x !== 0 || this.#state.position.y !== 0) { - actions.push(this.move(0, 0)); - } - await Promise.all(actions); - } - async move(x, y, options = {}) { - const { steps = 1 } = options; - const from = this.#state.position; - const to = { x, y }; - for (let i = 1; i <= steps; i++) { - await this.#withTransaction(updateState => { - updateState({ - position: { - x: from.x + (to.x - from.x) * (i / steps), - y: from.y + (to.y - from.y) * (i / steps), - }, - }); - const { buttons, position } = this.#state; - return this.#client.send('Input.dispatchMouseEvent', { - type: 'mouseMoved', - modifiers: this.#keyboard._modifiers, - buttons, - button: getButtonFromPressedButtons(buttons), - ...position, - }); - }); - } - } - async down(options = {}) { - const { button = MouseButton.Left, clickCount = 1 } = options; - const flag = getFlag(button); - if (!flag) { - throw new Error(`Unsupported mouse button: ${button}`); - } - if (this.#state.buttons & flag) { - throw new Error(`'${button}' is already pressed.`); - } - await this.#withTransaction(updateState => { - updateState({ - buttons: this.#state.buttons | flag, - }); - const { buttons, position } = this.#state; - return this.#client.send('Input.dispatchMouseEvent', { - type: 'mousePressed', - modifiers: this.#keyboard._modifiers, - clickCount, - buttons, - button, - ...position, - }); - }); - } - async up(options = {}) { - const { button = MouseButton.Left, clickCount = 1 } = options; - const flag = getFlag(button); - if (!flag) { - throw new Error(`Unsupported mouse button: ${button}`); - } - if (!(this.#state.buttons & flag)) { - throw new Error(`'${button}' is not pressed.`); - } - await this.#withTransaction(updateState => { - updateState({ - buttons: this.#state.buttons & ~flag, - }); - const { buttons, position } = this.#state; - return this.#client.send('Input.dispatchMouseEvent', { - type: 'mouseReleased', - modifiers: this.#keyboard._modifiers, - clickCount, - buttons, - button, - ...position, - }); - }); - } - async click(x, y, options = {}) { - const { delay, count = 1, clickCount = count } = options; - if (count < 1) { - throw new Error('Click must occur a positive number of times.'); - } - const actions = [this.move(x, y)]; - if (clickCount === count) { - for (let i = 1; i < count; ++i) { - actions.push(this.down({ ...options, clickCount: i }), this.up({ ...options, clickCount: i })); - } - } - actions.push(this.down({ ...options, clickCount })); - if (typeof delay === 'number') { - await Promise.all(actions); - actions.length = 0; - await new Promise(resolve => { - setTimeout(resolve, delay); - }); - } - actions.push(this.up({ ...options, clickCount })); - await Promise.all(actions); - } - async wheel(options = {}) { - const { deltaX = 0, deltaY = 0 } = options; - const { position, buttons } = this.#state; - await this.#client.send('Input.dispatchMouseEvent', { - type: 'mouseWheel', - pointerType: 'mouse', - modifiers: this.#keyboard._modifiers, - deltaY, - deltaX, - buttons, - ...position, - }); - } - async drag(start, target) { - const promise = new Promise(resolve => { - this.#client.once('Input.dragIntercepted', event => { - return resolve(event.data); - }); - }); - await this.move(start.x, start.y); - await this.down(); - await this.move(target.x, target.y); - return await promise; - } - async dragEnter(target, data) { - await this.#client.send('Input.dispatchDragEvent', { - type: 'dragEnter', - x: target.x, - y: target.y, - modifiers: this.#keyboard._modifiers, - data, - }); - } - async dragOver(target, data) { - await this.#client.send('Input.dispatchDragEvent', { - type: 'dragOver', - x: target.x, - y: target.y, - modifiers: this.#keyboard._modifiers, - data, - }); - } - async drop(target, data) { - await this.#client.send('Input.dispatchDragEvent', { - type: 'drop', - x: target.x, - y: target.y, - modifiers: this.#keyboard._modifiers, - data, - }); - } - async dragAndDrop(start, target, options = {}) { - const { delay = null } = options; - const data = await this.drag(start, target); - await this.dragEnter(target, data); - await this.dragOver(target, data); - if (delay) { - await new Promise(resolve => { - return setTimeout(resolve, delay); - }); - } - await this.drop(target, data); - await this.up(); - } -} -class CdpTouchHandle { - #started = false; - #touchScreen; - #touchPoint; - #client; - #keyboard; - constructor(client, touchScreen, keyboard, touchPoint) { - this.#client = client; - this.#touchScreen = touchScreen; - this.#keyboard = keyboard; - this.#touchPoint = touchPoint; - } - updateClient(client) { - this.#client = client; - } - async start() { - if (this.#started) { - throw new TouchError('Touch has already started'); - } - await this.#client.send('Input.dispatchTouchEvent', { - type: 'touchStart', - touchPoints: [this.#touchPoint], - modifiers: this.#keyboard._modifiers, - }); - this.#started = true; - } - move(x, y) { - this.#touchPoint.x = Math.round(x); - this.#touchPoint.y = Math.round(y); - return this.#client.send('Input.dispatchTouchEvent', { - type: 'touchMove', - touchPoints: [this.#touchPoint], - modifiers: this.#keyboard._modifiers, - }); - } - async end() { - await this.#client.send('Input.dispatchTouchEvent', { - type: 'touchEnd', - touchPoints: [this.#touchPoint], - modifiers: this.#keyboard._modifiers, - }); - this.#touchScreen.removeHandle(this); - } -} -class CdpTouchscreen extends Touchscreen { - #client; - #keyboard; - constructor(client, keyboard) { - super(); - this.#client = client; - this.#keyboard = keyboard; - } - updateClient(client) { - this.#client = client; - this.touches.forEach(t => { - t.updateClient(client); - }); - } - async touchStart(x, y) { - const id = this.idGenerator(); - const touchPoint = { - x: Math.round(x), - y: Math.round(y), - radiusX: 0.5, - radiusY: 0.5, - force: 0.5, - id, - }; - const touch = new CdpTouchHandle(this.#client, this, this.#keyboard, touchPoint); - await touch.start(); - this.touches.push(touch); - return touch; - } -} - -class Tracing { - #client; - #recording = false; - #path; - constructor(client) { - this.#client = client; - } - updateClient(client) { - this.#client = client; - } - async start(options = {}) { - assert(!this.#recording, 'Cannot start recording trace while already recording trace.'); - const defaultCategories = [ - '-*', - 'devtools.timeline', - 'v8.execute', - 'disabled-by-default-devtools.timeline', - 'disabled-by-default-devtools.timeline.frame', - 'toplevel', - 'blink.console', - 'blink.user_timing', - 'latencyInfo', - 'disabled-by-default-devtools.timeline.stack', - 'disabled-by-default-v8.cpu_profiler', - ]; - const { path, screenshots = false, categories = defaultCategories } = options; - if (screenshots) { - categories.push('disabled-by-default-devtools.screenshot'); - } - const excludedCategories = categories - .filter(cat => { - return cat.startsWith('-'); - }) - .map(cat => { - return cat.slice(1); - }); - const includedCategories = categories.filter(cat => { - return !cat.startsWith('-'); - }); - this.#path = path; - this.#recording = true; - await this.#client.send('Tracing.start', { - transferMode: 'ReturnAsStream', - traceConfig: { - excludedCategories, - includedCategories, - }, - }); - } - async stop() { - const contentDeferred = Deferred.create(); - this.#client.once('Tracing.tracingComplete', async (event) => { - try { - assert(event.stream, 'Missing "stream"'); - const readable = await getReadableFromProtocolStream(this.#client, event.stream); - const typedArray = await getReadableAsTypedArray(readable, this.#path); - contentDeferred.resolve(typedArray ?? undefined); - } - catch (error) { - if (isErrorLike$1(error)) { - contentDeferred.reject(error); - } - else { - contentDeferred.reject(new Error(`Unknown error: ${error}`)); - } - } - }); - await this.#client.send('Tracing.end'); - this.#recording = false; - return await contentDeferred.valueOrThrow(); - } -} - -class CdpWebWorker extends WebWorker$1 { - #world; - #client; - #id; - #targetType; - constructor(client, url, targetId, targetType, consoleAPICalled, exceptionThrown, networkManager) { - super(url); - this.#id = targetId; - this.#client = client; - this.#targetType = targetType; - this.#world = new IsolatedWorld(this, new TimeoutSettings()); - this.#client.once('Runtime.executionContextCreated', async (event) => { - this.#world.setContext(new ExecutionContext$1(client, event.context, this.#world)); - }); - this.#world.emitter.on('consoleapicalled', async (event) => { - try { - return consoleAPICalled(this.#world, event); - } - catch (err) { - debugError(err); - } - }); - this.#client.on('Runtime.exceptionThrown', exceptionThrown); - this.#client.once(CDPSessionEvent.Disconnected, () => { - this.#world.dispose(); - }); - networkManager?.addClient(this.#client).catch(debugError); - this.#client.send('Runtime.enable').catch(debugError); - } - mainRealm() { - return this.#world; - } - get client() { - return this.#client; - } - async close() { - switch (this.#targetType) { - case TargetType.SERVICE_WORKER: { - await this.client.connection()?.send('Target.closeTarget', { - targetId: this.#id, - }); - await this.client.connection()?.send('Target.detachFromTarget', { - sessionId: this.client.id(), - }); - break; - } - case TargetType.SHARED_WORKER: { - await this.client.connection()?.send('Target.closeTarget', { - targetId: this.#id, - }); - break; - } - default: - await this.evaluate(() => { - self.close(); - }); - } - } -} - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __addDisposableResource$2 = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$2 = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -function convertConsoleMessageLevel(method) { - switch (method) { - case 'warning': - return 'warn'; - default: - return method; - } -} -function convertSameSiteFromPuppeteerToCdp(sameSite) { - switch (sameSite) { - case 'Strict': - case 'Lax': - case 'None': - return sameSite; - default: - return undefined; - } -} -class CdpPage extends Page { - static async _create(client, target, defaultViewport) { - const page = new CdpPage(client, target); - await page.#initialize(); - if (defaultViewport) { - try { - await page.setViewport(defaultViewport); - } - catch (err) { - if (isErrorLike$1(err) && isTargetClosedError(err)) { - debugError(err); - } - else { - throw err; - } - } - } - return page; - } - #closed = false; - #targetManager; - #cdpBluetoothEmulation; - #primaryTargetClient; - #primaryTarget; - #tabTargetClient; - #tabTarget; - #keyboard; - #mouse; - #touchscreen; - #frameManager; - #emulationManager; - #tracing; - #bindings = new Map(); - #exposedFunctions = new Map(); - #coverage; - #viewport; - #workers = new Map(); - #fileChooserDeferreds = new Set(); - #sessionCloseDeferred = Deferred.create(); - #serviceWorkerBypassed = false; - #userDragInterceptionEnabled = false; - constructor(client, target) { - super(); - this.#primaryTargetClient = client; - this.#tabTargetClient = client.parentSession(); - assert(this.#tabTargetClient, 'Tab target session is not defined.'); - this.#tabTarget = this.#tabTargetClient.target(); - assert(this.#tabTarget, 'Tab target is not defined.'); - this._tabId = this.#tabTarget._getTargetInfo().targetId; - this.#primaryTarget = target; - this.#targetManager = target._targetManager(); - this.#keyboard = new CdpKeyboard(client); - this.#mouse = new CdpMouse(client, this.#keyboard); - this.#touchscreen = new CdpTouchscreen(client, this.#keyboard); - this.#frameManager = new FrameManager$1(client, this, this._timeoutSettings); - this.#emulationManager = new EmulationManager(client); - this.#tracing = new Tracing(client); - this.#coverage = new Coverage(client); - this.#viewport = null; - this.#cdpBluetoothEmulation = new CdpBluetoothEmulation(this.#primaryTargetClient.connection()); - const frameManagerEmitter = new EventEmitter(this.#frameManager); - frameManagerEmitter.on(FrameManagerEvent.FrameAttached, frame => { - this.emit("frameattached" , frame); - }); - frameManagerEmitter.on(FrameManagerEvent.FrameDetached, frame => { - this.emit("framedetached" , frame); - }); - frameManagerEmitter.on(FrameManagerEvent.FrameNavigated, frame => { - this.emit("framenavigated" , frame); - }); - frameManagerEmitter.on(FrameManagerEvent.ConsoleApiCalled, ([world, event]) => { - this.#onConsoleAPI(world, event); - }); - frameManagerEmitter.on(FrameManagerEvent.BindingCalled, ([world, event]) => { - void this.#onBindingCalled(world, event); - }); - const networkManagerEmitter = new EventEmitter(this.#frameManager.networkManager); - networkManagerEmitter.on(NetworkManagerEvent.Request, request => { - this.emit("request" , request); - }); - networkManagerEmitter.on(NetworkManagerEvent.RequestServedFromCache, request => { - this.emit("requestservedfromcache" , request); - }); - networkManagerEmitter.on(NetworkManagerEvent.Response, response => { - this.emit("response" , response); - }); - networkManagerEmitter.on(NetworkManagerEvent.RequestFailed, request => { - this.emit("requestfailed" , request); - }); - networkManagerEmitter.on(NetworkManagerEvent.RequestFinished, request => { - this.emit("requestfinished" , request); - }); - this.#tabTargetClient.on(CDPSessionEvent.Swapped, this.#onActivation.bind(this)); - this.#tabTargetClient.on(CDPSessionEvent.Ready, this.#onSecondaryTarget.bind(this)); - this.#targetManager.on("targetGone" , this.#onDetachedFromTarget); - this.#tabTarget._isClosedDeferred - .valueOrThrow() - .then(() => { - this.#targetManager.off("targetGone" , this.#onDetachedFromTarget); - this.emit("close" , undefined); - this.#closed = true; - }) - .catch(debugError); - this.#setupPrimaryTargetListeners(); - this.#attachExistingTargets(); - } - #attachExistingTargets() { - const queue = []; - for (const childTarget of this.#targetManager.getChildTargets(this.#primaryTarget)) { - queue.push(childTarget); - } - let idx = 0; - while (idx < queue.length) { - const next = queue[idx]; - idx++; - const session = next._session(); - if (session) { - this.#onAttachedToTarget(session); - } - for (const childTarget of this.#targetManager.getChildTargets(next)) { - queue.push(childTarget); - } - } - } - async #onActivation(newSession) { - assert(newSession instanceof CdpCDPSession, 'CDPSession is not instance of CdpCDPSession'); - this.#primaryTargetClient = newSession; - this.#primaryTarget = newSession.target(); - assert(this.#primaryTarget, 'Missing target on swap'); - this.#keyboard.updateClient(newSession); - this.#mouse.updateClient(newSession); - this.#touchscreen.updateClient(newSession); - this.#emulationManager.updateClient(newSession); - this.#tracing.updateClient(newSession); - this.#coverage.updateClient(newSession); - await this.#frameManager.swapFrameTree(newSession); - this.#setupPrimaryTargetListeners(); - } - async #onSecondaryTarget(session) { - assert(session instanceof CdpCDPSession); - if (session.target()._subtype() !== 'prerender') { - return; - } - this.#frameManager.registerSpeculativeSession(session).catch(debugError); - this.#emulationManager - .registerSpeculativeSession(session) - .catch(debugError); - } - #setupPrimaryTargetListeners() { - const clientEmitter = new EventEmitter(this.#primaryTargetClient); - clientEmitter.on(CDPSessionEvent.Ready, this.#onAttachedToTarget); - clientEmitter.on(CDPSessionEvent.Disconnected, () => { - this.#sessionCloseDeferred.reject(new TargetCloseError('Target closed')); - }); - clientEmitter.on('Page.domContentEventFired', () => { - this.emit("domcontentloaded" , undefined); - }); - clientEmitter.on('Page.loadEventFired', () => { - this.emit("load" , undefined); - }); - clientEmitter.on('Page.javascriptDialogOpening', this.#onDialog.bind(this)); - clientEmitter.on('Runtime.exceptionThrown', this.#handleException.bind(this)); - clientEmitter.on('Inspector.targetCrashed', this.#onTargetCrashed.bind(this)); - clientEmitter.on('Performance.metrics', this.#emitMetrics.bind(this)); - clientEmitter.on('Log.entryAdded', this.#onLogEntryAdded.bind(this)); - clientEmitter.on('Page.fileChooserOpened', this.#onFileChooser.bind(this)); - } - #onDetachedFromTarget = (target) => { - const sessionId = target._session()?.id(); - const worker = this.#workers.get(sessionId); - if (!worker) { - return; - } - this.#workers.delete(sessionId); - this.emit("workerdestroyed" , worker); - }; - #onAttachedToTarget = (session) => { - assert(session instanceof CdpCDPSession); - this.#frameManager.onAttachedToTarget(session.target()); - if (session.target()._getTargetInfo().type === 'worker') { - const worker = new CdpWebWorker(session, session.target().url(), session.target()._targetId, session.target().type(), this.#onConsoleAPI.bind(this), this.#handleException.bind(this), this.#frameManager.networkManager); - this.#workers.set(session.id(), worker); - this.emit("workercreated" , worker); - } - session.on(CDPSessionEvent.Ready, this.#onAttachedToTarget); - }; - async #initialize() { - try { - await Promise.all([ - this.#frameManager.initialize(this.#primaryTargetClient), - this.#primaryTargetClient.send('Performance.enable'), - this.#primaryTargetClient.send('Log.enable'), - ]); - } - catch (err) { - if (isErrorLike$1(err) && isTargetClosedError(err)) { - debugError(err); - } - else { - throw err; - } - } - } - async resize(params) { - const windowId = await this.windowId(); - await this.#primaryTargetClient.send('Browser.setContentsSize', { - windowId: Number(windowId), - width: params.contentWidth, - height: params.contentHeight, - }); - } - async windowId() { - const { windowId } = await this.#primaryTargetClient.send('Browser.getWindowForTarget'); - return windowId.toString(); - } - async #onFileChooser(event) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - if (!this.#fileChooserDeferreds.size) { - return; - } - const frame = this.#frameManager.frame(event.frameId); - assert(frame, 'This should never happen.'); - const handle = __addDisposableResource$2(env_1, (await frame.worlds[MAIN_WORLD].adoptBackendNode(event.backendNodeId)), false); - const fileChooser = new FileChooser(handle.move(), event.mode !== 'selectSingle'); - for (const promise of this.#fileChooserDeferreds) { - promise.resolve(fileChooser); - } - this.#fileChooserDeferreds.clear(); - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$2(env_1); - } - } - _client() { - return this.#primaryTargetClient; - } - isServiceWorkerBypassed() { - return this.#serviceWorkerBypassed; - } - isDragInterceptionEnabled() { - return this.#userDragInterceptionEnabled; - } - isJavaScriptEnabled() { - return this.#emulationManager.javascriptEnabled; - } - async openDevTools() { - const pageTargetId = this.target()._targetId; - const browser = this.browser(); - const devtoolsPage = await browser._createDevToolsPage(pageTargetId); - return devtoolsPage; - } - async hasDevTools() { - const browser = this.browser(); - const targetId = await browser._hasDevToolsTarget(this.target()._targetId); - return Boolean(targetId); - } - async waitForFileChooser(options = {}) { - const needsEnable = this.#fileChooserDeferreds.size === 0; - const { timeout = this._timeoutSettings.timeout() } = options; - const deferred = Deferred.create({ - message: `Waiting for \`FileChooser\` failed: ${timeout}ms exceeded`, - timeout, - }); - if (options.signal) { - options.signal.addEventListener('abort', () => { - deferred.reject(options.signal?.reason); - }, { once: true }); - } - this.#fileChooserDeferreds.add(deferred); - let enablePromise; - if (needsEnable) { - enablePromise = this.#primaryTargetClient.send('Page.setInterceptFileChooserDialog', { - enabled: true, - }); - } - try { - const [result] = await Promise.all([ - deferred.valueOrThrow(), - enablePromise, - ]); - return result; - } - catch (error) { - this.#fileChooserDeferreds.delete(deferred); - throw error; - } - } - async setGeolocation(options) { - return await this.#emulationManager.setGeolocation(options); - } - target() { - return this.#primaryTarget; - } - browser() { - return this.#primaryTarget.browser(); - } - browserContext() { - return this.#primaryTarget.browserContext(); - } - #onTargetCrashed() { - this.emit("error" , new Error('Page crashed!')); - } - #onLogEntryAdded(event) { - const { level, text, args, source, url, lineNumber, stackTrace } = event.entry; - if (args) { - args.map(arg => { - void releaseObject(this.#primaryTargetClient, arg); - }); - } - if (source !== 'worker') { - this.emit("console" , new ConsoleMessage$1(convertConsoleMessageLevel(level), text, [], [{ url, lineNumber }], undefined, stackTrace, this.#primaryTarget._targetId)); - } - } - mainFrame() { - return this.#frameManager.mainFrame(); - } - get keyboard() { - return this.#keyboard; - } - get touchscreen() { - return this.#touchscreen; - } - get coverage() { - return this.#coverage; - } - get tracing() { - return this.#tracing; - } - frames() { - return this.#frameManager.frames(); - } - workers() { - return Array.from(this.#workers.values()); - } - async setRequestInterception(value) { - return await this.#frameManager.networkManager.setRequestInterception(value); - } - async setBypassServiceWorker(bypass) { - this.#serviceWorkerBypassed = bypass; - return await this.#primaryTargetClient.send('Network.setBypassServiceWorker', { bypass }); - } - async setDragInterception(enabled) { - this.#userDragInterceptionEnabled = enabled; - return await this.#primaryTargetClient.send('Input.setInterceptDrags', { - enabled, - }); - } - async setOfflineMode(enabled) { - return await this.#frameManager.networkManager.setOfflineMode(enabled); - } - async emulateNetworkConditions(networkConditions) { - return await this.#frameManager.networkManager.emulateNetworkConditions(networkConditions); - } - async emulateFocusedPage(enabled) { - return await this.#emulationManager.emulateFocus(enabled); - } - setDefaultNavigationTimeout(timeout) { - this._timeoutSettings.setDefaultNavigationTimeout(timeout); - } - setDefaultTimeout(timeout) { - this._timeoutSettings.setDefaultTimeout(timeout); - } - getDefaultTimeout() { - return this._timeoutSettings.timeout(); - } - getDefaultNavigationTimeout() { - return this._timeoutSettings.navigationTimeout(); - } - async queryObjects(prototypeHandle) { - assert(!prototypeHandle.disposed, 'Prototype JSHandle is disposed!'); - assert(prototypeHandle.id, 'Prototype JSHandle must not be referencing primitive value'); - const response = await this.mainFrame().client.send('Runtime.queryObjects', { - prototypeObjectId: prototypeHandle.id, - }); - return this.mainFrame() - .mainRealm() - .createCdpHandle(response.objects); - } - async cookies(...urls) { - const originalCookies = (await this.#primaryTargetClient.send('Network.getCookies', { - urls: urls.length ? urls : [this.url()], - })).cookies; - const unsupportedCookieAttributes = ['sourcePort']; - const filterUnsupportedAttributes = (cookie) => { - for (const attr of unsupportedCookieAttributes) { - delete cookie[attr]; - } - return cookie; - }; - return originalCookies.map(filterUnsupportedAttributes).map(cookie => { - return { - ...cookie, - partitionKey: cookie.partitionKey - ? cookie.partitionKey.topLevelSite - : undefined, - sameParty: false, - }; - }); - } - async deleteCookie(...cookies) { - const pageURL = this.url(); - for (const cookie of cookies) { - const item = { - ...cookie, - partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(cookie.partitionKey), - }; - if (!cookie.url && pageURL.startsWith('http')) { - item.url = pageURL; - } - await this.#primaryTargetClient.send('Network.deleteCookies', item); - if (pageURL.startsWith('http') && !item.partitionKey) { - const url = new URL(pageURL); - await this.#primaryTargetClient.send('Network.deleteCookies', { - ...item, - partitionKey: { - topLevelSite: url.origin.replace(`:${url.port}`, ''), - hasCrossSiteAncestor: false, - }, - }); - } - } - } - async setCookie(...cookies) { - const pageURL = this.url(); - const startsWithHTTP = pageURL.startsWith('http'); - const items = cookies.map(cookie => { - const item = Object.assign({}, cookie); - if (!item.url && startsWithHTTP) { - item.url = pageURL; - } - assert(item.url !== 'about:blank', `Blank page can not have cookie "${item.name}"`); - assert(!String.prototype.startsWith.call(item.url || '', 'data:'), `Data URL page can not have cookie "${item.name}"`); - return item; - }); - await this.deleteCookie(...items); - if (items.length) { - await this.#primaryTargetClient.send('Network.setCookies', { - cookies: items.map(cookieParam => { - return { - ...cookieParam, - partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(cookieParam.partitionKey), - sameSite: convertSameSiteFromPuppeteerToCdp(cookieParam.sameSite), - }; - }), - }); - } - } - async exposeFunction(name, - pptrFunction) { - if (this.#bindings.has(name)) { - throw new Error(`Failed to add page binding with name ${name}: window['${name}'] already exists!`); - } - const source = pageBindingInitString('exposedFun', name); - let binding; - switch (typeof pptrFunction) { - case 'function': - binding = new Binding$2(name, pptrFunction, source); - break; - default: - binding = new Binding$2(name, pptrFunction.default, source); - break; - } - this.#bindings.set(name, binding); - const [{ identifier }] = await Promise.all([ - this.#frameManager.evaluateOnNewDocument(source), - this.#frameManager.addExposedFunctionBinding(binding), - ]); - this.#exposedFunctions.set(name, identifier); - } - async removeExposedFunction(name) { - const exposedFunctionId = this.#exposedFunctions.get(name); - if (!exposedFunctionId) { - throw new Error(`Function with name "${name}" does not exist`); - } - const binding = this.#bindings.get(name); - this.#exposedFunctions.delete(name); - this.#bindings.delete(name); - await Promise.all([ - this.#frameManager.removeScriptToEvaluateOnNewDocument(exposedFunctionId), - this.#frameManager.removeExposedFunctionBinding(binding), - ]); - } - async authenticate(credentials) { - return await this.#frameManager.networkManager.authenticate(credentials); - } - async setExtraHTTPHeaders(headers) { - return await this.#frameManager.networkManager.setExtraHTTPHeaders(headers); - } - async setUserAgent(userAgentOrOptions, userAgentMetadata) { - if (typeof userAgentOrOptions === 'string') { - return await this.#frameManager.networkManager.setUserAgent(userAgentOrOptions, userAgentMetadata); - } - else { - const userAgent = userAgentOrOptions.userAgent ?? (await this.browser().userAgent()); - return await this.#frameManager.networkManager.setUserAgent(userAgent, userAgentOrOptions.userAgentMetadata, userAgentOrOptions.platform); - } - } - async metrics() { - const response = await this.#primaryTargetClient.send('Performance.getMetrics'); - return this.#buildMetricsObject(response.metrics); - } - async captureHeapSnapshot(options) { - const { createWriteStream } = environment.value.fs; - const stream = createWriteStream(options.path); - const streamPromise = new Promise((resolve, reject) => { - stream.on('error', reject); - stream.on('finish', resolve); - }); - const client = this.#primaryTargetClient; - await client.send('HeapProfiler.enable'); - await client.send('HeapProfiler.collectGarbage'); - const handler = (event) => { - stream.write(event.chunk); - }; - client.on('HeapProfiler.addHeapSnapshotChunk', handler); - try { - await client.send('HeapProfiler.takeHeapSnapshot', { - reportProgress: false, - }); - } - finally { - client.off('HeapProfiler.addHeapSnapshotChunk', handler); - await client.send('HeapProfiler.disable'); - } - stream.end(); - await streamPromise; - } - #emitMetrics(event) { - this.emit("metrics" , { - title: event.title, - metrics: this.#buildMetricsObject(event.metrics), - }); - } - #buildMetricsObject(metrics) { - const result = {}; - for (const metric of metrics || []) { - if (supportedMetrics.has(metric.name)) { - result[metric.name] = metric.value; - } - } - return result; - } - #handleException(exception) { - this.emit("pageerror" , createClientError(exception.exceptionDetails)); - } - #onConsoleAPI(world, event) { - const values = event.args.map(arg => { - return world.createCdpHandle(arg); - }); - if (!this.listenerCount("console" )) { - values.forEach(arg => { - return arg.dispose(); - }); - return; - } - const textTokens = []; - for (const arg of values) { - textTokens.push(valueFromJSHandle(arg)); - } - const stackTraceLocations = []; - if (event.stackTrace) { - for (const callFrame of event.stackTrace.callFrames) { - stackTraceLocations.push({ - url: callFrame.url, - lineNumber: callFrame.lineNumber, - columnNumber: callFrame.columnNumber, - }); - } - } - let targetId; - if (world.environment.client instanceof CdpCDPSession) { - targetId = world.environment.client.target()._targetId; - } - const message = new ConsoleMessage$1(convertConsoleMessageLevel(event.type), textTokens.join(' '), values, stackTraceLocations, undefined, event.stackTrace, targetId); - this.emit("console" , message); - } - async #onBindingCalled(world, event) { - let payload; - try { - payload = JSON.parse(event.payload); - } - catch { - return; - } - const { type, name, seq, args, isTrivial } = payload; - if (type !== 'exposedFun') { - return; - } - const context = world.context; - if (!context) { - return; - } - const binding = this.#bindings.get(name); - await binding?.run(context, seq, args, isTrivial); - } - #onDialog(event) { - const type = validateDialogType(event.type); - const dialog = new CdpDialog(this.#primaryTargetClient, type, event.message, event.defaultPrompt); - this.emit("dialog" , dialog); - } - async reload(options) { - const [result] = await Promise.all([ - this.waitForNavigation({ - ...options, - ignoreSameDocumentNavigation: true, - }), - this.#primaryTargetClient.send('Page.reload', { - ignoreCache: options?.ignoreCache ?? false, - }), - ]); - return result; - } - async createCDPSession() { - return await this.target().createCDPSession(); - } - async goBack(options = {}) { - return await this.#go(-1, options); - } - async goForward(options = {}) { - return await this.#go(1, options); - } - async #go(delta, options) { - const history = await this.#primaryTargetClient.send('Page.getNavigationHistory'); - const entry = history.entries[history.currentIndex + delta]; - if (!entry) { - throw new Error('History entry to navigate to not found.'); - } - const result = await Promise.all([ - this.waitForNavigation(options), - this.#primaryTargetClient.send('Page.navigateToHistoryEntry', { - entryId: entry.id, - }), - ]); - return result[0]; - } - async bringToFront() { - await this.#primaryTargetClient.send('Page.bringToFront'); - } - async setJavaScriptEnabled(enabled) { - return await this.#emulationManager.setJavaScriptEnabled(enabled); - } - async setBypassCSP(enabled) { - await this.#primaryTargetClient.send('Page.setBypassCSP', { enabled }); - } - async emulateMediaType(type) { - return await this.#emulationManager.emulateMediaType(type); - } - async emulateCPUThrottling(factor) { - return await this.#emulationManager.emulateCPUThrottling(factor); - } - async emulateMediaFeatures(features) { - return await this.#emulationManager.emulateMediaFeatures(features); - } - async emulateTimezone(timezoneId) { - return await this.#emulationManager.emulateTimezone(timezoneId); - } - async emulateIdleState(overrides) { - return await this.#emulationManager.emulateIdleState(overrides); - } - async emulateVisionDeficiency(type) { - return await this.#emulationManager.emulateVisionDeficiency(type); - } - async setViewport(viewport) { - const needsReload = await this.#emulationManager.emulateViewport(viewport); - this.#viewport = viewport; - if (needsReload) { - await this.reload(); - } - } - viewport() { - return this.#viewport; - } - async evaluateOnNewDocument(pageFunction, ...args) { - const source = evaluationString(pageFunction, ...args); - return await this.#frameManager.evaluateOnNewDocument(source); - } - async removeScriptToEvaluateOnNewDocument(identifier) { - return await this.#frameManager.removeScriptToEvaluateOnNewDocument(identifier); - } - async setCacheEnabled(enabled = true) { - await this.#frameManager.networkManager.setCacheEnabled(enabled); - } - async _screenshot(options) { - const env_2 = { stack: [], error: void 0, hasError: false }; - try { - const { fromSurface, omitBackground, optimizeForSpeed, quality, clip: userClip, type, captureBeyondViewport, } = options; - const stack = __addDisposableResource$2(env_2, new AsyncDisposableStack(), true); - if (omitBackground && (type === 'png' || type === 'webp')) { - await this.#emulationManager.setTransparentBackgroundColor(); - stack.defer(async () => { - await this.#emulationManager - .resetDefaultBackgroundColor() - .catch(debugError); - }); - } - let clip = userClip; - if (clip && !captureBeyondViewport) { - const viewport = await this.mainFrame() - .isolatedRealm() - .evaluate(() => { - const { height, pageLeft: x, pageTop: y, width, } = window.visualViewport; - return { x, y, height, width }; - }); - clip = getIntersectionRect(clip, viewport); - } - const { data } = await this.#primaryTargetClient.send('Page.captureScreenshot', { - format: type, - optimizeForSpeed, - fromSurface, - ...(quality !== undefined ? { quality: Math.round(quality) } : {}), - ...(clip ? { clip: { ...clip, scale: clip.scale ?? 1 } } : {}), - captureBeyondViewport, - }); - return data; - } - catch (e_2) { - env_2.error = e_2; - env_2.hasError = true; - } - finally { - const result_1 = __disposeResources$2(env_2); - if (result_1) - await result_1; - } - } - async createPDFStream(options = {}) { - const { timeout: ms = this._timeoutSettings.timeout() } = options; - const { landscape, displayHeaderFooter, headerTemplate, footerTemplate, printBackground, scale, width: paperWidth, height: paperHeight, margin, pageRanges, preferCSSPageSize, omitBackground, tagged: generateTaggedPDF, outline: generateDocumentOutline, waitForFonts, } = parsePDFOptions(options); - if (omitBackground) { - await this.#emulationManager.setTransparentBackgroundColor(); - } - if (waitForFonts) { - await firstValueFrom(from(this.mainFrame() - .isolatedRealm() - .evaluate(() => { - return document.fonts.ready; - })).pipe(raceWith(timeout(ms)))); - } - const printCommandPromise = this.#primaryTargetClient.send('Page.printToPDF', { - transferMode: 'ReturnAsStream', - landscape, - displayHeaderFooter, - headerTemplate, - footerTemplate, - printBackground, - scale, - paperWidth, - paperHeight, - marginTop: margin.top, - marginBottom: margin.bottom, - marginLeft: margin.left, - marginRight: margin.right, - pageRanges, - preferCSSPageSize, - generateTaggedPDF, - generateDocumentOutline, - }); - const result = await firstValueFrom(from(printCommandPromise).pipe(raceWith(timeout(ms)))); - if (omitBackground) { - await this.#emulationManager.resetDefaultBackgroundColor(); - } - assert(result.stream, '`stream` is missing from `Page.printToPDF'); - return await getReadableFromProtocolStream(this.#primaryTargetClient, result.stream); - } - async pdf(options = {}) { - const { path = undefined } = options; - const readable = await this.createPDFStream(options); - const typedArray = await getReadableAsTypedArray(readable, path); - assert(typedArray, 'Could not create typed array'); - return typedArray; - } - async close(options = { runBeforeUnload: undefined }) { - const env_3 = { stack: [], error: void 0, hasError: false }; - try { - const _guard = __addDisposableResource$2(env_3, await this.browserContext().waitForScreenshotOperations(), false); - const connection = this.#primaryTargetClient.connection(); - assert(connection, 'Connection closed. Most likely the page has been closed.'); - const runBeforeUnload = !!options.runBeforeUnload; - if (runBeforeUnload) { - await this.#primaryTargetClient.send('Page.close'); - } - else { - await connection.send('Target.closeTarget', { - targetId: this.#primaryTarget._targetId, - }); - await this.#tabTarget._isClosedDeferred.valueOrThrow(); - } - } - catch (e_3) { - env_3.error = e_3; - env_3.hasError = true; - } - finally { - __disposeResources$2(env_3); - } - } - isClosed() { - return this.#closed; - } - get mouse() { - return this.#mouse; - } - async waitForDevicePrompt(options = {}) { - return await this.mainFrame().waitForDevicePrompt(options); - } - get bluetooth() { - return this.#cdpBluetoothEmulation; - } -} -const supportedMetrics = new Set([ - 'Timestamp', - 'Documents', - 'Frames', - 'JSEventListeners', - 'Nodes', - 'LayoutCount', - 'RecalcStyleCount', - 'LayoutDuration', - 'RecalcStyleDuration', - 'ScriptDuration', - 'TaskDuration', - 'JSHeapUsedSize', - 'JSHeapTotalSize', -]); -function getIntersectionRect(clip, viewport) { - const x = Math.max(clip.x, viewport.x); - const y = Math.max(clip.y, viewport.y); - return { - x, - y, - width: Math.max(Math.min(clip.x + clip.width, viewport.x + viewport.width) - x, 0), - height: Math.max(Math.min(clip.y + clip.height, viewport.y + viewport.height) - y, 0), - }; -} -function convertCookiesPartitionKeyFromPuppeteerToCdp(partitionKey) { - if (partitionKey === undefined) { - return undefined; - } - if (typeof partitionKey === 'string') { - return { - topLevelSite: partitionKey, - hasCrossSiteAncestor: false, - }; - } - return { - topLevelSite: partitionKey.sourceOrigin, - hasCrossSiteAncestor: partitionKey.hasCrossSiteAncestor ?? false, - }; -} - -/** - * @license - * Copyright 2024 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __addDisposableResource$1 = (undefined && undefined.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -}; -var __disposeResources$1 = (undefined && undefined.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); - }; -})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}); -class CdpBrowserContext extends BrowserContext { - #connection; - #browser; - #id; - constructor(connection, browser, contextId) { - super(); - this.#connection = connection; - this.#browser = browser; - this.#id = contextId; - } - get id() { - return this.#id; - } - targets() { - return this.#browser.targets().filter(target => { - return target.browserContext() === this; - }); - } - async pages(includeAll = false) { - const pages = await Promise.all(this.targets() - .filter(target => { - return (target.type() === 'page' || - ((target.type() === 'other' || includeAll) && - this.#browser._getIsPageTargetCallback()?.(target))); - }) - .map(target => { - return target.page(); - })); - return pages.filter((page) => { - return !!page; - }); - } - async overridePermissions(origin, permissions) { - const protocolPermissions = permissions.map(permission => { - const protocolPermission = WEB_PERMISSION_TO_PROTOCOL_PERMISSION.get(permission); - if (!protocolPermission) { - throw new Error('Unknown permission: ' + permission); - } - return protocolPermission; - }); - await this.#connection.send('Browser.grantPermissions', { - origin, - browserContextId: this.#id || undefined, - permissions: protocolPermissions, - }); - } - async setPermission(origin, ...permissions) { - await Promise.all(permissions.map(async (permission) => { - const protocolPermission = { - name: permission.permission.name, - userVisibleOnly: permission.permission.userVisibleOnly, - sysex: permission.permission.sysex, - allowWithoutSanitization: permission.permission.allowWithoutSanitization, - panTiltZoom: permission.permission.panTiltZoom, - }; - await this.#connection.send('Browser.setPermission', { - origin: origin === '*' ? undefined : origin, - browserContextId: this.#id || undefined, - permission: protocolPermission, - setting: permission.state, - }); - })); - } - async clearPermissionOverrides() { - await this.#connection.send('Browser.resetPermissions', { - browserContextId: this.#id || undefined, - }); - } - async newPage(options) { - const env_1 = { stack: [], error: void 0, hasError: false }; - try { - const _guard = __addDisposableResource$1(env_1, await this.waitForScreenshotOperations(), false); - return await this.#browser._createPageInContext(this.#id, options); - } - catch (e_1) { - env_1.error = e_1; - env_1.hasError = true; - } - finally { - __disposeResources$1(env_1); - } - } - browser() { - return this.#browser; - } - async close() { - assert(this.#id, 'Default BrowserContext cannot be closed!'); - await this.#browser._disposeContext(this.#id); - } - async cookies() { - const { cookies } = await this.#connection.send('Storage.getCookies', { - browserContextId: this.#id, - }); - return cookies.map(cookie => { - return { - ...cookie, - partitionKey: cookie.partitionKey - ? { - sourceOrigin: cookie.partitionKey.topLevelSite, - hasCrossSiteAncestor: cookie.partitionKey.hasCrossSiteAncestor, - } - : undefined, - sameParty: false, - }; - }); - } - async setCookie(...cookies) { - return await this.#connection.send('Storage.setCookies', { - browserContextId: this.#id, - cookies: cookies.map(cookie => { - return { - ...cookie, - partitionKey: convertCookiesPartitionKeyFromPuppeteerToCdp(cookie.partitionKey), - sameSite: convertSameSiteFromPuppeteerToCdp(cookie.sameSite), - }; - }), - }); - } - async setDownloadBehavior(downloadBehavior) { - await this.#connection.send('Browser.setDownloadBehavior', { - behavior: downloadBehavior.policy, - downloadPath: downloadBehavior.downloadPath, - browserContextId: this.#id, - }); - } -} - -/** - * @license - * Copyright 2019 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var InitializationStatus; -(function (InitializationStatus) { - InitializationStatus["SUCCESS"] = "success"; - InitializationStatus["ABORTED"] = "aborted"; -})(InitializationStatus || (InitializationStatus = {})); -class CdpTarget extends Target$1 { - #browserContext; - #session; - #targetInfo; - #targetManager; - #sessionFactory; - #childTargets = new Set(); - _initializedDeferred = Deferred.create(); - _isClosedDeferred = Deferred.create(); - _targetId; - constructor(targetInfo, session, browserContext, targetManager, sessionFactory) { - super(); - this.#session = session; - this.#targetManager = targetManager; - this.#targetInfo = targetInfo; - this.#browserContext = browserContext; - this._targetId = targetInfo.targetId; - this.#sessionFactory = sessionFactory; - if (this.#session) { - this.#session.setTarget(this); - } - } - async asPage() { - const session = this._session(); - if (!session) { - return await this.createCDPSession().then(client => { - return CdpPage._create(client, this, null); - }); - } - return await CdpPage._create(session, this, null); - } - _subtype() { - return this.#targetInfo.subtype; - } - _session() { - return this.#session; - } - _addChildTarget(target) { - this.#childTargets.add(target); - } - _removeChildTarget(target) { - this.#childTargets.delete(target); - } - _childTargets() { - return this.#childTargets; - } - _sessionFactory() { - if (!this.#sessionFactory) { - throw new Error('sessionFactory is not initialized'); - } - return this.#sessionFactory; - } - createCDPSession() { - if (!this.#sessionFactory) { - throw new Error('sessionFactory is not initialized'); - } - return this.#sessionFactory(false).then(session => { - session.setTarget(this); - return session; - }); - } - url() { - return this.#targetInfo.url; - } - type() { - const type = this.#targetInfo.type; - switch (type) { - case 'page': - return TargetType.PAGE; - case 'background_page': - return TargetType.BACKGROUND_PAGE; - case 'service_worker': - return TargetType.SERVICE_WORKER; - case 'shared_worker': - return TargetType.SHARED_WORKER; - case 'browser': - return TargetType.BROWSER; - case 'webview': - return TargetType.WEBVIEW; - case 'tab': - return TargetType.TAB; - default: - return TargetType.OTHER; - } - } - _targetManager() { - if (!this.#targetManager) { - throw new Error('targetManager is not initialized'); - } - return this.#targetManager; - } - _getTargetInfo() { - return this.#targetInfo; - } - browser() { - if (!this.#browserContext) { - throw new Error('browserContext is not initialized'); - } - return this.#browserContext.browser(); - } - browserContext() { - if (!this.#browserContext) { - throw new Error('browserContext is not initialized'); - } - return this.#browserContext; - } - opener() { - const { openerId } = this.#targetInfo; - if (!openerId) { - return; - } - return this.browser() - .targets() - .find(target => { - return target._targetId === openerId; - }); - } - _targetInfoChanged(targetInfo) { - this.#targetInfo = targetInfo; - this._checkIfInitialized(); - } - _initialize() { - this._initializedDeferred.resolve(InitializationStatus.SUCCESS); - } - _isTargetExposed() { - return this.type() !== TargetType.TAB && !this._subtype(); - } - _checkIfInitialized() { - if (!this._initializedDeferred.resolved()) { - this._initializedDeferred.resolve(InitializationStatus.SUCCESS); - } - } -} -class PageTarget extends CdpTarget { - #defaultViewport; - pagePromise; - constructor(targetInfo, session, browserContext, targetManager, sessionFactory, defaultViewport) { - super(targetInfo, session, browserContext, targetManager, sessionFactory); - this.#defaultViewport = defaultViewport ?? undefined; - } - _initialize() { - this._initializedDeferred - .valueOrThrow() - .then(async (result) => { - if (result === InitializationStatus.ABORTED) { - return; - } - const opener = this.opener(); - if (!(opener instanceof PageTarget)) { - return; - } - if (!opener || !opener.pagePromise || this.type() !== 'page') { - return true; - } - const openerPage = await opener.pagePromise; - if (!openerPage.listenerCount("popup" )) { - return true; - } - const popupPage = await this.page(); - openerPage.emit("popup" , popupPage); - return true; - }) - .catch(debugError); - this._checkIfInitialized(); - } - async page() { - if (!this.pagePromise) { - const session = this._session(); - this.pagePromise = (session - ? Promise.resolve(session) - : this._sessionFactory()( false)).then(client => { - return CdpPage._create(client, this, this.#defaultViewport ?? null); - }); - } - return (await this.pagePromise) ?? null; - } - _checkIfInitialized() { - if (this._initializedDeferred.resolved()) { - return; - } - if (this._getTargetInfo().url !== '') { - this._initializedDeferred.resolve(InitializationStatus.SUCCESS); - } - } -} -class DevToolsTarget extends PageTarget { -} -class WorkerTarget extends CdpTarget { - #workerPromise; - async worker() { - if (!this.#workerPromise) { - const session = this._session(); - this.#workerPromise = (session - ? Promise.resolve(session) - : this._sessionFactory()( false)).then(client => { - return new CdpWebWorker(client, this._getTargetInfo().url, this._targetId, this.type(), () => { } , () => { } , undefined ); - }); - } - return await this.#workerPromise; - } -} -class OtherTarget extends CdpTarget { -} - -/** - * @license - * Copyright 2022 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function isPageTargetBecomingPrimary(target, newTargetInfo) { - return Boolean(target._subtype()) && !newTargetInfo.subtype; -} -let TargetManager$1 = class TargetManager extends EventEmitter { - #connection; - #discoveredTargetsByTargetId = new Map(); - #attachedTargetsByTargetId = new Map(); - #attachedTargetsBySessionId = new Map(); - #ignoredTargets = new Set(); - #targetFilterCallback; - #targetFactory; - #attachedToTargetListenersBySession = new WeakMap(); - #detachedFromTargetListenersBySession = new WeakMap(); - #initializeDeferred = Deferred.create(); - #waitForInitiallyDiscoveredTargets = true; - #discoveryFilter = [{}]; - #targetsIdsForInit = new Set(); - #initialAttachDone = false; - constructor(connection, targetFactory, targetFilterCallback, waitForInitiallyDiscoveredTargets = true) { - super(); - this.#connection = connection; - this.#targetFilterCallback = targetFilterCallback; - this.#targetFactory = targetFactory; - this.#waitForInitiallyDiscoveredTargets = waitForInitiallyDiscoveredTargets; - this.#connection.on('Target.targetCreated', this.#onTargetCreated); - this.#connection.on('Target.targetDestroyed', this.#onTargetDestroyed); - this.#connection.on('Target.targetInfoChanged', this.#onTargetInfoChanged); - this.#connection.on(CDPSessionEvent.SessionDetached, this.#onSessionDetached); - this.#setupAttachmentListeners(this.#connection); - } - async initialize() { - await this.#connection.send('Target.setDiscoverTargets', { - discover: true, - filter: this.#discoveryFilter, - }); - await this.#connection.send('Target.setAutoAttach', { - waitForDebuggerOnStart: true, - flatten: true, - autoAttach: true, - filter: [ - { - type: 'page', - exclude: true, - }, - ...this.#discoveryFilter, - ], - }); - this.#initialAttachDone = true; - this.#finishInitializationIfReady(); - await this.#initializeDeferred.valueOrThrow(); - } - getChildTargets(target) { - return target._childTargets(); - } - dispose() { - this.#connection.off('Target.targetCreated', this.#onTargetCreated); - this.#connection.off('Target.targetDestroyed', this.#onTargetDestroyed); - this.#connection.off('Target.targetInfoChanged', this.#onTargetInfoChanged); - this.#connection.off(CDPSessionEvent.SessionDetached, this.#onSessionDetached); - this.#removeAttachmentListeners(this.#connection); - } - getAvailableTargets() { - return this.#attachedTargetsByTargetId; - } - #setupAttachmentListeners(session) { - const listener = (event) => { - void this.#onAttachedToTarget(session, event); - }; - assert(!this.#attachedToTargetListenersBySession.has(session)); - this.#attachedToTargetListenersBySession.set(session, listener); - session.on('Target.attachedToTarget', listener); - const detachedListener = (event) => { - return this.#onDetachedFromTarget(session, event); - }; - assert(!this.#detachedFromTargetListenersBySession.has(session)); - this.#detachedFromTargetListenersBySession.set(session, detachedListener); - session.on('Target.detachedFromTarget', detachedListener); - } - #removeAttachmentListeners(session) { - const listener = this.#attachedToTargetListenersBySession.get(session); - if (listener) { - session.off('Target.attachedToTarget', listener); - this.#attachedToTargetListenersBySession.delete(session); - } - const detachedListener = this.#detachedFromTargetListenersBySession.get(session); - if (detachedListener) { - session.off('Target.detachedFromTarget', detachedListener); - this.#detachedFromTargetListenersBySession.delete(session); - } - } - #silentDetach = async (session, parentSession) => { - await session.send('Runtime.runIfWaitingForDebugger').catch(debugError); - await parentSession - .send('Target.detachFromTarget', { - sessionId: session.id(), - }) - .catch(debugError); - }; - #getParentTarget = (parentSession) => { - return parentSession instanceof CdpCDPSession - ? parentSession.target() - : null; - }; - #onSessionDetached = (session) => { - this.#removeAttachmentListeners(session); - }; - #onTargetCreated = async (event) => { - this.#discoveredTargetsByTargetId.set(event.targetInfo.targetId, event.targetInfo); - this.emit("targetDiscovered" , event.targetInfo); - if (event.targetInfo.type === 'browser' && event.targetInfo.attached) { - if (this.#attachedTargetsByTargetId.has(event.targetInfo.targetId)) { - return; - } - const target = this.#targetFactory(event.targetInfo, undefined); - target._initialize(); - this.#attachedTargetsByTargetId.set(event.targetInfo.targetId, target); - } - }; - #onTargetDestroyed = (event) => { - const targetInfo = this.#discoveredTargetsByTargetId.get(event.targetId); - this.#discoveredTargetsByTargetId.delete(event.targetId); - this.#finishInitializationIfReady(event.targetId); - if (targetInfo?.type === 'service_worker') { - const target = this.#attachedTargetsByTargetId.get(event.targetId); - if (target) { - this.emit("targetGone" , target); - this.#attachedTargetsByTargetId.delete(event.targetId); - } - } - }; - #onTargetInfoChanged = (event) => { - this.#discoveredTargetsByTargetId.set(event.targetInfo.targetId, event.targetInfo); - if (this.#ignoredTargets.has(event.targetInfo.targetId) || - !event.targetInfo.attached) { - return; - } - const target = this.#attachedTargetsByTargetId.get(event.targetInfo.targetId); - if (!target) { - return; - } - const previousURL = target.url(); - const wasInitialized = target._initializedDeferred.value() === InitializationStatus.SUCCESS; - if (isPageTargetBecomingPrimary(target, event.targetInfo)) { - const session = target._session(); - assert(session, 'Target that is being activated is missing a CDPSession.'); - session.parentSession()?.emit(CDPSessionEvent.Swapped, session); - } - target._targetInfoChanged(event.targetInfo); - if (wasInitialized && previousURL !== target.url()) { - this.emit("targetChanged" , { - target, - wasInitialized, - previousURL, - }); - } - }; - #onAttachedToTarget = async (parentSession, event) => { - const targetInfo = event.targetInfo; - const session = this.#connection._session(event.sessionId); - if (!session) { - throw new Error(`Session ${event.sessionId} was not created.`); - } - if (!this.#connection.isAutoAttached(targetInfo.targetId)) { - return; - } - if (targetInfo.type === 'service_worker') { - await this.#silentDetach(session, parentSession); - if (this.#attachedTargetsByTargetId.has(targetInfo.targetId)) { - return; - } - const target = this.#targetFactory(targetInfo); - target._initialize(); - this.#attachedTargetsByTargetId.set(targetInfo.targetId, target); - this.emit("targetAvailable" , target); - return; - } - let target = this.#attachedTargetsByTargetId.get(targetInfo.targetId); - const isExistingTarget = target !== undefined; - if (!target) { - target = this.#targetFactory(targetInfo, session, parentSession instanceof CdpCDPSession ? parentSession : undefined); - } - const parentTarget = this.#getParentTarget(parentSession); - if (this.#targetFilterCallback && !this.#targetFilterCallback(target)) { - this.#ignoredTargets.add(targetInfo.targetId); - if (parentTarget?.type() === 'tab') { - this.#finishInitializationIfReady(parentTarget._targetId); - } - await this.#silentDetach(session, parentSession); - return; - } - if (this.#waitForInitiallyDiscoveredTargets && - event.targetInfo.type === 'tab' && - !this.#initialAttachDone) { - this.#targetsIdsForInit.add(event.targetInfo.targetId); - } - this.#setupAttachmentListeners(session); - if (isExistingTarget) { - session.setTarget(target); - this.#attachedTargetsBySessionId.set(session.id(), target); - } - else { - target._initialize(); - this.#attachedTargetsByTargetId.set(targetInfo.targetId, target); - this.#attachedTargetsBySessionId.set(session.id(), target); - } - parentTarget?._addChildTarget(target); - parentSession.emit(CDPSessionEvent.Ready, session); - if (!isExistingTarget) { - this.emit("targetAvailable" , target); - } - if (parentTarget?.type() === 'tab') { - this.#finishInitializationIfReady(parentTarget._targetId); - } - await Promise.all([ - session.send('Target.setAutoAttach', { - waitForDebuggerOnStart: true, - flatten: true, - autoAttach: true, - filter: this.#discoveryFilter, - }), - session.send('Runtime.runIfWaitingForDebugger'), - ]).catch(debugError); - }; - #finishInitializationIfReady(targetId) { - if (targetId !== undefined) { - this.#targetsIdsForInit.delete(targetId); - } - if (!this.#initialAttachDone) { - return; - } - if (this.#targetsIdsForInit.size === 0) { - this.#initializeDeferred.resolve(); - } - } - #onDetachedFromTarget = (parentSession, event) => { - const target = this.#attachedTargetsBySessionId.get(event.sessionId); - this.#attachedTargetsBySessionId.delete(event.sessionId); - if (!target) { - return; - } - if (parentSession instanceof CdpCDPSession) { - parentSession.target()._removeChildTarget(target); - } - this.#attachedTargetsByTargetId.delete(target._targetId); - this.emit("targetGone" , target); - }; -}; - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function isDevToolsPageTarget(url) { - return url.startsWith('devtools://devtools/bundled/devtools_app.html'); -} -class CdpBrowser extends Browser$1 { - protocol = 'cdp'; - static async _create(connection, contextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, handleDevToolsAsPage = false) { - const browser = new CdpBrowser(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets, networkEnabled, handleDevToolsAsPage); - if (acceptInsecureCerts) { - await connection.send('Security.setIgnoreCertificateErrors', { - ignore: true, - }); - } - await browser._attach(downloadBehavior); - return browser; - } - #defaultViewport; - #process; - #connection; - #closeCallback; - #targetFilterCallback; - #isPageTargetCallback; - #defaultContext; - #contexts = new Map(); - #networkEnabled = true; - #targetManager; - #handleDevToolsAsPage = false; - constructor(connection, contextIds, defaultViewport, process, closeCallback, targetFilterCallback, isPageTargetCallback, waitForInitiallyDiscoveredTargets = true, networkEnabled = true, handleDevToolsAsPage = false) { - super(); - this.#networkEnabled = networkEnabled; - this.#defaultViewport = defaultViewport; - this.#process = process; - this.#connection = connection; - this.#closeCallback = closeCallback || (() => { }); - this.#targetFilterCallback = - targetFilterCallback || - (() => { - return true; - }); - this.#handleDevToolsAsPage = handleDevToolsAsPage; - this.#setIsPageTargetCallback(isPageTargetCallback); - this.#targetManager = new TargetManager$1(connection, this.#createTarget, this.#targetFilterCallback, waitForInitiallyDiscoveredTargets); - this.#defaultContext = new CdpBrowserContext(this.#connection, this); - for (const contextId of contextIds) { - this.#contexts.set(contextId, new CdpBrowserContext(this.#connection, this, contextId)); - } - } - #emitDisconnected = () => { - this.emit("disconnected" , undefined); - }; - async _attach(downloadBehavior) { - this.#connection.on(CDPSessionEvent.Disconnected, this.#emitDisconnected); - if (downloadBehavior) { - await this.#defaultContext.setDownloadBehavior(downloadBehavior); - } - this.#targetManager.on("targetAvailable" , this.#onAttachedToTarget); - this.#targetManager.on("targetGone" , this.#onDetachedFromTarget); - this.#targetManager.on("targetChanged" , this.#onTargetChanged); - this.#targetManager.on("targetDiscovered" , this.#onTargetDiscovered); - await this.#targetManager.initialize(); - } - _detach() { - this.#connection.off(CDPSessionEvent.Disconnected, this.#emitDisconnected); - this.#targetManager.off("targetAvailable" , this.#onAttachedToTarget); - this.#targetManager.off("targetGone" , this.#onDetachedFromTarget); - this.#targetManager.off("targetChanged" , this.#onTargetChanged); - this.#targetManager.off("targetDiscovered" , this.#onTargetDiscovered); - } - process() { - return this.#process ?? null; - } - _targetManager() { - return this.#targetManager; - } - #setIsPageTargetCallback(isPageTargetCallback) { - this.#isPageTargetCallback = - isPageTargetCallback || - ((target) => { - return (target.type() === 'page' || - target.type() === 'background_page' || - target.type() === 'webview' || - (this.#handleDevToolsAsPage && - target.type() === 'other' && - isDevToolsPageTarget(target.url()))); - }); - } - _getIsPageTargetCallback() { - return this.#isPageTargetCallback; - } - async createBrowserContext(options = {}) { - const { proxyServer, proxyBypassList, downloadBehavior } = options; - const { browserContextId } = await this.#connection.send('Target.createBrowserContext', { - proxyServer, - proxyBypassList: proxyBypassList && proxyBypassList.join(','), - }); - const context = new CdpBrowserContext(this.#connection, this, browserContextId); - if (downloadBehavior) { - await context.setDownloadBehavior(downloadBehavior); - } - this.#contexts.set(browserContextId, context); - return context; - } - browserContexts() { - return [this.#defaultContext, ...Array.from(this.#contexts.values())]; - } - defaultBrowserContext() { - return this.#defaultContext; - } - async _disposeContext(contextId) { - if (!contextId) { - return; - } - await this.#connection.send('Target.disposeBrowserContext', { - browserContextId: contextId, - }); - this.#contexts.delete(contextId); - } - #createTarget = (targetInfo, session) => { - const { browserContextId } = targetInfo; - const context = browserContextId && this.#contexts.has(browserContextId) - ? this.#contexts.get(browserContextId) - : this.#defaultContext; - if (!context) { - throw new Error('Missing browser context'); - } - const createSession = (isAutoAttachEmulated) => { - return this.#connection._createSession(targetInfo, isAutoAttachEmulated); - }; - const otherTarget = new OtherTarget(targetInfo, session, context, this.#targetManager, createSession); - if (targetInfo.url && isDevToolsPageTarget(targetInfo.url)) { - return new DevToolsTarget(targetInfo, session, context, this.#targetManager, createSession, this.#defaultViewport ?? null); - } - if (this.#isPageTargetCallback(otherTarget)) { - return new PageTarget(targetInfo, session, context, this.#targetManager, createSession, this.#defaultViewport ?? null); - } - if (targetInfo.type === 'service_worker' || - targetInfo.type === 'shared_worker') { - return new WorkerTarget(targetInfo, session, context, this.#targetManager, createSession); - } - return otherTarget; - }; - #onAttachedToTarget = async (target) => { - if (target._isTargetExposed() && - (await target._initializedDeferred.valueOrThrow()) === - InitializationStatus.SUCCESS) { - this.emit("targetcreated" , target); - target.browserContext().emit("targetcreated" , target); - } - }; - #onDetachedFromTarget = async (target) => { - target._initializedDeferred.resolve(InitializationStatus.ABORTED); - target._isClosedDeferred.resolve(); - if (target._isTargetExposed() && - (await target._initializedDeferred.valueOrThrow()) === - InitializationStatus.SUCCESS) { - this.emit("targetdestroyed" , target); - target.browserContext().emit("targetdestroyed" , target); - } - }; - #onTargetChanged = ({ target }) => { - this.emit("targetchanged" , target); - target.browserContext().emit("targetchanged" , target); - }; - #onTargetDiscovered = (targetInfo) => { - this.emit("targetdiscovered" , targetInfo); - }; - wsEndpoint() { - return this.#connection.url(); - } - async newPage(options) { - return await this.#defaultContext.newPage(options); - } - async _createPageInContext(contextId, options) { - const hasTargets = this.targets().filter(t => { - return t.browserContext().id === contextId; - }).length > 0; - const windowBounds = options?.type === 'window' ? options.windowBounds : undefined; - const { targetId } = await this.#connection.send('Target.createTarget', { - url: 'about:blank', - browserContextId: contextId || undefined, - left: windowBounds?.left, - top: windowBounds?.top, - width: windowBounds?.width, - height: windowBounds?.height, - windowState: windowBounds?.windowState, - newWindow: hasTargets && options?.type === 'window' ? true : undefined, - background: options?.background, - }); - const target = (await this.waitForTarget(t => { - return t._targetId === targetId; - })); - if (!target) { - throw new Error(`Missing target for page (id = ${targetId})`); - } - const initialized = (await target._initializedDeferred.valueOrThrow()) === - InitializationStatus.SUCCESS; - if (!initialized) { - throw new Error(`Failed to create target for page (id = ${targetId})`); - } - const page = await target.page(); - if (!page) { - throw new Error(`Failed to create a page for context (id = ${contextId})`); - } - return page; - } - async _createDevToolsPage(pageTargetId) { - const openDevToolsResponse = await this.#connection.send('Target.openDevTools', { - targetId: pageTargetId, - }); - const target = (await this.waitForTarget(t => { - return t._targetId === openDevToolsResponse.targetId; - })); - if (!target) { - throw new Error(`Missing target for DevTools page (id = ${pageTargetId})`); - } - const initialized = (await target._initializedDeferred.valueOrThrow()) === - InitializationStatus.SUCCESS; - if (!initialized) { - throw new Error(`Failed to create target for DevTools page (id = ${pageTargetId})`); - } - const page = await target.page(); - if (!page) { - throw new Error(`Failed to create a DevTools Page for target (id = ${pageTargetId})`); - } - return page; - } - async _hasDevToolsTarget(pageTargetId) { - const response = await this.#connection.send('Target.getDevToolsTarget', { - targetId: pageTargetId, - }); - return response.targetId; - } - async installExtension(path) { - const { id } = await this.#connection.send('Extensions.loadUnpacked', { path }); - return id; - } - uninstallExtension(id) { - return this.#connection.send('Extensions.uninstall', { id }); - } - async screens() { - const { screenInfos } = await this.#connection.send('Emulation.getScreenInfos'); - return screenInfos; - } - async addScreen(params) { - const { screenInfo } = await this.#connection.send('Emulation.addScreen', params); - return screenInfo; - } - async removeScreen(screenId) { - return await this.#connection.send('Emulation.removeScreen', { screenId }); - } - async getWindowBounds(windowId) { - const { bounds } = await this.#connection.send('Browser.getWindowBounds', { - windowId: Number(windowId), - }); - return bounds; - } - async setWindowBounds(windowId, windowBounds) { - await this.#connection.send('Browser.setWindowBounds', { - windowId: Number(windowId), - bounds: windowBounds, - }); - } - targets() { - return Array.from(this.#targetManager.getAvailableTargets().values()).filter(target => { - return (target._isTargetExposed() && - target._initializedDeferred.value() === InitializationStatus.SUCCESS); - }); - } - target() { - const browserTarget = this.targets().find(target => { - return target.type() === 'browser'; - }); - if (!browserTarget) { - throw new Error('Browser target is not found'); - } - return browserTarget; - } - async version() { - const version = await this.#getVersion(); - return version.product; - } - async userAgent() { - const version = await this.#getVersion(); - return version.userAgent; - } - async close() { - await this.#closeCallback.call(null); - await this.disconnect(); - } - disconnect() { - this.#targetManager.dispose(); - this.#connection.dispose(); - this._detach(); - return Promise.resolve(); - } - get connected() { - return !this.#connection._closed; - } - #getVersion() { - return this.#connection.send('Browser.getVersion'); - } - get debugInfo() { - return { - pendingProtocolErrors: this.#connection.getPendingProtocolErrors(), - }; - } - isNetworkEnabled() { - return this.#networkEnabled; - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -async function _connectToCdpBrowser(connectionTransport, url, options) { - const { acceptInsecureCerts = false, networkEnabled = true, defaultViewport = DEFAULT_VIEWPORT, downloadBehavior, targetFilter, _isPageTarget: isPageTarget, slowMo = 0, protocolTimeout, handleDevToolsAsPage, idGenerator = createIncrementalIdGenerator(), } = options; - const connection = new Connection(url, connectionTransport, slowMo, protocolTimeout, - false, idGenerator); - const { browserContextIds } = await connection.send('Target.getBrowserContexts'); - const browser = await CdpBrowser._create(connection, browserContextIds, acceptInsecureCerts, defaultViewport, downloadBehavior, undefined, () => { - return connection.send('Browser.close').catch(debugError); - }, targetFilter, isPageTarget, undefined, networkEnabled, handleDevToolsAsPage); - return browser; -} - -/** - * @license - * Copyright 2021 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const PredefinedNetworkConditions = Object.freeze({ - 'Slow 3G': { - download: ((500 * 1000) / 8) * 0.8, - upload: ((500 * 1000) / 8) * 0.8, - latency: 400 * 5, - }, - 'Fast 3G': { - download: ((1.6 * 1000 * 1000) / 8) * 0.9, - upload: ((750 * 1000) / 8) * 0.9, - latency: 150 * 3.75, - }, - 'Slow 4G': { - download: ((1.6 * 1000 * 1000) / 8) * 0.9, - upload: ((750 * 1000) / 8) * 0.9, - latency: 150 * 3.75, - }, - 'Fast 4G': { - download: ((9 * 1000 * 1000) / 8) * 0.9, - upload: ((1.5 * 1000 * 1000) / 8) * 0.9, - latency: 60 * 2.75, - }, -}); - -class BrowserWebSocketTransport { - static create(url) { - return new Promise((resolve, reject) => { - const ws = new WebSocket(url); - ws.addEventListener('open', () => { - return resolve(new BrowserWebSocketTransport(ws)); - }); - ws.addEventListener('error', reject); - }); - } - #ws; - onmessage; - onclose; - constructor(ws) { - this.#ws = ws; - this.#ws.addEventListener('message', event => { - if (this.onmessage) { - this.onmessage.call(null, event.data); - } - }); - this.#ws.addEventListener('close', () => { - if (this.onclose) { - this.onclose.call(null); - } - }); - this.#ws.addEventListener('error', () => { }); - } - send(message) { - this.#ws.send(message); - } - close() { - this.#ws.close(); - } -} - -var BrowserWebSocketTransport$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - BrowserWebSocketTransport: BrowserWebSocketTransport -}); - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const knownDevices = [ - { - name: 'Blackberry PlayBook', - userAgent: 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+', - viewport: { - width: 600, - height: 1024, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Blackberry PlayBook landscape', - userAgent: 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+', - viewport: { - width: 1024, - height: 600, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'BlackBerry Z30', - userAgent: 'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'BlackBerry Z30 landscape', - userAgent: 'Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy Note 3', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy Note 3 landscape', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy Note II', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy Note II landscape', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy S III', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy S III landscape', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy S5', - userAgent: 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy S5 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy S8', - userAgent: 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36', - viewport: { - width: 360, - height: 740, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy S8 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36', - viewport: { - width: 740, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy S9+', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36', - viewport: { - width: 320, - height: 658, - deviceScaleFactor: 4.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy S9+ landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36', - viewport: { - width: 658, - height: 320, - deviceScaleFactor: 4.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Galaxy Tab S4', - userAgent: 'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36', - viewport: { - width: 712, - height: 1138, - deviceScaleFactor: 2.25, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Galaxy Tab S4 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36', - viewport: { - width: 1138, - height: 712, - deviceScaleFactor: 2.25, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPad', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', - viewport: { - width: 768, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPad landscape', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', - viewport: { - width: 1024, - height: 768, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPad (gen 6)', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 768, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPad (gen 6) landscape', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 1024, - height: 768, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPad (gen 7)', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 810, - height: 1080, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPad (gen 7) landscape', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 1080, - height: 810, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPad Mini', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', - viewport: { - width: 768, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPad Mini landscape', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', - viewport: { - width: 1024, - height: 768, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPad Pro', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', - viewport: { - width: 1024, - height: 1366, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPad Pro landscape', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1', - viewport: { - width: 1366, - height: 1024, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPad Pro 11', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 834, - height: 1194, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPad Pro 11 landscape', - userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 1194, - height: 834, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 4', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53', - viewport: { - width: 320, - height: 480, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 4 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53', - viewport: { - width: 480, - height: 320, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 5', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1', - viewport: { - width: 320, - height: 568, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 5 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1', - viewport: { - width: 568, - height: 320, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 6', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 375, - height: 667, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 6 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 667, - height: 375, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 6 Plus', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 414, - height: 736, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 6 Plus landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 736, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 7', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 375, - height: 667, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 7 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 667, - height: 375, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 7 Plus', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 414, - height: 736, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 7 Plus landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 736, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 8', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 375, - height: 667, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 8 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 667, - height: 375, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 8 Plus', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 414, - height: 736, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 8 Plus landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 736, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone SE', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1', - viewport: { - width: 320, - height: 568, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone SE landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1', - viewport: { - width: 568, - height: 320, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone X', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 375, - height: 812, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone X landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1', - viewport: { - width: 812, - height: 375, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone XR', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1', - viewport: { - width: 414, - height: 896, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone XR landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1', - viewport: { - width: 896, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 11', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1', - viewport: { - width: 414, - height: 828, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 11 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1', - viewport: { - width: 828, - height: 414, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 11 Pro', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1', - viewport: { - width: 375, - height: 812, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 11 Pro landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1', - viewport: { - width: 812, - height: 375, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 11 Pro Max', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1', - viewport: { - width: 414, - height: 896, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 11 Pro Max landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1', - viewport: { - width: 896, - height: 414, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 12', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 390, - height: 844, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 12 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 844, - height: 390, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 12 Pro', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 390, - height: 844, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 12 Pro landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 844, - height: 390, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 12 Pro Max', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 428, - height: 926, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 12 Pro Max landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 926, - height: 428, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 12 Mini', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 375, - height: 812, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 12 Mini landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 812, - height: 375, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 13', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 390, - height: 844, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 13 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 844, - height: 390, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 13 Pro', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 390, - height: 844, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 13 Pro landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 844, - height: 390, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 13 Pro Max', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 428, - height: 926, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 13 Pro Max landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 926, - height: 428, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 13 Mini', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 375, - height: 812, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 13 Mini landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1', - viewport: { - width: 812, - height: 375, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 14', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 390, - height: 663, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 14 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 750, - height: 340, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 14 Plus', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 428, - height: 745, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 14 Plus landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 832, - height: 378, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 14 Pro', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 393, - height: 659, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 14 Pro landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 734, - height: 343, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 14 Pro Max', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 430, - height: 739, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 14 Pro Max landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', - viewport: { - width: 814, - height: 380, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 15', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 393, - height: 659, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 15 landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 734, - height: 343, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 15 Plus', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 430, - height: 739, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 15 Plus landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 814, - height: 380, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 15 Pro', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 393, - height: 659, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 15 Pro landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 734, - height: 343, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'iPhone 15 Pro Max', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 430, - height: 739, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'iPhone 15 Pro Max landscape', - userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1', - viewport: { - width: 814, - height: 380, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'JioPhone 2', - userAgent: 'Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5', - viewport: { - width: 240, - height: 320, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'JioPhone 2 landscape', - userAgent: 'Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5', - viewport: { - width: 320, - height: 240, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Kindle Fire HDX', - userAgent: 'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true', - viewport: { - width: 800, - height: 1280, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Kindle Fire HDX landscape', - userAgent: 'Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true', - viewport: { - width: 1280, - height: 800, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'LG Optimus L70', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 384, - height: 640, - deviceScaleFactor: 1.25, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'LG Optimus L70 landscape', - userAgent: 'Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 640, - height: 384, - deviceScaleFactor: 1.25, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Microsoft Lumia 550', - userAgent: 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Microsoft Lumia 950', - userAgent: 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 4, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Microsoft Lumia 950 landscape', - userAgent: 'Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 4, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 10', - userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36', - viewport: { - width: 800, - height: 1280, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 10 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36', - viewport: { - width: 1280, - height: 800, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 4', - userAgent: 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 384, - height: 640, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 4 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 640, - height: 384, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 5', - userAgent: 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 5 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 5X', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 412, - height: 732, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 5X landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 732, - height: 412, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 6', - userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 412, - height: 732, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 6 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 732, - height: 412, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 6P', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 412, - height: 732, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 6P landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 732, - height: 412, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nexus 7', - userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36', - viewport: { - width: 600, - height: 960, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nexus 7 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36', - viewport: { - width: 960, - height: 600, - deviceScaleFactor: 2, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nokia Lumia 520', - userAgent: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)', - viewport: { - width: 320, - height: 533, - deviceScaleFactor: 1.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nokia Lumia 520 landscape', - userAgent: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)', - viewport: { - width: 533, - height: 320, - deviceScaleFactor: 1.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Nokia N9', - userAgent: 'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13', - viewport: { - width: 480, - height: 854, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Nokia N9 landscape', - userAgent: 'Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13', - viewport: { - width: 854, - height: 480, - deviceScaleFactor: 1, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Pixel 2', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 411, - height: 731, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Pixel 2 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 731, - height: 411, - deviceScaleFactor: 2.625, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Pixel 2 XL', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 411, - height: 823, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Pixel 2 XL landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Mobile Safari/537.36', - viewport: { - width: 823, - height: 411, - deviceScaleFactor: 3.5, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Pixel 3', - userAgent: 'Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36', - viewport: { - width: 393, - height: 786, - deviceScaleFactor: 2.75, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Pixel 3 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36', - viewport: { - width: 786, - height: 393, - deviceScaleFactor: 2.75, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Pixel 4', - userAgent: 'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36', - viewport: { - width: 353, - height: 745, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Pixel 4 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36', - viewport: { - width: 745, - height: 353, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Pixel 4a (5G)', - userAgent: 'Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36', - viewport: { - width: 353, - height: 745, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Pixel 4a (5G) landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 11; Pixel 4a (5G)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36', - viewport: { - width: 745, - height: 353, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Pixel 5', - userAgent: 'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36', - viewport: { - width: 393, - height: 851, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Pixel 5 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36', - viewport: { - width: 851, - height: 393, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, - { - name: 'Moto G4', - userAgent: 'Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36', - viewport: { - width: 360, - height: 640, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: false, - }, - }, - { - name: 'Moto G4 landscape', - userAgent: 'Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4812.0 Mobile Safari/537.36', - viewport: { - width: 640, - height: 360, - deviceScaleFactor: 3, - isMobile: true, - hasTouch: true, - isLandscape: true, - }, - }, -]; -const knownDevicesByName = {}; -for (const device of knownDevices) { - knownDevicesByName[device.name] = device; -} -const KnownDevices = Object.freeze(knownDevicesByName); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -async function _connectToBiDiBrowser(connectionTransport, url, options) { - const { acceptInsecureCerts = false, networkEnabled = true, defaultViewport = DEFAULT_VIEWPORT, } = options; - const { bidiConnection, cdpConnection, closeCallback } = await getBiDiConnection(connectionTransport, url, options); - const BiDi = await import( '../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js'); - const bidiBrowser = await BiDi.BidiBrowser.create({ - connection: bidiConnection, - cdpConnection, - closeCallback, - process: undefined, - defaultViewport: defaultViewport, - acceptInsecureCerts: acceptInsecureCerts, - networkEnabled, - capabilities: options.capabilities, - }); - return bidiBrowser; -} -async function getBiDiConnection(connectionTransport, url, options) { - const BiDi = await import( '../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js'); - const { slowMo = 0, protocolTimeout, idGenerator = createIncrementalIdGenerator(), } = options; - const pureBidiConnection = new BiDi.BidiConnection(url, connectionTransport, idGenerator, slowMo, protocolTimeout); - try { - const result = await pureBidiConnection.send('session.status', {}); - if ('type' in result && result.type === 'success') { - return { - bidiConnection: pureBidiConnection, - closeCallback: async () => { - await pureBidiConnection.send('browser.close', {}).catch(debugError); - }, - }; - } - } - catch (e) { - if (!(e instanceof ProtocolError)) { - throw e; - } - } - pureBidiConnection.unbind(); - const cdpConnection = new Connection(url, connectionTransport, slowMo, protocolTimeout, - true, idGenerator); - const version = await cdpConnection.send('Browser.getVersion'); - if (version.product.toLowerCase().includes('firefox')) { - throw new UnsupportedOperation('Firefox is not supported in BiDi over CDP mode.'); - } - const bidiOverCdpConnection = await BiDi.connectBidiOverCdp(cdpConnection); - return { - cdpConnection, - bidiConnection: bidiOverCdpConnection, - closeCallback: async () => { - await cdpConnection.send('Browser.close').catch(debugError); - }, - }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const getWebSocketTransportClass = async () => { - return isNode - ? (await Promise.resolve().then(function () { return NodeWebSocketTransport$1; })).NodeWebSocketTransport - : (await Promise.resolve().then(function () { return BrowserWebSocketTransport$1; })) - .BrowserWebSocketTransport; -}; -async function _connectToBrowser(options) { - const { connectionTransport, endpointUrl } = await getConnectionTransport(options); - if (options.protocol === 'webDriverBiDi') { - const bidiBrowser = await _connectToBiDiBrowser(connectionTransport, endpointUrl, options); - return bidiBrowser; - } - else { - const cdpBrowser = await _connectToCdpBrowser(connectionTransport, endpointUrl, options); - return cdpBrowser; - } -} -async function getConnectionTransport(options) { - const { browserWSEndpoint, browserURL, channel, transport, headers = {}, } = options; - assert(Number(!!browserWSEndpoint) + - Number(!!browserURL) + - Number(!!transport) + - Number(!!channel) === - 1, 'Exactly one of browserWSEndpoint, browserURL, transport or channel must be passed to puppeteer.connect'); - if (transport) { - return { connectionTransport: transport, endpointUrl: '' }; - } - else if (browserWSEndpoint) { - const WebSocketClass = await getWebSocketTransportClass(); - const connectionTransport = await WebSocketClass.create(browserWSEndpoint, headers); - return { - connectionTransport: connectionTransport, - endpointUrl: browserWSEndpoint, - }; - } - else if (browserURL) { - const connectionURL = await getWSEndpoint(browserURL); - const WebSocketClass = await getWebSocketTransportClass(); - const connectionTransport = await WebSocketClass.create(connectionURL); - return { - connectionTransport: connectionTransport, - endpointUrl: connectionURL, - }; - } - else if (options.channel && isNode) { - const { detectBrowserPlatform, resolveDefaultUserDataDir, Browser } = await Promise.resolve().then(function () { return main; }); - const platform = detectBrowserPlatform(); - if (!platform) { - throw new Error('Could not detect required browser platform'); - } - const { convertPuppeteerChannelToBrowsersChannel } = await Promise.resolve().then(function () { return LaunchOptions; }); - const { join } = await import('node:path'); - const userDataDir = resolveDefaultUserDataDir(Browser.CHROME, platform, convertPuppeteerChannelToBrowsersChannel(options.channel)); - const portPath = join(userDataDir, 'DevToolsActivePort'); - try { - const fileContent = await environment.value.fs.promises.readFile(portPath, 'ascii'); - const [rawPort, rawPath] = fileContent - .split('\n') - .map(line => { - return line.trim(); - }) - .filter(line => { - return !!line; - }); - if (!rawPort || !rawPath) { - throw new Error(`Invalid DevToolsActivePort '${fileContent}' found`); - } - const port = parseInt(rawPort, 10); - if (isNaN(port) || port <= 0 || port > 65535) { - throw new Error(`Invalid port '${rawPort}' found`); - } - const browserWSEndpoint = `ws://localhost:${port}${rawPath}`; - const WebSocketClass = await getWebSocketTransportClass(); - const connectionTransport = await WebSocketClass.create(browserWSEndpoint, headers); - return { - connectionTransport: connectionTransport, - endpointUrl: browserWSEndpoint, - }; - } - catch (error) { - throw new Error(`Could not find DevToolsActivePort for ${options.channel} at ${portPath}`, { - cause: error, - }); - } - } - throw new Error('Invalid connection options'); -} -async function getWSEndpoint(browserURL) { - const endpointURL = new URL('/json/version', browserURL); - try { - const result = await globalThis.fetch(endpointURL.toString(), { - method: 'GET', - }); - if (!result.ok) { - throw new Error(`HTTP ${result.statusText}`); - } - const data = await result.json(); - return data.webSocketDebuggerUrl; - } - catch (error) { - if (isErrorLike$1(error)) { - error.message = - `Failed to fetch browser webSocket URL from ${endpointURL}: ` + - error.message; - } - throw error; - } -} - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class Puppeteer { - static customQueryHandlers = customQueryHandlers; - static registerCustomQueryHandler(name, queryHandler) { - return this.customQueryHandlers.register(name, queryHandler); - } - static unregisterCustomQueryHandler(name) { - return this.customQueryHandlers.unregister(name); - } - static customQueryHandlerNames() { - return this.customQueryHandlers.names(); - } - static clearCustomQueryHandlers() { - return this.customQueryHandlers.clear(); - } - _isPuppeteerCore; - _changedBrowsers = false; - constructor(settings) { - this._isPuppeteerCore = settings.isPuppeteerCore; - this.connect = this.connect.bind(this); - } - connect(options) { - return _connectToBrowser(options); - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const PUPPETEER_REVISIONS = Object.freeze({ - chrome: '146.0.7680.153', - 'chrome-headless-shell': '146.0.7680.153', - firefox: 'stable_148.0.2', -}); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var Browser; -(function (Browser) { - Browser["CHROME"] = "chrome"; - Browser["CHROMEHEADLESSSHELL"] = "chrome-headless-shell"; - Browser["CHROMIUM"] = "chromium"; - Browser["FIREFOX"] = "firefox"; - Browser["CHROMEDRIVER"] = "chromedriver"; -})(Browser || (Browser = {})); -var BrowserPlatform; -(function (BrowserPlatform) { - BrowserPlatform["LINUX"] = "linux"; - BrowserPlatform["LINUX_ARM"] = "linux_arm"; - BrowserPlatform["MAC"] = "mac"; - BrowserPlatform["MAC_ARM"] = "mac_arm"; - BrowserPlatform["WIN32"] = "win32"; - BrowserPlatform["WIN64"] = "win64"; -})(BrowserPlatform || (BrowserPlatform = {})); -var BrowserTag; -(function (BrowserTag) { - BrowserTag["CANARY"] = "canary"; - BrowserTag["NIGHTLY"] = "nightly"; - BrowserTag["BETA"] = "beta"; - BrowserTag["DEV"] = "dev"; - BrowserTag["DEVEDITION"] = "devedition"; - BrowserTag["STABLE"] = "stable"; - BrowserTag["ESR"] = "esr"; - BrowserTag["LATEST"] = "latest"; -})(BrowserTag || (BrowserTag = {})); -var ChromeReleaseChannel; -(function (ChromeReleaseChannel) { - ChromeReleaseChannel["STABLE"] = "stable"; - ChromeReleaseChannel["DEV"] = "dev"; - ChromeReleaseChannel["CANARY"] = "canary"; - ChromeReleaseChannel["BETA"] = "beta"; -})(ChromeReleaseChannel || (ChromeReleaseChannel = {})); - -var re$1 = {exports: {}}; - -var constants$4; -var hasRequiredConstants$4; - -function requireConstants$4 () { - if (hasRequiredConstants$4) return constants$4; - hasRequiredConstants$4 = 1; - const SEMVER_SPEC_VERSION = '2.0.0'; - const MAX_LENGTH = 256; - const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - 9007199254740991; - const MAX_SAFE_COMPONENT_LENGTH = 16; - const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', - ]; - constants$4 = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, - }; - return constants$4; -} - -var debug_1; -var hasRequiredDebug$1; - -function requireDebug$1 () { - if (hasRequiredDebug$1) return debug_1; - hasRequiredDebug$1 = 1; - const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) - ) ? (...args) => console.error('SEMVER', ...args) - : () => {}; - debug_1 = debug; - return debug_1; -} - -var hasRequiredRe; - -function requireRe () { - if (hasRequiredRe) return re$1.exports; - hasRequiredRe = 1; - (function (module, exports$1) { - const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, - } = requireConstants$4(); - const debug = requireDebug$1(); - exports$1 = module.exports = {}; - const re = exports$1.re = []; - const safeRe = exports$1.safeRe = []; - const src = exports$1.src = []; - const safeSrc = exports$1.safeSrc = []; - const t = exports$1.t = {}; - let R = 0; - const LETTERDASHNUMBER = '[a-zA-Z0-9-]'; - const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], - ]; - const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`); - } - return value - }; - const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value); - const index = R++; - debug(name, index, value); - t[name] = index; - src[index] = value; - safeSrc[index] = safe; - re[index] = new RegExp(value, isGlobal ? 'g' : undefined); - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined); - }; - createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*'); - createToken('NUMERICIDENTIFIERLOOSE', '\\d+'); - createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); - createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`); - createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER] - }|${src[t.NUMERICIDENTIFIER]})`); - createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER] - }|${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] - }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); - createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] - }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`); - createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] - }(?:\\.${src[t.BUILDIDENTIFIER]})*))`); - createToken('FULLPLAIN', `v?${src[t.MAINVERSION] - }${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`); - createToken('FULL', `^${src[t.FULLPLAIN]}$`); - createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] - }${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`); - createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`); - createToken('GTLT', '((?:<|>)?=?)'); - createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`); - createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`); - createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); - createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); - createToken('COERCEPLAIN', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); - createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); - createToken('COERCEFULL', src[t.COERCEPLAIN] + - `(?:${src[t.PRERELEASE]})?` + - `(?:${src[t.BUILD]})?` + - `(?:$|[^\\d])`); - createToken('COERCERTL', src[t.COERCE], true); - createToken('COERCERTLFULL', src[t.COERCEFULL], true); - createToken('LONETILDE', '(?:~>?)'); - createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true); - exports$1.tildeTrimReplace = '$1~'; - createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); - createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken('LONECARET', '(?:\\^)'); - createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true); - exports$1.caretTrimReplace = '$1^'; - createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); - createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); - createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); - createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] - }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); - exports$1.comparatorTrimReplace = '$1$2$3'; - createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`); - createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`); - createToken('STAR', '(<|>)?=?\\s*\\*'); - createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$'); - createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$'); - } (re$1, re$1.exports)); - return re$1.exports; -} - -var parseOptions_1; -var hasRequiredParseOptions; - -function requireParseOptions () { - if (hasRequiredParseOptions) return parseOptions_1; - hasRequiredParseOptions = 1; - const looseOption = Object.freeze({ loose: true }); - const emptyOpts = Object.freeze({ }); - const parseOptions = options => { - if (!options) { - return emptyOpts - } - if (typeof options !== 'object') { - return looseOption - } - return options - }; - parseOptions_1 = parseOptions; - return parseOptions_1; -} - -var identifiers; -var hasRequiredIdentifiers; - -function requireIdentifiers () { - if (hasRequiredIdentifiers) return identifiers; - hasRequiredIdentifiers = 1; - const numeric = /^[0-9]+$/; - const compareIdentifiers = (a, b) => { - if (typeof a === 'number' && typeof b === 'number') { - return a === b ? 0 : a < b ? -1 : 1 - } - const anum = numeric.test(a); - const bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 - }; - const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); - identifiers = { - compareIdentifiers, - rcompareIdentifiers, - }; - return identifiers; -} - -var semver$2; -var hasRequiredSemver$1; - -function requireSemver$1 () { - if (hasRequiredSemver$1) return semver$2; - hasRequiredSemver$1 = 1; - const debug = requireDebug$1(); - const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants$4(); - const { safeRe: re, t } = requireRe(); - const parseOptions = requireParseOptions(); - const { compareIdentifiers } = requireIdentifiers(); - class SemVer { - constructor (version, options) { - options = parseOptions(options); - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version; - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) - } - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - debug('SemVer', version, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - this.raw = version; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }); - } - this.build = m[5] ? m[5].split('.') : []; - this.format(); - } - format () { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}`; - } - return this.version - } - toString () { - return this.version - } - compare (other) { - debug('SemVer.compare', this.version, this.options, other); - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options); - } - if (other.version === this.version) { - return 0 - } - return this.compareMain(other) || this.comparePre(other) - } - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - if (this.major < other.major) { - return -1 - } - if (this.major > other.major) { - return 1 - } - if (this.minor < other.minor) { - return -1 - } - if (this.minor > other.minor) { - return 1 - } - if (this.patch < other.patch) { - return -1 - } - if (this.patch > other.patch) { - return 1 - } - return 0 - } - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - let i = 0; - do { - const a = this.prerelease[i]; - const b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - let i = 0; - do { - const a = this.build[i]; - const b = other.build[i]; - debug('build compare', i, a, b); - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - inc (release, identifier, identifierBase) { - if (release.startsWith('pre')) { - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); - if (!match || match[1] !== identifier) { - throw new Error(`invalid identifier: ${identifier}`) - } - } - } - switch (release) { - case 'premajor': - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc('pre', identifier, identifierBase); - break - case 'preminor': - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc('pre', identifier, identifierBase); - break - case 'prepatch': - this.prerelease.length = 0; - this.inc('patch', identifier, identifierBase); - this.inc('pre', identifier, identifierBase); - break - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase); - } - this.inc('pre', identifier, identifierBase); - break - case 'release': - if (this.prerelease.length === 0) { - throw new Error(`version ${this.raw} is not a prerelease`) - } - this.prerelease.length = 0; - break - case 'major': - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break - case 'minor': - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break - case 'patch': - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break - case 'pre': { - const base = Number(identifierBase) ? 1 : 0; - if (this.prerelease.length === 0) { - this.prerelease = [base]; - } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base); - } - } - if (identifier) { - let prerelease = [identifier, base]; - if (identifierBase === false) { - prerelease = [identifier]; - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease; - } - } else { - this.prerelease = prerelease; - } - } - break - } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format(); - if (this.build.length) { - this.raw += `+${this.build.join('.')}`; - } - return this - } - } - semver$2 = SemVer; - return semver$2; -} - -var parse_1; -var hasRequiredParse; - -function requireParse () { - if (hasRequiredParse) return parse_1; - hasRequiredParse = 1; - const SemVer = requireSemver$1(); - const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er - } - }; - parse_1 = parse; - return parse_1; -} - -var valid_1; -var hasRequiredValid$1; - -function requireValid$1 () { - if (hasRequiredValid$1) return valid_1; - hasRequiredValid$1 = 1; - const parse = requireParse(); - const valid = (version, options) => { - const v = parse(version, options); - return v ? v.version : null - }; - valid_1 = valid; - return valid_1; -} - -var clean_1; -var hasRequiredClean; - -function requireClean () { - if (hasRequiredClean) return clean_1; - hasRequiredClean = 1; - const parse = requireParse(); - const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options); - return s ? s.version : null - }; - clean_1 = clean; - return clean_1; -} - -var inc_1; -var hasRequiredInc; - -function requireInc () { - if (hasRequiredInc) return inc_1; - hasRequiredInc = 1; - const SemVer = requireSemver$1(); - const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier; - identifier = options; - options = undefined; - } - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } - }; - inc_1 = inc; - return inc_1; -} - -var diff_1; -var hasRequiredDiff; - -function requireDiff () { - if (hasRequiredDiff) return diff_1; - hasRequiredDiff = 1; - const parse = requireParse(); - const diff = (version1, version2) => { - const v1 = parse(version1, null, true); - const v2 = parse(version2, null, true); - const comparison = v1.compare(v2); - if (comparison === 0) { - return null - } - const v1Higher = comparison > 0; - const highVersion = v1Higher ? v1 : v2; - const lowVersion = v1Higher ? v2 : v1; - const highHasPre = !!highVersion.prerelease.length; - const lowHasPre = !!lowVersion.prerelease.length; - if (lowHasPre && !highHasPre) { - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } - if (lowVersion.compareMain(highVersion) === 0) { - if (lowVersion.minor && !lowVersion.patch) { - return 'minor' - } - return 'patch' - } - } - const prefix = highHasPre ? 'pre' : ''; - if (v1.major !== v2.major) { - return prefix + 'major' - } - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } - return 'prerelease' - }; - diff_1 = diff; - return diff_1; -} - -var major_1; -var hasRequiredMajor; - -function requireMajor () { - if (hasRequiredMajor) return major_1; - hasRequiredMajor = 1; - const SemVer = requireSemver$1(); - const major = (a, loose) => new SemVer(a, loose).major; - major_1 = major; - return major_1; -} - -var minor_1; -var hasRequiredMinor; - -function requireMinor () { - if (hasRequiredMinor) return minor_1; - hasRequiredMinor = 1; - const SemVer = requireSemver$1(); - const minor = (a, loose) => new SemVer(a, loose).minor; - minor_1 = minor; - return minor_1; -} - -var patch_1; -var hasRequiredPatch; - -function requirePatch () { - if (hasRequiredPatch) return patch_1; - hasRequiredPatch = 1; - const SemVer = requireSemver$1(); - const patch = (a, loose) => new SemVer(a, loose).patch; - patch_1 = patch; - return patch_1; -} - -var prerelease_1; -var hasRequiredPrerelease; - -function requirePrerelease () { - if (hasRequiredPrerelease) return prerelease_1; - hasRequiredPrerelease = 1; - const parse = requireParse(); - const prerelease = (version, options) => { - const parsed = parse(version, options); - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null - }; - prerelease_1 = prerelease; - return prerelease_1; -} - -var compare_1; -var hasRequiredCompare; - -function requireCompare () { - if (hasRequiredCompare) return compare_1; - hasRequiredCompare = 1; - const SemVer = requireSemver$1(); - const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)); - compare_1 = compare; - return compare_1; -} - -var rcompare_1; -var hasRequiredRcompare; - -function requireRcompare () { - if (hasRequiredRcompare) return rcompare_1; - hasRequiredRcompare = 1; - const compare = requireCompare(); - const rcompare = (a, b, loose) => compare(b, a, loose); - rcompare_1 = rcompare; - return rcompare_1; -} - -var compareLoose_1; -var hasRequiredCompareLoose; - -function requireCompareLoose () { - if (hasRequiredCompareLoose) return compareLoose_1; - hasRequiredCompareLoose = 1; - const compare = requireCompare(); - const compareLoose = (a, b) => compare(a, b, true); - compareLoose_1 = compareLoose; - return compareLoose_1; -} - -var compareBuild_1; -var hasRequiredCompareBuild; - -function requireCompareBuild () { - if (hasRequiredCompareBuild) return compareBuild_1; - hasRequiredCompareBuild = 1; - const SemVer = requireSemver$1(); - const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose); - const versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB) - }; - compareBuild_1 = compareBuild; - return compareBuild_1; -} - -var sort_1; -var hasRequiredSort; - -function requireSort () { - if (hasRequiredSort) return sort_1; - hasRequiredSort = 1; - const compareBuild = requireCompareBuild(); - const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); - sort_1 = sort; - return sort_1; -} - -var rsort_1; -var hasRequiredRsort; - -function requireRsort () { - if (hasRequiredRsort) return rsort_1; - hasRequiredRsort = 1; - const compareBuild = requireCompareBuild(); - const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); - rsort_1 = rsort; - return rsort_1; -} - -var gt_1; -var hasRequiredGt; - -function requireGt () { - if (hasRequiredGt) return gt_1; - hasRequiredGt = 1; - const compare = requireCompare(); - const gt = (a, b, loose) => compare(a, b, loose) > 0; - gt_1 = gt; - return gt_1; -} - -var lt_1; -var hasRequiredLt; - -function requireLt () { - if (hasRequiredLt) return lt_1; - hasRequiredLt = 1; - const compare = requireCompare(); - const lt = (a, b, loose) => compare(a, b, loose) < 0; - lt_1 = lt; - return lt_1; -} - -var eq_1; -var hasRequiredEq; - -function requireEq () { - if (hasRequiredEq) return eq_1; - hasRequiredEq = 1; - const compare = requireCompare(); - const eq = (a, b, loose) => compare(a, b, loose) === 0; - eq_1 = eq; - return eq_1; -} - -var neq_1; -var hasRequiredNeq; - -function requireNeq () { - if (hasRequiredNeq) return neq_1; - hasRequiredNeq = 1; - const compare = requireCompare(); - const neq = (a, b, loose) => compare(a, b, loose) !== 0; - neq_1 = neq; - return neq_1; -} - -var gte_1; -var hasRequiredGte; - -function requireGte () { - if (hasRequiredGte) return gte_1; - hasRequiredGte = 1; - const compare = requireCompare(); - const gte = (a, b, loose) => compare(a, b, loose) >= 0; - gte_1 = gte; - return gte_1; -} - -var lte_1; -var hasRequiredLte; - -function requireLte () { - if (hasRequiredLte) return lte_1; - hasRequiredLte = 1; - const compare = requireCompare(); - const lte = (a, b, loose) => compare(a, b, loose) <= 0; - lte_1 = lte; - return lte_1; -} - -var cmp_1; -var hasRequiredCmp; - -function requireCmp () { - if (hasRequiredCmp) return cmp_1; - hasRequiredCmp = 1; - const eq = requireEq(); - const neq = requireNeq(); - const gt = requireGt(); - const gte = requireGte(); - const lt = requireLt(); - const lte = requireLte(); - const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version; - } - if (typeof b === 'object') { - b = b.version; - } - return a === b - case '!==': - if (typeof a === 'object') { - a = a.version; - } - if (typeof b === 'object') { - b = b.version; - } - return a !== b - case '': - case '=': - case '==': - return eq(a, b, loose) - case '!=': - return neq(a, b, loose) - case '>': - return gt(a, b, loose) - case '>=': - return gte(a, b, loose) - case '<': - return lt(a, b, loose) - case '<=': - return lte(a, b, loose) - default: - throw new TypeError(`Invalid operator: ${op}`) - } - }; - cmp_1 = cmp; - return cmp_1; -} - -var coerce_1; -var hasRequiredCoerce; - -function requireCoerce () { - if (hasRequiredCoerce) return coerce_1; - hasRequiredCoerce = 1; - const SemVer = requireSemver$1(); - const parse = requireParse(); - const { safeRe: re, t } = requireRe(); - const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - if (typeof version === 'number') { - version = String(version); - } - if (typeof version !== 'string') { - return null - } - options = options || {}; - let match = null; - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); - } else { - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; - let next; - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next; - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; - } - coerceRtlRegex.lastIndex = -1; - } - if (match === null) { - return null - } - const major = match[2]; - const minor = match[3] || '0'; - const patch = match[4] || '0'; - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''; - const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''; - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) - }; - coerce_1 = coerce; - return coerce_1; -} - -var lrucache; -var hasRequiredLrucache; - -function requireLrucache () { - if (hasRequiredLrucache) return lrucache; - hasRequiredLrucache = 1; - class LRUCache { - constructor () { - this.max = 1000; - this.map = new Map(); - } - get (key) { - const value = this.map.get(key); - if (value === undefined) { - return undefined - } else { - this.map.delete(key); - this.map.set(key, value); - return value - } - } - delete (key) { - return this.map.delete(key) - } - set (key, value) { - const deleted = this.delete(key); - if (!deleted && value !== undefined) { - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value; - this.delete(firstKey); - } - this.map.set(key, value); - } - return this - } - } - lrucache = LRUCache; - return lrucache; -} - -var range; -var hasRequiredRange; - -function requireRange () { - if (hasRequiredRange) return range; - hasRequiredRange = 1; - const SPACE_CHARACTERS = /\s+/g; - class Range { - constructor (range, options) { - options = parseOptions(options); - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - if (range instanceof Comparator) { - this.raw = range.value; - this.set = [[range]]; - this.formatted = undefined; - return this - } - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().replace(SPACE_CHARACTERS, ' '); - this.set = this.raw - .split('||') - .map(r => this.parseRange(r.trim())) - .filter(c => c.length); - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } - if (this.set.length > 1) { - const first = this.set[0]; - this.set = this.set.filter(c => !isNullSet(c[0])); - if (this.set.length === 0) { - this.set = [first]; - } else if (this.set.length > 1) { - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c]; - break - } - } - } - } - this.formatted = undefined; - } - get range () { - if (this.formatted === undefined) { - this.formatted = ''; - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += '||'; - } - const comps = this.set[i]; - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += ' '; - } - this.formatted += comps[k].toString().trim(); - } - } - } - return this.formatted - } - format () { - return this.range - } - toString () { - return this.range - } - parseRange (range) { - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ':' + range; - const cached = cache.get(memoKey); - if (cached) { - return cached - } - const loose = this.options.loose; - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug('hyphen replace', range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - debug('tilde trim', range); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - debug('caret trim', range); - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - .map(comp => replaceGTE0(comp, this.options)); - if (loose) { - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options); - return !!comp.match(re[t.COMPARATORLOOSE]) - }); - } - debug('range list', rangeList); - const rangeMap = new Map(); - const comparators = rangeList.map(comp => new Comparator(comp, this.options)); - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp); - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete(''); - } - const result = [...rangeMap.values()]; - cache.set(memoKey, result); - return result - } - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - test (version) { - if (!version) { - return false - } - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options); - } catch (er) { - return false - } - } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } - } - range = Range; - const LRU = requireLrucache(); - const cache = new LRU(); - const parseOptions = requireParseOptions(); - const Comparator = requireComparator(); - const debug = requireDebug$1(); - const SemVer = requireSemver$1(); - const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, - } = requireRe(); - const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants$4(); - const isNullSet = c => c.value === '<0.0.0-0'; - const isAny = c => c.value === ''; - const isSatisfiable = (comparators, options) => { - let result = true; - const remainingComparators = comparators.slice(); - let testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }); - testComparator = remainingComparators.pop(); - } - return result - }; - const parseComparator = (comp, options) => { - comp = comp.replace(re[t.BUILD], ''); - debug('comp', comp, options); - comp = replaceCarets(comp, options); - debug('caret', comp); - comp = replaceTildes(comp, options); - debug('tildes', comp); - comp = replaceXRanges(comp, options); - debug('xrange', comp); - comp = replaceStars(comp, options); - debug('stars', comp); - return comp - }; - const isX = id => !id || id.toLowerCase() === 'x' || id === '*'; - const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') - }; - const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ''; - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0`; - } else if (isX(p)) { - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`; - } else if (pr) { - debug('replaceTilde pr', pr); - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0`; - } - debug('tilde return', ret); - return ret - }) - }; - const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') - }; - const replaceCaret = (comp, options) => { - debug('caret', comp, options); - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; - const z = options.includePrerelease ? '-0' : ''; - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ''; - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; - } - } else if (pr) { - debug('replaceCaret pr', pr); - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0`; - } - } else { - debug('no pr'); - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0`; - } - } - debug('caret return', ret); - return ret - }) - }; - const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options); - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') - }; - const replaceXRange = (comp, options) => { - comp = comp.trim(); - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - const xM = isX(M); - const xm = xM || isX(m); - const xp = xm || isX(p); - const anyX = xp; - if (gtlt === '=' && anyX) { - gtlt = ''; - } - pr = options.includePrerelease ? '-0' : ''; - if (xM) { - if (gtlt === '>' || gtlt === '<') { - ret = '<0.0.0-0'; - } else { - ret = '*'; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; - } - p = 0; - if (gtlt === '>') { - gtlt = '>='; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === '<=') { - gtlt = '<'; - if (xm) { - M = +M + 1; - } else { - m = +m + 1; - } - } - if (gtlt === '<') { - pr = '-0'; - } - ret = `${gtlt + M}.${m}.${p}${pr}`; - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0`; - } - debug('xRange return', ret); - return ret - }) - }; - const replaceStars = (comp, options) => { - debug('replaceStars', comp, options); - return comp - .trim() - .replace(re[t.STAR], '') - }; - const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options); - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') - }; - const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = ''; - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}`; - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`; - } else if (fpr) { - from = `>=${from}`; - } else { - from = `>=${from}${incPr ? '-0' : ''}`; - } - if (isX(tM)) { - to = ''; - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0`; - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0`; - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}`; - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0`; - } else { - to = `<=${to}`; - } - return `${from} ${to}`.trim() - }; - const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - if (version.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === Comparator.ANY) { - continue - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver; - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - return false - } - return true - }; - return range; -} - -var comparator; -var hasRequiredComparator; - -function requireComparator () { - if (hasRequiredComparator) return comparator; - hasRequiredComparator = 1; - const ANY = Symbol('SemVer ANY'); - class Comparator { - static get ANY () { - return ANY - } - constructor (comp, options) { - options = parseOptions(options); - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value; - } - } - comp = comp.trim().split(/\s+/).join(' '); - debug('comparator', comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) { - this.value = ''; - } else { - this.value = this.operator + this.semver.version; - } - debug('comp', this); - } - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - const m = comp.match(r); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - this.operator = m[1] !== undefined ? m[1] : ''; - if (this.operator === '=') { - this.operator = ''; - } - if (!m[2]) { - this.semver = ANY; - } else { - this.semver = new SemVer(m[2], this.options.loose); - } - } - toString () { - return this.value - } - test (version) { - debug('Comparator.test', version, this.options.loose); - if (this.semver === ANY || version === ANY) { - return true - } - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options); - } catch (er) { - return false - } - } - return cmp(version, this.operator, this.semver, this.options) - } - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - options = parseOptions(options); - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false - } - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true - } - return false - } - } - comparator = Comparator; - const parseOptions = requireParseOptions(); - const { safeRe: re, t } = requireRe(); - const cmp = requireCmp(); - const debug = requireDebug$1(); - const SemVer = requireSemver$1(); - const Range = requireRange(); - return comparator; -} - -var satisfies_1; -var hasRequiredSatisfies; - -function requireSatisfies () { - if (hasRequiredSatisfies) return satisfies_1; - hasRequiredSatisfies = 1; - const Range = requireRange(); - const satisfies = (version, range, options) => { - try { - range = new Range(range, options); - } catch (er) { - return false - } - return range.test(version) - }; - satisfies_1 = satisfies; - return satisfies_1; -} - -var toComparators_1; -var hasRequiredToComparators; - -function requireToComparators () { - if (hasRequiredToComparators) return toComparators_1; - hasRequiredToComparators = 1; - const Range = requireRange(); - const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')); - toComparators_1 = toComparators; - return toComparators_1; -} - -var maxSatisfying_1; -var hasRequiredMaxSatisfying; - -function requireMaxSatisfying () { - if (hasRequiredMaxSatisfying) return maxSatisfying_1; - hasRequiredMaxSatisfying = 1; - const SemVer = requireSemver$1(); - const Range = requireRange(); - const maxSatisfying = (versions, range, options) => { - let max = null; - let maxSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer(max, options); - } - } - }); - return max - }; - maxSatisfying_1 = maxSatisfying; - return maxSatisfying_1; -} - -var minSatisfying_1; -var hasRequiredMinSatisfying; - -function requireMinSatisfying () { - if (hasRequiredMinSatisfying) return minSatisfying_1; - hasRequiredMinSatisfying = 1; - const SemVer = requireSemver$1(); - const Range = requireRange(); - const minSatisfying = (versions, range, options) => { - let min = null; - let minSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer(min, options); - } - } - }); - return min - }; - minSatisfying_1 = minSatisfying; - return minSatisfying_1; -} - -var minVersion_1; -var hasRequiredMinVersion; - -function requireMinVersion () { - if (hasRequiredMinVersion) return minVersion_1; - hasRequiredMinVersion = 1; - const SemVer = requireSemver$1(); - const Range = requireRange(); - const gt = requireGt(); - const minVersion = (range, loose) => { - range = new Range(range, loose); - let minver = new SemVer('0.0.0'); - if (range.test(minver)) { - return minver - } - minver = new SemVer('0.0.0-0'); - if (range.test(minver)) { - return minver - } - minver = null; - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let setMin = null; - comparators.forEach((comparator) => { - const compver = new SemVer(comparator.semver.version); - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++; - } else { - compver.prerelease.push(0); - } - compver.raw = compver.format(); - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver; - } - break - case '<': - case '<=': - break - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }); - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin; - } - } - if (minver && range.test(minver)) { - return minver - } - return null - }; - minVersion_1 = minVersion; - return minVersion_1; -} - -var valid; -var hasRequiredValid; - -function requireValid () { - if (hasRequiredValid) return valid; - hasRequiredValid = 1; - const Range = requireRange(); - const validRange = (range, options) => { - try { - return new Range(range, options).range || '*' - } catch (er) { - return null - } - }; - valid = validRange; - return valid; -} - -var outside_1; -var hasRequiredOutside; - -function requireOutside () { - if (hasRequiredOutside) return outside_1; - hasRequiredOutside = 1; - const SemVer = requireSemver$1(); - const Comparator = requireComparator(); - const { ANY } = Comparator; - const Range = requireRange(); - const satisfies = requireSatisfies(); - const gt = requireGt(); - const lt = requireLt(); - const lte = requireLte(); - const gte = requireGte(); - const outside = (version, range, hilo, options) => { - version = new SemVer(version, options); - range = new Range(range, options); - let gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - if (satisfies(version, range, options)) { - return false - } - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let high = null; - let low = null; - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0'); - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator; - } - }); - if (high.operator === comp || high.operator === ecomp) { - return false - } - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true - }; - outside_1 = outside; - return outside_1; -} - -var gtr_1; -var hasRequiredGtr; - -function requireGtr () { - if (hasRequiredGtr) return gtr_1; - hasRequiredGtr = 1; - const outside = requireOutside(); - const gtr = (version, range, options) => outside(version, range, '>', options); - gtr_1 = gtr; - return gtr_1; -} - -var ltr_1; -var hasRequiredLtr; - -function requireLtr () { - if (hasRequiredLtr) return ltr_1; - hasRequiredLtr = 1; - const outside = requireOutside(); - const ltr = (version, range, options) => outside(version, range, '<', options); - ltr_1 = ltr; - return ltr_1; -} - -var intersects_1; -var hasRequiredIntersects; - -function requireIntersects () { - if (hasRequiredIntersects) return intersects_1; - hasRequiredIntersects = 1; - const Range = requireRange(); - const intersects = (r1, r2, options) => { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2, options) - }; - intersects_1 = intersects; - return intersects_1; -} - -var simplify; -var hasRequiredSimplify; - -function requireSimplify () { - if (hasRequiredSimplify) return simplify; - hasRequiredSimplify = 1; - const satisfies = requireSatisfies(); - const compare = requireCompare(); - simplify = (versions, range, options) => { - const set = []; - let first = null; - let prev = null; - const v = versions.sort((a, b) => compare(a, b, options)); - for (const version of v) { - const included = satisfies(version, range, options); - if (included) { - prev = version; - if (!first) { - first = version; - } - } else { - if (prev) { - set.push([first, prev]); - } - prev = null; - first = null; - } - } - if (first) { - set.push([first, null]); - } - const ranges = []; - for (const [min, max] of set) { - if (min === max) { - ranges.push(min); - } else if (!max && min === v[0]) { - ranges.push('*'); - } else if (!max) { - ranges.push(`>=${min}`); - } else if (min === v[0]) { - ranges.push(`<=${max}`); - } else { - ranges.push(`${min} - ${max}`); - } - } - const simplified = ranges.join(' || '); - const original = typeof range.raw === 'string' ? range.raw : String(range); - return simplified.length < original.length ? simplified : range - }; - return simplify; -} - -var subset_1; -var hasRequiredSubset; - -function requireSubset () { - if (hasRequiredSubset) return subset_1; - hasRequiredSubset = 1; - const Range = requireRange(); - const Comparator = requireComparator(); - const { ANY } = Comparator; - const satisfies = requireSatisfies(); - const compare = requireCompare(); - const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - sub = new Range(sub, options); - dom = new Range(dom, options); - let sawNonNull = false; - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options); - sawNonNull = sawNonNull || isSub !== null; - if (isSub) { - continue OUTER - } - } - if (sawNonNull) { - return false - } - } - return true - }; - const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]; - const minimumVersion = [new Comparator('>=0.0.0')]; - const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease; - } else { - sub = minimumVersion; - } - } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion; - } - } - const eqSet = new Set(); - let gt, lt; - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options); - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options); - } else { - eqSet.add(c.semver); - } - } - if (eqSet.size > 1) { - return null - } - let gtltComp; - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options); - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - return true - } - let higher, lower; - let hasDomLT, hasDomGT; - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false; - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false; - } - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='; - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='; - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false; - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options); - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false; - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options); - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - if (needDomGTPre || needDomLTPre) { - return false - } - return true - }; - const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options); - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a - }; - const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options); - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a - }; - subset_1 = subset; - return subset_1; -} - -var semver$1; -var hasRequiredSemver; - -function requireSemver () { - if (hasRequiredSemver) return semver$1; - hasRequiredSemver = 1; - const internalRe = requireRe(); - const constants = requireConstants$4(); - const SemVer = requireSemver$1(); - const identifiers = requireIdentifiers(); - const parse = requireParse(); - const valid = requireValid$1(); - const clean = requireClean(); - const inc = requireInc(); - const diff = requireDiff(); - const major = requireMajor(); - const minor = requireMinor(); - const patch = requirePatch(); - const prerelease = requirePrerelease(); - const compare = requireCompare(); - const rcompare = requireRcompare(); - const compareLoose = requireCompareLoose(); - const compareBuild = requireCompareBuild(); - const sort = requireSort(); - const rsort = requireRsort(); - const gt = requireGt(); - const lt = requireLt(); - const eq = requireEq(); - const neq = requireNeq(); - const gte = requireGte(); - const lte = requireLte(); - const cmp = requireCmp(); - const coerce = requireCoerce(); - const Comparator = requireComparator(); - const Range = requireRange(); - const satisfies = requireSatisfies(); - const toComparators = requireToComparators(); - const maxSatisfying = requireMaxSatisfying(); - const minSatisfying = requireMinSatisfying(); - const minVersion = requireMinVersion(); - const validRange = requireValid(); - const outside = requireOutside(); - const gtr = requireGtr(); - const ltr = requireLtr(); - const intersects = requireIntersects(); - const simplifyRange = requireSimplify(); - const subset = requireSubset(); - semver$1 = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, - }; - return semver$1; -} - -var semverExports = requireSemver(); -var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports); - -var dist$b = {}; - -var lruCache; -var hasRequiredLruCache; - -function requireLruCache () { - if (hasRequiredLruCache) return lruCache; - hasRequiredLruCache = 1; - const perf = - typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; - const hasAbortController = typeof AbortController === 'function'; - const AC = hasAbortController - ? AbortController - : class AbortController { - constructor() { - this.signal = new AS(); - } - abort(reason = new Error('This operation was aborted')) { - this.signal.reason = this.signal.reason || reason; - this.signal.aborted = true; - this.signal.dispatchEvent({ - type: 'abort', - target: this.signal, - }); - } - }; - const hasAbortSignal = typeof AbortSignal === 'function'; - const hasACAbortSignal = typeof AC.AbortSignal === 'function'; - const AS = hasAbortSignal - ? AbortSignal - : hasACAbortSignal - ? AC.AbortController - : class AbortSignal { - constructor() { - this.reason = undefined; - this.aborted = false; - this._listeners = []; - } - dispatchEvent(e) { - if (e.type === 'abort') { - this.aborted = true; - this.onabort(e); - this._listeners.forEach(f => f(e), this); - } - } - onabort() {} - addEventListener(ev, fn) { - if (ev === 'abort') { - this._listeners.push(fn); - } - } - removeEventListener(ev, fn) { - if (ev === 'abort') { - this._listeners = this._listeners.filter(f => f !== fn); - } - } - }; - const warned = new Set(); - const deprecatedOption = (opt, instead) => { - const code = `LRU_CACHE_OPTION_${opt}`; - if (shouldWarn(code)) { - warn(code, `${opt} option`, `options.${instead}`, LRUCache); - } - }; - const deprecatedMethod = (method, instead) => { - const code = `LRU_CACHE_METHOD_${method}`; - if (shouldWarn(code)) { - const { prototype } = LRUCache; - const { get } = Object.getOwnPropertyDescriptor(prototype, method); - warn(code, `${method} method`, `cache.${instead}()`, get); - } - }; - const deprecatedProperty = (field, instead) => { - const code = `LRU_CACHE_PROPERTY_${field}`; - if (shouldWarn(code)) { - const { prototype } = LRUCache; - const { get } = Object.getOwnPropertyDescriptor(prototype, field); - warn(code, `${field} property`, `cache.${instead}`, get); - } - }; - const emitWarning = (...a) => { - typeof process === 'object' && - process && - typeof process.emitWarning === 'function' - ? process.emitWarning(...a) - : console.error(...a); - }; - const shouldWarn = code => !warned.has(code); - const warn = (code, what, instead, fn) => { - warned.add(code); - const msg = `The ${what} is deprecated. Please use ${instead} instead.`; - emitWarning(msg, 'DeprecationWarning', code, fn); - }; - const isPosInt = n => n && n === Math.floor(n) && n > 0 && isFinite(n); - const getUintArray = max => - !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; - class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } - } - class Stack { - constructor(max) { - if (max === 0) { - return [] - } - const UintArray = getUintArray(max); - this.heap = new UintArray(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length] - } - } - class LRUCache { - constructor(options = {}) { - const { - max = 0, - ttl, - ttlResolution = 1, - ttlAutopurge, - updateAgeOnGet, - updateAgeOnHas, - allowStale, - dispose, - disposeAfter, - noDisposeOnSet, - noUpdateTTL, - maxSize = 0, - maxEntrySize = 0, - sizeCalculation, - fetchMethod, - fetchContext, - noDeleteOnFetchRejection, - noDeleteOnStaleGet, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - } = options; - const { length, maxAge, stale } = - options instanceof LRUCache ? {} : options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer') - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max) - } - this.max = max; - this.maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.maxSize; - this.sizeCalculation = sizeCalculation || length; - if (this.sizeCalculation) { - if (!this.maxSize && !this.maxEntrySize) { - throw new TypeError( - 'cannot set sizeCalculation without setting maxSize or maxEntrySize' - ) - } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function') - } - } - this.fetchMethod = fetchMethod || null; - if (this.fetchMethod && typeof this.fetchMethod !== 'function') { - throw new TypeError( - 'fetchMethod must be a function if specified' - ) - } - this.fetchContext = fetchContext; - if (!this.fetchMethod && fetchContext !== undefined) { - throw new TypeError( - 'cannot set fetchContext without fetchMethod' - ) - } - this.keyMap = new Map(); - this.keyList = new Array(max).fill(null); - this.valList = new Array(max).fill(null); - this.next = new UintArray(max); - this.prev = new UintArray(max); - this.head = 0; - this.tail = 0; - this.free = new Stack(max); - this.initialFill = 1; - this.size = 0; - if (typeof dispose === 'function') { - this.dispose = dispose; - } - if (typeof disposeAfter === 'function') { - this.disposeAfter = disposeAfter; - this.disposed = []; - } else { - this.disposeAfter = null; - this.disposed = null; - } - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - if (this.maxEntrySize !== 0) { - if (this.maxSize !== 0) { - if (!isPosInt(this.maxSize)) { - throw new TypeError( - 'maxSize must be a positive integer if specified' - ) - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError( - 'maxEntrySize must be a positive integer if specified' - ) - } - this.initializeSizeTracking(); - } - this.allowStale = !!allowStale || !!stale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || maxAge || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError( - 'ttl must be a positive integer if specified' - ) - } - this.initializeTTLTracking(); - } - if (this.max === 0 && this.ttl === 0 && this.maxSize === 0) { - throw new TypeError( - 'At least one of max, maxSize, or ttl is required' - ) - } - if (!this.ttlAutopurge && !this.max && !this.maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = - 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } - } - if (stale) { - deprecatedOption('stale', 'allowStale'); - } - if (maxAge) { - deprecatedOption('maxAge', 'ttl'); - } - if (length) { - deprecatedOption('length', 'sizeCalculation'); - } - } - getRemainingTTL(key) { - return this.has(key, { updateAgeOnHas: false }) ? Infinity : 0 - } - initializeTTLTracking() { - this.ttls = new ZeroArray(this.max); - this.starts = new ZeroArray(this.max); - this.setItemTTL = (index, ttl, start = perf.now()) => { - this.starts[index] = ttl !== 0 ? start : 0; - this.ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.isStale(index)) { - this.delete(this.keyList[index]); - } - }, ttl + 1); - if (t.unref) { - t.unref(); - } - } - }; - this.updateItemAge = index => { - this.starts[index] = this.ttls[index] !== 0 ? perf.now() : 0; - }; - this.statusTTL = (status, index) => { - if (status) { - status.ttl = this.ttls[index]; - status.start = this.starts[index]; - status.now = cachedNow || getNow(); - status.remainingTTL = status.now + status.ttl - status.start; - } - }; - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout( - () => (cachedNow = 0), - this.ttlResolution - ); - if (t.unref) { - t.unref(); - } - } - return n - }; - this.getRemainingTTL = key => { - const index = this.keyMap.get(key); - if (index === undefined) { - return 0 - } - return this.ttls[index] === 0 || this.starts[index] === 0 - ? Infinity - : this.starts[index] + - this.ttls[index] - - (cachedNow || getNow()) - }; - this.isStale = index => { - return ( - this.ttls[index] !== 0 && - this.starts[index] !== 0 && - (cachedNow || getNow()) - this.starts[index] > - this.ttls[index] - ) - }; - } - updateItemAge(_index) {} - statusTTL(_status, _index) {} - setItemTTL(_index, _ttl, _start) {} - isStale(_index) { - return false - } - initializeSizeTracking() { - this.calculatedSize = 0; - this.sizes = new ZeroArray(this.max); - this.removeItemSize = index => { - this.calculatedSize -= this.sizes[index]; - this.sizes[index] = 0; - }; - this.requireSize = (k, v, size, sizeCalculation) => { - if (this.isBackgroundFetch(v)) { - return 0 - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function') - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError( - 'sizeCalculation return invalid (expect positive integer)' - ) - } - } else { - throw new TypeError( - 'invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation or size ' + - 'must be set.' - ) - } - } - return size - }; - this.addItemSize = (index, size, status) => { - this.sizes[index] = size; - if (this.maxSize) { - const maxSize = this.maxSize - this.sizes[index]; - while (this.calculatedSize > maxSize) { - this.evict(true); - } - } - this.calculatedSize += this.sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.calculatedSize; - } - }; - } - removeItemSize(_index) {} - addItemSize(_index, _size) {} - requireSize(_k, _v, size, sizeCalculation) { - if (size || sizeCalculation) { - throw new TypeError( - 'cannot set size without setting maxSize or maxEntrySize on cache' - ) - } - } - *indexes({ allowStale = this.allowStale } = {}) { - if (this.size) { - for (let i = this.tail; true; ) { - if (!this.isValidIndex(i)) { - break - } - if (allowStale || !this.isStale(i)) { - yield i; - } - if (i === this.head) { - break - } else { - i = this.prev[i]; - } - } - } - } - *rindexes({ allowStale = this.allowStale } = {}) { - if (this.size) { - for (let i = this.head; true; ) { - if (!this.isValidIndex(i)) { - break - } - if (allowStale || !this.isStale(i)) { - yield i; - } - if (i === this.tail) { - break - } else { - i = this.next[i]; - } - } - } - } - isValidIndex(index) { - return ( - index !== undefined && - this.keyMap.get(this.keyList[index]) === index - ) - } - *entries() { - for (const i of this.indexes()) { - if ( - this.valList[i] !== undefined && - this.keyList[i] !== undefined && - !this.isBackgroundFetch(this.valList[i]) - ) { - yield [this.keyList[i], this.valList[i]]; - } - } - } - *rentries() { - for (const i of this.rindexes()) { - if ( - this.valList[i] !== undefined && - this.keyList[i] !== undefined && - !this.isBackgroundFetch(this.valList[i]) - ) { - yield [this.keyList[i], this.valList[i]]; - } - } - } - *keys() { - for (const i of this.indexes()) { - if ( - this.keyList[i] !== undefined && - !this.isBackgroundFetch(this.valList[i]) - ) { - yield this.keyList[i]; - } - } - } - *rkeys() { - for (const i of this.rindexes()) { - if ( - this.keyList[i] !== undefined && - !this.isBackgroundFetch(this.valList[i]) - ) { - yield this.keyList[i]; - } - } - } - *values() { - for (const i of this.indexes()) { - if ( - this.valList[i] !== undefined && - !this.isBackgroundFetch(this.valList[i]) - ) { - yield this.valList[i]; - } - } - } - *rvalues() { - for (const i of this.rindexes()) { - if ( - this.valList[i] !== undefined && - !this.isBackgroundFetch(this.valList[i]) - ) { - yield this.valList[i]; - } - } - } - [Symbol.iterator]() { - return this.entries() - } - find(fn, getOptions) { - for (const i of this.indexes()) { - const v = this.valList[i]; - const value = this.isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) continue - if (fn(value, this.keyList[i], this)) { - return this.get(this.keyList[i], getOptions) - } - } - } - forEach(fn, thisp = this) { - for (const i of this.indexes()) { - const v = this.valList[i]; - const value = this.isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) continue - fn.call(thisp, value, this.keyList[i], this); - } - } - rforEach(fn, thisp = this) { - for (const i of this.rindexes()) { - const v = this.valList[i]; - const value = this.isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) continue - fn.call(thisp, value, this.keyList[i], this); - } - } - get prune() { - deprecatedMethod('prune', 'purgeStale'); - return this.purgeStale - } - purgeStale() { - let deleted = false; - for (const i of this.rindexes({ allowStale: true })) { - if (this.isStale(i)) { - this.delete(this.keyList[i]); - deleted = true; - } - } - return deleted - } - dump() { - const arr = []; - for (const i of this.indexes({ allowStale: true })) { - const key = this.keyList[i]; - const v = this.valList[i]; - const value = this.isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) continue - const entry = { value }; - if (this.ttls) { - entry.ttl = this.ttls[i]; - const age = perf.now() - this.starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.sizes) { - entry.size = this.sizes[i]; - } - arr.unshift([key, entry]); - } - return arr - } - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - dispose(_v, _k, _reason) {} - set( - k, - v, - { - ttl = this.ttl, - start, - noDisposeOnSet = this.noDisposeOnSet, - size = 0, - sizeCalculation = this.sizeCalculation, - noUpdateTTL = this.noUpdateTTL, - status, - } = {} - ) { - size = this.requireSize(k, v, size, sizeCalculation); - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - this.delete(k); - return this - } - let index = this.size === 0 ? undefined : this.keyMap.get(k); - if (index === undefined) { - index = this.newIndex(); - this.keyList[index] = k; - this.valList[index] = v; - this.keyMap.set(k, index); - this.next[this.tail] = index; - this.prev[index] = this.tail; - this.tail = index; - this.size++; - this.addItemSize(index, size, status); - if (status) { - status.set = 'add'; - } - noUpdateTTL = false; - } else { - this.moveToTail(index); - const oldVal = this.valList[index]; - if (v !== oldVal) { - if (this.isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - } else { - if (!noDisposeOnSet) { - this.dispose(oldVal, k, 'set'); - if (this.disposeAfter) { - this.disposed.push([oldVal, k, 'set']); - } - } - } - this.removeItemSize(index); - this.valList[index] = v; - this.addItemSize(index, size, status); - if (status) { - status.set = 'replace'; - const oldValue = - oldVal && this.isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) status.oldValue = oldValue; - } - } else if (status) { - status.set = 'update'; - } - } - if (ttl !== 0 && this.ttl === 0 && !this.ttls) { - this.initializeTTLTracking(); - } - if (!noUpdateTTL) { - this.setItemTTL(index, ttl, start); - } - this.statusTTL(status, index); - if (this.disposeAfter) { - while (this.disposed.length) { - this.disposeAfter(...this.disposed.shift()); - } - } - return this - } - newIndex() { - if (this.size === 0) { - return this.tail - } - if (this.size === this.max && this.max !== 0) { - return this.evict(false) - } - if (this.free.length !== 0) { - return this.free.pop() - } - return this.initialFill++ - } - pop() { - if (this.size) { - const val = this.valList[this.head]; - this.evict(true); - return val - } - } - evict(free) { - const head = this.head; - const k = this.keyList[head]; - const v = this.valList[head]; - if (this.isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } else { - this.dispose(v, k, 'evict'); - if (this.disposeAfter) { - this.disposed.push([v, k, 'evict']); - } - } - this.removeItemSize(head); - if (free) { - this.keyList[head] = null; - this.valList[head] = null; - this.free.push(head); - } - this.head = this.next[head]; - this.keyMap.delete(k); - this.size--; - return head - } - has(k, { updateAgeOnHas = this.updateAgeOnHas, status } = {}) { - const index = this.keyMap.get(k); - if (index !== undefined) { - if (!this.isStale(index)) { - if (updateAgeOnHas) { - this.updateItemAge(index); - } - if (status) status.has = 'hit'; - this.statusTTL(status, index); - return true - } else if (status) { - status.has = 'stale'; - this.statusTTL(status, index); - } - } else if (status) { - status.has = 'miss'; - } - return false - } - peek(k, { allowStale = this.allowStale } = {}) { - const index = this.keyMap.get(k); - if (index !== undefined && (allowStale || !this.isStale(index))) { - const v = this.valList[index]; - return this.isBackgroundFetch(v) ? v.__staleWhileFetching : v - } - } - backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.valList[index]; - if (this.isBackgroundFetch(v)) { - return v - } - const ac = new AC(); - if (options.signal) { - options.signal.addEventListener('abort', () => - ac.abort(options.signal.reason) - ); - } - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) options.status.fetchAbortIgnored = true; - } else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason) - } - if (this.valList[index] === p) { - if (v === undefined) { - if (p.__staleWhileFetching) { - this.valList[index] = p.__staleWhileFetching; - } else { - this.delete(k); - } - } else { - if (options.status) options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v - }; - const eb = er => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er) - }; - const fetchFail = er => { - const { aborted } = ac.signal; - const allowStaleAborted = - aborted && options.allowStaleOnFetchAbort; - const allowStale = - allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - if (this.valList[index] === p) { - const del = !noDelete || p.__staleWhileFetching === undefined; - if (del) { - this.delete(k); - } else if (!allowStaleAborted) { - this.valList[index] = p.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && p.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return p.__staleWhileFetching - } else if (p.__returned === p) { - throw er - } - }; - const pcall = (res, rej) => { - this.fetchMethod(k, v, fetchOpts).then(v => res(v), rej); - ac.signal.addEventListener('abort', () => { - if ( - !options.ignoreFetchAbort || - options.allowStaleOnFetchAbort - ) { - res(); - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - p.__abortController = ac; - p.__staleWhileFetching = v; - p.__returned = null; - if (index === undefined) { - this.set(k, p, { ...fetchOpts.options, status: undefined }); - index = this.keyMap.get(k); - } else { - this.valList[index] = p; - } - return p - } - isBackgroundFetch(p) { - return ( - p && - typeof p === 'object' && - typeof p.then === 'function' && - Object.prototype.hasOwnProperty.call( - p, - '__staleWhileFetching' - ) && - Object.prototype.hasOwnProperty.call(p, '__returned') && - (p.__returned === p || p.__returned === null) - ) - } - async fetch( - k, - { - allowStale = this.allowStale, - updateAgeOnGet = this.updateAgeOnGet, - noDeleteOnStaleGet = this.noDeleteOnStaleGet, - ttl = this.ttl, - noDisposeOnSet = this.noDisposeOnSet, - size = 0, - sizeCalculation = this.sizeCalculation, - noUpdateTTL = this.noUpdateTTL, - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, - allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, - ignoreFetchAbort = this.ignoreFetchAbort, - allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, - fetchContext = this.fetchContext, - forceRefresh = false, - status, - signal, - } = {} - ) { - if (!this.fetchMethod) { - if (status) status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }) - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.keyMap.get(k); - if (index === undefined) { - if (status) status.fetch = 'miss'; - const p = this.backgroundFetch(k, index, options, fetchContext); - return (p.__returned = p) - } else { - const v = this.valList[index]; - if (this.isBackgroundFetch(v)) { - const stale = - allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v) - } - const isStale = this.isStale(index); - if (!forceRefresh && !isStale) { - if (status) status.fetch = 'hit'; - this.moveToTail(index); - if (updateAgeOnGet) { - this.updateItemAge(index); - } - this.statusTTL(status, index); - return v - } - const p = this.backgroundFetch(k, index, options, fetchContext); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = hasStale && isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) status.returnedStale = true; - } - return staleVal ? p.__staleWhileFetching : (p.__returned = p) - } - } - get( - k, - { - allowStale = this.allowStale, - updateAgeOnGet = this.updateAgeOnGet, - noDeleteOnStaleGet = this.noDeleteOnStaleGet, - status, - } = {} - ) { - const index = this.keyMap.get(k); - if (index !== undefined) { - const value = this.valList[index]; - const fetching = this.isBackgroundFetch(value); - this.statusTTL(status, index); - if (this.isStale(index)) { - if (status) status.get = 'stale'; - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status) status.returnedStale = allowStale; - return allowStale ? value : undefined - } else { - if (status) { - status.returnedStale = - allowStale && value.__staleWhileFetching !== undefined; - } - return allowStale ? value.__staleWhileFetching : undefined - } - } else { - if (status) status.get = 'hit'; - if (fetching) { - return value.__staleWhileFetching - } - this.moveToTail(index); - if (updateAgeOnGet) { - this.updateItemAge(index); - } - return value - } - } else if (status) { - status.get = 'miss'; - } - } - connect(p, n) { - this.prev[n] = p; - this.next[p] = n; - } - moveToTail(index) { - if (index !== this.tail) { - if (index === this.head) { - this.head = this.next[index]; - } else { - this.connect(this.prev[index], this.next[index]); - } - this.connect(this.tail, index); - this.tail = index; - } - } - get del() { - deprecatedMethod('del', 'delete'); - return this.delete - } - delete(k) { - let deleted = false; - if (this.size !== 0) { - const index = this.keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.size === 1) { - this.clear(); - } else { - this.removeItemSize(index); - const v = this.valList[index]; - if (this.isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } else { - this.dispose(v, k, 'delete'); - if (this.disposeAfter) { - this.disposed.push([v, k, 'delete']); - } - } - this.keyMap.delete(k); - this.keyList[index] = null; - this.valList[index] = null; - if (index === this.tail) { - this.tail = this.prev[index]; - } else if (index === this.head) { - this.head = this.next[index]; - } else { - this.next[this.prev[index]] = this.next[index]; - this.prev[this.next[index]] = this.prev[index]; - } - this.size--; - this.free.push(index); - } - } - } - if (this.disposed) { - while (this.disposed.length) { - this.disposeAfter(...this.disposed.shift()); - } - } - return deleted - } - clear() { - for (const index of this.rindexes({ allowStale: true })) { - const v = this.valList[index]; - if (this.isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } else { - const k = this.keyList[index]; - this.dispose(v, k, 'delete'); - if (this.disposeAfter) { - this.disposed.push([v, k, 'delete']); - } - } - } - this.keyMap.clear(); - this.valList.fill(null); - this.keyList.fill(null); - if (this.ttls) { - this.ttls.fill(0); - this.starts.fill(0); - } - if (this.sizes) { - this.sizes.fill(0); - } - this.head = 0; - this.tail = 0; - this.initialFill = 1; - this.free.length = 0; - this.calculatedSize = 0; - this.size = 0; - if (this.disposed) { - while (this.disposed.length) { - this.disposeAfter(...this.disposed.shift()); - } - } - } - get reset() { - deprecatedMethod('reset', 'clear'); - return this.clear - } - get length() { - deprecatedProperty('length', 'size'); - return this.size - } - static get AbortController() { - return AC - } - static get AbortSignal() { - return AS - } - } - lruCache = LRUCache; - return lruCache; -} - -var dist$a = {}; - -var helpers$4 = {}; - -var hasRequiredHelpers$2; - -function requireHelpers$2 () { - if (hasRequiredHelpers$2) return helpers$4; - hasRequiredHelpers$2 = 1; - var __createBinding = (helpers$4 && helpers$4.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (helpers$4 && helpers$4.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (helpers$4 && helpers$4.__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; - }; - Object.defineProperty(helpers$4, "__esModule", { value: true }); - helpers$4.req = helpers$4.json = helpers$4.toBuffer = void 0; - const http = __importStar(require$$0$6); - const https = __importStar(require$$1$1); - async function toBuffer(stream) { - let length = 0; - const chunks = []; - for await (const chunk of stream) { - length += chunk.length; - chunks.push(chunk); - } - return Buffer.concat(chunks, length); - } - helpers$4.toBuffer = toBuffer; - async function json(stream) { - const buf = await toBuffer(stream); - const str = buf.toString('utf8'); - try { - return JSON.parse(str); - } - catch (_err) { - const err = _err; - err.message += ` (input: ${str})`; - throw err; - } - } - helpers$4.json = json; - function req(url, opts = {}) { - const href = typeof url === 'string' ? url : url.href; - const req = (href.startsWith('https:') ? https : http).request(url, opts); - const promise = new Promise((resolve, reject) => { - req - .once('response', resolve) - .once('error', reject) - .end(); - }); - req.then = promise.then.bind(promise); - return req; - } - helpers$4.req = req; - return helpers$4; -} - -var hasRequiredDist$b; - -function requireDist$b () { - if (hasRequiredDist$b) return dist$a; - hasRequiredDist$b = 1; - (function (exports$1) { - var __createBinding = (dist$a && dist$a.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist$a && dist$a.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (dist$a && dist$a.__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 __exportStar = (dist$a && dist$a.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.Agent = void 0; - const net = __importStar(require$$0$7); - const http = __importStar(require$$0$6); - const https_1 = require$$1$1; - __exportStar(requireHelpers$2(), exports$1); - const INTERNAL = Symbol('AgentBaseInternalState'); - class Agent extends http.Agent { - constructor(opts) { - super(opts); - this[INTERNAL] = {}; - } - isSecureEndpoint(options) { - if (options) { - if (typeof options.secureEndpoint === 'boolean') { - return options.secureEndpoint; - } - if (typeof options.protocol === 'string') { - return options.protocol === 'https:'; - } - } - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack - .split('\n') - .some((l) => l.indexOf('(https.js:') !== -1 || - l.indexOf('node:https:') !== -1); - } - incrementSockets(name) { - if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { - return null; - } - if (!this.sockets[name]) { - this.sockets[name] = []; - } - const fakeSocket = new net.Socket({ writable: false }); - this.sockets[name].push(fakeSocket); - this.totalSocketCount++; - return fakeSocket; - } - decrementSockets(name, socket) { - if (!this.sockets[name] || socket === null) { - return; - } - const sockets = this.sockets[name]; - const index = sockets.indexOf(socket); - if (index !== -1) { - sockets.splice(index, 1); - this.totalSocketCount--; - if (sockets.length === 0) { - delete this.sockets[name]; - } - } - } - getName(options) { - const secureEndpoint = this.isSecureEndpoint(options); - if (secureEndpoint) { - return https_1.Agent.prototype.getName.call(this, options); - } - return super.getName(options); - } - createSocket(req, options, cb) { - const connectOpts = { - ...options, - secureEndpoint: this.isSecureEndpoint(options), - }; - const name = this.getName(connectOpts); - const fakeSocket = this.incrementSockets(name); - Promise.resolve() - .then(() => this.connect(req, connectOpts)) - .then((socket) => { - this.decrementSockets(name, fakeSocket); - if (socket instanceof http.Agent) { - try { - return socket.addRequest(req, connectOpts); - } - catch (err) { - return cb(err); - } - } - this[INTERNAL].currentSocket = socket; - super.createSocket(req, options, cb); - }, (err) => { - this.decrementSockets(name, fakeSocket); - cb(err); - }); - } - createConnection() { - const socket = this[INTERNAL].currentSocket; - this[INTERNAL].currentSocket = undefined; - if (!socket) { - throw new Error('No socket was returned in the `connect()` function'); - } - return socket; - } - get defaultPort() { - return (this[INTERNAL].defaultPort ?? - (this.protocol === 'https:' ? 443 : 80)); - } - set defaultPort(v) { - if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v; - } - } - get protocol() { - return (this[INTERNAL].protocol ?? - (this.isSecureEndpoint() ? 'https:' : 'http:')); - } - set protocol(v) { - if (this[INTERNAL]) { - this[INTERNAL].protocol = v; - } - } - } - exports$1.Agent = Agent; - } (dist$a)); - return dist$a; -} - -var proxyFromEnv = {}; - -var hasRequiredProxyFromEnv; - -function requireProxyFromEnv () { - if (hasRequiredProxyFromEnv) return proxyFromEnv; - hasRequiredProxyFromEnv = 1; - var parseUrl = require$$5.parse; - var DEFAULT_PORTS = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443, - }; - var stringEndsWith = String.prototype.endsWith || function(s) { - return s.length <= this.length && - this.indexOf(s, this.length - s.length) !== -1; - }; - function getProxyForUrl(url) { - var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { - return ''; - } - proto = proto.split(':', 1)[0]; - hostname = hostname.replace(/:\d*$/, ''); - port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ''; - } - var proxy = - getEnv('npm_config_' + proto + '_proxy') || - getEnv(proto + '_proxy') || - getEnv('npm_config_proxy') || - getEnv('all_proxy'); - if (proxy && proxy.indexOf('://') === -1) { - proxy = proto + '://' + proxy; - } - return proxy; - } - function shouldProxy(hostname, port) { - var NO_PROXY = - (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); - if (!NO_PROXY) { - return true; - } - if (NO_PROXY === '*') { - return false; - } - return NO_PROXY.split(/[,\s]/).every(function(proxy) { - if (!proxy) { - return true; - } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; - } - if (!/^[.*]/.test(parsedProxyHostname)) { - return hostname !== parsedProxyHostname; - } - if (parsedProxyHostname.charAt(0) === '*') { - parsedProxyHostname = parsedProxyHostname.slice(1); - } - return !stringEndsWith.call(hostname, parsedProxyHostname); - }); - } - function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; - } - proxyFromEnv.getProxyForUrl = getProxyForUrl; - return proxyFromEnv; -} - -var dist$9 = {}; - -var hasRequiredDist$a; - -function requireDist$a () { - if (hasRequiredDist$a) return dist$9; - hasRequiredDist$a = 1; - var __createBinding = (dist$9 && dist$9.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist$9 && dist$9.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (dist$9 && dist$9.__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 __importDefault = (dist$9 && dist$9.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(dist$9, "__esModule", { value: true }); - dist$9.HttpProxyAgent = void 0; - const net = __importStar(require$$0$7); - const tls = __importStar(require$$1$2); - const debug_1 = __importDefault(requireSrc()); - const events_1 = require$$0$8; - const agent_base_1 = requireDist$b(); - const url_1 = require$$5; - const debug = (0, debug_1.default)('http-proxy-agent'); - class HttpProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpProxyAgent instance: %o', this.proxy.href); - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - addRequest(req, opts) { - req._header = null; - this.setRequestProps(req, opts); - super.addRequest(req, opts); - } - setRequestProps(req, opts) { - const { proxy } = this; - const protocol = opts.secureEndpoint ? 'https:' : 'http:'; - const hostname = req.getHeader('host') || 'localhost'; - const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); - if (opts.port !== 80) { - url.port = String(opts.port); - } - req.path = String(url); - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; - } - for (const name of Object.keys(headers)) { - const value = headers[name]; - if (value) { - req.setHeader(name, value); - } - } - } - async connect(req, opts) { - req._header = null; - if (!req.path.includes('://')) { - this.setRequestProps(req, opts); - } - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._implicitHeader(); - if (req.outputData && req.outputData.length > 0) { - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - let socket; - if (this.proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(this.connectOpts); - } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - await (0, events_1.once)(socket, 'connect'); - return socket; - } - } - HttpProxyAgent.protocols = ['http', 'https']; - dist$9.HttpProxyAgent = HttpProxyAgent; - function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; - } - return dist$9; -} - -var dist$8 = {}; - -var parseProxyResponse = {}; - -var hasRequiredParseProxyResponse; - -function requireParseProxyResponse () { - if (hasRequiredParseProxyResponse) return parseProxyResponse; - hasRequiredParseProxyResponse = 1; - var __importDefault = (parseProxyResponse && parseProxyResponse.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(parseProxyResponse, "__esModule", { value: true }); - parseProxyResponse.parseProxyResponse = void 0; - const debug_1 = __importDefault(requireSrc()); - const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); - function parseProxyResponse$1(socket) { - return new Promise((resolve, reject) => { - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('readable', read); - } - function onend() { - cleanup(); - debug('onend'); - reject(new Error('Proxy connection ended before receiving CONNECT response')); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const headerParts = buffered - .slice(0, endOfHeaders) - .toString('ascii') - .split('\r\n'); - const firstLine = headerParts.shift(); - if (!firstLine) { - socket.destroy(); - return reject(new Error('No header received from proxy CONNECT response')); - } - const firstLineParts = firstLine.split(' '); - const statusCode = +firstLineParts[1]; - const statusText = firstLineParts.slice(2).join(' '); - const headers = {}; - for (const header of headerParts) { - if (!header) - continue; - const firstColon = header.indexOf(':'); - if (firstColon === -1) { - socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); - } - const key = header.slice(0, firstColon).toLowerCase(); - const value = header.slice(firstColon + 1).trimStart(); - const current = headers[key]; - if (typeof current === 'string') { - headers[key] = [current, value]; - } - else if (Array.isArray(current)) { - current.push(value); - } - else { - headers[key] = value; - } - } - debug('got proxy server response: %o %o', firstLine, headers); - cleanup(); - resolve({ - connect: { - statusCode, - statusText, - headers, - }, - buffered, - }); - } - socket.on('error', onerror); - socket.on('end', onend); - read(); - }); - } - parseProxyResponse.parseProxyResponse = parseProxyResponse$1; - return parseProxyResponse; -} - -var hasRequiredDist$9; - -function requireDist$9 () { - if (hasRequiredDist$9) return dist$8; - hasRequiredDist$9 = 1; - var __createBinding = (dist$8 && dist$8.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist$8 && dist$8.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (dist$8 && dist$8.__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 __importDefault = (dist$8 && dist$8.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(dist$8, "__esModule", { value: true }); - dist$8.HttpsProxyAgent = void 0; - const net = __importStar(require$$0$7); - const tls = __importStar(require$$1$2); - const assert_1 = __importDefault(require$$2); - const debug_1 = __importDefault(requireSrc()); - const agent_base_1 = requireDist$b(); - const url_1 = require$$5; - const parse_proxy_response_1 = requireParseProxyResponse(); - const debug = (0, debug_1.default)('https-proxy-agent'); - const setServernameFromNonIpHost = (options) => { - if (options.servername === undefined && - options.host && - !net.isIP(options.host)) { - return { - ...options, - servername: options.host, - }; - } - return options; - }; - class HttpsProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.options = { path: undefined }; - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - ALPNProtocols: ['http/1.1'], - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - async connect(req, opts) { - const { proxy } = this; - if (!opts.host) { - throw new TypeError('No "host" provided'); - } - let socket; - if (proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); - } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - headers.Host = `${host}:${opts.port}`; - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; - } - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); - socket.write(`${payload}\r\n`); - const { connect, buffered } = await proxyResponsePromise; - req.emit('proxyConnect', connect); - this.emit('proxyConnect', connect, req); - if (connect.statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - debug('Upgrading socket connection to TLS'); - return tls.connect({ - ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'), - socket, - }); - } - return socket; - } - socket.destroy(); - const fakeSocket = new net.Socket({ writable: false }); - fakeSocket.readable = true; - req.once('socket', (s) => { - debug('Replaying proxy buffer for failed request'); - (0, assert_1.default)(s.listenerCount('data') > 0); - s.push(buffered); - s.push(null); - }); - return fakeSocket; - } - } - HttpsProxyAgent.protocols = ['http', 'https']; - dist$8.HttpsProxyAgent = HttpsProxyAgent; - function resume(socket) { - socket.resume(); - } - function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; - } - return dist$8; -} - -var dist$7 = {}; - -var build = {}; - -var socksclient = {}; - -var smartbuffer = {}; - -var utils$1 = {}; - -var hasRequiredUtils$1; - -function requireUtils$1 () { - if (hasRequiredUtils$1) return utils$1; - hasRequiredUtils$1 = 1; - Object.defineProperty(utils$1, "__esModule", { value: true }); - const buffer_1 = require$$0$9; - const ERRORS = { - INVALID_ENCODING: 'Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.', - INVALID_SMARTBUFFER_SIZE: 'Invalid size provided. Size must be a valid integer greater than zero.', - INVALID_SMARTBUFFER_BUFFER: 'Invalid Buffer provided in SmartBufferOptions.', - INVALID_SMARTBUFFER_OBJECT: 'Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.', - INVALID_OFFSET: 'An invalid offset value was provided.', - INVALID_OFFSET_NON_NUMBER: 'An invalid offset value was provided. A numeric value is required.', - INVALID_LENGTH: 'An invalid length value was provided.', - INVALID_LENGTH_NON_NUMBER: 'An invalid length value was provived. A numeric value is required.', - INVALID_TARGET_OFFSET: 'Target offset is beyond the bounds of the internal SmartBuffer data.', - INVALID_TARGET_LENGTH: 'Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.', - INVALID_READ_BEYOND_BOUNDS: 'Attempted to read beyond the bounds of the managed data.', - INVALID_WRITE_BEYOND_BOUNDS: 'Attempted to write beyond the bounds of the managed data.' - }; - utils$1.ERRORS = ERRORS; - function checkEncoding(encoding) { - if (!buffer_1.Buffer.isEncoding(encoding)) { - throw new Error(ERRORS.INVALID_ENCODING); - } - } - utils$1.checkEncoding = checkEncoding; - function isFiniteInteger(value) { - return typeof value === 'number' && isFinite(value) && isInteger(value); - } - utils$1.isFiniteInteger = isFiniteInteger; - function checkOffsetOrLengthValue(value, offset) { - if (typeof value === 'number') { - if (!isFiniteInteger(value) || value < 0) { - throw new Error(offset ? ERRORS.INVALID_OFFSET : ERRORS.INVALID_LENGTH); - } - } - else { - throw new Error(offset ? ERRORS.INVALID_OFFSET_NON_NUMBER : ERRORS.INVALID_LENGTH_NON_NUMBER); - } - } - function checkLengthValue(length) { - checkOffsetOrLengthValue(length, false); - } - utils$1.checkLengthValue = checkLengthValue; - function checkOffsetValue(offset) { - checkOffsetOrLengthValue(offset, true); - } - utils$1.checkOffsetValue = checkOffsetValue; - function checkTargetOffset(offset, buff) { - if (offset < 0 || offset > buff.length) { - throw new Error(ERRORS.INVALID_TARGET_OFFSET); - } - } - utils$1.checkTargetOffset = checkTargetOffset; - function isInteger(value) { - return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; - } - function bigIntAndBufferInt64Check(bufferMethod) { - if (typeof BigInt === 'undefined') { - throw new Error('Platform does not support JS BigInt type.'); - } - if (typeof buffer_1.Buffer.prototype[bufferMethod] === 'undefined') { - throw new Error(`Platform does not support Buffer.prototype.${bufferMethod}.`); - } - } - utils$1.bigIntAndBufferInt64Check = bigIntAndBufferInt64Check; - return utils$1; -} - -var hasRequiredSmartbuffer; - -function requireSmartbuffer () { - if (hasRequiredSmartbuffer) return smartbuffer; - hasRequiredSmartbuffer = 1; - Object.defineProperty(smartbuffer, "__esModule", { value: true }); - const utils_1 = requireUtils$1(); - const DEFAULT_SMARTBUFFER_SIZE = 4096; - const DEFAULT_SMARTBUFFER_ENCODING = 'utf8'; - class SmartBuffer { - constructor(options) { - this.length = 0; - this._encoding = DEFAULT_SMARTBUFFER_ENCODING; - this._writeOffset = 0; - this._readOffset = 0; - if (SmartBuffer.isSmartBufferOptions(options)) { - if (options.encoding) { - utils_1.checkEncoding(options.encoding); - this._encoding = options.encoding; - } - if (options.size) { - if (utils_1.isFiniteInteger(options.size) && options.size > 0) { - this._buff = Buffer.allocUnsafe(options.size); - } - else { - throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_SIZE); - } - } - else if (options.buff) { - if (Buffer.isBuffer(options.buff)) { - this._buff = options.buff; - this.length = options.buff.length; - } - else { - throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_BUFFER); - } - } - else { - this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE); - } - } - else { - if (typeof options !== 'undefined') { - throw new Error(utils_1.ERRORS.INVALID_SMARTBUFFER_OBJECT); - } - this._buff = Buffer.allocUnsafe(DEFAULT_SMARTBUFFER_SIZE); - } - } - static fromSize(size, encoding) { - return new this({ - size: size, - encoding: encoding - }); - } - static fromBuffer(buff, encoding) { - return new this({ - buff: buff, - encoding: encoding - }); - } - static fromOptions(options) { - return new this(options); - } - static isSmartBufferOptions(options) { - const castOptions = options; - return (castOptions && - (castOptions.encoding !== undefined || castOptions.size !== undefined || castOptions.buff !== undefined)); - } - readInt8(offset) { - return this._readNumberValue(Buffer.prototype.readInt8, 1, offset); - } - readInt16BE(offset) { - return this._readNumberValue(Buffer.prototype.readInt16BE, 2, offset); - } - readInt16LE(offset) { - return this._readNumberValue(Buffer.prototype.readInt16LE, 2, offset); - } - readInt32BE(offset) { - return this._readNumberValue(Buffer.prototype.readInt32BE, 4, offset); - } - readInt32LE(offset) { - return this._readNumberValue(Buffer.prototype.readInt32LE, 4, offset); - } - readBigInt64BE(offset) { - utils_1.bigIntAndBufferInt64Check('readBigInt64BE'); - return this._readNumberValue(Buffer.prototype.readBigInt64BE, 8, offset); - } - readBigInt64LE(offset) { - utils_1.bigIntAndBufferInt64Check('readBigInt64LE'); - return this._readNumberValue(Buffer.prototype.readBigInt64LE, 8, offset); - } - writeInt8(value, offset) { - this._writeNumberValue(Buffer.prototype.writeInt8, 1, value, offset); - return this; - } - insertInt8(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeInt8, 1, value, offset); - } - writeInt16BE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); - } - insertInt16BE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeInt16BE, 2, value, offset); - } - writeInt16LE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); - } - insertInt16LE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeInt16LE, 2, value, offset); - } - writeInt32BE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); - } - insertInt32BE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeInt32BE, 4, value, offset); - } - writeInt32LE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); - } - insertInt32LE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeInt32LE, 4, value, offset); - } - writeBigInt64BE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigInt64BE'); - return this._writeNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset); - } - insertBigInt64BE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigInt64BE'); - return this._insertNumberValue(Buffer.prototype.writeBigInt64BE, 8, value, offset); - } - writeBigInt64LE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigInt64LE'); - return this._writeNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset); - } - insertBigInt64LE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigInt64LE'); - return this._insertNumberValue(Buffer.prototype.writeBigInt64LE, 8, value, offset); - } - readUInt8(offset) { - return this._readNumberValue(Buffer.prototype.readUInt8, 1, offset); - } - readUInt16BE(offset) { - return this._readNumberValue(Buffer.prototype.readUInt16BE, 2, offset); - } - readUInt16LE(offset) { - return this._readNumberValue(Buffer.prototype.readUInt16LE, 2, offset); - } - readUInt32BE(offset) { - return this._readNumberValue(Buffer.prototype.readUInt32BE, 4, offset); - } - readUInt32LE(offset) { - return this._readNumberValue(Buffer.prototype.readUInt32LE, 4, offset); - } - readBigUInt64BE(offset) { - utils_1.bigIntAndBufferInt64Check('readBigUInt64BE'); - return this._readNumberValue(Buffer.prototype.readBigUInt64BE, 8, offset); - } - readBigUInt64LE(offset) { - utils_1.bigIntAndBufferInt64Check('readBigUInt64LE'); - return this._readNumberValue(Buffer.prototype.readBigUInt64LE, 8, offset); - } - writeUInt8(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); - } - insertUInt8(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeUInt8, 1, value, offset); - } - writeUInt16BE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); - } - insertUInt16BE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeUInt16BE, 2, value, offset); - } - writeUInt16LE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); - } - insertUInt16LE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeUInt16LE, 2, value, offset); - } - writeUInt32BE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); - } - insertUInt32BE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeUInt32BE, 4, value, offset); - } - writeUInt32LE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); - } - insertUInt32LE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeUInt32LE, 4, value, offset); - } - writeBigUInt64BE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigUInt64BE'); - return this._writeNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset); - } - insertBigUInt64BE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigUInt64BE'); - return this._insertNumberValue(Buffer.prototype.writeBigUInt64BE, 8, value, offset); - } - writeBigUInt64LE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigUInt64LE'); - return this._writeNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset); - } - insertBigUInt64LE(value, offset) { - utils_1.bigIntAndBufferInt64Check('writeBigUInt64LE'); - return this._insertNumberValue(Buffer.prototype.writeBigUInt64LE, 8, value, offset); - } - readFloatBE(offset) { - return this._readNumberValue(Buffer.prototype.readFloatBE, 4, offset); - } - readFloatLE(offset) { - return this._readNumberValue(Buffer.prototype.readFloatLE, 4, offset); - } - writeFloatBE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); - } - insertFloatBE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeFloatBE, 4, value, offset); - } - writeFloatLE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); - } - insertFloatLE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeFloatLE, 4, value, offset); - } - readDoubleBE(offset) { - return this._readNumberValue(Buffer.prototype.readDoubleBE, 8, offset); - } - readDoubleLE(offset) { - return this._readNumberValue(Buffer.prototype.readDoubleLE, 8, offset); - } - writeDoubleBE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); - } - insertDoubleBE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeDoubleBE, 8, value, offset); - } - writeDoubleLE(value, offset) { - return this._writeNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); - } - insertDoubleLE(value, offset) { - return this._insertNumberValue(Buffer.prototype.writeDoubleLE, 8, value, offset); - } - readString(arg1, encoding) { - let lengthVal; - if (typeof arg1 === 'number') { - utils_1.checkLengthValue(arg1); - lengthVal = Math.min(arg1, this.length - this._readOffset); - } - else { - encoding = arg1; - lengthVal = this.length - this._readOffset; - } - if (typeof encoding !== 'undefined') { - utils_1.checkEncoding(encoding); - } - const value = this._buff.slice(this._readOffset, this._readOffset + lengthVal).toString(encoding || this._encoding); - this._readOffset += lengthVal; - return value; - } - insertString(value, offset, encoding) { - utils_1.checkOffsetValue(offset); - return this._handleString(value, true, offset, encoding); - } - writeString(value, arg2, encoding) { - return this._handleString(value, false, arg2, encoding); - } - readStringNT(encoding) { - if (typeof encoding !== 'undefined') { - utils_1.checkEncoding(encoding); - } - let nullPos = this.length; - for (let i = this._readOffset; i < this.length; i++) { - if (this._buff[i] === 0x00) { - nullPos = i; - break; - } - } - const value = this._buff.slice(this._readOffset, nullPos); - this._readOffset = nullPos + 1; - return value.toString(encoding || this._encoding); - } - insertStringNT(value, offset, encoding) { - utils_1.checkOffsetValue(offset); - this.insertString(value, offset, encoding); - this.insertUInt8(0x00, offset + value.length); - return this; - } - writeStringNT(value, arg2, encoding) { - this.writeString(value, arg2, encoding); - this.writeUInt8(0x00, typeof arg2 === 'number' ? arg2 + value.length : this.writeOffset); - return this; - } - readBuffer(length) { - if (typeof length !== 'undefined') { - utils_1.checkLengthValue(length); - } - const lengthVal = typeof length === 'number' ? length : this.length; - const endPoint = Math.min(this.length, this._readOffset + lengthVal); - const value = this._buff.slice(this._readOffset, endPoint); - this._readOffset = endPoint; - return value; - } - insertBuffer(value, offset) { - utils_1.checkOffsetValue(offset); - return this._handleBuffer(value, true, offset); - } - writeBuffer(value, offset) { - return this._handleBuffer(value, false, offset); - } - readBufferNT() { - let nullPos = this.length; - for (let i = this._readOffset; i < this.length; i++) { - if (this._buff[i] === 0x00) { - nullPos = i; - break; - } - } - const value = this._buff.slice(this._readOffset, nullPos); - this._readOffset = nullPos + 1; - return value; - } - insertBufferNT(value, offset) { - utils_1.checkOffsetValue(offset); - this.insertBuffer(value, offset); - this.insertUInt8(0x00, offset + value.length); - return this; - } - writeBufferNT(value, offset) { - if (typeof offset !== 'undefined') { - utils_1.checkOffsetValue(offset); - } - this.writeBuffer(value, offset); - this.writeUInt8(0x00, typeof offset === 'number' ? offset + value.length : this._writeOffset); - return this; - } - clear() { - this._writeOffset = 0; - this._readOffset = 0; - this.length = 0; - return this; - } - remaining() { - return this.length - this._readOffset; - } - get readOffset() { - return this._readOffset; - } - set readOffset(offset) { - utils_1.checkOffsetValue(offset); - utils_1.checkTargetOffset(offset, this); - this._readOffset = offset; - } - get writeOffset() { - return this._writeOffset; - } - set writeOffset(offset) { - utils_1.checkOffsetValue(offset); - utils_1.checkTargetOffset(offset, this); - this._writeOffset = offset; - } - get encoding() { - return this._encoding; - } - set encoding(encoding) { - utils_1.checkEncoding(encoding); - this._encoding = encoding; - } - get internalBuffer() { - return this._buff; - } - toBuffer() { - return this._buff.slice(0, this.length); - } - toString(encoding) { - const encodingVal = typeof encoding === 'string' ? encoding : this._encoding; - utils_1.checkEncoding(encodingVal); - return this._buff.toString(encodingVal, 0, this.length); - } - destroy() { - this.clear(); - return this; - } - _handleString(value, isInsert, arg3, encoding) { - let offsetVal = this._writeOffset; - let encodingVal = this._encoding; - if (typeof arg3 === 'number') { - offsetVal = arg3; - } - else if (typeof arg3 === 'string') { - utils_1.checkEncoding(arg3); - encodingVal = arg3; - } - if (typeof encoding === 'string') { - utils_1.checkEncoding(encoding); - encodingVal = encoding; - } - const byteLength = Buffer.byteLength(value, encodingVal); - if (isInsert) { - this.ensureInsertable(byteLength, offsetVal); - } - else { - this._ensureWriteable(byteLength, offsetVal); - } - this._buff.write(value, offsetVal, byteLength, encodingVal); - if (isInsert) { - this._writeOffset += byteLength; - } - else { - if (typeof arg3 === 'number') { - this._writeOffset = Math.max(this._writeOffset, offsetVal + byteLength); - } - else { - this._writeOffset += byteLength; - } - } - return this; - } - _handleBuffer(value, isInsert, offset) { - const offsetVal = typeof offset === 'number' ? offset : this._writeOffset; - if (isInsert) { - this.ensureInsertable(value.length, offsetVal); - } - else { - this._ensureWriteable(value.length, offsetVal); - } - value.copy(this._buff, offsetVal); - if (isInsert) { - this._writeOffset += value.length; - } - else { - if (typeof offset === 'number') { - this._writeOffset = Math.max(this._writeOffset, offsetVal + value.length); - } - else { - this._writeOffset += value.length; - } - } - return this; - } - ensureReadable(length, offset) { - let offsetVal = this._readOffset; - if (typeof offset !== 'undefined') { - utils_1.checkOffsetValue(offset); - offsetVal = offset; - } - if (offsetVal < 0 || offsetVal + length > this.length) { - throw new Error(utils_1.ERRORS.INVALID_READ_BEYOND_BOUNDS); - } - } - ensureInsertable(dataLength, offset) { - utils_1.checkOffsetValue(offset); - this._ensureCapacity(this.length + dataLength); - if (offset < this.length) { - this._buff.copy(this._buff, offset + dataLength, offset, this._buff.length); - } - if (offset + dataLength > this.length) { - this.length = offset + dataLength; - } - else { - this.length += dataLength; - } - } - _ensureWriteable(dataLength, offset) { - const offsetVal = typeof offset === 'number' ? offset : this._writeOffset; - this._ensureCapacity(offsetVal + dataLength); - if (offsetVal + dataLength > this.length) { - this.length = offsetVal + dataLength; - } - } - _ensureCapacity(minLength) { - const oldLength = this._buff.length; - if (minLength > oldLength) { - let data = this._buff; - let newLength = (oldLength * 3) / 2 + 1; - if (newLength < minLength) { - newLength = minLength; - } - this._buff = Buffer.allocUnsafe(newLength); - data.copy(this._buff, 0, 0, oldLength); - } - } - _readNumberValue(func, byteSize, offset) { - this.ensureReadable(byteSize, offset); - const value = func.call(this._buff, typeof offset === 'number' ? offset : this._readOffset); - if (typeof offset === 'undefined') { - this._readOffset += byteSize; - } - return value; - } - _insertNumberValue(func, byteSize, value, offset) { - utils_1.checkOffsetValue(offset); - this.ensureInsertable(byteSize, offset); - func.call(this._buff, value, offset); - this._writeOffset += byteSize; - return this; - } - _writeNumberValue(func, byteSize, value, offset) { - if (typeof offset === 'number') { - if (offset < 0) { - throw new Error(utils_1.ERRORS.INVALID_WRITE_BEYOND_BOUNDS); - } - utils_1.checkOffsetValue(offset); - } - const offsetVal = typeof offset === 'number' ? offset : this._writeOffset; - this._ensureWriteable(byteSize, offsetVal); - func.call(this._buff, value, offsetVal); - if (typeof offset === 'number') { - this._writeOffset = Math.max(this._writeOffset, offsetVal + byteSize); - } - else { - this._writeOffset += byteSize; - } - return this; - } - } - smartbuffer.SmartBuffer = SmartBuffer; - return smartbuffer; -} - -var constants$3 = {}; - -var hasRequiredConstants$3; - -function requireConstants$3 () { - if (hasRequiredConstants$3) return constants$3; - hasRequiredConstants$3 = 1; - Object.defineProperty(constants$3, "__esModule", { value: true }); - constants$3.SOCKS5_NO_ACCEPTABLE_AUTH = constants$3.SOCKS5_CUSTOM_AUTH_END = constants$3.SOCKS5_CUSTOM_AUTH_START = constants$3.SOCKS_INCOMING_PACKET_SIZES = constants$3.SocksClientState = constants$3.Socks5Response = constants$3.Socks5HostType = constants$3.Socks5Auth = constants$3.Socks4Response = constants$3.SocksCommand = constants$3.ERRORS = constants$3.DEFAULT_TIMEOUT = void 0; - const DEFAULT_TIMEOUT = 30000; - constants$3.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; - const ERRORS = { - InvalidSocksCommand: 'An invalid SOCKS command was provided. Valid options are connect, bind, and associate.', - InvalidSocksCommandForOperation: 'An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.', - InvalidSocksCommandChain: 'An invalid SOCKS command was provided. Chaining currently only supports the connect command.', - InvalidSocksClientOptionsDestination: 'An invalid destination host was provided.', - InvalidSocksClientOptionsExistingSocket: 'An invalid existing socket was provided. This should be an instance of stream.Duplex.', - InvalidSocksClientOptionsProxy: 'Invalid SOCKS proxy details were provided.', - InvalidSocksClientOptionsTimeout: 'An invalid timeout value was provided. Please enter a value above 0 (in ms).', - InvalidSocksClientOptionsProxiesLength: 'At least two socks proxies must be provided for chaining.', - InvalidSocksClientOptionsCustomAuthRange: 'Custom auth must be a value between 0x80 and 0xFE.', - InvalidSocksClientOptionsCustomAuthOptions: 'When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.', - NegotiationError: 'Negotiation error', - SocketClosed: 'Socket closed', - ProxyConnectionTimedOut: 'Proxy connection timed out', - InternalError: 'SocksClient internal error (this should not happen)', - InvalidSocks4HandshakeResponse: 'Received invalid Socks4 handshake response', - Socks4ProxyRejectedConnection: 'Socks4 Proxy rejected connection', - InvalidSocks4IncomingConnectionResponse: 'Socks4 invalid incoming connection response', - Socks4ProxyRejectedIncomingBoundConnection: 'Socks4 Proxy rejected incoming bound connection', - InvalidSocks5InitialHandshakeResponse: 'Received invalid Socks5 initial handshake response', - InvalidSocks5IntiailHandshakeSocksVersion: 'Received invalid Socks5 initial handshake (invalid socks version)', - InvalidSocks5InitialHandshakeNoAcceptedAuthType: 'Received invalid Socks5 initial handshake (no accepted authentication type)', - InvalidSocks5InitialHandshakeUnknownAuthType: 'Received invalid Socks5 initial handshake (unknown authentication type)', - Socks5AuthenticationFailed: 'Socks5 Authentication failed', - InvalidSocks5FinalHandshake: 'Received invalid Socks5 final handshake response', - InvalidSocks5FinalHandshakeRejected: 'Socks5 proxy rejected connection', - InvalidSocks5IncomingConnectionResponse: 'Received invalid Socks5 incoming connection response', - Socks5ProxyRejectedIncomingBoundConnection: 'Socks5 Proxy rejected incoming bound connection', - }; - constants$3.ERRORS = ERRORS; - const SOCKS_INCOMING_PACKET_SIZES = { - Socks5InitialHandshakeResponse: 2, - Socks5UserPassAuthenticationResponse: 2, - Socks5ResponseHeader: 5, - Socks5ResponseIPv4: 10, - Socks5ResponseIPv6: 22, - Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7, - Socks4Response: 8, - }; - constants$3.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES; - var SocksCommand; - (function (SocksCommand) { - SocksCommand[SocksCommand["connect"] = 1] = "connect"; - SocksCommand[SocksCommand["bind"] = 2] = "bind"; - SocksCommand[SocksCommand["associate"] = 3] = "associate"; - })(SocksCommand || (constants$3.SocksCommand = SocksCommand = {})); - var Socks4Response; - (function (Socks4Response) { - Socks4Response[Socks4Response["Granted"] = 90] = "Granted"; - Socks4Response[Socks4Response["Failed"] = 91] = "Failed"; - Socks4Response[Socks4Response["Rejected"] = 92] = "Rejected"; - Socks4Response[Socks4Response["RejectedIdent"] = 93] = "RejectedIdent"; - })(Socks4Response || (constants$3.Socks4Response = Socks4Response = {})); - var Socks5Auth; - (function (Socks5Auth) { - Socks5Auth[Socks5Auth["NoAuth"] = 0] = "NoAuth"; - Socks5Auth[Socks5Auth["GSSApi"] = 1] = "GSSApi"; - Socks5Auth[Socks5Auth["UserPass"] = 2] = "UserPass"; - })(Socks5Auth || (constants$3.Socks5Auth = Socks5Auth = {})); - const SOCKS5_CUSTOM_AUTH_START = 0x80; - constants$3.SOCKS5_CUSTOM_AUTH_START = SOCKS5_CUSTOM_AUTH_START; - const SOCKS5_CUSTOM_AUTH_END = 0xfe; - constants$3.SOCKS5_CUSTOM_AUTH_END = SOCKS5_CUSTOM_AUTH_END; - const SOCKS5_NO_ACCEPTABLE_AUTH = 0xff; - constants$3.SOCKS5_NO_ACCEPTABLE_AUTH = SOCKS5_NO_ACCEPTABLE_AUTH; - var Socks5Response; - (function (Socks5Response) { - Socks5Response[Socks5Response["Granted"] = 0] = "Granted"; - Socks5Response[Socks5Response["Failure"] = 1] = "Failure"; - Socks5Response[Socks5Response["NotAllowed"] = 2] = "NotAllowed"; - Socks5Response[Socks5Response["NetworkUnreachable"] = 3] = "NetworkUnreachable"; - Socks5Response[Socks5Response["HostUnreachable"] = 4] = "HostUnreachable"; - Socks5Response[Socks5Response["ConnectionRefused"] = 5] = "ConnectionRefused"; - Socks5Response[Socks5Response["TTLExpired"] = 6] = "TTLExpired"; - Socks5Response[Socks5Response["CommandNotSupported"] = 7] = "CommandNotSupported"; - Socks5Response[Socks5Response["AddressNotSupported"] = 8] = "AddressNotSupported"; - })(Socks5Response || (constants$3.Socks5Response = Socks5Response = {})); - var Socks5HostType; - (function (Socks5HostType) { - Socks5HostType[Socks5HostType["IPv4"] = 1] = "IPv4"; - Socks5HostType[Socks5HostType["Hostname"] = 3] = "Hostname"; - Socks5HostType[Socks5HostType["IPv6"] = 4] = "IPv6"; - })(Socks5HostType || (constants$3.Socks5HostType = Socks5HostType = {})); - var SocksClientState; - (function (SocksClientState) { - SocksClientState[SocksClientState["Created"] = 0] = "Created"; - SocksClientState[SocksClientState["Connecting"] = 1] = "Connecting"; - SocksClientState[SocksClientState["Connected"] = 2] = "Connected"; - SocksClientState[SocksClientState["SentInitialHandshake"] = 3] = "SentInitialHandshake"; - SocksClientState[SocksClientState["ReceivedInitialHandshakeResponse"] = 4] = "ReceivedInitialHandshakeResponse"; - SocksClientState[SocksClientState["SentAuthentication"] = 5] = "SentAuthentication"; - SocksClientState[SocksClientState["ReceivedAuthenticationResponse"] = 6] = "ReceivedAuthenticationResponse"; - SocksClientState[SocksClientState["SentFinalHandshake"] = 7] = "SentFinalHandshake"; - SocksClientState[SocksClientState["ReceivedFinalResponse"] = 8] = "ReceivedFinalResponse"; - SocksClientState[SocksClientState["BoundWaitingForConnection"] = 9] = "BoundWaitingForConnection"; - SocksClientState[SocksClientState["Established"] = 10] = "Established"; - SocksClientState[SocksClientState["Disconnected"] = 11] = "Disconnected"; - SocksClientState[SocksClientState["Error"] = 99] = "Error"; - })(SocksClientState || (constants$3.SocksClientState = SocksClientState = {})); - return constants$3; -} - -var helpers$3 = {}; - -var util$2 = {}; - -var hasRequiredUtil$2; - -function requireUtil$2 () { - if (hasRequiredUtil$2) return util$2; - hasRequiredUtil$2 = 1; - Object.defineProperty(util$2, "__esModule", { value: true }); - util$2.shuffleArray = util$2.SocksClientError = void 0; - class SocksClientError extends Error { - constructor(message, options) { - super(message); - this.options = options; - } - } - util$2.SocksClientError = SocksClientError; - function shuffleArray(array) { - for (let i = array.length - 1; i > 0; i--) { - const j = Math.floor(Math.random() * (i + 1)); - [array[i], array[j]] = [array[j], array[i]]; - } - } - util$2.shuffleArray = shuffleArray; - return util$2; -} - -var ipAddress = {}; - -var ipv4 = {}; - -var common$2 = {}; - -var hasRequiredCommon$1; - -function requireCommon$1 () { - if (hasRequiredCommon$1) return common$2; - hasRequiredCommon$1 = 1; - Object.defineProperty(common$2, "__esModule", { value: true }); - common$2.isInSubnet = isInSubnet; - common$2.isCorrect = isCorrect; - common$2.numberToPaddedHex = numberToPaddedHex; - common$2.stringToPaddedHex = stringToPaddedHex; - common$2.testBit = testBit; - function isInSubnet(address) { - if (this.subnetMask < address.subnetMask) { - return false; - } - if (this.mask(address.subnetMask) === address.mask()) { - return true; - } - return false; - } - function isCorrect(defaultBits) { - return function () { - if (this.addressMinusSuffix !== this.correctForm()) { - return false; - } - if (this.subnetMask === defaultBits && !this.parsedSubnet) { - return true; - } - return this.parsedSubnet === String(this.subnetMask); - }; - } - function numberToPaddedHex(number) { - return number.toString(16).padStart(2, '0'); - } - function stringToPaddedHex(numberString) { - return numberToPaddedHex(parseInt(numberString, 10)); - } - function testBit(binaryValue, position) { - const { length } = binaryValue; - if (position > length) { - return false; - } - const positionInString = length - position; - return binaryValue.substring(positionInString, positionInString + 1) === '1'; - } - return common$2; -} - -var constants$2 = {}; - -var hasRequiredConstants$2; - -function requireConstants$2 () { - if (hasRequiredConstants$2) return constants$2; - hasRequiredConstants$2 = 1; - Object.defineProperty(constants$2, "__esModule", { value: true }); - constants$2.RE_SUBNET_STRING = constants$2.RE_ADDRESS = constants$2.GROUPS = constants$2.BITS = void 0; - constants$2.BITS = 32; - constants$2.GROUPS = 4; - constants$2.RE_ADDRESS = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g; - constants$2.RE_SUBNET_STRING = /\/\d{1,2}$/; - return constants$2; -} - -var addressError = {}; - -var hasRequiredAddressError; - -function requireAddressError () { - if (hasRequiredAddressError) return addressError; - hasRequiredAddressError = 1; - Object.defineProperty(addressError, "__esModule", { value: true }); - addressError.AddressError = void 0; - class AddressError extends Error { - constructor(message, parseMessage) { - super(message); - this.name = 'AddressError'; - this.parseMessage = parseMessage; - } - } - addressError.AddressError = AddressError; - return addressError; -} - -var hasRequiredIpv4; - -function requireIpv4 () { - if (hasRequiredIpv4) return ipv4; - hasRequiredIpv4 = 1; - var __createBinding = (ipv4 && ipv4.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (ipv4 && ipv4.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (ipv4 && ipv4.__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; - }; - Object.defineProperty(ipv4, "__esModule", { value: true }); - ipv4.Address4 = void 0; - const common = __importStar(requireCommon$1()); - const constants = __importStar(requireConstants$2()); - const address_error_1 = requireAddressError(); - class Address4 { - constructor(address) { - this.groups = constants.GROUPS; - this.parsedAddress = []; - this.parsedSubnet = ''; - this.subnet = '/32'; - this.subnetMask = 32; - this.v4 = true; - this.isCorrect = common.isCorrect(constants.BITS); - this.isInSubnet = common.isInSubnet; - this.address = address; - const subnet = constants.RE_SUBNET_STRING.exec(address); - if (subnet) { - this.parsedSubnet = subnet[0].replace('/', ''); - this.subnetMask = parseInt(this.parsedSubnet, 10); - this.subnet = `/${this.subnetMask}`; - if (this.subnetMask < 0 || this.subnetMask > constants.BITS) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - address = address.replace(constants.RE_SUBNET_STRING, ''); - } - this.addressMinusSuffix = address; - this.parsedAddress = this.parse(address); - } - static isValid(address) { - try { - new Address4(address); - return true; - } - catch (e) { - return false; - } - } - parse(address) { - const groups = address.split('.'); - if (!address.match(constants.RE_ADDRESS)) { - throw new address_error_1.AddressError('Invalid IPv4 address.'); - } - return groups; - } - correctForm() { - return this.parsedAddress.map((part) => parseInt(part, 10)).join('.'); - } - static fromHex(hex) { - const padded = hex.replace(/:/g, '').padStart(8, '0'); - const groups = []; - let i; - for (i = 0; i < 8; i += 2) { - const h = padded.slice(i, i + 2); - groups.push(parseInt(h, 16)); - } - return new Address4(groups.join('.')); - } - static fromInteger(integer) { - return Address4.fromHex(integer.toString(16)); - } - static fromArpa(arpaFormAddress) { - const leader = arpaFormAddress.replace(/(\.in-addr\.arpa)?\.$/, ''); - const address = leader.split('.').reverse().join('.'); - return new Address4(address); - } - toHex() { - return this.parsedAddress.map((part) => common.stringToPaddedHex(part)).join(':'); - } - toArray() { - return this.parsedAddress.map((part) => parseInt(part, 10)); - } - toGroup6() { - const output = []; - let i; - for (i = 0; i < constants.GROUPS; i += 2) { - output.push(`${common.stringToPaddedHex(this.parsedAddress[i])}${common.stringToPaddedHex(this.parsedAddress[i + 1])}`); - } - return output.join(':'); - } - bigInt() { - return BigInt(`0x${this.parsedAddress.map((n) => common.stringToPaddedHex(n)).join('')}`); - } - _startAddress() { - return BigInt(`0b${this.mask() + '0'.repeat(constants.BITS - this.subnetMask)}`); - } - startAddress() { - return Address4.fromBigInt(this._startAddress()); - } - startAddressExclusive() { - const adjust = BigInt('1'); - return Address4.fromBigInt(this._startAddress() + adjust); - } - _endAddress() { - return BigInt(`0b${this.mask() + '1'.repeat(constants.BITS - this.subnetMask)}`); - } - endAddress() { - return Address4.fromBigInt(this._endAddress()); - } - endAddressExclusive() { - const adjust = BigInt('1'); - return Address4.fromBigInt(this._endAddress() - adjust); - } - static fromBigInt(bigInt) { - return Address4.fromHex(bigInt.toString(16)); - } - static fromByteArray(bytes) { - if (bytes.length !== 4) { - throw new address_error_1.AddressError('IPv4 addresses require exactly 4 bytes'); - } - for (let i = 0; i < bytes.length; i++) { - if (!Number.isInteger(bytes[i]) || bytes[i] < 0 || bytes[i] > 255) { - throw new address_error_1.AddressError('All bytes must be integers between 0 and 255'); - } - } - return this.fromUnsignedByteArray(bytes); - } - static fromUnsignedByteArray(bytes) { - if (bytes.length !== 4) { - throw new address_error_1.AddressError('IPv4 addresses require exactly 4 bytes'); - } - const address = bytes.join('.'); - return new Address4(address); - } - mask(mask) { - if (mask === undefined) { - mask = this.subnetMask; - } - return this.getBitsBase2(0, mask); - } - getBitsBase2(start, end) { - return this.binaryZeroPad().slice(start, end); - } - reverseForm(options) { - if (!options) { - options = {}; - } - const reversed = this.correctForm().split('.').reverse().join('.'); - if (options.omitSuffix) { - return reversed; - } - return `${reversed}.in-addr.arpa.`; - } - isMulticast() { - return this.isInSubnet(new Address4('224.0.0.0/4')); - } - binaryZeroPad() { - return this.bigInt().toString(2).padStart(constants.BITS, '0'); - } - groupForV6() { - const segments = this.parsedAddress; - return this.address.replace(constants.RE_ADDRESS, `${segments - .slice(0, 2) - .join('.')}.${segments - .slice(2, 4) - .join('.')}`); - } - } - ipv4.Address4 = Address4; - return ipv4; -} - -var ipv6 = {}; - -var constants$1 = {}; - -var hasRequiredConstants$1; - -function requireConstants$1 () { - if (hasRequiredConstants$1) return constants$1; - hasRequiredConstants$1 = 1; - Object.defineProperty(constants$1, "__esModule", { value: true }); - constants$1.RE_URL_WITH_PORT = constants$1.RE_URL = constants$1.RE_ZONE_STRING = constants$1.RE_SUBNET_STRING = constants$1.RE_BAD_ADDRESS = constants$1.RE_BAD_CHARACTERS = constants$1.TYPES = constants$1.SCOPES = constants$1.GROUPS = constants$1.BITS = void 0; - constants$1.BITS = 128; - constants$1.GROUPS = 8; - constants$1.SCOPES = { - 0: 'Reserved', - 1: 'Interface local', - 2: 'Link local', - 4: 'Admin local', - 5: 'Site local', - 8: 'Organization local', - 14: 'Global', - 15: 'Reserved', - }; - constants$1.TYPES = { - 'ff01::1/128': 'Multicast (All nodes on this interface)', - 'ff01::2/128': 'Multicast (All routers on this interface)', - 'ff02::1/128': 'Multicast (All nodes on this link)', - 'ff02::2/128': 'Multicast (All routers on this link)', - 'ff05::2/128': 'Multicast (All routers in this site)', - 'ff02::5/128': 'Multicast (OSPFv3 AllSPF routers)', - 'ff02::6/128': 'Multicast (OSPFv3 AllDR routers)', - 'ff02::9/128': 'Multicast (RIP routers)', - 'ff02::a/128': 'Multicast (EIGRP routers)', - 'ff02::d/128': 'Multicast (PIM routers)', - 'ff02::16/128': 'Multicast (MLDv2 reports)', - 'ff01::fb/128': 'Multicast (mDNSv6)', - 'ff02::fb/128': 'Multicast (mDNSv6)', - 'ff05::fb/128': 'Multicast (mDNSv6)', - 'ff02::1:2/128': 'Multicast (All DHCP servers and relay agents on this link)', - 'ff05::1:2/128': 'Multicast (All DHCP servers and relay agents in this site)', - 'ff02::1:3/128': 'Multicast (All DHCP servers on this link)', - 'ff05::1:3/128': 'Multicast (All DHCP servers in this site)', - '::/128': 'Unspecified', - '::1/128': 'Loopback', - 'ff00::/8': 'Multicast', - 'fe80::/10': 'Link-local unicast', - }; - constants$1.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi; - constants$1.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi; - constants$1.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/; - constants$1.RE_ZONE_STRING = /%.*$/; - constants$1.RE_URL = /^\[{0,1}([0-9a-f:]+)\]{0,1}/; - constants$1.RE_URL_WITH_PORT = /\[([0-9a-f:]+)\]:([0-9]{1,5})/; - return constants$1; -} - -var helpers$2 = {}; - -var hasRequiredHelpers$1; - -function requireHelpers$1 () { - if (hasRequiredHelpers$1) return helpers$2; - hasRequiredHelpers$1 = 1; - Object.defineProperty(helpers$2, "__esModule", { value: true }); - helpers$2.spanAllZeroes = spanAllZeroes; - helpers$2.spanAll = spanAll; - helpers$2.spanLeadingZeroes = spanLeadingZeroes; - helpers$2.simpleGroup = simpleGroup; - function spanAllZeroes(s) { - return s.replace(/(0+)/g, '$1'); - } - function spanAll(s, offset = 0) { - const letters = s.split(''); - return letters - .map((n, i) => `${spanAllZeroes(n)}`) - .join(''); - } - function spanLeadingZeroesSimple(group) { - return group.replace(/^(0+)/, '$1'); - } - function spanLeadingZeroes(address) { - const groups = address.split(':'); - return groups.map((g) => spanLeadingZeroesSimple(g)).join(':'); - } - function simpleGroup(addressString, offset = 0) { - const groups = addressString.split(':'); - return groups.map((g, i) => { - if (/group-v4/.test(g)) { - return g; - } - return `${spanLeadingZeroesSimple(g)}`; - }); - } - return helpers$2; -} - -var regularExpressions = {}; - -var hasRequiredRegularExpressions; - -function requireRegularExpressions () { - if (hasRequiredRegularExpressions) return regularExpressions; - hasRequiredRegularExpressions = 1; - var __createBinding = (regularExpressions && regularExpressions.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (regularExpressions && regularExpressions.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (regularExpressions && regularExpressions.__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; - }; - Object.defineProperty(regularExpressions, "__esModule", { value: true }); - regularExpressions.ADDRESS_BOUNDARY = void 0; - regularExpressions.groupPossibilities = groupPossibilities; - regularExpressions.padGroup = padGroup; - regularExpressions.simpleRegularExpression = simpleRegularExpression; - regularExpressions.possibleElisions = possibleElisions; - const v6 = __importStar(requireConstants$1()); - function groupPossibilities(possibilities) { - return `(${possibilities.join('|')})`; - } - function padGroup(group) { - if (group.length < 4) { - return `0{0,${4 - group.length}}${group}`; - } - return group; - } - regularExpressions.ADDRESS_BOUNDARY = '[^A-Fa-f0-9:]'; - function simpleRegularExpression(groups) { - const zeroIndexes = []; - groups.forEach((group, i) => { - const groupInteger = parseInt(group, 16); - if (groupInteger === 0) { - zeroIndexes.push(i); - } - }); - const possibilities = zeroIndexes.map((zeroIndex) => groups - .map((group, i) => { - if (i === zeroIndex) { - const elision = i === 0 || i === v6.GROUPS - 1 ? ':' : ''; - return groupPossibilities([padGroup(group), elision]); - } - return padGroup(group); - }) - .join(':')); - possibilities.push(groups.map(padGroup).join(':')); - return groupPossibilities(possibilities); - } - function possibleElisions(elidedGroups, moreLeft, moreRight) { - const left = moreLeft ? '' : ':'; - const right = moreRight ? '' : ':'; - const possibilities = []; - if (!moreLeft && !moreRight) { - possibilities.push('::'); - } - if (moreLeft && moreRight) { - possibilities.push(''); - } - if ((moreRight && !moreLeft) || (!moreRight && moreLeft)) { - possibilities.push(':'); - } - possibilities.push(`${left}(:0{1,4}){1,${elidedGroups - 1}}`); - possibilities.push(`(0{1,4}:){1,${elidedGroups - 1}}${right}`); - possibilities.push(`(0{1,4}:){${elidedGroups - 1}}0{1,4}`); - for (let groups = 1; groups < elidedGroups - 1; groups++) { - for (let position = 1; position < elidedGroups - groups; position++) { - possibilities.push(`(0{1,4}:){${position}}:(0{1,4}:){${elidedGroups - position - groups - 1}}0{1,4}`); - } - } - return groupPossibilities(possibilities); - } - return regularExpressions; -} - -var hasRequiredIpv6; - -function requireIpv6 () { - if (hasRequiredIpv6) return ipv6; - hasRequiredIpv6 = 1; - var __createBinding = (ipv6 && ipv6.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (ipv6 && ipv6.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (ipv6 && ipv6.__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; - }; - Object.defineProperty(ipv6, "__esModule", { value: true }); - ipv6.Address6 = void 0; - const common = __importStar(requireCommon$1()); - const constants4 = __importStar(requireConstants$2()); - const constants6 = __importStar(requireConstants$1()); - const helpers = __importStar(requireHelpers$1()); - const ipv4_1 = requireIpv4(); - const regular_expressions_1 = requireRegularExpressions(); - const address_error_1 = requireAddressError(); - const common_1 = requireCommon$1(); - function assert(condition) { - if (!condition) { - throw new Error('Assertion failed.'); - } - } - function addCommas(number) { - const r = /(\d+)(\d{3})/; - while (r.test(number)) { - number = number.replace(r, '$1,$2'); - } - return number; - } - function spanLeadingZeroes4(n) { - n = n.replace(/^(0{1,})([1-9]+)$/, '$1$2'); - n = n.replace(/^(0{1,})(0)$/, '$1$2'); - return n; - } - function compact(address, slice) { - const s1 = []; - const s2 = []; - let i; - for (i = 0; i < address.length; i++) { - if (i < slice[0]) { - s1.push(address[i]); - } - else if (i > slice[1]) { - s2.push(address[i]); - } - } - return s1.concat(['compact']).concat(s2); - } - function paddedHex(octet) { - return parseInt(octet, 16).toString(16).padStart(4, '0'); - } - function unsignByte(b) { - return b & 0xff; - } - class Address6 { - constructor(address, optionalGroups) { - this.addressMinusSuffix = ''; - this.parsedSubnet = ''; - this.subnet = '/128'; - this.subnetMask = 128; - this.v4 = false; - this.zone = ''; - this.isInSubnet = common.isInSubnet; - this.isCorrect = common.isCorrect(constants6.BITS); - if (optionalGroups === undefined) { - this.groups = constants6.GROUPS; - } - else { - this.groups = optionalGroups; - } - this.address = address; - const subnet = constants6.RE_SUBNET_STRING.exec(address); - if (subnet) { - this.parsedSubnet = subnet[0].replace('/', ''); - this.subnetMask = parseInt(this.parsedSubnet, 10); - this.subnet = `/${this.subnetMask}`; - if (Number.isNaN(this.subnetMask) || - this.subnetMask < 0 || - this.subnetMask > constants6.BITS) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - address = address.replace(constants6.RE_SUBNET_STRING, ''); - } - else if (/\//.test(address)) { - throw new address_error_1.AddressError('Invalid subnet mask.'); - } - const zone = constants6.RE_ZONE_STRING.exec(address); - if (zone) { - this.zone = zone[0]; - address = address.replace(constants6.RE_ZONE_STRING, ''); - } - this.addressMinusSuffix = address; - this.parsedAddress = this.parse(this.addressMinusSuffix); - } - static isValid(address) { - try { - new Address6(address); - return true; - } - catch (e) { - return false; - } - } - static fromBigInt(bigInt) { - const hex = bigInt.toString(16).padStart(32, '0'); - const groups = []; - let i; - for (i = 0; i < constants6.GROUPS; i++) { - groups.push(hex.slice(i * 4, (i + 1) * 4)); - } - return new Address6(groups.join(':')); - } - static fromURL(url) { - let host; - let port = null; - let result; - if (url.indexOf('[') !== -1 && url.indexOf(']:') !== -1) { - result = constants6.RE_URL_WITH_PORT.exec(url); - if (result === null) { - return { - error: 'failed to parse address with port', - address: null, - port: null, - }; - } - host = result[1]; - port = result[2]; - } - else if (url.indexOf('/') !== -1) { - url = url.replace(/^[a-z0-9]+:\/\//, ''); - result = constants6.RE_URL.exec(url); - if (result === null) { - return { - error: 'failed to parse address from URL', - address: null, - port: null, - }; - } - host = result[1]; - } - else { - host = url; - } - if (port) { - port = parseInt(port, 10); - if (port < 0 || port > 65536) { - port = null; - } - } - else { - port = null; - } - return { - address: new Address6(host), - port, - }; - } - static fromAddress4(address) { - const address4 = new ipv4_1.Address4(address); - const mask6 = constants6.BITS - (constants4.BITS - address4.subnetMask); - return new Address6(`::ffff:${address4.correctForm()}/${mask6}`); - } - static fromArpa(arpaFormAddress) { - let address = arpaFormAddress.replace(/(\.ip6\.arpa)?\.$/, ''); - const semicolonAmount = 7; - if (address.length !== 63) { - throw new address_error_1.AddressError("Invalid 'ip6.arpa' form."); - } - const parts = address.split('.').reverse(); - for (let i = semicolonAmount; i > 0; i--) { - const insertIndex = i * 4; - parts.splice(insertIndex, 0, ':'); - } - address = parts.join(''); - return new Address6(address); - } - microsoftTranscription() { - return `${this.correctForm().replace(/:/g, '-')}.ipv6-literal.net`; - } - mask(mask = this.subnetMask) { - return this.getBitsBase2(0, mask); - } - possibleSubnets(subnetSize = 128) { - const availableBits = constants6.BITS - this.subnetMask; - const subnetBits = Math.abs(subnetSize - constants6.BITS); - const subnetPowers = availableBits - subnetBits; - if (subnetPowers < 0) { - return '0'; - } - return addCommas((BigInt('2') ** BigInt(subnetPowers)).toString(10)); - } - _startAddress() { - return BigInt(`0b${this.mask() + '0'.repeat(constants6.BITS - this.subnetMask)}`); - } - startAddress() { - return Address6.fromBigInt(this._startAddress()); - } - startAddressExclusive() { - const adjust = BigInt('1'); - return Address6.fromBigInt(this._startAddress() + adjust); - } - _endAddress() { - return BigInt(`0b${this.mask() + '1'.repeat(constants6.BITS - this.subnetMask)}`); - } - endAddress() { - return Address6.fromBigInt(this._endAddress()); - } - endAddressExclusive() { - const adjust = BigInt('1'); - return Address6.fromBigInt(this._endAddress() - adjust); - } - getScope() { - let scope = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)]; - if (this.getType() === 'Global unicast' && scope !== 'Link local') { - scope = 'Global'; - } - return scope || 'Unknown'; - } - getType() { - for (const subnet of Object.keys(constants6.TYPES)) { - if (this.isInSubnet(new Address6(subnet))) { - return constants6.TYPES[subnet]; - } - } - return 'Global unicast'; - } - getBits(start, end) { - return BigInt(`0b${this.getBitsBase2(start, end)}`); - } - getBitsBase2(start, end) { - return this.binaryZeroPad().slice(start, end); - } - getBitsBase16(start, end) { - const length = end - start; - if (length % 4 !== 0) { - throw new Error('Length of bits to retrieve must be divisible by four'); - } - return this.getBits(start, end) - .toString(16) - .padStart(length / 4, '0'); - } - getBitsPastSubnet() { - return this.getBitsBase2(this.subnetMask, constants6.BITS); - } - reverseForm(options) { - if (!options) { - options = {}; - } - const characters = Math.floor(this.subnetMask / 4); - const reversed = this.canonicalForm() - .replace(/:/g, '') - .split('') - .slice(0, characters) - .reverse() - .join('.'); - if (characters > 0) { - if (options.omitSuffix) { - return reversed; - } - return `${reversed}.ip6.arpa.`; - } - if (options.omitSuffix) { - return ''; - } - return 'ip6.arpa.'; - } - correctForm() { - let i; - let groups = []; - let zeroCounter = 0; - const zeroes = []; - for (i = 0; i < this.parsedAddress.length; i++) { - const value = parseInt(this.parsedAddress[i], 16); - if (value === 0) { - zeroCounter++; - } - if (value !== 0 && zeroCounter > 0) { - if (zeroCounter > 1) { - zeroes.push([i - zeroCounter, i - 1]); - } - zeroCounter = 0; - } - } - if (zeroCounter > 1) { - zeroes.push([this.parsedAddress.length - zeroCounter, this.parsedAddress.length - 1]); - } - const zeroLengths = zeroes.map((n) => n[1] - n[0] + 1); - if (zeroes.length > 0) { - const index = zeroLengths.indexOf(Math.max(...zeroLengths)); - groups = compact(this.parsedAddress, zeroes[index]); - } - else { - groups = this.parsedAddress; - } - for (i = 0; i < groups.length; i++) { - if (groups[i] !== 'compact') { - groups[i] = parseInt(groups[i], 16).toString(16); - } - } - let correct = groups.join(':'); - correct = correct.replace(/^compact$/, '::'); - correct = correct.replace(/(^compact)|(compact$)/, ':'); - correct = correct.replace(/compact/, ''); - return correct; - } - binaryZeroPad() { - return this.bigInt().toString(2).padStart(constants6.BITS, '0'); - } - parse4in6(address) { - const groups = address.split(':'); - const lastGroup = groups.slice(-1)[0]; - const address4 = lastGroup.match(constants4.RE_ADDRESS); - if (address4) { - this.parsedAddress4 = address4[0]; - this.address4 = new ipv4_1.Address4(this.parsedAddress4); - for (let i = 0; i < this.address4.groups; i++) { - if (/^0[0-9]+/.test(this.address4.parsedAddress[i])) { - throw new address_error_1.AddressError("IPv4 addresses can't have leading zeroes.", address.replace(constants4.RE_ADDRESS, this.address4.parsedAddress.map(spanLeadingZeroes4).join('.'))); - } - } - this.v4 = true; - groups[groups.length - 1] = this.address4.toGroup6(); - address = groups.join(':'); - } - return address; - } - parse(address) { - address = this.parse4in6(address); - const badCharacters = address.match(constants6.RE_BAD_CHARACTERS); - if (badCharacters) { - throw new address_error_1.AddressError(`Bad character${badCharacters.length > 1 ? 's' : ''} detected in address: ${badCharacters.join('')}`, address.replace(constants6.RE_BAD_CHARACTERS, '$1')); - } - const badAddress = address.match(constants6.RE_BAD_ADDRESS); - if (badAddress) { - throw new address_error_1.AddressError(`Address failed regex: ${badAddress.join('')}`, address.replace(constants6.RE_BAD_ADDRESS, '$1')); - } - let groups = []; - const halves = address.split('::'); - if (halves.length === 2) { - let first = halves[0].split(':'); - let last = halves[1].split(':'); - if (first.length === 1 && first[0] === '') { - first = []; - } - if (last.length === 1 && last[0] === '') { - last = []; - } - const remaining = this.groups - (first.length + last.length); - if (!remaining) { - throw new address_error_1.AddressError('Error parsing groups'); - } - this.elidedGroups = remaining; - this.elisionBegin = first.length; - this.elisionEnd = first.length + this.elidedGroups; - groups = groups.concat(first); - for (let i = 0; i < remaining; i++) { - groups.push('0'); - } - groups = groups.concat(last); - } - else if (halves.length === 1) { - groups = address.split(':'); - this.elidedGroups = 0; - } - else { - throw new address_error_1.AddressError('Too many :: groups found'); - } - groups = groups.map((group) => parseInt(group, 16).toString(16)); - if (groups.length !== this.groups) { - throw new address_error_1.AddressError('Incorrect number of groups found'); - } - return groups; - } - canonicalForm() { - return this.parsedAddress.map(paddedHex).join(':'); - } - decimal() { - return this.parsedAddress.map((n) => parseInt(n, 16).toString(10).padStart(5, '0')).join(':'); - } - bigInt() { - return BigInt(`0x${this.parsedAddress.map(paddedHex).join('')}`); - } - to4() { - const binary = this.binaryZeroPad().split(''); - return ipv4_1.Address4.fromHex(BigInt(`0b${binary.slice(96, 128).join('')}`).toString(16)); - } - to4in6() { - const address4 = this.to4(); - const address6 = new Address6(this.parsedAddress.slice(0, 6).join(':'), 6); - const correct = address6.correctForm(); - let infix = ''; - if (!/:$/.test(correct)) { - infix = ':'; - } - return correct + infix + address4.address; - } - inspectTeredo() { - const prefix = this.getBitsBase16(0, 32); - const bitsForUdpPort = this.getBits(80, 96); - const udpPort = (bitsForUdpPort ^ BigInt('0xffff')).toString(); - const server4 = ipv4_1.Address4.fromHex(this.getBitsBase16(32, 64)); - const bitsForClient4 = this.getBits(96, 128); - const client4 = ipv4_1.Address4.fromHex((bitsForClient4 ^ BigInt('0xffffffff')).toString(16)); - const flagsBase2 = this.getBitsBase2(64, 80); - const coneNat = (0, common_1.testBit)(flagsBase2, 15); - const reserved = (0, common_1.testBit)(flagsBase2, 14); - const groupIndividual = (0, common_1.testBit)(flagsBase2, 8); - const universalLocal = (0, common_1.testBit)(flagsBase2, 9); - const nonce = BigInt(`0b${flagsBase2.slice(2, 6) + flagsBase2.slice(8, 16)}`).toString(10); - return { - prefix: `${prefix.slice(0, 4)}:${prefix.slice(4, 8)}`, - server4: server4.address, - client4: client4.address, - flags: flagsBase2, - coneNat, - microsoft: { - reserved, - universalLocal, - groupIndividual, - nonce, - }, - udpPort, - }; - } - inspect6to4() { - const prefix = this.getBitsBase16(0, 16); - const gateway = ipv4_1.Address4.fromHex(this.getBitsBase16(16, 48)); - return { - prefix: prefix.slice(0, 4), - gateway: gateway.address, - }; - } - to6to4() { - if (!this.is4()) { - return null; - } - const addr6to4 = [ - '2002', - this.getBitsBase16(96, 112), - this.getBitsBase16(112, 128), - '', - '/16', - ].join(':'); - return new Address6(addr6to4); - } - toByteArray() { - const valueWithoutPadding = this.bigInt().toString(16); - const leadingPad = '0'.repeat(valueWithoutPadding.length % 2); - const value = `${leadingPad}${valueWithoutPadding}`; - const bytes = []; - for (let i = 0, length = value.length; i < length; i += 2) { - bytes.push(parseInt(value.substring(i, i + 2), 16)); - } - return bytes; - } - toUnsignedByteArray() { - return this.toByteArray().map(unsignByte); - } - static fromByteArray(bytes) { - return this.fromUnsignedByteArray(bytes.map(unsignByte)); - } - static fromUnsignedByteArray(bytes) { - const BYTE_MAX = BigInt('256'); - let result = BigInt('0'); - let multiplier = BigInt('1'); - for (let i = bytes.length - 1; i >= 0; i--) { - result += multiplier * BigInt(bytes[i].toString(10)); - multiplier *= BYTE_MAX; - } - return Address6.fromBigInt(result); - } - isCanonical() { - return this.addressMinusSuffix === this.canonicalForm(); - } - isLinkLocal() { - if (this.getBitsBase2(0, 64) === - '1111111010000000000000000000000000000000000000000000000000000000') { - return true; - } - return false; - } - isMulticast() { - return this.getType() === 'Multicast'; - } - is4() { - return this.v4; - } - isTeredo() { - return this.isInSubnet(new Address6('2001::/32')); - } - is6to4() { - return this.isInSubnet(new Address6('2002::/16')); - } - isLoopback() { - return this.getType() === 'Loopback'; - } - href(optionalPort) { - if (optionalPort === undefined) { - optionalPort = ''; - } - else { - optionalPort = `:${optionalPort}`; - } - return `http://[${this.correctForm()}]${optionalPort}/`; - } - link(options) { - if (!options) { - options = {}; - } - if (options.className === undefined) { - options.className = ''; - } - if (options.prefix === undefined) { - options.prefix = '/#address='; - } - if (options.v4 === undefined) { - options.v4 = false; - } - let formFunction = this.correctForm; - if (options.v4) { - formFunction = this.to4in6; - } - const form = formFunction.call(this); - if (options.className) { - return `${form}`; - } - return `${form}`; - } - group() { - if (this.elidedGroups === 0) { - return helpers.simpleGroup(this.address).join(':'); - } - assert(typeof this.elidedGroups === 'number'); - assert(typeof this.elisionBegin === 'number'); - const output = []; - const [left, right] = this.address.split('::'); - if (left.length) { - output.push(...helpers.simpleGroup(left)); - } - else { - output.push(''); - } - const classes = ['hover-group']; - for (let i = this.elisionBegin; i < this.elisionBegin + this.elidedGroups; i++) { - classes.push(`group-${i}`); - } - output.push(``); - if (right.length) { - output.push(...helpers.simpleGroup(right, this.elisionEnd)); - } - else { - output.push(''); - } - if (this.is4()) { - assert(this.address4 instanceof ipv4_1.Address4); - output.pop(); - output.push(this.address4.groupForV6()); - } - return output.join(':'); - } - regularExpressionString(substringSearch = false) { - let output = []; - const address6 = new Address6(this.correctForm()); - if (address6.elidedGroups === 0) { - output.push((0, regular_expressions_1.simpleRegularExpression)(address6.parsedAddress)); - } - else if (address6.elidedGroups === constants6.GROUPS) { - output.push((0, regular_expressions_1.possibleElisions)(constants6.GROUPS)); - } - else { - const halves = address6.address.split('::'); - if (halves[0].length) { - output.push((0, regular_expressions_1.simpleRegularExpression)(halves[0].split(':'))); - } - assert(typeof address6.elidedGroups === 'number'); - output.push((0, regular_expressions_1.possibleElisions)(address6.elidedGroups, halves[0].length !== 0, halves[1].length !== 0)); - if (halves[1].length) { - output.push((0, regular_expressions_1.simpleRegularExpression)(halves[1].split(':'))); - } - output = [output.join(':')]; - } - if (!substringSearch) { - output = [ - '(?=^|', - regular_expressions_1.ADDRESS_BOUNDARY, - '|[^\\w\\:])(', - ...output, - ')(?=[^\\w\\:]|', - regular_expressions_1.ADDRESS_BOUNDARY, - '|$)', - ]; - } - return output.join(''); - } - regularExpression(substringSearch = false) { - return new RegExp(this.regularExpressionString(substringSearch), 'i'); - } - } - ipv6.Address6 = Address6; - return ipv6; -} - -var hasRequiredIpAddress; - -function requireIpAddress () { - if (hasRequiredIpAddress) return ipAddress; - hasRequiredIpAddress = 1; - (function (exports$1) { - var __createBinding = (ipAddress && ipAddress.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (ipAddress && ipAddress.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (ipAddress && ipAddress.__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; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.v6 = exports$1.AddressError = exports$1.Address6 = exports$1.Address4 = void 0; - var ipv4_1 = requireIpv4(); - Object.defineProperty(exports$1, "Address4", { enumerable: true, get: function () { return ipv4_1.Address4; } }); - var ipv6_1 = requireIpv6(); - Object.defineProperty(exports$1, "Address6", { enumerable: true, get: function () { return ipv6_1.Address6; } }); - var address_error_1 = requireAddressError(); - Object.defineProperty(exports$1, "AddressError", { enumerable: true, get: function () { return address_error_1.AddressError; } }); - const helpers = __importStar(requireHelpers$1()); - exports$1.v6 = { helpers }; - } (ipAddress)); - return ipAddress; -} - -var hasRequiredHelpers; - -function requireHelpers () { - if (hasRequiredHelpers) return helpers$3; - hasRequiredHelpers = 1; - Object.defineProperty(helpers$3, "__esModule", { value: true }); - helpers$3.ipToBuffer = helpers$3.int32ToIpv4 = helpers$3.ipv4ToInt32 = helpers$3.validateSocksClientChainOptions = helpers$3.validateSocksClientOptions = void 0; - const util_1 = requireUtil$2(); - const constants_1 = requireConstants$3(); - const stream = require$$1$3; - const ip_address_1 = requireIpAddress(); - const net = require$$0$7; - function validateSocksClientOptions(options, acceptedCommands = ['connect', 'bind', 'associate']) { - if (!constants_1.SocksCommand[options.command]) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options); - } - if (acceptedCommands.indexOf(options.command) === -1) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandForOperation, options); - } - if (!isValidSocksRemoteHost(options.destination)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options); - } - if (!isValidSocksProxy(options.proxy)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options); - } - validateCustomProxyAuth(options.proxy, options); - if (options.timeout && !isValidTimeoutValue(options.timeout)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options); - } - if (options.existing_socket && - !(options.existing_socket instanceof stream.Duplex)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsExistingSocket, options); - } - } - helpers$3.validateSocksClientOptions = validateSocksClientOptions; - function validateSocksClientChainOptions(options) { - if (options.command !== 'connect') { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandChain, options); - } - if (!isValidSocksRemoteHost(options.destination)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options); - } - if (!(options.proxies && - Array.isArray(options.proxies) && - options.proxies.length >= 2)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxiesLength, options); - } - options.proxies.forEach((proxy) => { - if (!isValidSocksProxy(proxy)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options); - } - validateCustomProxyAuth(proxy, options); - }); - if (options.timeout && !isValidTimeoutValue(options.timeout)) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options); - } - } - helpers$3.validateSocksClientChainOptions = validateSocksClientChainOptions; - function validateCustomProxyAuth(proxy, options) { - if (proxy.custom_auth_method !== undefined) { - if (proxy.custom_auth_method < constants_1.SOCKS5_CUSTOM_AUTH_START || - proxy.custom_auth_method > constants_1.SOCKS5_CUSTOM_AUTH_END) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthRange, options); - } - if (proxy.custom_auth_request_handler === undefined || - typeof proxy.custom_auth_request_handler !== 'function') { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); - } - if (proxy.custom_auth_response_size === undefined) { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); - } - if (proxy.custom_auth_response_handler === undefined || - typeof proxy.custom_auth_response_handler !== 'function') { - throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options); - } - } - } - function isValidSocksRemoteHost(remoteHost) { - return (remoteHost && - typeof remoteHost.host === 'string' && - Buffer.byteLength(remoteHost.host) < 256 && - typeof remoteHost.port === 'number' && - remoteHost.port >= 0 && - remoteHost.port <= 65535); - } - function isValidSocksProxy(proxy) { - return (proxy && - (typeof proxy.host === 'string' || typeof proxy.ipaddress === 'string') && - typeof proxy.port === 'number' && - proxy.port >= 0 && - proxy.port <= 65535 && - (proxy.type === 4 || proxy.type === 5)); - } - function isValidTimeoutValue(value) { - return typeof value === 'number' && value > 0; - } - function ipv4ToInt32(ip) { - const address = new ip_address_1.Address4(ip); - return address.toArray().reduce((acc, part) => (acc << 8) + part, 0) >>> 0; - } - helpers$3.ipv4ToInt32 = ipv4ToInt32; - function int32ToIpv4(int32) { - const octet1 = (int32 >>> 24) & 0xff; - const octet2 = (int32 >>> 16) & 0xff; - const octet3 = (int32 >>> 8) & 0xff; - const octet4 = int32 & 0xff; - return [octet1, octet2, octet3, octet4].join('.'); - } - helpers$3.int32ToIpv4 = int32ToIpv4; - function ipToBuffer(ip) { - if (net.isIPv4(ip)) { - const address = new ip_address_1.Address4(ip); - return Buffer.from(address.toArray()); - } - else if (net.isIPv6(ip)) { - const address = new ip_address_1.Address6(ip); - return Buffer.from(address - .canonicalForm() - .split(':') - .map((segment) => segment.padStart(4, '0')) - .join(''), 'hex'); - } - else { - throw new Error('Invalid IP address format'); - } - } - helpers$3.ipToBuffer = ipToBuffer; - return helpers$3; -} - -var receivebuffer = {}; - -var hasRequiredReceivebuffer; - -function requireReceivebuffer () { - if (hasRequiredReceivebuffer) return receivebuffer; - hasRequiredReceivebuffer = 1; - Object.defineProperty(receivebuffer, "__esModule", { value: true }); - receivebuffer.ReceiveBuffer = void 0; - class ReceiveBuffer { - constructor(size = 4096) { - this.buffer = Buffer.allocUnsafe(size); - this.offset = 0; - this.originalSize = size; - } - get length() { - return this.offset; - } - append(data) { - if (!Buffer.isBuffer(data)) { - throw new Error('Attempted to append a non-buffer instance to ReceiveBuffer.'); - } - if (this.offset + data.length >= this.buffer.length) { - const tmp = this.buffer; - this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data.length)); - tmp.copy(this.buffer); - } - data.copy(this.buffer, this.offset); - return (this.offset += data.length); - } - peek(length) { - if (length > this.offset) { - throw new Error('Attempted to read beyond the bounds of the managed internal data.'); - } - return this.buffer.slice(0, length); - } - get(length) { - if (length > this.offset) { - throw new Error('Attempted to read beyond the bounds of the managed internal data.'); - } - const value = Buffer.allocUnsafe(length); - this.buffer.slice(0, length).copy(value); - this.buffer.copyWithin(0, length, length + this.offset - length); - this.offset -= length; - return value; - } - } - receivebuffer.ReceiveBuffer = ReceiveBuffer; - return receivebuffer; -} - -var hasRequiredSocksclient; - -function requireSocksclient () { - if (hasRequiredSocksclient) return socksclient; - hasRequiredSocksclient = 1; - (function (exports$1) { - var __awaiter = (socksclient && socksclient.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.SocksClientError = exports$1.SocksClient = void 0; - const events_1 = require$$0$8; - const net = require$$0$7; - const smart_buffer_1 = requireSmartbuffer(); - const constants_1 = requireConstants$3(); - const helpers_1 = requireHelpers(); - const receivebuffer_1 = requireReceivebuffer(); - const util_1 = requireUtil$2(); - Object.defineProperty(exports$1, "SocksClientError", { enumerable: true, get: function () { return util_1.SocksClientError; } }); - const ip_address_1 = requireIpAddress(); - class SocksClient extends events_1.EventEmitter { - constructor(options) { - super(); - this.options = Object.assign({}, options); - (0, helpers_1.validateSocksClientOptions)(options); - this.setState(constants_1.SocksClientState.Created); - } - static createConnection(options, callback) { - return new Promise((resolve, reject) => { - try { - (0, helpers_1.validateSocksClientOptions)(options, ['connect']); - } - catch (err) { - if (typeof callback === 'function') { - callback(err); - return resolve(err); - } - else { - return reject(err); - } - } - const client = new SocksClient(options); - client.connect(options.existing_socket); - client.once('established', (info) => { - client.removeAllListeners(); - if (typeof callback === 'function') { - callback(null, info); - resolve(info); - } - else { - resolve(info); - } - }); - client.once('error', (err) => { - client.removeAllListeners(); - if (typeof callback === 'function') { - callback(err); - resolve(err); - } - else { - reject(err); - } - }); - }); - } - static createConnectionChain(options, callback) { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - try { - (0, helpers_1.validateSocksClientChainOptions)(options); - } - catch (err) { - if (typeof callback === 'function') { - callback(err); - return resolve(err); - } - else { - return reject(err); - } - } - if (options.randomizeChain) { - (0, util_1.shuffleArray)(options.proxies); - } - try { - let sock; - for (let i = 0; i < options.proxies.length; i++) { - const nextProxy = options.proxies[i]; - const nextDestination = i === options.proxies.length - 1 - ? options.destination - : { - host: options.proxies[i + 1].host || - options.proxies[i + 1].ipaddress, - port: options.proxies[i + 1].port, - }; - const result = yield SocksClient.createConnection({ - command: 'connect', - proxy: nextProxy, - destination: nextDestination, - existing_socket: sock, - }); - sock = sock || result.socket; - } - if (typeof callback === 'function') { - callback(null, { socket: sock }); - resolve({ socket: sock }); - } - else { - resolve({ socket: sock }); - } - } - catch (err) { - if (typeof callback === 'function') { - callback(err); - resolve(err); - } - else { - reject(err); - } - } - })); - } - static createUDPFrame(options) { - const buff = new smart_buffer_1.SmartBuffer(); - buff.writeUInt16BE(0); - buff.writeUInt8(options.frameNumber || 0); - if (net.isIPv4(options.remoteHost.host)) { - buff.writeUInt8(constants_1.Socks5HostType.IPv4); - buff.writeUInt32BE((0, helpers_1.ipv4ToInt32)(options.remoteHost.host)); - } - else if (net.isIPv6(options.remoteHost.host)) { - buff.writeUInt8(constants_1.Socks5HostType.IPv6); - buff.writeBuffer((0, helpers_1.ipToBuffer)(options.remoteHost.host)); - } - else { - buff.writeUInt8(constants_1.Socks5HostType.Hostname); - buff.writeUInt8(Buffer.byteLength(options.remoteHost.host)); - buff.writeString(options.remoteHost.host); - } - buff.writeUInt16BE(options.remoteHost.port); - buff.writeBuffer(options.data); - return buff.toBuffer(); - } - static parseUDPFrame(data) { - const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); - buff.readOffset = 2; - const frameNumber = buff.readUInt8(); - const hostType = buff.readUInt8(); - let remoteHost; - if (hostType === constants_1.Socks5HostType.IPv4) { - remoteHost = (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()); - } - else if (hostType === constants_1.Socks5HostType.IPv6) { - remoteHost = ip_address_1.Address6.fromByteArray(Array.from(buff.readBuffer(16))).canonicalForm(); - } - else { - remoteHost = buff.readString(buff.readUInt8()); - } - const remotePort = buff.readUInt16BE(); - return { - frameNumber, - remoteHost: { - host: remoteHost, - port: remotePort, - }, - data: buff.readBuffer(), - }; - } - setState(newState) { - if (this.state !== constants_1.SocksClientState.Error) { - this.state = newState; - } - } - connect(existingSocket) { - this.onDataReceived = (data) => this.onDataReceivedHandler(data); - this.onClose = () => this.onCloseHandler(); - this.onError = (err) => this.onErrorHandler(err); - this.onConnect = () => this.onConnectHandler(); - const timer = setTimeout(() => this.onEstablishedTimeout(), this.options.timeout || constants_1.DEFAULT_TIMEOUT); - if (timer.unref && typeof timer.unref === 'function') { - timer.unref(); - } - if (existingSocket) { - this.socket = existingSocket; - } - else { - this.socket = new net.Socket(); - } - this.socket.once('close', this.onClose); - this.socket.once('error', this.onError); - this.socket.once('connect', this.onConnect); - this.socket.on('data', this.onDataReceived); - this.setState(constants_1.SocksClientState.Connecting); - this.receiveBuffer = new receivebuffer_1.ReceiveBuffer(); - if (existingSocket) { - this.socket.emit('connect'); - } - else { - this.socket.connect(this.getSocketOptions()); - if (this.options.set_tcp_nodelay !== undefined && - this.options.set_tcp_nodelay !== null) { - this.socket.setNoDelay(!!this.options.set_tcp_nodelay); - } - } - this.prependOnceListener('established', (info) => { - setImmediate(() => { - if (this.receiveBuffer.length > 0) { - const excessData = this.receiveBuffer.get(this.receiveBuffer.length); - info.socket.emit('data', excessData); - } - info.socket.resume(); - }); - }); - } - getSocketOptions() { - return Object.assign(Object.assign({}, this.options.socket_options), { host: this.options.proxy.host || this.options.proxy.ipaddress, port: this.options.proxy.port }); - } - onEstablishedTimeout() { - if (this.state !== constants_1.SocksClientState.Established && - this.state !== constants_1.SocksClientState.BoundWaitingForConnection) { - this.closeSocket(constants_1.ERRORS.ProxyConnectionTimedOut); - } - } - onConnectHandler() { - this.setState(constants_1.SocksClientState.Connected); - if (this.options.proxy.type === 4) { - this.sendSocks4InitialHandshake(); - } - else { - this.sendSocks5InitialHandshake(); - } - this.setState(constants_1.SocksClientState.SentInitialHandshake); - } - onDataReceivedHandler(data) { - this.receiveBuffer.append(data); - this.processData(); - } - processData() { - while (this.state !== constants_1.SocksClientState.Established && - this.state !== constants_1.SocksClientState.Error && - this.receiveBuffer.length >= this.nextRequiredPacketBufferSize) { - if (this.state === constants_1.SocksClientState.SentInitialHandshake) { - if (this.options.proxy.type === 4) { - this.handleSocks4FinalHandshakeResponse(); - } - else { - this.handleInitialSocks5HandshakeResponse(); - } - } - else if (this.state === constants_1.SocksClientState.SentAuthentication) { - this.handleInitialSocks5AuthenticationHandshakeResponse(); - } - else if (this.state === constants_1.SocksClientState.SentFinalHandshake) { - this.handleSocks5FinalHandshakeResponse(); - } - else if (this.state === constants_1.SocksClientState.BoundWaitingForConnection) { - if (this.options.proxy.type === 4) { - this.handleSocks4IncomingConnectionResponse(); - } - else { - this.handleSocks5IncomingConnectionResponse(); - } - } - else { - this.closeSocket(constants_1.ERRORS.InternalError); - break; - } - } - } - onCloseHandler() { - this.closeSocket(constants_1.ERRORS.SocketClosed); - } - onErrorHandler(err) { - this.closeSocket(err.message); - } - removeInternalSocketHandlers() { - this.socket.pause(); - this.socket.removeListener('data', this.onDataReceived); - this.socket.removeListener('close', this.onClose); - this.socket.removeListener('error', this.onError); - this.socket.removeListener('connect', this.onConnect); - } - closeSocket(err) { - if (this.state !== constants_1.SocksClientState.Error) { - this.setState(constants_1.SocksClientState.Error); - this.socket.destroy(); - this.removeInternalSocketHandlers(); - this.emit('error', new util_1.SocksClientError(err, this.options)); - } - } - sendSocks4InitialHandshake() { - const userId = this.options.proxy.userId || ''; - const buff = new smart_buffer_1.SmartBuffer(); - buff.writeUInt8(0x04); - buff.writeUInt8(constants_1.SocksCommand[this.options.command]); - buff.writeUInt16BE(this.options.destination.port); - if (net.isIPv4(this.options.destination.host)) { - buff.writeBuffer((0, helpers_1.ipToBuffer)(this.options.destination.host)); - buff.writeStringNT(userId); - } - else { - buff.writeUInt8(0x00); - buff.writeUInt8(0x00); - buff.writeUInt8(0x00); - buff.writeUInt8(0x01); - buff.writeStringNT(userId); - buff.writeStringNT(this.options.destination.host); - } - this.nextRequiredPacketBufferSize = - constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks4Response; - this.socket.write(buff.toBuffer()); - } - handleSocks4FinalHandshakeResponse() { - const data = this.receiveBuffer.get(8); - if (data[1] !== constants_1.Socks4Response.Granted) { - this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedConnection} - (${constants_1.Socks4Response[data[1]]})`); - } - else { - if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) { - const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); - buff.readOffset = 2; - const remoteHost = { - port: buff.readUInt16BE(), - host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()), - }; - if (remoteHost.host === '0.0.0.0') { - remoteHost.host = this.options.proxy.ipaddress; - } - this.setState(constants_1.SocksClientState.BoundWaitingForConnection); - this.emit('bound', { remoteHost, socket: this.socket }); - } - else { - this.setState(constants_1.SocksClientState.Established); - this.removeInternalSocketHandlers(); - this.emit('established', { socket: this.socket }); - } - } - } - handleSocks4IncomingConnectionResponse() { - const data = this.receiveBuffer.get(8); - if (data[1] !== constants_1.Socks4Response.Granted) { - this.closeSocket(`${constants_1.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${constants_1.Socks4Response[data[1]]})`); - } - else { - const buff = smart_buffer_1.SmartBuffer.fromBuffer(data); - buff.readOffset = 2; - const remoteHost = { - port: buff.readUInt16BE(), - host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()), - }; - this.setState(constants_1.SocksClientState.Established); - this.removeInternalSocketHandlers(); - this.emit('established', { remoteHost, socket: this.socket }); - } - } - sendSocks5InitialHandshake() { - const buff = new smart_buffer_1.SmartBuffer(); - const supportedAuthMethods = [constants_1.Socks5Auth.NoAuth]; - if (this.options.proxy.userId || this.options.proxy.password) { - supportedAuthMethods.push(constants_1.Socks5Auth.UserPass); - } - if (this.options.proxy.custom_auth_method !== undefined) { - supportedAuthMethods.push(this.options.proxy.custom_auth_method); - } - buff.writeUInt8(0x05); - buff.writeUInt8(supportedAuthMethods.length); - for (const authMethod of supportedAuthMethods) { - buff.writeUInt8(authMethod); - } - this.nextRequiredPacketBufferSize = - constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse; - this.socket.write(buff.toBuffer()); - this.setState(constants_1.SocksClientState.SentInitialHandshake); - } - handleInitialSocks5HandshakeResponse() { - const data = this.receiveBuffer.get(2); - if (data[0] !== 0x05) { - this.closeSocket(constants_1.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion); - } - else if (data[1] === constants_1.SOCKS5_NO_ACCEPTABLE_AUTH) { - this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType); - } - else { - if (data[1] === constants_1.Socks5Auth.NoAuth) { - this.socks5ChosenAuthType = constants_1.Socks5Auth.NoAuth; - this.sendSocks5CommandRequest(); - } - else if (data[1] === constants_1.Socks5Auth.UserPass) { - this.socks5ChosenAuthType = constants_1.Socks5Auth.UserPass; - this.sendSocks5UserPassAuthentication(); - } - else if (data[1] === this.options.proxy.custom_auth_method) { - this.socks5ChosenAuthType = this.options.proxy.custom_auth_method; - this.sendSocks5CustomAuthentication(); - } - else { - this.closeSocket(constants_1.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType); - } - } - } - sendSocks5UserPassAuthentication() { - const userId = this.options.proxy.userId || ''; - const password = this.options.proxy.password || ''; - const buff = new smart_buffer_1.SmartBuffer(); - buff.writeUInt8(0x01); - buff.writeUInt8(Buffer.byteLength(userId)); - buff.writeString(userId); - buff.writeUInt8(Buffer.byteLength(password)); - buff.writeString(password); - this.nextRequiredPacketBufferSize = - constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse; - this.socket.write(buff.toBuffer()); - this.setState(constants_1.SocksClientState.SentAuthentication); - } - sendSocks5CustomAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - this.nextRequiredPacketBufferSize = - this.options.proxy.custom_auth_response_size; - this.socket.write(yield this.options.proxy.custom_auth_request_handler()); - this.setState(constants_1.SocksClientState.SentAuthentication); - }); - } - handleSocks5CustomAuthHandshakeResponse(data) { - return __awaiter(this, void 0, void 0, function* () { - return yield this.options.proxy.custom_auth_response_handler(data); - }); - } - handleSocks5AuthenticationNoAuthHandshakeResponse(data) { - return __awaiter(this, void 0, void 0, function* () { - return data[1] === 0x00; - }); - } - handleSocks5AuthenticationUserPassHandshakeResponse(data) { - return __awaiter(this, void 0, void 0, function* () { - return data[1] === 0x00; - }); - } - handleInitialSocks5AuthenticationHandshakeResponse() { - return __awaiter(this, void 0, void 0, function* () { - this.setState(constants_1.SocksClientState.ReceivedAuthenticationResponse); - let authResult = false; - if (this.socks5ChosenAuthType === constants_1.Socks5Auth.NoAuth) { - authResult = yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)); - } - else if (this.socks5ChosenAuthType === constants_1.Socks5Auth.UserPass) { - authResult = - yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)); - } - else if (this.socks5ChosenAuthType === this.options.proxy.custom_auth_method) { - authResult = yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size)); - } - if (!authResult) { - this.closeSocket(constants_1.ERRORS.Socks5AuthenticationFailed); - } - else { - this.sendSocks5CommandRequest(); - } - }); - } - sendSocks5CommandRequest() { - const buff = new smart_buffer_1.SmartBuffer(); - buff.writeUInt8(0x05); - buff.writeUInt8(constants_1.SocksCommand[this.options.command]); - buff.writeUInt8(0x00); - if (net.isIPv4(this.options.destination.host)) { - buff.writeUInt8(constants_1.Socks5HostType.IPv4); - buff.writeBuffer((0, helpers_1.ipToBuffer)(this.options.destination.host)); - } - else if (net.isIPv6(this.options.destination.host)) { - buff.writeUInt8(constants_1.Socks5HostType.IPv6); - buff.writeBuffer((0, helpers_1.ipToBuffer)(this.options.destination.host)); - } - else { - buff.writeUInt8(constants_1.Socks5HostType.Hostname); - buff.writeUInt8(this.options.destination.host.length); - buff.writeString(this.options.destination.host); - } - buff.writeUInt16BE(this.options.destination.port); - this.nextRequiredPacketBufferSize = - constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader; - this.socket.write(buff.toBuffer()); - this.setState(constants_1.SocksClientState.SentFinalHandshake); - } - handleSocks5FinalHandshakeResponse() { - const header = this.receiveBuffer.peek(5); - if (header[0] !== 0x05 || header[1] !== constants_1.Socks5Response.Granted) { - this.closeSocket(`${constants_1.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${constants_1.Socks5Response[header[1]]}`); - } - else { - const addressType = header[3]; - let remoteHost; - let buff; - if (addressType === constants_1.Socks5HostType.IPv4) { - const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4; - if (this.receiveBuffer.length < dataNeeded) { - this.nextRequiredPacketBufferSize = dataNeeded; - return; - } - buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); - remoteHost = { - host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()), - port: buff.readUInt16BE(), - }; - if (remoteHost.host === '0.0.0.0') { - remoteHost.host = this.options.proxy.ipaddress; - } - } - else if (addressType === constants_1.Socks5HostType.Hostname) { - const hostLength = header[4]; - const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); - if (this.receiveBuffer.length < dataNeeded) { - this.nextRequiredPacketBufferSize = dataNeeded; - return; - } - buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5)); - remoteHost = { - host: buff.readString(hostLength), - port: buff.readUInt16BE(), - }; - } - else if (addressType === constants_1.Socks5HostType.IPv6) { - const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6; - if (this.receiveBuffer.length < dataNeeded) { - this.nextRequiredPacketBufferSize = dataNeeded; - return; - } - buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); - remoteHost = { - host: ip_address_1.Address6.fromByteArray(Array.from(buff.readBuffer(16))).canonicalForm(), - port: buff.readUInt16BE(), - }; - } - this.setState(constants_1.SocksClientState.ReceivedFinalResponse); - if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.connect) { - this.setState(constants_1.SocksClientState.Established); - this.removeInternalSocketHandlers(); - this.emit('established', { remoteHost, socket: this.socket }); - } - else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.bind) { - this.setState(constants_1.SocksClientState.BoundWaitingForConnection); - this.nextRequiredPacketBufferSize = - constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader; - this.emit('bound', { remoteHost, socket: this.socket }); - } - else if (constants_1.SocksCommand[this.options.command] === constants_1.SocksCommand.associate) { - this.setState(constants_1.SocksClientState.Established); - this.removeInternalSocketHandlers(); - this.emit('established', { - remoteHost, - socket: this.socket, - }); - } - } - } - handleSocks5IncomingConnectionResponse() { - const header = this.receiveBuffer.peek(5); - if (header[0] !== 0x05 || header[1] !== constants_1.Socks5Response.Granted) { - this.closeSocket(`${constants_1.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${constants_1.Socks5Response[header[1]]}`); - } - else { - const addressType = header[3]; - let remoteHost; - let buff; - if (addressType === constants_1.Socks5HostType.IPv4) { - const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4; - if (this.receiveBuffer.length < dataNeeded) { - this.nextRequiredPacketBufferSize = dataNeeded; - return; - } - buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); - remoteHost = { - host: (0, helpers_1.int32ToIpv4)(buff.readUInt32BE()), - port: buff.readUInt16BE(), - }; - if (remoteHost.host === '0.0.0.0') { - remoteHost.host = this.options.proxy.ipaddress; - } - } - else if (addressType === constants_1.Socks5HostType.Hostname) { - const hostLength = header[4]; - const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(hostLength); - if (this.receiveBuffer.length < dataNeeded) { - this.nextRequiredPacketBufferSize = dataNeeded; - return; - } - buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(5)); - remoteHost = { - host: buff.readString(hostLength), - port: buff.readUInt16BE(), - }; - } - else if (addressType === constants_1.Socks5HostType.IPv6) { - const dataNeeded = constants_1.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6; - if (this.receiveBuffer.length < dataNeeded) { - this.nextRequiredPacketBufferSize = dataNeeded; - return; - } - buff = smart_buffer_1.SmartBuffer.fromBuffer(this.receiveBuffer.get(dataNeeded).slice(4)); - remoteHost = { - host: ip_address_1.Address6.fromByteArray(Array.from(buff.readBuffer(16))).canonicalForm(), - port: buff.readUInt16BE(), - }; - } - this.setState(constants_1.SocksClientState.Established); - this.removeInternalSocketHandlers(); - this.emit('established', { remoteHost, socket: this.socket }); - } - } - get socksClientOptions() { - return Object.assign({}, this.options); - } - } - exports$1.SocksClient = SocksClient; - } (socksclient)); - return socksclient; -} - -var hasRequiredBuild; - -function requireBuild () { - if (hasRequiredBuild) return build; - hasRequiredBuild = 1; - (function (exports$1) { - var __createBinding = (build && build.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __exportStar = (build && build.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - __exportStar(requireSocksclient(), exports$1); - } (build)); - return build; -} - -var hasRequiredDist$8; - -function requireDist$8 () { - if (hasRequiredDist$8) return dist$7; - hasRequiredDist$8 = 1; - var __createBinding = (dist$7 && dist$7.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist$7 && dist$7.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (dist$7 && dist$7.__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 __importDefault = (dist$7 && dist$7.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(dist$7, "__esModule", { value: true }); - dist$7.SocksProxyAgent = void 0; - const socks_1 = requireBuild(); - const agent_base_1 = requireDist$b(); - const debug_1 = __importDefault(requireSrc()); - const dns = __importStar(require$$3$3); - const net = __importStar(require$$0$7); - const tls = __importStar(require$$1$2); - const url_1 = require$$5; - const debug = (0, debug_1.default)('socks-proxy-agent'); - const setServernameFromNonIpHost = (options) => { - if (options.servername === undefined && - options.host && - !net.isIP(options.host)) { - return { - ...options, - servername: options.host, - }; - } - return options; - }; - function parseSocksURL(url) { - let lookup = false; - let type = 5; - const host = url.hostname; - const port = parseInt(url.port, 10) || 1080; - switch (url.protocol.replace(':', '')) { - case 'socks4': - lookup = true; - type = 4; - break; - case 'socks4a': - type = 4; - break; - case 'socks5': - lookup = true; - type = 5; - break; - case 'socks': - type = 5; - break; - case 'socks5h': - type = 5; - break; - default: - throw new TypeError(`A "socks" protocol must be specified! Got: ${String(url.protocol)}`); - } - const proxy = { - host, - port, - type, - }; - if (url.username) { - Object.defineProperty(proxy, 'userId', { - value: decodeURIComponent(url.username), - enumerable: false, - }); - } - if (url.password != null) { - Object.defineProperty(proxy, 'password', { - value: decodeURIComponent(url.password), - enumerable: false, - }); - } - return { lookup, proxy }; - } - class SocksProxyAgent extends agent_base_1.Agent { - constructor(uri, opts) { - super(opts); - const url = typeof uri === 'string' ? new url_1.URL(uri) : uri; - const { proxy, lookup } = parseSocksURL(url); - this.shouldLookup = lookup; - this.proxy = proxy; - this.timeout = opts?.timeout ?? null; - this.socketOptions = opts?.socketOptions ?? null; - } - async connect(req, opts) { - const { shouldLookup, proxy, timeout } = this; - if (!opts.host) { - throw new Error('No `host` defined!'); - } - let { host } = opts; - const { port, lookup: lookupFn = dns.lookup } = opts; - if (shouldLookup) { - host = await new Promise((resolve, reject) => { - lookupFn(host, {}, (err, res) => { - if (err) { - reject(err); - } - else { - resolve(res); - } - }); - }); - } - const socksOpts = { - proxy, - destination: { - host, - port: typeof port === 'number' ? port : parseInt(port, 10), - }, - command: 'connect', - timeout: timeout ?? undefined, - socket_options: this.socketOptions ?? undefined, - }; - const cleanup = (tlsSocket) => { - req.destroy(); - socket.destroy(); - if (tlsSocket) - tlsSocket.destroy(); - }; - debug('Creating socks proxy connection: %o', socksOpts); - const { socket } = await socks_1.SocksClient.createConnection(socksOpts); - debug('Successfully created socks proxy connection'); - if (timeout !== null) { - socket.setTimeout(timeout); - socket.on('timeout', () => cleanup()); - } - if (opts.secureEndpoint) { - debug('Upgrading socket connection to TLS'); - const tlsSocket = tls.connect({ - ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'), - socket, - }); - tlsSocket.once('error', (error) => { - debug('Socket TLS error', error.message); - cleanup(tlsSocket); - }); - return tlsSocket; - } - return socket; - } - } - SocksProxyAgent.protocols = [ - 'socks', - 'socks4', - 'socks4a', - 'socks5', - 'socks5h', - ]; - dist$7.SocksProxyAgent = SocksProxyAgent; - function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; - } - return dist$7; -} - -var dist$6 = {}; - -var dist$5 = {}; - -var data$u = {}; - -var dist$4 = {}; - -var common$1 = {}; - -var hasRequiredCommon; - -function requireCommon () { - if (hasRequiredCommon) return common$1; - hasRequiredCommon = 1; - Object.defineProperty(common$1, "__esModule", { value: true }); - common$1.makeDataUriToBuffer = void 0; - const makeDataUriToBuffer = (convert) => (uri) => { - uri = String(uri); - if (!/^data:/i.test(uri)) { - throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); - } - uri = uri.replace(/\r?\n/g, ''); - const firstComma = uri.indexOf(','); - if (firstComma === -1 || firstComma <= 4) { - throw new TypeError('malformed data: URI'); - } - const meta = uri.substring(5, firstComma).split(';'); - let charset = ''; - let base64 = false; - const type = meta[0] || 'text/plain'; - let typeFull = type; - for (let i = 1; i < meta.length; i++) { - if (meta[i] === 'base64') { - base64 = true; - } - else if (meta[i]) { - typeFull += `;${meta[i]}`; - if (meta[i].indexOf('charset=') === 0) { - charset = meta[i].substring(8); - } - } - } - if (!meta[0] && !charset.length) { - typeFull += ';charset=US-ASCII'; - charset = 'US-ASCII'; - } - const data = unescape(uri.substring(firstComma + 1)); - const buffer = base64 ? convert.base64ToArrayBuffer(data) : convert.stringToBuffer(data); - return { - type, - typeFull, - charset, - buffer, - }; - }; - common$1.makeDataUriToBuffer = makeDataUriToBuffer; - return common$1; -} - -var hasRequiredDist$7; - -function requireDist$7 () { - if (hasRequiredDist$7) return dist$4; - hasRequiredDist$7 = 1; - Object.defineProperty(dist$4, "__esModule", { value: true }); - dist$4.dataUriToBuffer = void 0; - const common_1 = requireCommon(); - function base64ToArrayBuffer(base64) { - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - const bytes = []; - for (let i = 0; i < base64.length; i += 4) { - const idx0 = chars.indexOf(base64.charAt(i)); - const idx1 = chars.indexOf(base64.charAt(i + 1)); - const idx2 = base64.charAt(i + 2) === '=' - ? 0 - : chars.indexOf(base64.charAt(i + 2)); - const idx3 = base64.charAt(i + 3) === '=' - ? 0 - : chars.indexOf(base64.charAt(i + 3)); - const bin0 = (idx0 << 2) | (idx1 >> 4); - const bin1 = ((idx1 & 15) << 4) | (idx2 >> 2); - const bin2 = ((idx2 & 3) << 6) | idx3; - bytes.push(bin0); - if (base64.charAt(i + 2) !== '=') - bytes.push(bin1); - if (base64.charAt(i + 3) !== '=') - bytes.push(bin2); - } - const buffer = new ArrayBuffer(bytes.length); - const view = new Uint8Array(buffer); - view.set(bytes); - return buffer; - } - function stringToBuffer(str) { - const buffer = new ArrayBuffer(str.length); - const view = new Uint8Array(buffer); - for (let i = 0; i < str.length; i++) { - view[i] = str.charCodeAt(i); - } - return buffer; - } - dist$4.dataUriToBuffer = (0, common_1.makeDataUriToBuffer)({ stringToBuffer, base64ToArrayBuffer }); - return dist$4; -} - -var notmodified = {}; - -var hasRequiredNotmodified; - -function requireNotmodified () { - if (hasRequiredNotmodified) return notmodified; - hasRequiredNotmodified = 1; - Object.defineProperty(notmodified, "__esModule", { value: true }); - class NotModifiedError extends Error { - constructor(message) { - super(message || - 'Source has not been modified since the provied "cache", re-use previous results'); - this.code = 'ENOTMODIFIED'; - } - } - notmodified.default = NotModifiedError; - return notmodified; -} - -var hasRequiredData; - -function requireData () { - if (hasRequiredData) return data$u; - hasRequiredData = 1; - var __importDefault = (data$u && data$u.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(data$u, "__esModule", { value: true }); - data$u.data = void 0; - const debug_1 = __importDefault(requireSrc()); - const stream_1 = require$$1$3; - const crypto_1 = require$$2$1; - const data_uri_to_buffer_1 = requireDist$7(); - const notmodified_1 = __importDefault(requireNotmodified()); - const debug = (0, debug_1.default)('get-uri:data'); - class DataReadable extends stream_1.Readable { - constructor(hash, buf) { - super(); - this.push(buf); - this.push(null); - this.hash = hash; - } - } - const data = async ({ href: uri }, { cache } = {}) => { - const shasum = (0, crypto_1.createHash)('sha1'); - shasum.update(uri); - const hash = shasum.digest('hex'); - debug('generated SHA1 hash for "data:" URI: %o', hash); - if (cache?.hash === hash) { - debug('got matching cache SHA1 hash: %o', hash); - throw new notmodified_1.default(); - } - else { - debug('creating Readable stream from "data:" URI buffer'); - const { buffer } = (0, data_uri_to_buffer_1.dataUriToBuffer)(uri); - return new DataReadable(hash, Buffer.from(buffer)); - } - }; - data$u.data = data; - return data$u; -} - -var file = {}; - -var notfound = {}; - -var hasRequiredNotfound; - -function requireNotfound () { - if (hasRequiredNotfound) return notfound; - hasRequiredNotfound = 1; - Object.defineProperty(notfound, "__esModule", { value: true }); - class NotFoundError extends Error { - constructor(message) { - super(message || 'File does not exist at the specified endpoint'); - this.code = 'ENOTFOUND'; - } - } - notfound.default = NotFoundError; - return notfound; -} - -var hasRequiredFile; - -function requireFile () { - if (hasRequiredFile) return file; - hasRequiredFile = 1; - var __importDefault = (file && file.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(file, "__esModule", { value: true }); - file.file = void 0; - const debug_1 = __importDefault(requireSrc()); - const fs_1 = require$$0$3; - const notfound_1 = __importDefault(requireNotfound()); - const notmodified_1 = __importDefault(requireNotmodified()); - const url_1 = require$$5; - const debug = (0, debug_1.default)('get-uri:file'); - const file$1 = async ({ href: uri }, opts = {}) => { - const { cache, flags = 'r', mode = 438, - } = opts; - try { - const filepath = (0, url_1.fileURLToPath)(uri); - debug('Normalized pathname: %o', filepath); - const fdHandle = await fs_1.promises.open(filepath, flags, mode); - const fd = fdHandle.fd; - const stat = await fdHandle.stat(); - if (cache && cache.stat && stat && isNotModified(cache.stat, stat)) { - await fdHandle.close(); - throw new notmodified_1.default(); - } - const rs = (0, fs_1.createReadStream)(filepath, { - autoClose: true, - ...opts, - fd, - }); - rs.stat = stat; - return rs; - } - catch (err) { - if (err.code === 'ENOENT') { - throw new notfound_1.default(); - } - throw err; - } - }; - file.file = file$1; - function isNotModified(prev, curr) { - return +prev.mtime === +curr.mtime; - } - return file; -} - -var ftp = {}; - -var dist$3 = {}; - -var Client = {}; - -var FtpContext = {}; - -var parseControlResponse = {}; - -var hasRequiredParseControlResponse; - -function requireParseControlResponse () { - if (hasRequiredParseControlResponse) return parseControlResponse; - hasRequiredParseControlResponse = 1; - Object.defineProperty(parseControlResponse, "__esModule", { value: true }); - parseControlResponse.parseControlResponse = parseControlResponse$1; - parseControlResponse.isSingleLine = isSingleLine; - parseControlResponse.isMultiline = isMultiline; - parseControlResponse.positiveCompletion = positiveCompletion; - parseControlResponse.positiveIntermediate = positiveIntermediate; - const LF = "\n"; - function parseControlResponse$1(text) { - const lines = text.split(/\r?\n/).filter(isNotBlank); - const messages = []; - let startAt = 0; - let tokenRegex; - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - if (!tokenRegex) { - if (isMultiline(line)) { - const token = line.substr(0, 3); - tokenRegex = new RegExp(`^${token}(?:$| )`); - startAt = i; - } - else if (isSingleLine(line)) { - messages.push(line); - } - } - else if (tokenRegex.test(line)) { - tokenRegex = undefined; - messages.push(lines.slice(startAt, i + 1).join(LF)); - } - } - const rest = tokenRegex ? lines.slice(startAt).join(LF) + LF : ""; - return { messages, rest }; - } - function isSingleLine(line) { - return /^\d\d\d(?:$| )/.test(line); - } - function isMultiline(line) { - return /^\d\d\d-/.test(line); - } - function positiveCompletion(code) { - return code >= 200 && code < 300; - } - function positiveIntermediate(code) { - return code >= 300 && code < 400; - } - function isNotBlank(str) { - return str.trim() !== ""; - } - return parseControlResponse; -} - -var hasRequiredFtpContext; - -function requireFtpContext () { - if (hasRequiredFtpContext) return FtpContext; - hasRequiredFtpContext = 1; - Object.defineProperty(FtpContext, "__esModule", { value: true }); - FtpContext.FTPContext = FtpContext.FTPError = void 0; - const net_1 = require$$0$7; - const parseControlResponse_1 = requireParseControlResponse(); - class FTPError extends Error { - constructor(res) { - super(res.message); - this.name = this.constructor.name; - this.code = res.code; - } - } - FtpContext.FTPError = FTPError; - function doNothing() { - } - class FTPContext { - constructor(timeout = 0, encoding = "utf8") { - this.timeout = timeout; - this.verbose = false; - this.ipFamily = undefined; - this.tlsOptions = {}; - this._partialResponse = ""; - this._encoding = encoding; - this._socket = this.socket = this._newSocket(); - this._dataSocket = undefined; - } - close() { - const message = this._task ? "User closed client during task" : "User closed client"; - const err = new Error(message); - this.closeWithError(err); - } - closeWithError(err) { - if (this._closingError) { - return; - } - this._closingError = err; - this._closeControlSocket(); - this._closeSocket(this._dataSocket); - this._passToHandler(err); - this._stopTrackingTask(); - } - get closed() { - return this.socket.remoteAddress === undefined || this._closingError !== undefined; - } - reset() { - this.socket = this._newSocket(); - } - get socket() { - return this._socket; - } - set socket(socket) { - this.dataSocket = undefined; - this.tlsOptions = {}; - this._partialResponse = ""; - if (this._socket) { - const newSocketUpgradesExisting = socket.localPort === this._socket.localPort; - if (newSocketUpgradesExisting) { - this._removeSocketListeners(this.socket); - } - else { - this._closeControlSocket(); - } - } - if (socket) { - this._closingError = undefined; - socket.setTimeout(0); - socket.setEncoding(this._encoding); - socket.setKeepAlive(true); - socket.on("data", data => this._onControlSocketData(data)); - socket.on("end", () => this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection."))); - socket.on("close", hadError => { if (!hadError) - this.closeWithError(new Error("Server closed connection unexpectedly.")); }); - this._setupDefaultErrorHandlers(socket, "control socket"); - } - this._socket = socket; - } - get dataSocket() { - return this._dataSocket; - } - set dataSocket(socket) { - this._closeSocket(this._dataSocket); - if (socket) { - socket.setTimeout(0); - this._setupDefaultErrorHandlers(socket, "data socket"); - } - this._dataSocket = socket; - } - get encoding() { - return this._encoding; - } - set encoding(encoding) { - this._encoding = encoding; - if (this.socket) { - this.socket.setEncoding(encoding); - } - } - send(command) { - const containsPassword = command.startsWith("PASS"); - const message = containsPassword ? "> PASS ###" : `> ${command}`; - this.log(message); - this._socket.write(command + "\r\n", this.encoding); - } - request(command) { - return this.handle(command, (res, task) => { - if (res instanceof Error) { - task.reject(res); - } - else { - task.resolve(res); - } - }); - } - handle(command, responseHandler) { - if (this._task) { - const err = new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?"); - err.stack += `\nRunning task launched at: ${this._task.stack}`; - this.closeWithError(err); - } - return new Promise((resolveTask, rejectTask) => { - this._task = { - stack: new Error().stack || "Unknown call stack", - responseHandler, - resolver: { - resolve: arg => { - this._stopTrackingTask(); - resolveTask(arg); - }, - reject: err => { - this._stopTrackingTask(); - rejectTask(err); - } - } - }; - if (this._closingError) { - const err = new Error(`Client is closed because ${this._closingError.message}`); - err.stack += `\nClosing reason: ${this._closingError.stack}`; - err.code = this._closingError.code !== undefined ? this._closingError.code : "0"; - this._passToHandler(err); - return; - } - this.socket.setTimeout(this.timeout); - if (command) { - this.send(command); - } - }); - } - log(message) { - if (this.verbose) { - console.log(message); - } - } - get hasTLS() { - return "encrypted" in this._socket; - } - _stopTrackingTask() { - this.socket.setTimeout(0); - this._task = undefined; - } - _onControlSocketData(chunk) { - this.log(`< ${chunk}`); - const completeResponse = this._partialResponse + chunk; - const parsed = (0, parseControlResponse_1.parseControlResponse)(completeResponse); - this._partialResponse = parsed.rest; - for (const message of parsed.messages) { - const code = parseInt(message.substr(0, 3), 10); - const response = { code, message }; - const err = code >= 400 ? new FTPError(response) : undefined; - this._passToHandler(err ? err : response); - } - } - _passToHandler(response) { - if (this._task) { - this._task.responseHandler(response, this._task.resolver); - } - } - _setupDefaultErrorHandlers(socket, identifier) { - socket.once("error", error => { - error.message += ` (${identifier})`; - this.closeWithError(error); - }); - socket.once("close", hadError => { - if (hadError) { - this.closeWithError(new Error(`Socket closed due to transmission error (${identifier})`)); - } - }); - socket.once("timeout", () => { - socket.destroy(); - this.closeWithError(new Error(`Timeout (${identifier})`)); - }); - } - _closeControlSocket() { - this._removeSocketListeners(this._socket); - this._socket.on("error", doNothing); - this.send("QUIT"); - this._closeSocket(this._socket); - } - _closeSocket(socket) { - if (socket) { - this._removeSocketListeners(socket); - socket.on("error", doNothing); - socket.destroy(); - } - } - _removeSocketListeners(socket) { - socket.removeAllListeners(); - socket.removeAllListeners("timeout"); - socket.removeAllListeners("data"); - socket.removeAllListeners("end"); - socket.removeAllListeners("error"); - socket.removeAllListeners("close"); - socket.removeAllListeners("connect"); - } - _newSocket() { - return new net_1.Socket(); - } - } - FtpContext.FTPContext = FTPContext; - return FtpContext; -} - -var parseList = {}; - -var parseListDOS = {}; - -var FileInfo = {}; - -var hasRequiredFileInfo; - -function requireFileInfo () { - if (hasRequiredFileInfo) return FileInfo; - hasRequiredFileInfo = 1; - Object.defineProperty(FileInfo, "__esModule", { value: true }); - FileInfo.FileInfo = FileInfo.FileType = void 0; - var FileType; - (function (FileType) { - FileType[FileType["Unknown"] = 0] = "Unknown"; - FileType[FileType["File"] = 1] = "File"; - FileType[FileType["Directory"] = 2] = "Directory"; - FileType[FileType["SymbolicLink"] = 3] = "SymbolicLink"; - })(FileType || (FileInfo.FileType = FileType = {})); - let FileInfo$1 = class FileInfo { - constructor(name) { - this.name = name; - this.type = FileType.Unknown; - this.size = 0; - this.rawModifiedAt = ""; - this.modifiedAt = undefined; - this.permissions = undefined; - this.hardLinkCount = undefined; - this.link = undefined; - this.group = undefined; - this.user = undefined; - this.uniqueID = undefined; - this.name = name; - } - get isDirectory() { - return this.type === FileType.Directory; - } - get isSymbolicLink() { - return this.type === FileType.SymbolicLink; - } - get isFile() { - return this.type === FileType.File; - } - get date() { - return this.rawModifiedAt; - } - set date(rawModifiedAt) { - this.rawModifiedAt = rawModifiedAt; - } - }; - FileInfo.FileInfo = FileInfo$1; - FileInfo$1.UnixPermission = { - Read: 4, - Write: 2, - Execute: 1 - }; - return FileInfo; -} - -var hasRequiredParseListDOS; - -function requireParseListDOS () { - if (hasRequiredParseListDOS) return parseListDOS; - hasRequiredParseListDOS = 1; - Object.defineProperty(parseListDOS, "__esModule", { value: true }); - parseListDOS.testLine = testLine; - parseListDOS.parseLine = parseLine; - parseListDOS.transformList = transformList; - const FileInfo_1 = requireFileInfo(); - const RE_LINE = new RegExp("(\\S+)\\s+(\\S+)\\s+" - + "(?:()|([0-9]+))\\s+" - + "(\\S.*)" - ); - function testLine(line) { - return /^\d{2}/.test(line) && RE_LINE.test(line); - } - function parseLine(line) { - const groups = line.match(RE_LINE); - if (groups === null) { - return undefined; - } - const name = groups[5]; - if (name === "." || name === "..") { - return undefined; - } - const file = new FileInfo_1.FileInfo(name); - const fileType = groups[3]; - if (fileType === "") { - file.type = FileInfo_1.FileType.Directory; - file.size = 0; - } - else { - file.type = FileInfo_1.FileType.File; - file.size = parseInt(groups[4], 10); - } - file.rawModifiedAt = groups[1] + " " + groups[2]; - return file; - } - function transformList(files) { - return files; - } - return parseListDOS; -} - -var parseListUnix = {}; - -var hasRequiredParseListUnix; - -function requireParseListUnix () { - if (hasRequiredParseListUnix) return parseListUnix; - hasRequiredParseListUnix = 1; - Object.defineProperty(parseListUnix, "__esModule", { value: true }); - parseListUnix.testLine = testLine; - parseListUnix.parseLine = parseLine; - parseListUnix.transformList = transformList; - const FileInfo_1 = requireFileInfo(); - const JA_MONTH = "\u6708"; - const JA_DAY = "\u65e5"; - const JA_YEAR = "\u5e74"; - const RE_LINE = new RegExp("([bcdelfmpSs-])" - + "(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?" - + "\\s*" - + "(\\d+)" - + "\\s+" - + "(?:(\\S+(?:\\s\\S+)*?)\\s+)?" - + "(?:(\\S+(?:\\s\\S+)*)\\s+)?" - + "(\\d+(?:,\\s*\\d+)?)" - + "\\s+" - + "(" + - "(?:\\d+[-/]\\d+[-/]\\d+)" + - "|(?:\\S{3}\\s+\\d{1,2})" + - "|(?:\\d{1,2}\\s+\\S{3})" + - "|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + ")" + - ")" - + "\\s+" - + "((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))" - + "\\s" - + "(.*)"); - function testLine(line) { - return RE_LINE.test(line); - } - function parseLine(line) { - const groups = line.match(RE_LINE); - if (groups === null) { - return undefined; - } - const name = groups[21]; - if (name === "." || name === "..") { - return undefined; - } - const file = new FileInfo_1.FileInfo(name); - file.size = parseInt(groups[18], 10); - file.user = groups[16]; - file.group = groups[17]; - file.hardLinkCount = parseInt(groups[15], 10); - file.rawModifiedAt = groups[19] + " " + groups[20]; - file.permissions = { - user: parseMode(groups[4], groups[5], groups[6]), - group: parseMode(groups[8], groups[9], groups[10]), - world: parseMode(groups[12], groups[13], groups[14]), - }; - switch (groups[1].charAt(0)) { - case "d": - file.type = FileInfo_1.FileType.Directory; - break; - case "e": - file.type = FileInfo_1.FileType.SymbolicLink; - break; - case "l": - file.type = FileInfo_1.FileType.SymbolicLink; - break; - case "b": - case "c": - file.type = FileInfo_1.FileType.File; - break; - case "f": - case "-": - file.type = FileInfo_1.FileType.File; - break; - default: - file.type = FileInfo_1.FileType.Unknown; - } - if (file.isSymbolicLink) { - const end = name.indexOf(" -> "); - if (end !== -1) { - file.name = name.substring(0, end); - file.link = name.substring(end + 4); - } - } - return file; - } - function transformList(files) { - return files; - } - function parseMode(r, w, x) { - let value = 0; - if (r !== "-") { - value += FileInfo_1.FileInfo.UnixPermission.Read; - } - if (w !== "-") { - value += FileInfo_1.FileInfo.UnixPermission.Write; - } - const execToken = x.charAt(0); - if (execToken !== "-" && execToken.toUpperCase() !== execToken) { - value += FileInfo_1.FileInfo.UnixPermission.Execute; - } - return value; - } - return parseListUnix; -} - -var parseListMLSD = {}; - -var hasRequiredParseListMLSD; - -function requireParseListMLSD () { - if (hasRequiredParseListMLSD) return parseListMLSD; - hasRequiredParseListMLSD = 1; - Object.defineProperty(parseListMLSD, "__esModule", { value: true }); - parseListMLSD.testLine = testLine; - parseListMLSD.parseLine = parseLine; - parseListMLSD.transformList = transformList; - parseListMLSD.parseMLSxDate = parseMLSxDate; - const FileInfo_1 = requireFileInfo(); - function parseSize(value, info) { - info.size = parseInt(value, 10); - } - const factHandlersByName = { - "size": parseSize, - "sizd": parseSize, - "unique": (value, info) => { - info.uniqueID = value; - }, - "modify": (value, info) => { - info.modifiedAt = parseMLSxDate(value); - info.rawModifiedAt = info.modifiedAt.toISOString(); - }, - "type": (value, info) => { - if (value.startsWith("OS.unix=slink")) { - info.type = FileInfo_1.FileType.SymbolicLink; - info.link = value.substr(value.indexOf(":") + 1); - return 1 ; - } - switch (value) { - case "file": - info.type = FileInfo_1.FileType.File; - break; - case "dir": - info.type = FileInfo_1.FileType.Directory; - break; - case "OS.unix=symlink": - info.type = FileInfo_1.FileType.SymbolicLink; - break; - case "cdir": - case "pdir": - return 2 ; - default: - info.type = FileInfo_1.FileType.Unknown; - } - return 1 ; - }, - "unix.mode": (value, info) => { - const digits = value.substr(-3); - info.permissions = { - user: parseInt(digits[0], 10), - group: parseInt(digits[1], 10), - world: parseInt(digits[2], 10) - }; - }, - "unix.ownername": (value, info) => { - info.user = value; - }, - "unix.owner": (value, info) => { - if (info.user === undefined) - info.user = value; - }, - get "unix.uid"() { - return this["unix.owner"]; - }, - "unix.groupname": (value, info) => { - info.group = value; - }, - "unix.group": (value, info) => { - if (info.group === undefined) - info.group = value; - }, - get "unix.gid"() { - return this["unix.group"]; - } - }; - function splitStringOnce(str, delimiter) { - const pos = str.indexOf(delimiter); - const a = str.substr(0, pos); - const b = str.substr(pos + delimiter.length); - return [a, b]; - } - function testLine(line) { - return /^\S+=\S+;/.test(line) || line.startsWith(" "); - } - function parseLine(line) { - const [packedFacts, name] = splitStringOnce(line, " "); - if (name === "" || name === "." || name === "..") { - return undefined; - } - const info = new FileInfo_1.FileInfo(name); - const facts = packedFacts.split(";"); - for (const fact of facts) { - const [factName, factValue] = splitStringOnce(fact, "="); - if (!factValue) { - continue; - } - const factHandler = factHandlersByName[factName.toLowerCase()]; - if (!factHandler) { - continue; - } - const result = factHandler(factValue, info); - if (result === 2 ) { - return undefined; - } - } - return info; - } - function transformList(files) { - const nonLinksByID = new Map(); - for (const file of files) { - if (!file.isSymbolicLink && file.uniqueID !== undefined) { - nonLinksByID.set(file.uniqueID, file); - } - } - const resolvedFiles = []; - for (const file of files) { - if (file.isSymbolicLink && file.uniqueID !== undefined && file.link === undefined) { - const target = nonLinksByID.get(file.uniqueID); - if (target !== undefined) { - file.link = target.name; - } - } - const isPartOfDirectory = !file.name.includes("/"); - if (isPartOfDirectory) { - resolvedFiles.push(file); - } - } - return resolvedFiles; - } - function parseMLSxDate(fact) { - return new Date(Date.UTC(+fact.slice(0, 4), - +fact.slice(4, 6) - 1, - +fact.slice(6, 8), - +fact.slice(8, 10), - +fact.slice(10, 12), - +fact.slice(12, 14), - +fact.slice(15, 18) - )); - } - return parseListMLSD; -} - -var hasRequiredParseList; - -function requireParseList () { - if (hasRequiredParseList) return parseList; - hasRequiredParseList = 1; - var __createBinding = (parseList && parseList.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (parseList && parseList.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (parseList && parseList.__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; - }; - })(); - Object.defineProperty(parseList, "__esModule", { value: true }); - parseList.parseList = parseList$1; - const dosParser = __importStar(requireParseListDOS()); - const unixParser = __importStar(requireParseListUnix()); - const mlsdParser = __importStar(requireParseListMLSD()); - const availableParsers = [ - dosParser, - unixParser, - mlsdParser - ]; - function firstCompatibleParser(line, parsers) { - return parsers.find(parser => parser.testLine(line) === true); - } - function isNotBlank(str) { - return str.trim() !== ""; - } - function isNotMeta(str) { - return !str.startsWith("total"); - } - const REGEX_NEWLINE = /\r?\n/; - function parseList$1(rawList) { - const lines = rawList - .split(REGEX_NEWLINE) - .filter(isNotBlank) - .filter(isNotMeta); - if (lines.length === 0) { - return []; - } - const testLine = lines[lines.length - 1]; - const parser = firstCompatibleParser(testLine, availableParsers); - if (!parser) { - throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details."); - } - const files = lines - .map(parser.parseLine) - .filter((info) => info !== undefined); - return parser.transformList(files); - } - return parseList; -} - -var ProgressTracker = {}; - -var hasRequiredProgressTracker; - -function requireProgressTracker () { - if (hasRequiredProgressTracker) return ProgressTracker; - hasRequiredProgressTracker = 1; - Object.defineProperty(ProgressTracker, "__esModule", { value: true }); - ProgressTracker.ProgressTracker = void 0; - let ProgressTracker$1 = class ProgressTracker { - constructor() { - this.bytesOverall = 0; - this.intervalMs = 500; - this.onStop = noop; - this.onHandle = noop; - } - reportTo(onHandle = noop) { - this.onHandle = onHandle; - } - start(socket, name, type) { - let lastBytes = 0; - this.onStop = poll(this.intervalMs, () => { - const bytes = socket.bytesRead + socket.bytesWritten; - this.bytesOverall += bytes - lastBytes; - lastBytes = bytes; - this.onHandle({ - name, - type, - bytes, - bytesOverall: this.bytesOverall - }); - }); - } - stop() { - this.onStop(false); - } - updateAndStop() { - this.onStop(true); - } - }; - ProgressTracker.ProgressTracker = ProgressTracker$1; - function poll(intervalMs, updateFunc) { - const id = setInterval(updateFunc, intervalMs); - const stopFunc = (stopWithUpdate) => { - clearInterval(id); - if (stopWithUpdate) { - updateFunc(); - } - updateFunc = noop; - }; - updateFunc(); - return stopFunc; - } - function noop() { } - return ProgressTracker; -} - -var StringWriter = {}; - -var hasRequiredStringWriter; - -function requireStringWriter () { - if (hasRequiredStringWriter) return StringWriter; - hasRequiredStringWriter = 1; - Object.defineProperty(StringWriter, "__esModule", { value: true }); - StringWriter.StringWriter = void 0; - const stream_1 = require$$1$3; - let StringWriter$1 = class StringWriter extends stream_1.Writable { - constructor() { - super(...arguments); - this.buf = Buffer.alloc(0); - } - _write(chunk, _, callback) { - if (chunk instanceof Buffer) { - this.buf = Buffer.concat([this.buf, chunk]); - callback(null); - } - else { - callback(new Error("StringWriter expects chunks of type 'Buffer'.")); - } - } - getText(encoding) { - return this.buf.toString(encoding); - } - }; - StringWriter.StringWriter = StringWriter$1; - return StringWriter; -} - -var netUtils = {}; - -var hasRequiredNetUtils; - -function requireNetUtils () { - if (hasRequiredNetUtils) return netUtils; - hasRequiredNetUtils = 1; - Object.defineProperty(netUtils, "__esModule", { value: true }); - netUtils.describeTLS = describeTLS; - netUtils.describeAddress = describeAddress; - netUtils.upgradeSocket = upgradeSocket; - netUtils.ipIsPrivateV4Address = ipIsPrivateV4Address; - const tls_1 = require$$1$2; - function describeTLS(socket) { - if (socket instanceof tls_1.TLSSocket) { - const protocol = socket.getProtocol(); - return protocol ? protocol : "Server socket or disconnected client socket"; - } - return "No encryption"; - } - function describeAddress(socket) { - if (socket.remoteFamily === "IPv6") { - return `[${socket.remoteAddress}]:${socket.remotePort}`; - } - return `${socket.remoteAddress}:${socket.remotePort}`; - } - function upgradeSocket(socket, options) { - return new Promise((resolve, reject) => { - const tlsOptions = Object.assign({}, options, { - socket - }); - const tlsSocket = (0, tls_1.connect)(tlsOptions, () => { - const expectCertificate = tlsOptions.rejectUnauthorized !== false; - if (expectCertificate && !tlsSocket.authorized) { - reject(tlsSocket.authorizationError); - } - else { - tlsSocket.removeAllListeners("error"); - resolve(tlsSocket); - } - }).once("error", error => { - reject(error); - }); - }); - } - function ipIsPrivateV4Address(ip = "") { - if (ip.startsWith("::ffff:")) { - ip = ip.substr(7); - } - const octets = ip.split(".").map(o => parseInt(o, 10)); - return octets[0] === 10 - || (octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31) - || (octets[0] === 192 && octets[1] === 168) - || ip === "127.0.0.1"; - } - return netUtils; -} - -var transfer = {}; - -var hasRequiredTransfer; - -function requireTransfer () { - if (hasRequiredTransfer) return transfer; - hasRequiredTransfer = 1; - Object.defineProperty(transfer, "__esModule", { value: true }); - transfer.enterPassiveModeIPv6 = enterPassiveModeIPv6; - transfer.parseEpsvResponse = parseEpsvResponse; - transfer.enterPassiveModeIPv4 = enterPassiveModeIPv4; - transfer.enterPassiveModeIPv4_forceControlHostIP = enterPassiveModeIPv4_forceControlHostIP; - transfer.parsePasvResponse = parsePasvResponse; - transfer.connectForPassiveTransfer = connectForPassiveTransfer; - transfer.uploadFrom = uploadFrom; - transfer.downloadTo = downloadTo; - const netUtils_1 = requireNetUtils(); - const stream_1 = require$$1$3; - const tls_1 = require$$1$2; - const parseControlResponse_1 = requireParseControlResponse(); - async function enterPassiveModeIPv6(ftp) { - const res = await ftp.request("EPSV"); - const port = parseEpsvResponse(res.message); - if (!port) { - throw new Error("Can't parse EPSV response: " + res.message); - } - const controlHost = ftp.socket.remoteAddress; - if (controlHost === undefined) { - throw new Error("Control socket is disconnected, can't get remote address."); - } - await connectForPassiveTransfer(controlHost, port, ftp); - return res; - } - function parseEpsvResponse(message) { - const groups = message.match(/[|!]{3}(.+)[|!]/); - if (groups === null || groups[1] === undefined) { - throw new Error(`Can't parse response to 'EPSV': ${message}`); - } - const port = parseInt(groups[1], 10); - if (Number.isNaN(port)) { - throw new Error(`Can't parse response to 'EPSV', port is not a number: ${message}`); - } - return port; - } - async function enterPassiveModeIPv4(ftp) { - const res = await ftp.request("PASV"); - const target = parsePasvResponse(res.message); - if (!target) { - throw new Error("Can't parse PASV response: " + res.message); - } - const controlHost = ftp.socket.remoteAddress; - if ((0, netUtils_1.ipIsPrivateV4Address)(target.host) && controlHost && !(0, netUtils_1.ipIsPrivateV4Address)(controlHost)) { - target.host = controlHost; - } - await connectForPassiveTransfer(target.host, target.port, ftp); - return res; - } - async function enterPassiveModeIPv4_forceControlHostIP(ftp) { - const res = await ftp.request("PASV"); - const target = parsePasvResponse(res.message); - if (!target) { - throw new Error("Can't parse PASV response: " + res.message); - } - const controlHost = ftp.socket.remoteAddress; - if (controlHost === undefined) { - throw new Error("Control socket is disconnected, can't get remote address."); - } - await connectForPassiveTransfer(controlHost, target.port, ftp); - return res; - } - function parsePasvResponse(message) { - const groups = message.match(/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/); - if (groups === null || groups.length !== 4) { - throw new Error(`Can't parse response to 'PASV': ${message}`); - } - return { - host: groups[1].replace(/,/g, "."), - port: (parseInt(groups[2], 10) & 255) * 256 + (parseInt(groups[3], 10) & 255) - }; - } - function connectForPassiveTransfer(host, port, ftp) { - return new Promise((resolve, reject) => { - let socket = ftp._newSocket(); - const handleConnErr = function (err) { - err.message = "Can't open data connection in passive mode: " + err.message; - reject(err); - }; - const handleTimeout = function () { - socket.destroy(); - reject(new Error(`Timeout when trying to open data connection to ${host}:${port}`)); - }; - socket.setTimeout(ftp.timeout); - socket.on("error", handleConnErr); - socket.on("timeout", handleTimeout); - socket.connect({ port, host, family: ftp.ipFamily }, () => { - if (ftp.socket instanceof tls_1.TLSSocket) { - socket = (0, tls_1.connect)(Object.assign({}, ftp.tlsOptions, { - socket, - session: ftp.socket.getSession() - })); - } - socket.removeListener("error", handleConnErr); - socket.removeListener("timeout", handleTimeout); - ftp.dataSocket = socket; - resolve(); - }); - }); - } - class TransferResolver { - constructor(ftp, progress) { - this.ftp = ftp; - this.progress = progress; - this.response = undefined; - this.dataTransferDone = false; - } - onDataStart(name, type) { - if (this.ftp.dataSocket === undefined) { - throw new Error("Data transfer should start but there is no data connection."); - } - this.ftp.socket.setTimeout(0); - this.ftp.dataSocket.setTimeout(this.ftp.timeout); - this.progress.start(this.ftp.dataSocket, name, type); - } - onDataDone(task) { - this.progress.updateAndStop(); - this.ftp.socket.setTimeout(this.ftp.timeout); - if (this.ftp.dataSocket) { - this.ftp.dataSocket.setTimeout(0); - } - this.dataTransferDone = true; - this.tryResolve(task); - } - onControlDone(task, response) { - this.response = response; - this.tryResolve(task); - } - onError(task, err) { - this.progress.updateAndStop(); - this.ftp.socket.setTimeout(this.ftp.timeout); - this.ftp.dataSocket = undefined; - task.reject(err); - } - onUnexpectedRequest(response) { - const err = new Error(`Unexpected FTP response is requesting an answer: ${response.message}`); - this.ftp.closeWithError(err); - } - tryResolve(task) { - const canResolve = this.dataTransferDone && this.response !== undefined; - if (canResolve) { - this.ftp.dataSocket = undefined; - task.resolve(this.response); - } - } - } - function uploadFrom(source, config) { - const resolver = new TransferResolver(config.ftp, config.tracker); - const fullCommand = `${config.command} ${config.remotePath}`; - return config.ftp.handle(fullCommand, (res, task) => { - if (res instanceof Error) { - resolver.onError(task, res); - } - else if (res.code === 150 || res.code === 125) { - const dataSocket = config.ftp.dataSocket; - if (!dataSocket) { - resolver.onError(task, new Error("Upload should begin but no data connection is available.")); - return; - } - const canUpload = "getCipher" in dataSocket ? dataSocket.getCipher() !== undefined : true; - onConditionOrEvent(canUpload, dataSocket, "secureConnect", () => { - config.ftp.log(`Uploading to ${(0, netUtils_1.describeAddress)(dataSocket)} (${(0, netUtils_1.describeTLS)(dataSocket)})`); - resolver.onDataStart(config.remotePath, config.type); - (0, stream_1.pipeline)(source, dataSocket, err => { - if (err) { - resolver.onError(task, err); - } - else { - resolver.onDataDone(task); - } - }); - }); - } - else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - resolver.onControlDone(task, res); - } - else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) { - resolver.onUnexpectedRequest(res); - } - }); - } - function downloadTo(destination, config) { - if (!config.ftp.dataSocket) { - throw new Error("Download will be initiated but no data connection is available."); - } - const resolver = new TransferResolver(config.ftp, config.tracker); - return config.ftp.handle(config.command, (res, task) => { - if (res instanceof Error) { - resolver.onError(task, res); - } - else if (res.code === 150 || res.code === 125) { - const dataSocket = config.ftp.dataSocket; - if (!dataSocket) { - resolver.onError(task, new Error("Download should begin but no data connection is available.")); - return; - } - config.ftp.log(`Downloading from ${(0, netUtils_1.describeAddress)(dataSocket)} (${(0, netUtils_1.describeTLS)(dataSocket)})`); - resolver.onDataStart(config.remotePath, config.type); - (0, stream_1.pipeline)(dataSocket, destination, err => { - if (err) { - resolver.onError(task, err); - } - else { - resolver.onDataDone(task); - } - }); - } - else if (res.code === 350) { - config.ftp.send("RETR " + config.remotePath); - } - else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - resolver.onControlDone(task, res); - } - else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) { - resolver.onUnexpectedRequest(res); - } - }); - } - function onConditionOrEvent(condition, emitter, eventName, action) { - if (condition === true) { - action(); - } - else { - emitter.once(eventName, () => action()); - } - } - return transfer; -} - -var hasRequiredClient; - -function requireClient () { - if (hasRequiredClient) return Client; - hasRequiredClient = 1; - Object.defineProperty(Client, "__esModule", { value: true }); - Client.Client = void 0; - const fs_1 = require$$0$3; - const path_1 = require$$0$4; - const tls_1 = require$$1$2; - const util_1 = require$$0$2; - const FtpContext_1 = requireFtpContext(); - const parseList_1 = requireParseList(); - const ProgressTracker_1 = requireProgressTracker(); - const StringWriter_1 = requireStringWriter(); - const parseListMLSD_1 = requireParseListMLSD(); - const netUtils_1 = requireNetUtils(); - const transfer_1 = requireTransfer(); - const parseControlResponse_1 = requireParseControlResponse(); - const fsReadDir = (0, util_1.promisify)(fs_1.readdir); - const fsMkDir = (0, util_1.promisify)(fs_1.mkdir); - const fsStat = (0, util_1.promisify)(fs_1.stat); - const fsOpen = (0, util_1.promisify)(fs_1.open); - const fsClose = (0, util_1.promisify)(fs_1.close); - const fsUnlink = (0, util_1.promisify)(fs_1.unlink); - const defaultClientOptions = { - allowSeparateTransferHost: true - }; - const LIST_COMMANDS_DEFAULT = () => ["LIST -a", "LIST"]; - const LIST_COMMANDS_MLSD = () => ["MLSD", "LIST -a", "LIST"]; - let Client$1 = class Client { - constructor(timeout = 30000, options = defaultClientOptions) { - this.availableListCommands = LIST_COMMANDS_DEFAULT(); - this.ftp = new FtpContext_1.FTPContext(timeout); - this.prepareTransfer = this._enterFirstCompatibleMode([ - transfer_1.enterPassiveModeIPv6, - options.allowSeparateTransferHost ? transfer_1.enterPassiveModeIPv4 : transfer_1.enterPassiveModeIPv4_forceControlHostIP - ]); - this.parseList = parseList_1.parseList; - this._progressTracker = new ProgressTracker_1.ProgressTracker(); - } - close() { - this.ftp.close(); - this._progressTracker.stop(); - } - get closed() { - return this.ftp.closed; - } - connect(host = "localhost", port = 21) { - this.ftp.reset(); - this.ftp.socket.connect({ - host, - port, - family: this.ftp.ipFamily - }, () => this.ftp.log(`Connected to ${(0, netUtils_1.describeAddress)(this.ftp.socket)} (${(0, netUtils_1.describeTLS)(this.ftp.socket)})`)); - return this._handleConnectResponse(); - } - connectImplicitTLS(host = "localhost", port = 21, tlsOptions = {}) { - this.ftp.reset(); - this.ftp.socket = (0, tls_1.connect)(port, host, tlsOptions, () => this.ftp.log(`Connected to ${(0, netUtils_1.describeAddress)(this.ftp.socket)} (${(0, netUtils_1.describeTLS)(this.ftp.socket)})`)); - this.ftp.tlsOptions = tlsOptions; - return this._handleConnectResponse(); - } - _handleConnectResponse() { - return this.ftp.handle(undefined, (res, task) => { - if (res instanceof Error) { - task.reject(res); - } - else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - task.resolve(res); - } - else { - task.reject(new FtpContext_1.FTPError(res)); - } - }); - } - send(command, ignoreErrorCodesDEPRECATED = false) { - if (ignoreErrorCodesDEPRECATED) { - this.ftp.log("Deprecated call using send(command, flag) with boolean flag to ignore errors. Use sendIgnoringError(command)."); - return this.sendIgnoringError(command); - } - return this.ftp.request(command); - } - sendIgnoringError(command) { - return this.ftp.handle(command, (res, task) => { - if (res instanceof FtpContext_1.FTPError) { - task.resolve({ code: res.code, message: res.message }); - } - else if (res instanceof Error) { - task.reject(res); - } - else { - task.resolve(res); - } - }); - } - async useTLS(options = {}, command = "AUTH TLS") { - const ret = await this.send(command); - this.ftp.socket = await (0, netUtils_1.upgradeSocket)(this.ftp.socket, options); - this.ftp.tlsOptions = options; - this.ftp.log(`Control socket is using: ${(0, netUtils_1.describeTLS)(this.ftp.socket)}`); - return ret; - } - login(user = "anonymous", password = "guest") { - this.ftp.log(`Login security: ${(0, netUtils_1.describeTLS)(this.ftp.socket)}`); - return this.ftp.handle("USER " + user, (res, task) => { - if (res instanceof Error) { - task.reject(res); - } - else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - task.resolve(res); - } - else if (res.code === 331) { - this.ftp.send("PASS " + password); - } - else { - task.reject(new FtpContext_1.FTPError(res)); - } - }); - } - async useDefaultSettings() { - const features = await this.features(); - const supportsMLSD = features.has("MLST"); - this.availableListCommands = supportsMLSD ? LIST_COMMANDS_MLSD() : LIST_COMMANDS_DEFAULT(); - await this.send("TYPE I"); - await this.sendIgnoringError("STRU F"); - await this.sendIgnoringError("OPTS UTF8 ON"); - if (supportsMLSD) { - await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;"); - } - if (this.ftp.hasTLS) { - await this.sendIgnoringError("PBSZ 0"); - await this.sendIgnoringError("PROT P"); - } - } - async access(options = {}) { - var _a, _b; - const useExplicitTLS = options.secure === true; - const useImplicitTLS = options.secure === "implicit"; - let welcome; - if (useImplicitTLS) { - welcome = await this.connectImplicitTLS(options.host, options.port, options.secureOptions); - } - else { - welcome = await this.connect(options.host, options.port); - } - if (useExplicitTLS) { - const secureOptions = (_a = options.secureOptions) !== null && _a !== void 0 ? _a : {}; - secureOptions.host = (_b = secureOptions.host) !== null && _b !== void 0 ? _b : options.host; - await this.useTLS(secureOptions); - } - await this.sendIgnoringError("OPTS UTF8 ON"); - await this.login(options.user, options.password); - await this.useDefaultSettings(); - return welcome; - } - async pwd() { - const res = await this.send("PWD"); - const parsed = res.message.match(/"(.+)"/); - if (parsed === null || parsed[1] === undefined) { - throw new Error(`Can't parse response to command 'PWD': ${res.message}`); - } - return parsed[1]; - } - async features() { - const res = await this.sendIgnoringError("FEAT"); - const features = new Map(); - if (res.code < 400 && (0, parseControlResponse_1.isMultiline)(res.message)) { - res.message.split("\n").slice(1, -1).forEach(line => { - const entry = line.trim().split(" "); - features.set(entry[0], entry[1] || ""); - }); - } - return features; - } - async cd(path) { - const validPath = await this.protectWhitespace(path); - return this.send("CWD " + validPath); - } - async cdup() { - return this.send("CDUP"); - } - async lastMod(path) { - const validPath = await this.protectWhitespace(path); - const res = await this.send(`MDTM ${validPath}`); - const date = res.message.slice(4); - return (0, parseListMLSD_1.parseMLSxDate)(date); - } - async size(path) { - const validPath = await this.protectWhitespace(path); - const command = `SIZE ${validPath}`; - const res = await this.send(command); - const size = parseInt(res.message.slice(4), 10); - if (Number.isNaN(size)) { - throw new Error(`Can't parse response to command '${command}' as a numerical value: ${res.message}`); - } - return size; - } - async rename(srcPath, destPath) { - const validSrc = await this.protectWhitespace(srcPath); - const validDest = await this.protectWhitespace(destPath); - await this.send("RNFR " + validSrc); - return this.send("RNTO " + validDest); - } - async remove(path, ignoreErrorCodes = false) { - const validPath = await this.protectWhitespace(path); - if (ignoreErrorCodes) { - return this.sendIgnoringError(`DELE ${validPath}`); - } - return this.send(`DELE ${validPath}`); - } - trackProgress(handler) { - this._progressTracker.bytesOverall = 0; - this._progressTracker.reportTo(handler); - } - async uploadFrom(source, toRemotePath, options = {}) { - return this._uploadWithCommand(source, toRemotePath, "STOR", options); - } - async appendFrom(source, toRemotePath, options = {}) { - return this._uploadWithCommand(source, toRemotePath, "APPE", options); - } - async _uploadWithCommand(source, remotePath, command, options) { - if (typeof source === "string") { - return this._uploadLocalFile(source, remotePath, command, options); - } - return this._uploadFromStream(source, remotePath, command); - } - async _uploadLocalFile(localPath, remotePath, command, options) { - const fd = await fsOpen(localPath, "r"); - const source = (0, fs_1.createReadStream)("", { - fd, - start: options.localStart, - end: options.localEndInclusive, - autoClose: false - }); - try { - return await this._uploadFromStream(source, remotePath, command); - } - finally { - await ignoreError(() => fsClose(fd)); - } - } - async _uploadFromStream(source, remotePath, command) { - const onError = (err) => this.ftp.closeWithError(err); - source.once("error", onError); - try { - const validPath = await this.protectWhitespace(remotePath); - await this.prepareTransfer(this.ftp); - return await (0, transfer_1.uploadFrom)(source, { - ftp: this.ftp, - tracker: this._progressTracker, - command, - remotePath: validPath, - type: "upload" - }); - } - finally { - source.removeListener("error", onError); - } - } - async downloadTo(destination, fromRemotePath, startAt = 0) { - if (typeof destination === "string") { - return this._downloadToFile(destination, fromRemotePath, startAt); - } - return this._downloadToStream(destination, fromRemotePath, startAt); - } - async _downloadToFile(localPath, remotePath, startAt) { - const appendingToLocalFile = startAt > 0; - const fileSystemFlags = appendingToLocalFile ? "r+" : "w"; - const fd = await fsOpen(localPath, fileSystemFlags); - const destination = (0, fs_1.createWriteStream)("", { - fd, - start: startAt, - autoClose: false - }); - try { - return await this._downloadToStream(destination, remotePath, startAt); - } - catch (err) { - const localFileStats = await ignoreError(() => fsStat(localPath)); - const hasDownloadedData = localFileStats && localFileStats.size > 0; - const shouldRemoveLocalFile = !appendingToLocalFile && !hasDownloadedData; - if (shouldRemoveLocalFile) { - await ignoreError(() => fsUnlink(localPath)); - } - throw err; - } - finally { - await ignoreError(() => fsClose(fd)); - } - } - async _downloadToStream(destination, remotePath, startAt) { - const onError = (err) => this.ftp.closeWithError(err); - destination.once("error", onError); - try { - const validPath = await this.protectWhitespace(remotePath); - await this.prepareTransfer(this.ftp); - return await (0, transfer_1.downloadTo)(destination, { - ftp: this.ftp, - tracker: this._progressTracker, - command: startAt > 0 ? `REST ${startAt}` : `RETR ${validPath}`, - remotePath: validPath, - type: "download" - }); - } - finally { - destination.removeListener("error", onError); - destination.end(); - } - } - async list(path = "") { - const validPath = await this.protectWhitespace(path); - let lastError; - for (const candidate of this.availableListCommands) { - const command = validPath === "" ? candidate : `${candidate} ${validPath}`; - await this.prepareTransfer(this.ftp); - try { - const parsedList = await this._requestListWithCommand(command); - this.availableListCommands = [candidate]; - return parsedList; - } - catch (err) { - const shouldTryNext = err instanceof FtpContext_1.FTPError; - if (!shouldTryNext) { - throw err; - } - lastError = err; - } - } - throw lastError; - } - async _requestListWithCommand(command) { - const buffer = new StringWriter_1.StringWriter(); - await (0, transfer_1.downloadTo)(buffer, { - ftp: this.ftp, - tracker: this._progressTracker, - command, - remotePath: "", - type: "list" - }); - const text = buffer.getText(this.ftp.encoding); - this.ftp.log(text); - return this.parseList(text); - } - async removeDir(remoteDirPath) { - return this._exitAtCurrentDirectory(async () => { - await this.cd(remoteDirPath); - const absoluteDirPath = await this.pwd(); - await this.clearWorkingDir(); - const dirIsRoot = absoluteDirPath === "/"; - if (!dirIsRoot) { - await this.cdup(); - await this.removeEmptyDir(absoluteDirPath); - } - }); - } - async clearWorkingDir() { - for (const file of await this.list()) { - if (file.isDirectory) { - await this.cd(file.name); - await this.clearWorkingDir(); - await this.cdup(); - await this.removeEmptyDir(file.name); - } - else { - await this.remove(file.name); - } - } - } - async uploadFromDir(localDirPath, remoteDirPath) { - return this._exitAtCurrentDirectory(async () => { - if (remoteDirPath) { - await this.ensureDir(remoteDirPath); - } - return await this._uploadToWorkingDir(localDirPath); - }); - } - async _uploadToWorkingDir(localDirPath) { - const files = await fsReadDir(localDirPath); - for (const file of files) { - const fullPath = (0, path_1.join)(localDirPath, file); - const stats = await fsStat(fullPath); - if (stats.isFile()) { - await this.uploadFrom(fullPath, file); - } - else if (stats.isDirectory()) { - await this._openDir(file); - await this._uploadToWorkingDir(fullPath); - await this.cdup(); - } - } - } - async downloadToDir(localDirPath, remoteDirPath) { - return this._exitAtCurrentDirectory(async () => { - if (remoteDirPath) { - await this.cd(remoteDirPath); - } - return await this._downloadFromWorkingDir(localDirPath); - }); - } - async _downloadFromWorkingDir(localDirPath) { - await ensureLocalDirectory(localDirPath); - for (const file of await this.list()) { - const hasInvalidName = !file.name || (0, path_1.basename)(file.name) !== file.name; - if (hasInvalidName) { - const safeName = JSON.stringify(file.name); - this.ftp.log(`Invalid filename from server listing, will skip file. (${safeName})`); - continue; - } - const localPath = (0, path_1.join)(localDirPath, file.name); - if (file.isDirectory) { - await this.cd(file.name); - await this._downloadFromWorkingDir(localPath); - await this.cdup(); - } - else if (file.isFile) { - await this.downloadTo(localPath, file.name); - } - } - } - async ensureDir(remoteDirPath) { - if (remoteDirPath.startsWith("/")) { - await this.cd("/"); - } - const names = remoteDirPath.split("/").filter(name => name !== ""); - for (const name of names) { - await this._openDir(name); - } - } - async _openDir(dirName) { - await this.sendIgnoringError("MKD " + dirName); - await this.cd(dirName); - } - async removeEmptyDir(path) { - const validPath = await this.protectWhitespace(path); - return this.send(`RMD ${validPath}`); - } - async protectWhitespace(path) { - if (!path.startsWith(" ")) { - return path; - } - const pwd = await this.pwd(); - const absolutePathPrefix = pwd.endsWith("/") ? pwd : pwd + "/"; - return absolutePathPrefix + path; - } - async _exitAtCurrentDirectory(func) { - const userDir = await this.pwd(); - try { - return await func(); - } - finally { - if (!this.closed) { - await ignoreError(() => this.cd(userDir)); - } - } - } - _enterFirstCompatibleMode(strategies) { - return async (ftp) => { - ftp.log("Trying to find optimal transfer strategy..."); - let lastError = undefined; - for (const strategy of strategies) { - try { - const res = await strategy(ftp); - ftp.log("Optimal transfer strategy found."); - this.prepareTransfer = strategy; - return res; - } - catch (err) { - lastError = err; - } - } - throw new Error(`None of the available transfer strategies work. Last error response was '${lastError}'.`); - }; - } - async upload(source, toRemotePath, options = {}) { - this.ftp.log("Warning: upload() has been deprecated, use uploadFrom()."); - return this.uploadFrom(source, toRemotePath, options); - } - async append(source, toRemotePath, options = {}) { - this.ftp.log("Warning: append() has been deprecated, use appendFrom()."); - return this.appendFrom(source, toRemotePath, options); - } - async download(destination, fromRemotePath, startAt = 0) { - this.ftp.log("Warning: download() has been deprecated, use downloadTo()."); - return this.downloadTo(destination, fromRemotePath, startAt); - } - async uploadDir(localDirPath, remoteDirPath) { - this.ftp.log("Warning: uploadDir() has been deprecated, use uploadFromDir()."); - return this.uploadFromDir(localDirPath, remoteDirPath); - } - async downloadDir(localDirPath) { - this.ftp.log("Warning: downloadDir() has been deprecated, use downloadToDir()."); - return this.downloadToDir(localDirPath); - } - }; - Client.Client = Client$1; - async function ensureLocalDirectory(path) { - try { - await fsStat(path); - } - catch (_a) { - await fsMkDir(path, { recursive: true }); - } - } - async function ignoreError(func) { - try { - return await func(); - } - catch (_a) { - return undefined; - } - } - return Client; -} - -var StringEncoding = {}; - -var hasRequiredStringEncoding; - -function requireStringEncoding () { - if (hasRequiredStringEncoding) return StringEncoding; - hasRequiredStringEncoding = 1; - Object.defineProperty(StringEncoding, "__esModule", { value: true }); - return StringEncoding; -} - -var hasRequiredDist$6; - -function requireDist$6 () { - if (hasRequiredDist$6) return dist$3; - hasRequiredDist$6 = 1; - (function (exports$1) { - var __createBinding = (dist$3 && dist$3.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __exportStar = (dist$3 && dist$3.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.enterPassiveModeIPv6 = exports$1.enterPassiveModeIPv4 = void 0; - __exportStar(requireClient(), exports$1); - __exportStar(requireFtpContext(), exports$1); - __exportStar(requireFileInfo(), exports$1); - __exportStar(requireParseList(), exports$1); - __exportStar(requireStringEncoding(), exports$1); - var transfer_1 = requireTransfer(); - Object.defineProperty(exports$1, "enterPassiveModeIPv4", { enumerable: true, get: function () { return transfer_1.enterPassiveModeIPv4; } }); - Object.defineProperty(exports$1, "enterPassiveModeIPv6", { enumerable: true, get: function () { return transfer_1.enterPassiveModeIPv6; } }); - } (dist$3)); - return dist$3; -} - -var hasRequiredFtp; - -function requireFtp () { - if (hasRequiredFtp) return ftp; - hasRequiredFtp = 1; - var __importDefault = (ftp && ftp.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(ftp, "__esModule", { value: true }); - ftp.ftp = void 0; - const basic_ftp_1 = requireDist$6(); - const stream_1 = require$$1$3; - const path_1 = require$$0$4; - const debug_1 = __importDefault(requireSrc()); - const notfound_1 = __importDefault(requireNotfound()); - const notmodified_1 = __importDefault(requireNotmodified()); - const debug = (0, debug_1.default)('get-uri:ftp'); - const ftp$1 = async (url, opts = {}) => { - const { cache } = opts; - const filepath = decodeURIComponent(url.pathname); - let lastModified; - if (!filepath) { - throw new TypeError('No "pathname"!'); - } - const client = new basic_ftp_1.Client(); - try { - const host = url.hostname || url.host || 'localhost'; - const port = parseInt(url.port || '0', 10) || 21; - const user = url.username - ? decodeURIComponent(url.username) - : undefined; - const password = url.password - ? decodeURIComponent(url.password) - : undefined; - await client.access({ - host, - port, - user, - password, - ...opts, - }); - try { - lastModified = await client.lastMod(filepath); - } - catch (err) { - if (err.code === 550) { - throw new notfound_1.default(); - } - } - if (!lastModified) { - const list = await client.list((0, path_1.dirname)(filepath)); - const name = (0, path_1.basename)(filepath); - const entry = list.find((e) => e.name === name); - if (entry) { - lastModified = entry.modifiedAt; - } - } - if (lastModified) { - if (isNotModified()) { - throw new notmodified_1.default(); - } - } - else { - throw new notfound_1.default(); - } - const stream = new stream_1.PassThrough(); - const rs = stream; - client.downloadTo(stream, filepath).then((result) => { - debug(result.message); - client.close(); - }); - rs.lastModified = lastModified; - return rs; - } - catch (err) { - client.close(); - throw err; - } - function isNotModified() { - if (cache?.lastModified && lastModified) { - return +cache.lastModified === +lastModified; - } - return false; - } - }; - ftp.ftp = ftp$1; - return ftp; -} - -var http = {}; - -var httpError = {}; - -var hasRequiredHttpError; - -function requireHttpError () { - if (hasRequiredHttpError) return httpError; - hasRequiredHttpError = 1; - Object.defineProperty(httpError, "__esModule", { value: true }); - const http_1 = require$$0$6; - class HTTPError extends Error { - constructor(statusCode, message = http_1.STATUS_CODES[statusCode]) { - super(message); - this.statusCode = statusCode; - this.code = `E${String(message).toUpperCase().replace(/\s+/g, '')}`; - } - } - httpError.default = HTTPError; - return httpError; -} - -var hasRequiredHttp; - -function requireHttp () { - if (hasRequiredHttp) return http; - hasRequiredHttp = 1; - (function (exports$1) { - var __importDefault = (http && http.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.http = void 0; - const http_1 = __importDefault(require$$0$6); - const https_1 = __importDefault(require$$1$1); - const events_1 = require$$0$8; - const debug_1 = __importDefault(requireSrc()); - const http_error_1 = __importDefault(requireHttpError()); - const notfound_1 = __importDefault(requireNotfound()); - const notmodified_1 = __importDefault(requireNotmodified()); - const debug = (0, debug_1.default)('get-uri:http'); - const http$1 = async (url, opts = {}) => { - debug('GET %o', url.href); - const cache = getCache(url, opts.cache); - if (cache && isFresh(cache) && typeof cache.statusCode === 'number') { - const type = (cache.statusCode / 100) | 0; - if (type === 3 && cache.headers.location) { - debug('cached redirect'); - throw new Error('TODO: implement cached redirects!'); - } - throw new notmodified_1.default(); - } - const maxRedirects = typeof opts.maxRedirects === 'number' ? opts.maxRedirects : 5; - debug('allowing %o max redirects', maxRedirects); - let mod; - if (opts.http) { - mod = opts.http; - debug('using secure `https` core module'); - } - else { - mod = http_1.default; - debug('using `http` core module'); - } - const options = { ...opts }; - if (cache) { - if (!options.headers) { - options.headers = {}; - } - const lastModified = cache.headers['last-modified']; - if (lastModified) { - options.headers['If-Modified-Since'] = lastModified; - debug('added "If-Modified-Since" request header: %o', lastModified); - } - const etag = cache.headers.etag; - if (etag) { - options.headers['If-None-Match'] = etag; - debug('added "If-None-Match" request header: %o', etag); - } - } - const req = mod.get(url, options); - const [res] = await (0, events_1.once)(req, 'response'); - const code = res.statusCode || 0; - res.date = Date.now(); - res.parsed = url; - debug('got %o response status code', code); - const type = (code / 100) | 0; - const location = res.headers.location; - if (type === 3 && location) { - if (!opts.redirects) - opts.redirects = []; - const redirects = opts.redirects; - if (redirects.length < maxRedirects) { - debug('got a "redirect" status code with Location: %o', location); - res.resume(); - redirects.push(res); - const newUri = new URL(location, url.href); - debug('resolved redirect URL: %o', newUri.href); - const left = maxRedirects - redirects.length; - debug('%o more redirects allowed after this one', left); - if (newUri.protocol !== url.protocol) { - opts.http = newUri.protocol === 'https:' ? https_1.default : undefined; - } - return (0, exports$1.http)(newUri, opts); - } - } - if (type !== 2) { - res.resume(); - if (code === 304) { - throw new notmodified_1.default(); - } - else if (code === 404) { - throw new notfound_1.default(); - } - throw new http_error_1.default(code); - } - if (opts.redirects) { - res.redirects = opts.redirects; - } - return res; - }; - exports$1.http = http$1; - function isFresh(cache) { - let fresh = false; - let expires = parseInt(cache.headers.expires || '', 10); - const cacheControl = cache.headers['cache-control']; - if (cacheControl) { - debug('Cache-Control: %o', cacheControl); - const parts = cacheControl.split(/,\s*?\b/); - for (let i = 0; i < parts.length; i++) { - const part = parts[i]; - const subparts = part.split('='); - const name = subparts[0]; - switch (name) { - case 'max-age': - expires = - (cache.date || 0) + parseInt(subparts[1], 10) * 1000; - fresh = Date.now() < expires; - if (fresh) { - debug('cache is "fresh" due to previous %o Cache-Control param', part); - } - return fresh; - case 'must-revalidate': - break; - case 'no-cache': - case 'no-store': - debug('cache is "stale" due to explicit %o Cache-Control param', name); - return false; - } - } - } - else if (expires) { - debug('Expires: %o', expires); - fresh = Date.now() < expires; - if (fresh) { - debug('cache is "fresh" due to previous Expires response header'); - } - return fresh; - } - return false; - } - function getCache(url, cache) { - if (cache) { - if (cache.parsed && cache.parsed.href === url.href) { - return cache; - } - if (cache.redirects) { - for (let i = 0; i < cache.redirects.length; i++) { - const c = getCache(url, cache.redirects[i]); - if (c) { - return c; - } - } - } - } - return null; - } - } (http)); - return http; -} - -var https = {}; - -var hasRequiredHttps; - -function requireHttps () { - if (hasRequiredHttps) return https; - hasRequiredHttps = 1; - var __importDefault = (https && https.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(https, "__esModule", { value: true }); - https.https = void 0; - const https_1 = __importDefault(require$$1$1); - const http_1 = requireHttp(); - const https$1 = (url, opts) => { - return (0, http_1.http)(url, { ...opts, http: https_1.default }); - }; - https.https = https$1; - return https; -} - -var hasRequiredDist$5; - -function requireDist$5 () { - if (hasRequiredDist$5) return dist$5; - hasRequiredDist$5 = 1; - (function (exports$1) { - var __importDefault = (dist$5 && dist$5.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.getUri = exports$1.isValidProtocol = exports$1.protocols = void 0; - const debug_1 = __importDefault(requireSrc()); - const data_1 = requireData(); - const file_1 = requireFile(); - const ftp_1 = requireFtp(); - const http_1 = requireHttp(); - const https_1 = requireHttps(); - const debug = (0, debug_1.default)('get-uri'); - exports$1.protocols = { - data: data_1.data, - file: file_1.file, - ftp: ftp_1.ftp, - http: http_1.http, - https: https_1.https, - }; - const VALID_PROTOCOLS = new Set(Object.keys(exports$1.protocols)); - function isValidProtocol(p) { - return VALID_PROTOCOLS.has(p); - } - exports$1.isValidProtocol = isValidProtocol; - async function getUri(uri, opts) { - debug('getUri(%o)', uri); - if (!uri) { - throw new TypeError('Must pass in a URI to "getUri()"'); - } - const url = typeof uri === 'string' ? new URL(uri) : uri; - const protocol = url.protocol.replace(/:$/, ''); - if (!isValidProtocol(protocol)) { - throw new TypeError(`Unsupported protocol "${protocol}" specified in URI: "${uri}"`); - } - const getter = exports$1.protocols[protocol]; - return getter(url, opts); - } - exports$1.getUri = getUri; - } (dist$5)); - return dist$5; -} - -var dist$2 = {}; - -var dist$1 = {}; - -var degenerator = {}; - -var escodegen = {}; - -var estraverse = {}; - -/* - Copyright (C) 2012-2013 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var hasRequiredEstraverse; - -function requireEstraverse () { - if (hasRequiredEstraverse) return estraverse; - hasRequiredEstraverse = 1; - (function (exports$1) { - (function clone(exports$1) { - var Syntax, - VisitorOption, - VisitorKeys, - BREAK, - SKIP, - REMOVE; - function deepCopy(obj) { - var ret = {}, key, val; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - val = obj[key]; - if (typeof val === 'object' && val !== null) { - ret[key] = deepCopy(val); - } else { - ret[key] = val; - } - } - } - return ret; - } - function upperBound(array, func) { - var diff, len, i, current; - len = array.length; - i = 0; - while (len) { - diff = len >>> 1; - current = i + diff; - if (func(array[current])) { - len = diff; - } else { - i = current + 1; - len -= diff + 1; - } - } - return i; - } - Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AwaitExpression: 'AwaitExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ChainExpression: 'ChainExpression', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ComprehensionBlock: 'ComprehensionBlock', - ComprehensionExpression: 'ComprehensionExpression', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DebuggerStatement: 'DebuggerStatement', - DirectiveStatement: 'DirectiveStatement', - DoWhileStatement: 'DoWhileStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - ForOfStatement: 'ForOfStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - GeneratorExpression: 'GeneratorExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportExpression: 'ImportExpression', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - ModuleSpecifier: 'ModuleSpecifier', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - PrivateIdentifier: 'PrivateIdentifier', - Program: 'Program', - Property: 'Property', - PropertyDefinition: 'PropertyDefinition', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; - VisitorKeys = { - AssignmentExpression: ['left', 'right'], - AssignmentPattern: ['left', 'right'], - ArrayExpression: ['elements'], - ArrayPattern: ['elements'], - ArrowFunctionExpression: ['params', 'body'], - AwaitExpression: ['argument'], - BlockStatement: ['body'], - BinaryExpression: ['left', 'right'], - BreakStatement: ['label'], - CallExpression: ['callee', 'arguments'], - CatchClause: ['param', 'body'], - ChainExpression: ['expression'], - ClassBody: ['body'], - ClassDeclaration: ['id', 'superClass', 'body'], - ClassExpression: ['id', 'superClass', 'body'], - ComprehensionBlock: ['left', 'right'], - ComprehensionExpression: ['blocks', 'filter', 'body'], - ConditionalExpression: ['test', 'consequent', 'alternate'], - ContinueStatement: ['label'], - DebuggerStatement: [], - DirectiveStatement: [], - DoWhileStatement: ['body', 'test'], - EmptyStatement: [], - ExportAllDeclaration: ['source'], - ExportDefaultDeclaration: ['declaration'], - ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], - ExportSpecifier: ['exported', 'local'], - ExpressionStatement: ['expression'], - ForStatement: ['init', 'test', 'update', 'body'], - ForInStatement: ['left', 'right', 'body'], - ForOfStatement: ['left', 'right', 'body'], - FunctionDeclaration: ['id', 'params', 'body'], - FunctionExpression: ['id', 'params', 'body'], - GeneratorExpression: ['blocks', 'filter', 'body'], - Identifier: [], - IfStatement: ['test', 'consequent', 'alternate'], - ImportExpression: ['source'], - ImportDeclaration: ['specifiers', 'source'], - ImportDefaultSpecifier: ['local'], - ImportNamespaceSpecifier: ['local'], - ImportSpecifier: ['imported', 'local'], - Literal: [], - LabeledStatement: ['label', 'body'], - LogicalExpression: ['left', 'right'], - MemberExpression: ['object', 'property'], - MetaProperty: ['meta', 'property'], - MethodDefinition: ['key', 'value'], - ModuleSpecifier: [], - NewExpression: ['callee', 'arguments'], - ObjectExpression: ['properties'], - ObjectPattern: ['properties'], - PrivateIdentifier: [], - Program: ['body'], - Property: ['key', 'value'], - PropertyDefinition: ['key', 'value'], - RestElement: [ 'argument' ], - ReturnStatement: ['argument'], - SequenceExpression: ['expressions'], - SpreadElement: ['argument'], - Super: [], - SwitchStatement: ['discriminant', 'cases'], - SwitchCase: ['test', 'consequent'], - TaggedTemplateExpression: ['tag', 'quasi'], - TemplateElement: [], - TemplateLiteral: ['quasis', 'expressions'], - ThisExpression: [], - ThrowStatement: ['argument'], - TryStatement: ['block', 'handler', 'finalizer'], - UnaryExpression: ['argument'], - UpdateExpression: ['argument'], - VariableDeclaration: ['declarations'], - VariableDeclarator: ['id', 'init'], - WhileStatement: ['test', 'body'], - WithStatement: ['object', 'body'], - YieldExpression: ['argument'] - }; - BREAK = {}; - SKIP = {}; - REMOVE = {}; - VisitorOption = { - Break: BREAK, - Skip: SKIP, - Remove: REMOVE - }; - function Reference(parent, key) { - this.parent = parent; - this.key = key; - } - Reference.prototype.replace = function replace(node) { - this.parent[this.key] = node; - }; - Reference.prototype.remove = function remove() { - if (Array.isArray(this.parent)) { - this.parent.splice(this.key, 1); - return true; - } else { - this.replace(null); - return false; - } - }; - function Element(node, path, wrap, ref) { - this.node = node; - this.path = path; - this.wrap = wrap; - this.ref = ref; - } - function Controller() { } - Controller.prototype.path = function path() { - var i, iz, j, jz, result, element; - function addToPath(result, path) { - if (Array.isArray(path)) { - for (j = 0, jz = path.length; j < jz; ++j) { - result.push(path[j]); - } - } else { - result.push(path); - } - } - if (!this.__current.path) { - return null; - } - result = []; - for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { - element = this.__leavelist[i]; - addToPath(result, element.path); - } - addToPath(result, this.__current.path); - return result; - }; - Controller.prototype.type = function () { - var node = this.current(); - return node.type || this.__current.wrap; - }; - Controller.prototype.parents = function parents() { - var i, iz, result; - result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { - result.push(this.__leavelist[i].node); - } - return result; - }; - Controller.prototype.current = function current() { - return this.__current.node; - }; - Controller.prototype.__execute = function __execute(callback, element) { - var previous, result; - result = undefined; - previous = this.__current; - this.__current = element; - this.__state = null; - if (callback) { - result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); - } - this.__current = previous; - return result; - }; - Controller.prototype.notify = function notify(flag) { - this.__state = flag; - }; - Controller.prototype.skip = function () { - this.notify(SKIP); - }; - Controller.prototype['break'] = function () { - this.notify(BREAK); - }; - Controller.prototype.remove = function () { - this.notify(REMOVE); - }; - Controller.prototype.__initialize = function(root, visitor) { - this.visitor = visitor; - this.root = root; - this.__worklist = []; - this.__leavelist = []; - this.__current = null; - this.__state = null; - this.__fallback = null; - if (visitor.fallback === 'iteration') { - this.__fallback = Object.keys; - } else if (typeof visitor.fallback === 'function') { - this.__fallback = visitor.fallback; - } - this.__keys = VisitorKeys; - if (visitor.keys) { - this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); - } - }; - function isNode(node) { - if (node == null) { - return false; - } - return typeof node === 'object' && typeof node.type === 'string'; - } - function isProperty(nodeType, key) { - return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; - } - function candidateExistsInLeaveList(leavelist, candidate) { - for (var i = leavelist.length - 1; i >= 0; --i) { - if (leavelist[i].node === candidate) { - return true; - } - } - return false; - } - Controller.prototype.traverse = function traverse(root, visitor) { - var worklist, - leavelist, - element, - node, - nodeType, - ret, - key, - current, - current2, - candidates, - candidate, - sentinel; - this.__initialize(root, visitor); - sentinel = {}; - worklist = this.__worklist; - leavelist = this.__leavelist; - worklist.push(new Element(root, null, null, null)); - leavelist.push(new Element(null, null, null, null)); - while (worklist.length) { - element = worklist.pop(); - if (element === sentinel) { - element = leavelist.pop(); - ret = this.__execute(visitor.leave, element); - if (this.__state === BREAK || ret === BREAK) { - return; - } - continue; - } - if (element.node) { - ret = this.__execute(visitor.enter, element); - if (this.__state === BREAK || ret === BREAK) { - return; - } - worklist.push(sentinel); - leavelist.push(element); - if (this.__state === SKIP || ret === SKIP) { - continue; - } - node = element.node; - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - if (candidateExistsInLeaveList(leavelist, candidate[current2])) { - continue; - } - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', null); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, null); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - if (candidateExistsInLeaveList(leavelist, candidate)) { - continue; - } - worklist.push(new Element(candidate, key, null, null)); - } - } - } - } - }; - Controller.prototype.replace = function replace(root, visitor) { - var worklist, - leavelist, - node, - nodeType, - target, - element, - current, - current2, - candidates, - candidate, - sentinel, - outer, - key; - function removeElem(element) { - var i, - key, - nextElem, - parent; - if (element.ref.remove()) { - key = element.ref.key; - parent = element.ref.parent; - i = worklist.length; - while (i--) { - nextElem = worklist[i]; - if (nextElem.ref && nextElem.ref.parent === parent) { - if (nextElem.ref.key < key) { - break; - } - --nextElem.ref.key; - } - } - } - } - this.__initialize(root, visitor); - sentinel = {}; - worklist = this.__worklist; - leavelist = this.__leavelist; - outer = { - root: root - }; - element = new Element(root, null, null, new Reference(outer, 'root')); - worklist.push(element); - leavelist.push(element); - while (worklist.length) { - element = worklist.pop(); - if (element === sentinel) { - element = leavelist.pop(); - target = this.__execute(visitor.leave, element); - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - element.ref.replace(target); - } - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - } - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - continue; - } - target = this.__execute(visitor.enter, element); - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - element.ref.replace(target); - element.node = target; - } - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - element.node = null; - } - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - node = element.node; - if (!node) { - continue; - } - worklist.push(sentinel); - leavelist.push(element); - if (this.__state === SKIP || target === SKIP) { - continue; - } - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - worklist.push(new Element(candidate, key, null, new Reference(node, key))); - } - } - } - return outer.root; - }; - function traverse(root, visitor) { - var controller = new Controller(); - return controller.traverse(root, visitor); - } - function replace(root, visitor) { - var controller = new Controller(); - return controller.replace(root, visitor); - } - function extendCommentRange(comment, tokens) { - var target; - target = upperBound(tokens, function search(token) { - return token.range[0] > comment.range[0]; - }); - comment.extendedRange = [comment.range[0], comment.range[1]]; - if (target !== tokens.length) { - comment.extendedRange[1] = tokens[target].range[0]; - } - target -= 1; - if (target >= 0) { - comment.extendedRange[0] = tokens[target].range[1]; - } - return comment; - } - function attachComments(tree, providedComments, tokens) { - var comments = [], comment, len, i, cursor; - if (!tree.range) { - throw new Error('attachComments needs range information'); - } - if (!tokens.length) { - if (providedComments.length) { - for (i = 0, len = providedComments.length; i < len; i += 1) { - comment = deepCopy(providedComments[i]); - comment.extendedRange = [0, tree.range[0]]; - comments.push(comment); - } - tree.leadingComments = comments; - } - return tree; - } - for (i = 0, len = providedComments.length; i < len; i += 1) { - comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } - cursor = 0; - traverse(tree, { - enter: function (node) { - var comment; - while (cursor < comments.length) { - comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { - break; - } - if (comment.extendedRange[1] === node.range[0]) { - if (!node.leadingComments) { - node.leadingComments = []; - } - node.leadingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - if (cursor === comments.length) { - return VisitorOption.Break; - } - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - cursor = 0; - traverse(tree, { - leave: function (node) { - var comment; - while (cursor < comments.length) { - comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { - break; - } - if (node.range[1] === comment.extendedRange[0]) { - if (!node.trailingComments) { - node.trailingComments = []; - } - node.trailingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - if (cursor === comments.length) { - return VisitorOption.Break; - } - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - return tree; - } - exports$1.Syntax = Syntax; - exports$1.traverse = traverse; - exports$1.replace = replace; - exports$1.attachComments = attachComments; - exports$1.VisitorKeys = VisitorKeys; - exports$1.VisitorOption = VisitorOption; - exports$1.Controller = Controller; - exports$1.cloneEnvironment = function () { return clone({}); }; - return exports$1; - }(exports$1)); - } (estraverse)); - return estraverse; -} - -var utils = {}; - -var ast = {exports: {}}; - -/* - Copyright (C) 2013 Yusuke Suzuki - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var hasRequiredAst; - -function requireAst () { - if (hasRequiredAst) return ast.exports; - hasRequiredAst = 1; - (function () { - function isExpression(node) { - if (node == null) { return false; } - switch (node.type) { - case 'ArrayExpression': - case 'AssignmentExpression': - case 'BinaryExpression': - case 'CallExpression': - case 'ConditionalExpression': - case 'FunctionExpression': - case 'Identifier': - case 'Literal': - case 'LogicalExpression': - case 'MemberExpression': - case 'NewExpression': - case 'ObjectExpression': - case 'SequenceExpression': - case 'ThisExpression': - case 'UnaryExpression': - case 'UpdateExpression': - return true; - } - return false; - } - function isIterationStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'DoWhileStatement': - case 'ForInStatement': - case 'ForStatement': - case 'WhileStatement': - return true; - } - return false; - } - function isStatement(node) { - if (node == null) { return false; } - switch (node.type) { - case 'BlockStatement': - case 'BreakStatement': - case 'ContinueStatement': - case 'DebuggerStatement': - case 'DoWhileStatement': - case 'EmptyStatement': - case 'ExpressionStatement': - case 'ForInStatement': - case 'ForStatement': - case 'IfStatement': - case 'LabeledStatement': - case 'ReturnStatement': - case 'SwitchStatement': - case 'ThrowStatement': - case 'TryStatement': - case 'VariableDeclaration': - case 'WhileStatement': - case 'WithStatement': - return true; - } - return false; - } - function isSourceElement(node) { - return isStatement(node) || node != null && node.type === 'FunctionDeclaration'; - } - function trailingStatement(node) { - switch (node.type) { - case 'IfStatement': - if (node.alternate != null) { - return node.alternate; - } - return node.consequent; - case 'LabeledStatement': - case 'ForStatement': - case 'ForInStatement': - case 'WhileStatement': - case 'WithStatement': - return node.body; - } - return null; - } - function isProblematicIfStatement(node) { - var current; - if (node.type !== 'IfStatement') { - return false; - } - if (node.alternate == null) { - return false; - } - current = node.consequent; - do { - if (current.type === 'IfStatement') { - if (current.alternate == null) { - return true; - } - } - current = trailingStatement(current); - } while (current); - return false; - } - ast.exports = { - isExpression: isExpression, - isStatement: isStatement, - isIterationStatement: isIterationStatement, - isSourceElement: isSourceElement, - isProblematicIfStatement: isProblematicIfStatement, - trailingStatement: trailingStatement - }; - }()); - return ast.exports; -} - -var code = {exports: {}}; - -/* - Copyright (C) 2013-2014 Yusuke Suzuki - Copyright (C) 2014 Ivan Nikulin - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var hasRequiredCode; - -function requireCode () { - if (hasRequiredCode) return code.exports; - hasRequiredCode = 1; - (function () { - var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; - ES5Regex = { - NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, - NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BA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1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - }; - ES6Regex = { - NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, - NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u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EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\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\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\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E57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ - }; - function isDecimalDigit(ch) { - return 0x30 <= ch && ch <= 0x39; - } - function isHexDigit(ch) { - return 0x30 <= ch && ch <= 0x39 || - 0x61 <= ch && ch <= 0x66 || - 0x41 <= ch && ch <= 0x46; - } - function isOctalDigit(ch) { - return ch >= 0x30 && ch <= 0x37; - } - NON_ASCII_WHITESPACES = [ - 0x1680, - 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, - 0x202F, 0x205F, - 0x3000, - 0xFEFF - ]; - function isWhiteSpace(ch) { - return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || - ch >= 0x1680 && NON_ASCII_WHITESPACES.indexOf(ch) >= 0; - } - function isLineTerminator(ch) { - return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029; - } - function fromCodePoint(cp) { - if (cp <= 0xFFFF) { return String.fromCharCode(cp); } - var cu1 = String.fromCharCode(Math.floor((cp - 0x10000) / 0x400) + 0xD800); - var cu2 = String.fromCharCode(((cp - 0x10000) % 0x400) + 0xDC00); - return cu1 + cu2; - } - IDENTIFIER_START = new Array(0x80); - for(ch = 0; ch < 0x80; ++ch) { - IDENTIFIER_START[ch] = - ch >= 0x61 && ch <= 0x7A || - ch >= 0x41 && ch <= 0x5A || - ch === 0x24 || ch === 0x5F; - } - IDENTIFIER_PART = new Array(0x80); - for(ch = 0; ch < 0x80; ++ch) { - IDENTIFIER_PART[ch] = - ch >= 0x61 && ch <= 0x7A || - ch >= 0x41 && ch <= 0x5A || - ch >= 0x30 && ch <= 0x39 || - ch === 0x24 || ch === 0x5F; - } - function isIdentifierStartES5(ch) { - return ch < 0x80 ? IDENTIFIER_START[ch] : ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); - } - function isIdentifierPartES5(ch) { - return ch < 0x80 ? IDENTIFIER_PART[ch] : ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); - } - function isIdentifierStartES6(ch) { - return ch < 0x80 ? IDENTIFIER_START[ch] : ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)); - } - function isIdentifierPartES6(ch) { - return ch < 0x80 ? IDENTIFIER_PART[ch] : ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)); - } - code.exports = { - isDecimalDigit: isDecimalDigit, - isHexDigit: isHexDigit, - isOctalDigit: isOctalDigit, - isWhiteSpace: isWhiteSpace, - isLineTerminator: isLineTerminator, - isIdentifierStartES5: isIdentifierStartES5, - isIdentifierPartES5: isIdentifierPartES5, - isIdentifierStartES6: isIdentifierStartES6, - isIdentifierPartES6: isIdentifierPartES6 - }; - }()); - return code.exports; -} - -var keyword = {exports: {}}; - -/* - Copyright (C) 2013 Yusuke Suzuki - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var hasRequiredKeyword; - -function requireKeyword () { - if (hasRequiredKeyword) return keyword.exports; - hasRequiredKeyword = 1; - (function () { - var code = requireCode(); - function isStrictModeReservedWordES6(id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'let': - return true; - default: - return false; - } - } - function isKeywordES5(id, strict) { - if (!strict && id === 'yield') { - return false; - } - return isKeywordES6(id, strict); - } - function isKeywordES6(id, strict) { - if (strict && isStrictModeReservedWordES6(id)) { - return true; - } - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - } - function isReservedWordES5(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES5(id, strict); - } - function isReservedWordES6(id, strict) { - return id === 'null' || id === 'true' || id === 'false' || isKeywordES6(id, strict); - } - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - function isIdentifierNameES5(id) { - var i, iz, ch; - if (id.length === 0) { return false; } - ch = id.charCodeAt(0); - if (!code.isIdentifierStartES5(ch)) { - return false; - } - for (i = 1, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (!code.isIdentifierPartES5(ch)) { - return false; - } - } - return true; - } - function decodeUtf16(lead, trail) { - return (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - } - function isIdentifierNameES6(id) { - var i, iz, ch, lowCh, check; - if (id.length === 0) { return false; } - check = code.isIdentifierStartES6; - for (i = 0, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - if (0xD800 <= ch && ch <= 0xDBFF) { - ++i; - if (i >= iz) { return false; } - lowCh = id.charCodeAt(i); - if (!(0xDC00 <= lowCh && lowCh <= 0xDFFF)) { - return false; - } - ch = decodeUtf16(ch, lowCh); - } - if (!check(ch)) { - return false; - } - check = code.isIdentifierPartES6; - } - return true; - } - function isIdentifierES5(id, strict) { - return isIdentifierNameES5(id) && !isReservedWordES5(id, strict); - } - function isIdentifierES6(id, strict) { - return isIdentifierNameES6(id) && !isReservedWordES6(id, strict); - } - keyword.exports = { - isKeywordES5: isKeywordES5, - isKeywordES6: isKeywordES6, - isReservedWordES5: isReservedWordES5, - isReservedWordES6: isReservedWordES6, - isRestrictedWord: isRestrictedWord, - isIdentifierNameES5: isIdentifierNameES5, - isIdentifierNameES6: isIdentifierNameES6, - isIdentifierES5: isIdentifierES5, - isIdentifierES6: isIdentifierES6 - }; - }()); - return keyword.exports; -} - -/* - Copyright (C) 2013 Yusuke Suzuki - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var hasRequiredUtils; - -function requireUtils () { - if (hasRequiredUtils) return utils; - hasRequiredUtils = 1; - (function () { - utils.ast = requireAst(); - utils.code = requireCode(); - utils.keyword = requireKeyword(); - }()); - return utils; -} - -var sourceMap = {}; - -var sourceMapGenerator = {}; - -var base64Vlq = {}; - -var base64 = {}; - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredBase64; - -function requireBase64 () { - if (hasRequiredBase64) return base64; - hasRequiredBase64 = 1; - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - base64.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - base64.decode = function (charCode) { - var bigA = 65; - var bigZ = 90; - var littleA = 97; - var littleZ = 122; - var zero = 48; - var nine = 57; - var plus = 43; - var slash = 47; - var littleOffset = 26; - var numberOffset = 52; - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - if (charCode == plus) { - return 62; - } - if (charCode == slash) { - return 63; - } - return -1; - }; - return base64; -} - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var hasRequiredBase64Vlq; - -function requireBase64Vlq () { - if (hasRequiredBase64Vlq) return base64Vlq; - hasRequiredBase64Vlq = 1; - var base64 = requireBase64(); - var VLQ_BASE_SHIFT = 5; - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - var VLQ_BASE_MASK = VLQ_BASE - 1; - var VLQ_CONTINUATION_BIT = VLQ_BASE; - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - base64Vlq.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - var vlq = toVLQSigned(aValue); - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - return encoded; - }; - base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - return base64Vlq; -} - -var util$1 = {}; - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredUtil$1; - -function requireUtil$1 () { - if (hasRequiredUtil$1) return util$1; - hasRequiredUtil$1 = 1; - (function (exports$1) { - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports$1.getArg = getArg; - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports$1.urlParse = urlParse; - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports$1.urlGenerate = urlGenerate; - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports$1.isAbsolute(path); - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports$1.normalize = normalize; - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports$1.join = join; - exports$1.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - aRoot = aRoot.replace(/\/$/, ''); - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - ++level; - } - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports$1.relative = relative; - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - function identity (s) { - return s; - } - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - return aStr; - } - exports$1.toSetString = supportsNullProto ? identity : toSetString; - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - return aStr; - } - exports$1.fromSetString = supportsNullProto ? identity : fromSetString; - function isProtoString(s) { - if (!s) { - return false; - } - var length = s.length; - if (length < 9 ) { - return false; - } - if (s.charCodeAt(length - 1) !== 95 || - s.charCodeAt(length - 2) !== 95 || - s.charCodeAt(length - 3) !== 111 || - s.charCodeAt(length - 4) !== 116 || - s.charCodeAt(length - 5) !== 111 || - s.charCodeAt(length - 6) !== 114 || - s.charCodeAt(length - 7) !== 112 || - s.charCodeAt(length - 8) !== 95 || - s.charCodeAt(length - 9) !== 95 ) { - return false; - } - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 ) { - return false; - } - } - return true; - } - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports$1.compareByOriginalPositions = compareByOriginalPositions; - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports$1.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - if (aStr1 === null) { - return 1; - } - if (aStr2 === null) { - return -1; - } - if (aStr1 > aStr2) { - return 1; - } - return -1; - } - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - return strcmp(mappingA.name, mappingB.name); - } - exports$1.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports$1.parseSourceMapInput = parseSourceMapInput; - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - if (sourceRoot) { - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - sourceURL = sourceRoot + sourceURL; - } - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - return normalize(sourceURL); - } - exports$1.computeSourceURL = computeSourceURL; - } (util$1)); - return util$1; -} - -var arraySet = {}; - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredArraySet; - -function requireArraySet () { - if (hasRequiredArraySet) return arraySet; - hasRequiredArraySet = 1; - var util = requireUtil$1(); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - arraySet.ArraySet = ArraySet; - return arraySet; -} - -var mappingList = {}; - -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredMappingList; - -function requireMappingList () { - if (hasRequiredMappingList) return mappingList; - hasRequiredMappingList = 1; - var util = requireUtil$1(); - function generatedPositionAfter(mappingA, mappingB) { - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - function MappingList() { - this._array = []; - this._sorted = true; - this._last = {generatedLine: -1, generatedColumn: 0}; - } - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - mappingList.MappingList = MappingList; - return mappingList; -} - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMapGenerator; - -function requireSourceMapGenerator () { - if (hasRequiredSourceMapGenerator) return sourceMapGenerator; - hasRequiredSourceMapGenerator = 1; - var base64VLQ = requireBase64Vlq(); - var util = requireUtil$1(); - var ArraySet = requireArraySet().ArraySet; - var MappingList = requireMappingList().MappingList; - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - SourceMapGenerator.prototype._version = 3; - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - if (aSourceContent != null) { - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - var newSources = new ArraySet(); - var newNames = new ArraySet(); - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - }, this); - this._sources = newSources; - this._names = newNames; - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ''; - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - result += next; - } - return result; - }; - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - return map; - }; - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - sourceMapGenerator.SourceMapGenerator = SourceMapGenerator; - return sourceMapGenerator; -} - -var sourceMapConsumer = {}; - -var binarySearch = {}; - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredBinarySearch; - -function requireBinarySearch () { - if (hasRequiredBinarySearch) return binarySearch; - hasRequiredBinarySearch = 1; - (function (exports$1) { - exports$1.GREATEST_LOWER_BOUND = 1; - exports$1.LEAST_UPPER_BOUND = 2; - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - return mid; - } - else if (cmp > 0) { - if (aHigh - mid > 1) { - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - if (aBias == exports$1.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - if (mid - aLow > 1) { - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - if (aBias == exports$1.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - exports$1.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports$1.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - return index; - }; - } (binarySearch)); - return binarySearch; -} - -var quickSort = {}; - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredQuickSort; - -function requireQuickSort () { - if (hasRequiredQuickSort) return quickSort; - hasRequiredQuickSort = 1; - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - function doQuickSort(ary, comparator, p, r) { - if (p < r) { - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - swap(ary, pivotIndex, r); - var pivot = ary[r]; - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - swap(ary, i + 1, j); - var q = i + 1; - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - quickSort.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - return quickSort; -} - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMapConsumer; - -function requireSourceMapConsumer () { - if (hasRequiredSourceMapConsumer) return sourceMapConsumer; - hasRequiredSourceMapConsumer = 1; - var util = requireUtil$1(); - var binarySearch = requireBinarySearch(); - var ArraySet = requireArraySet().ArraySet; - var base64VLQ = requireBase64Vlq(); - var quickSort = requireQuickSort().quickSort; - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - }; - SourceMapConsumer.prototype._version = 3; - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - return this.__generatedMappings; - } - }); - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - return this.__originalMappings; - } - }); - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - var mappings = []; - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - mapping = this._originalMappings[++index]; - } - } - } - return mappings; - }; - sourceMapConsumer.SourceMapConsumer = SourceMapConsumer; - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - sources = sources - .map(String) - .map(util.normalize) - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - return -1; - }; - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - destOriginalMappings.push(destMapping); - } - destGeneratedMappings.push(destMapping); - } - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - return smc; - }; - BasicSourceMapConsumer.prototype._version = 3; - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - cachedSegments[str] = segment; - } - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - if (segment.length > 1) { - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - mapping.originalLine += 1; - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - if (segment.length > 4) { - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - mapping.lastGeneratedColumn = Infinity; - } - }; - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - if (index >= 0) { - var mapping = this._generatedMappings[index]; - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - return { - source: null, - line: null, - column: null, - name: null - }; - }; - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - if (index >= 0) { - var mapping = this._originalMappings[index]; - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - return { - line: null, - column: null, - lastColumn: null - }; - }; - sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - this._sources = new ArraySet(); - this._names = new ArraySet(); - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - return { - generatedOffset: { - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - IndexedSourceMapConsumer.prototype._version = 3; - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - return { - line: null, - column: null - }; - }; - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - return sourceMapConsumer; -} - -var sourceNode = {}; - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceNode; - -function requireSourceNode () { - if (hasRequiredSourceNode) return sourceNode; - hasRequiredSourceNode = 1; - var SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator; - var util = requireUtil$1(); - var REGEX_NEWLINE = /(\r?\n)/; - var NEWLINE_CODE = 10; - var isSourceNode = "$$$isSourceNode$$$"; - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - var node = new SourceNode(); - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - var newLine = getNextLine() || ""; - return lineContents + newLine; - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - var lastMapping = null; - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - if (lastGeneratedLine < mapping.generatedLine) { - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - } else { - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - lastMapping = mapping; - return; - } - } - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - addMappingWithCode(lastMapping, shiftNextLine()); - } - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - return node; - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - return { code: generated.code, map: map }; - }; - sourceNode.SourceNode = SourceNode; - return sourceNode; -} - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var hasRequiredSourceMap; - -function requireSourceMap () { - if (hasRequiredSourceMap) return sourceMap; - hasRequiredSourceMap = 1; - sourceMap.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator; - sourceMap.SourceMapConsumer = requireSourceMapConsumer().SourceMapConsumer; - sourceMap.SourceNode = requireSourceNode().SourceNode; - return sourceMap; -} - -var version = "2.1.0"; -var require$$3 = { - version: version}; - -/* - Copyright (C) 2012-2014 Yusuke Suzuki - Copyright (C) 2015 Ingvar Stepanyan - Copyright (C) 2014 Ivan Nikulin - Copyright (C) 2012-2013 Michael Ficarra - Copyright (C) 2012-2013 Mathias Bynens - Copyright (C) 2013 Irakli Gozalishvili - Copyright (C) 2012 Robert Gust-Bardon - Copyright (C) 2012 John Freeman - Copyright (C) 2011-2012 Ariya Hidayat - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2020 Apple Inc. All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -var hasRequiredEscodegen; - -function requireEscodegen () { - if (hasRequiredEscodegen) return escodegen; - hasRequiredEscodegen = 1; - (function (exports$1) { - (function () { - var Syntax, - Precedence, - BinaryPrecedence, - SourceNode, - estraverse, - esutils, - base, - indent, - json, - renumber, - hexadecimal, - quotes, - escapeless, - newline, - space, - parentheses, - semicolons, - safeConcatenation, - directive, - extra, - parse, - sourceMap, - sourceCode, - preserveBlankLines, - FORMAT_MINIFY, - FORMAT_DEFAULTS; - estraverse = requireEstraverse(); - esutils = requireUtils(); - Syntax = estraverse.Syntax; - function isExpression(node) { - return CodeGenerator.Expression.hasOwnProperty(node.type); - } - function isStatement(node) { - return CodeGenerator.Statement.hasOwnProperty(node.type); - } - Precedence = { - Sequence: 0, - Yield: 1, - Assignment: 1, - Conditional: 2, - ArrowFunction: 2, - Coalesce: 3, - LogicalOR: 4, - LogicalAND: 5, - BitwiseOR: 6, - BitwiseXOR: 7, - BitwiseAND: 8, - Equality: 9, - Relational: 10, - BitwiseSHIFT: 11, - Additive: 12, - Multiplicative: 13, - Exponentiation: 14, - Await: 15, - Unary: 15, - Postfix: 16, - OptionalChaining: 17, - Call: 18, - New: 19, - TaggedTemplate: 20, - Member: 21, - Primary: 22 - }; - BinaryPrecedence = { - '??': Precedence.Coalesce, - '||': Precedence.LogicalOR, - '&&': Precedence.LogicalAND, - '|': Precedence.BitwiseOR, - '^': Precedence.BitwiseXOR, - '&': Precedence.BitwiseAND, - '==': Precedence.Equality, - '!=': Precedence.Equality, - '===': Precedence.Equality, - '!==': Precedence.Equality, - 'is': Precedence.Equality, - 'isnt': Precedence.Equality, - '<': Precedence.Relational, - '>': Precedence.Relational, - '<=': Precedence.Relational, - '>=': Precedence.Relational, - 'in': Precedence.Relational, - 'instanceof': Precedence.Relational, - '<<': Precedence.BitwiseSHIFT, - '>>': Precedence.BitwiseSHIFT, - '>>>': Precedence.BitwiseSHIFT, - '+': Precedence.Additive, - '-': Precedence.Additive, - '*': Precedence.Multiplicative, - '%': Precedence.Multiplicative, - '/': Precedence.Multiplicative, - '**': Precedence.Exponentiation - }; - var F_ALLOW_IN = 1, - F_ALLOW_CALL = 1 << 1, - F_ALLOW_UNPARATH_NEW = 1 << 2, - F_FUNC_BODY = 1 << 3, - F_DIRECTIVE_CTX = 1 << 4, - F_SEMICOLON_OPT = 1 << 5, - F_FOUND_COALESCE = 1 << 6; - var E_FTT = F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, - E_TTF = F_ALLOW_IN | F_ALLOW_CALL, - E_TTT = F_ALLOW_IN | F_ALLOW_CALL | F_ALLOW_UNPARATH_NEW, - E_TFF = F_ALLOW_IN, - E_FFT = F_ALLOW_UNPARATH_NEW, - E_TFT = F_ALLOW_IN | F_ALLOW_UNPARATH_NEW; - var S_TFFF = F_ALLOW_IN, - S_TFFT = F_ALLOW_IN | F_SEMICOLON_OPT, - S_FFFF = 0x00, - S_TFTF = F_ALLOW_IN | F_DIRECTIVE_CTX, - S_TTFF = F_ALLOW_IN | F_FUNC_BODY; - function getDefaultOptions() { - return { - indent: null, - base: null, - parse: null, - comment: false, - format: { - indent: { - style: ' ', - base: 0, - adjustMultilineComment: false - }, - newline: '\n', - space: ' ', - json: false, - renumber: false, - hexadecimal: false, - quotes: 'single', - escapeless: false, - compact: false, - parentheses: true, - semicolons: true, - safeConcatenation: false, - preserveBlankLines: false - }, - moz: { - comprehensionExpressionStartsWithAssignment: false, - starlessGenerator: false - }, - sourceMap: null, - sourceMapRoot: null, - sourceMapWithCode: false, - directive: false, - raw: true, - verbatim: null, - sourceCode: null - }; - } - function stringRepeat(str, num) { - var result = ''; - for (num |= 0; num > 0; num >>>= 1, str += str) { - if (num & 1) { - result += str; - } - } - return result; - } - function hasLineTerminator(str) { - return (/[\r\n]/g).test(str); - } - function endsWithLineTerminator(str) { - var len = str.length; - return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1)); - } - function merge(target, override) { - var key; - for (key in override) { - if (override.hasOwnProperty(key)) { - target[key] = override[key]; - } - } - return target; - } - function updateDeeply(target, override) { - var key, val; - function isHashObject(target) { - return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); - } - for (key in override) { - if (override.hasOwnProperty(key)) { - val = override[key]; - if (isHashObject(val)) { - if (isHashObject(target[key])) { - updateDeeply(target[key], val); - } else { - target[key] = updateDeeply({}, val); - } - } else { - target[key] = val; - } - } - } - return target; - } - function generateNumber(value) { - var result, point, temp, exponent, pos; - if (value !== value) { - throw new Error('Numeric literal whose value is NaN'); - } - if (value < 0 || (value === 0 && 1 / value < 0)) { - throw new Error('Numeric literal whose value is negative'); - } - if (value === 1 / 0) { - return json ? 'null' : renumber ? '1e400' : '1e+400'; - } - result = '' + value; - if (!renumber || result.length < 3) { - return result; - } - point = result.indexOf('.'); - if (!json && result.charCodeAt(0) === 0x30 && point === 1) { - point = 0; - result = result.slice(1); - } - temp = result; - result = result.replace('e+', 'e'); - exponent = 0; - if ((pos = temp.indexOf('e')) > 0) { - exponent = +temp.slice(pos + 1); - temp = temp.slice(0, pos); - } - if (point >= 0) { - exponent -= temp.length - point - 1; - temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; - } - pos = 0; - while (temp.charCodeAt(temp.length + pos - 1) === 0x30 ) { - --pos; - } - if (pos !== 0) { - exponent -= pos; - temp = temp.slice(0, pos); - } - if (exponent !== 0) { - temp += 'e' + exponent; - } - if ((temp.length < result.length || - (hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) && - +temp === value) { - result = temp; - } - return result; - } - function escapeRegExpCharacter(ch, previousIsBackslash) { - if ((ch & -2) === 0x2028) { - return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029'); - } else if (ch === 10 || ch === 13) { - return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r'); - } - return String.fromCharCode(ch); - } - function generateRegExp(reg) { - var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash; - result = reg.toString(); - if (reg.source) { - match = result.match(/\/([^/]*)$/); - if (!match) { - return result; - } - flags = match[1]; - result = ''; - characterInBrack = false; - previousIsBackslash = false; - for (i = 0, iz = reg.source.length; i < iz; ++i) { - ch = reg.source.charCodeAt(i); - if (!previousIsBackslash) { - if (characterInBrack) { - if (ch === 93) { - characterInBrack = false; - } - } else { - if (ch === 47) { - result += '\\'; - } else if (ch === 91) { - characterInBrack = true; - } - } - result += escapeRegExpCharacter(ch, previousIsBackslash); - previousIsBackslash = ch === 92; - } else { - result += escapeRegExpCharacter(ch, previousIsBackslash); - previousIsBackslash = false; - } - } - return '/' + result + '/' + flags; - } - return result; - } - function escapeAllowedCharacter(code, next) { - var hex; - if (code === 0x08 ) { - return '\\b'; - } - if (code === 0x0C ) { - return '\\f'; - } - if (code === 0x09 ) { - return '\\t'; - } - hex = code.toString(16).toUpperCase(); - if (json || code > 0xFF) { - return '\\u' + '0000'.slice(hex.length) + hex; - } else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) { - return '\\0'; - } else if (code === 0x000B ) { - return '\\x0B'; - } else { - return '\\x' + '00'.slice(hex.length) + hex; - } - } - function escapeDisallowedCharacter(code) { - if (code === 0x5C ) { - return '\\\\'; - } - if (code === 0x0A ) { - return '\\n'; - } - if (code === 0x0D ) { - return '\\r'; - } - if (code === 0x2028) { - return '\\u2028'; - } - if (code === 0x2029) { - return '\\u2029'; - } - throw new Error('Incorrectly classified character'); - } - function escapeDirective(str) { - var i, iz, code, quote; - quote = quotes === 'double' ? '"' : '\''; - for (i = 0, iz = str.length; i < iz; ++i) { - code = str.charCodeAt(i); - if (code === 0x27 ) { - quote = '"'; - break; - } else if (code === 0x22 ) { - quote = '\''; - break; - } else if (code === 0x5C ) { - ++i; - } - } - return quote + str + quote; - } - function escapeString(str) { - var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote; - for (i = 0, len = str.length; i < len; ++i) { - code = str.charCodeAt(i); - if (code === 0x27 ) { - ++singleQuotes; - } else if (code === 0x22 ) { - ++doubleQuotes; - } else if (code === 0x2F && json) { - result += '\\'; - } else if (esutils.code.isLineTerminator(code) || code === 0x5C ) { - result += escapeDisallowedCharacter(code); - continue; - } else if (!esutils.code.isIdentifierPartES5(code) && (json && code < 0x20 || !json && !escapeless && (code < 0x20 || code > 0x7E ))) { - result += escapeAllowedCharacter(code, str.charCodeAt(i + 1)); - continue; - } - result += String.fromCharCode(code); - } - single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes)); - quote = single ? '\'' : '"'; - if (!(single ? singleQuotes : doubleQuotes)) { - return quote + result + quote; - } - str = result; - result = quote; - for (i = 0, len = str.length; i < len; ++i) { - code = str.charCodeAt(i); - if ((code === 0x27 && single) || (code === 0x22 && !single)) { - result += '\\'; - } - result += String.fromCharCode(code); - } - return result + quote; - } - function flattenToString(arr) { - var i, iz, elem, result = ''; - for (i = 0, iz = arr.length; i < iz; ++i) { - elem = arr[i]; - result += Array.isArray(elem) ? flattenToString(elem) : elem; - } - return result; - } - function toSourceNodeWhenNeeded(generated, node) { - if (!sourceMap) { - if (Array.isArray(generated)) { - return flattenToString(generated); - } else { - return generated; - } - } - if (node == null) { - if (generated instanceof SourceNode) { - return generated; - } else { - node = {}; - } - } - if (node.loc == null) { - return new SourceNode(null, null, sourceMap, generated, node.name || null); - } - return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated, node.name || null); - } - function noEmptySpace() { - return (space) ? space : ' '; - } - function join(left, right) { - var leftSource, - rightSource, - leftCharCode, - rightCharCode; - leftSource = toSourceNodeWhenNeeded(left).toString(); - if (leftSource.length === 0) { - return [right]; - } - rightSource = toSourceNodeWhenNeeded(right).toString(); - if (rightSource.length === 0) { - return [left]; - } - leftCharCode = leftSource.charCodeAt(leftSource.length - 1); - rightCharCode = rightSource.charCodeAt(0); - if ((leftCharCode === 0x2B || leftCharCode === 0x2D ) && leftCharCode === rightCharCode || - esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode) || - leftCharCode === 0x2F && rightCharCode === 0x69 ) { - return [left, noEmptySpace(), right]; - } else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || - esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) { - return [left, right]; - } - return [left, space, right]; - } - function addIndent(stmt) { - return [base, stmt]; - } - function withIndent(fn) { - var previousBase; - previousBase = base; - base += indent; - fn(base); - base = previousBase; - } - function calculateSpaces(str) { - var i; - for (i = str.length - 1; i >= 0; --i) { - if (esutils.code.isLineTerminator(str.charCodeAt(i))) { - break; - } - } - return (str.length - 1) - i; - } - function adjustMultilineComment(value, specialBase) { - var array, i, len, line, j, spaces, previousBase, sn; - array = value.split(/\r\n|[\r\n]/); - spaces = Number.MAX_VALUE; - for (i = 1, len = array.length; i < len; ++i) { - line = array[i]; - j = 0; - while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) { - ++j; - } - if (spaces > j) { - spaces = j; - } - } - if (typeof specialBase !== 'undefined') { - previousBase = base; - if (array[1][spaces] === '*') { - specialBase += ' '; - } - base = specialBase; - } else { - if (spaces & 1) { - --spaces; - } - previousBase = base; - } - for (i = 1, len = array.length; i < len; ++i) { - sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces))); - array[i] = sourceMap ? sn.join('') : sn; - } - base = previousBase; - return array.join('\n'); - } - function generateComment(comment, specialBase) { - if (comment.type === 'Line') { - if (endsWithLineTerminator(comment.value)) { - return '//' + comment.value; - } else { - var result = '//' + comment.value; - if (!preserveBlankLines) { - result += '\n'; - } - return result; - } - } - if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) { - return adjustMultilineComment('/*' + comment.value + '*/', specialBase); - } - return '/*' + comment.value + '*/'; - } - function addComments(stmt, result) { - var i, len, comment, save, tailingToStatement, specialBase, fragment, - extRange, range, prevRange, prefix, infix, suffix, count; - if (stmt.leadingComments && stmt.leadingComments.length > 0) { - save = result; - if (preserveBlankLines) { - comment = stmt.leadingComments[0]; - result = []; - extRange = comment.extendedRange; - range = comment.range; - prefix = sourceCode.substring(extRange[0], range[0]); - count = (prefix.match(/\n/g) || []).length; - if (count > 0) { - result.push(stringRepeat('\n', count)); - result.push(addIndent(generateComment(comment))); - } else { - result.push(prefix); - result.push(generateComment(comment)); - } - prevRange = range; - for (i = 1, len = stmt.leadingComments.length; i < len; i++) { - comment = stmt.leadingComments[i]; - range = comment.range; - infix = sourceCode.substring(prevRange[1], range[0]); - count = (infix.match(/\n/g) || []).length; - result.push(stringRepeat('\n', count)); - result.push(addIndent(generateComment(comment))); - prevRange = range; - } - suffix = sourceCode.substring(range[1], extRange[1]); - count = (suffix.match(/\n/g) || []).length; - result.push(stringRepeat('\n', count)); - } else { - comment = stmt.leadingComments[0]; - result = []; - if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) { - result.push('\n'); - } - result.push(generateComment(comment)); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push('\n'); - } - for (i = 1, len = stmt.leadingComments.length; i < len; ++i) { - comment = stmt.leadingComments[i]; - fragment = [generateComment(comment)]; - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { - fragment.push('\n'); - } - result.push(addIndent(fragment)); - } - } - result.push(addIndent(save)); - } - if (stmt.trailingComments) { - if (preserveBlankLines) { - comment = stmt.trailingComments[0]; - extRange = comment.extendedRange; - range = comment.range; - prefix = sourceCode.substring(extRange[0], range[0]); - count = (prefix.match(/\n/g) || []).length; - if (count > 0) { - result.push(stringRepeat('\n', count)); - result.push(addIndent(generateComment(comment))); - } else { - result.push(prefix); - result.push(generateComment(comment)); - } - } else { - tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); - specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString())); - for (i = 0, len = stmt.trailingComments.length; i < len; ++i) { - comment = stmt.trailingComments[i]; - if (tailingToStatement) { - if (i === 0) { - result = [result, indent]; - } else { - result = [result, specialBase]; - } - result.push(generateComment(comment, specialBase)); - } else { - result = [result, addIndent(generateComment(comment))]; - } - if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result = [result, '\n']; - } - } - } - } - return result; - } - function generateBlankLines(start, end, result) { - var j, newlineCount = 0; - for (j = start; j < end; j++) { - if (sourceCode[j] === '\n') { - newlineCount++; - } - } - for (j = 1; j < newlineCount; j++) { - result.push(newline); - } - } - function parenthesize(text, current, should) { - if (current < should) { - return ['(', text, ')']; - } - return text; - } - function generateVerbatimString(string) { - var i, iz, result; - result = string.split(/\r\n|\n/); - for (i = 1, iz = result.length; i < iz; i++) { - result[i] = newline + base + result[i]; - } - return result; - } - function generateVerbatim(expr, precedence) { - var verbatim, result, prec; - verbatim = expr[extra.verbatim]; - if (typeof verbatim === 'string') { - result = parenthesize(generateVerbatimString(verbatim), Precedence.Sequence, precedence); - } else { - result = generateVerbatimString(verbatim.content); - prec = (verbatim.precedence != null) ? verbatim.precedence : Precedence.Sequence; - result = parenthesize(result, prec, precedence); - } - return toSourceNodeWhenNeeded(result, expr); - } - function CodeGenerator() { - } - CodeGenerator.prototype.maybeBlock = function(stmt, flags) { - var result, noLeadingComment, that = this; - noLeadingComment = !extra.comment || !stmt.leadingComments; - if (stmt.type === Syntax.BlockStatement && noLeadingComment) { - return [space, this.generateStatement(stmt, flags)]; - } - if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { - return ';'; - } - withIndent(function () { - result = [ - newline, - addIndent(that.generateStatement(stmt, flags)) - ]; - }); - return result; - }; - CodeGenerator.prototype.maybeBlockSuffix = function (stmt, result) { - var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); - if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) { - return [result, space]; - } - if (ends) { - return [result, base]; - } - return [result, newline, base]; - }; - function generateIdentifier(node) { - return toSourceNodeWhenNeeded(node.name, node); - } - function generateAsyncPrefix(node, spaceRequired) { - return node.async ? 'async' + (spaceRequired ? noEmptySpace() : space) : ''; - } - function generateStarSuffix(node) { - var isGenerator = node.generator && !extra.moz.starlessGenerator; - return isGenerator ? '*' + space : ''; - } - function generateMethodPrefix(prop) { - var func = prop.value, prefix = ''; - if (func.async) { - prefix += generateAsyncPrefix(func, !prop.computed); - } - if (func.generator) { - prefix += generateStarSuffix(func) ? '*' : ''; - } - return prefix; - } - CodeGenerator.prototype.generatePattern = function (node, precedence, flags) { - if (node.type === Syntax.Identifier) { - return generateIdentifier(node); - } - return this.generateExpression(node, precedence, flags); - }; - CodeGenerator.prototype.generateFunctionParams = function (node) { - var i, iz, result, hasDefault; - hasDefault = false; - if (node.type === Syntax.ArrowFunctionExpression && - !node.rest && (!node.defaults || node.defaults.length === 0) && - node.params.length === 1 && node.params[0].type === Syntax.Identifier) { - result = [generateAsyncPrefix(node, true), generateIdentifier(node.params[0])]; - } else { - result = node.type === Syntax.ArrowFunctionExpression ? [generateAsyncPrefix(node, false)] : []; - result.push('('); - if (node.defaults) { - hasDefault = true; - } - for (i = 0, iz = node.params.length; i < iz; ++i) { - if (hasDefault && node.defaults[i]) { - result.push(this.generateAssignment(node.params[i], node.defaults[i], '=', Precedence.Assignment, E_TTT)); - } else { - result.push(this.generatePattern(node.params[i], Precedence.Assignment, E_TTT)); - } - if (i + 1 < iz) { - result.push(',' + space); - } - } - if (node.rest) { - if (node.params.length) { - result.push(',' + space); - } - result.push('...'); - result.push(generateIdentifier(node.rest)); - } - result.push(')'); - } - return result; - }; - CodeGenerator.prototype.generateFunctionBody = function (node) { - var result, expr; - result = this.generateFunctionParams(node); - if (node.type === Syntax.ArrowFunctionExpression) { - result.push(space); - result.push('=>'); - } - if (node.expression) { - result.push(space); - expr = this.generateExpression(node.body, Precedence.Assignment, E_TTT); - if (expr.toString().charAt(0) === '{') { - expr = ['(', expr, ')']; - } - result.push(expr); - } else { - result.push(this.maybeBlock(node.body, S_TTFF)); - } - return result; - }; - CodeGenerator.prototype.generateIterationForStatement = function (operator, stmt, flags) { - var result = ['for' + (stmt.await ? noEmptySpace() + 'await' : '') + space + '('], that = this; - withIndent(function () { - if (stmt.left.type === Syntax.VariableDeclaration) { - withIndent(function () { - result.push(stmt.left.kind + noEmptySpace()); - result.push(that.generateStatement(stmt.left.declarations[0], S_FFFF)); - }); - } else { - result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT)); - } - result = join(result, operator); - result = [join( - result, - that.generateExpression(stmt.right, Precedence.Assignment, E_TTT) - ), ')']; - }); - result.push(this.maybeBlock(stmt.body, flags)); - return result; - }; - CodeGenerator.prototype.generatePropertyKey = function (expr, computed) { - var result = []; - if (computed) { - result.push('['); - } - result.push(this.generateExpression(expr, Precedence.Assignment, E_TTT)); - if (computed) { - result.push(']'); - } - return result; - }; - CodeGenerator.prototype.generateAssignment = function (left, right, operator, precedence, flags) { - if (Precedence.Assignment < precedence) { - flags |= F_ALLOW_IN; - } - return parenthesize( - [ - this.generateExpression(left, Precedence.Call, flags), - space + operator + space, - this.generateExpression(right, Precedence.Assignment, flags) - ], - Precedence.Assignment, - precedence - ); - }; - CodeGenerator.prototype.semicolon = function (flags) { - if (!semicolons && flags & F_SEMICOLON_OPT) { - return ''; - } - return ';'; - }; - CodeGenerator.Statement = { - BlockStatement: function (stmt, flags) { - var range, content, result = ['{', newline], that = this; - withIndent(function () { - if (stmt.body.length === 0 && preserveBlankLines) { - range = stmt.range; - if (range[1] - range[0] > 2) { - content = sourceCode.substring(range[0] + 1, range[1] - 1); - if (content[0] === '\n') { - result = ['{']; - } - result.push(content); - } - } - var i, iz, fragment, bodyFlags; - bodyFlags = S_TFFF; - if (flags & F_FUNC_BODY) { - bodyFlags |= F_DIRECTIVE_CTX; - } - for (i = 0, iz = stmt.body.length; i < iz; ++i) { - if (preserveBlankLines) { - if (i === 0) { - if (stmt.body[0].leadingComments) { - range = stmt.body[0].leadingComments[0].extendedRange; - content = sourceCode.substring(range[0], range[1]); - if (content[0] === '\n') { - result = ['{']; - } - } - if (!stmt.body[0].leadingComments) { - generateBlankLines(stmt.range[0], stmt.body[0].range[0], result); - } - } - if (i > 0) { - if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) { - generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result); - } - } - } - if (i === iz - 1) { - bodyFlags |= F_SEMICOLON_OPT; - } - if (stmt.body[i].leadingComments && preserveBlankLines) { - fragment = that.generateStatement(stmt.body[i], bodyFlags); - } else { - fragment = addIndent(that.generateStatement(stmt.body[i], bodyFlags)); - } - result.push(fragment); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { - if (preserveBlankLines && i < iz - 1) { - if (!stmt.body[i + 1].leadingComments) { - result.push(newline); - } - } else { - result.push(newline); - } - } - if (preserveBlankLines) { - if (i === iz - 1) { - if (!stmt.body[i].trailingComments) { - generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); - } - } - } - } - }); - result.push(addIndent('}')); - return result; - }, - BreakStatement: function (stmt, flags) { - if (stmt.label) { - return 'break ' + stmt.label.name + this.semicolon(flags); - } - return 'break' + this.semicolon(flags); - }, - ContinueStatement: function (stmt, flags) { - if (stmt.label) { - return 'continue ' + stmt.label.name + this.semicolon(flags); - } - return 'continue' + this.semicolon(flags); - }, - ClassBody: function (stmt, flags) { - var result = [ '{', newline], that = this; - withIndent(function (indent) { - var i, iz; - for (i = 0, iz = stmt.body.length; i < iz; ++i) { - result.push(indent); - result.push(that.generateExpression(stmt.body[i], Precedence.Sequence, E_TTT)); - if (i + 1 < iz) { - result.push(newline); - } - } - }); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - result.push(base); - result.push('}'); - return result; - }, - ClassDeclaration: function (stmt, flags) { - var result, fragment; - result = ['class']; - if (stmt.id) { - result = join(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT)); - } - if (stmt.superClass) { - fragment = join('extends', this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT)); - result = join(result, fragment); - } - result.push(space); - result.push(this.generateStatement(stmt.body, S_TFFT)); - return result; - }, - DirectiveStatement: function (stmt, flags) { - if (extra.raw && stmt.raw) { - return stmt.raw + this.semicolon(flags); - } - return escapeDirective(stmt.directive) + this.semicolon(flags); - }, - DoWhileStatement: function (stmt, flags) { - var result = join('do', this.maybeBlock(stmt.body, S_TFFF)); - result = this.maybeBlockSuffix(stmt.body, result); - return join(result, [ - 'while' + space + '(', - this.generateExpression(stmt.test, Precedence.Sequence, E_TTT), - ')' + this.semicolon(flags) - ]); - }, - CatchClause: function (stmt, flags) { - var result, that = this; - withIndent(function () { - var guard; - if (stmt.param) { - result = [ - 'catch' + space + '(', - that.generateExpression(stmt.param, Precedence.Sequence, E_TTT), - ')' - ]; - if (stmt.guard) { - guard = that.generateExpression(stmt.guard, Precedence.Sequence, E_TTT); - result.splice(2, 0, ' if ', guard); - } - } else { - result = ['catch']; - } - }); - result.push(this.maybeBlock(stmt.body, S_TFFF)); - return result; - }, - DebuggerStatement: function (stmt, flags) { - return 'debugger' + this.semicolon(flags); - }, - EmptyStatement: function (stmt, flags) { - return ';'; - }, - ExportDefaultDeclaration: function (stmt, flags) { - var result = [ 'export' ], bodyFlags; - bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF; - result = join(result, 'default'); - if (isStatement(stmt.declaration)) { - result = join(result, this.generateStatement(stmt.declaration, bodyFlags)); - } else { - result = join(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags)); - } - return result; - }, - ExportNamedDeclaration: function (stmt, flags) { - var result = [ 'export' ], bodyFlags, that = this; - bodyFlags = (flags & F_SEMICOLON_OPT) ? S_TFFT : S_TFFF; - if (stmt.declaration) { - return join(result, this.generateStatement(stmt.declaration, bodyFlags)); - } - if (stmt.specifiers) { - if (stmt.specifiers.length === 0) { - result = join(result, '{' + space + '}'); - } else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) { - result = join(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT)); - } else { - result = join(result, '{'); - withIndent(function (indent) { - var i, iz; - result.push(newline); - for (i = 0, iz = stmt.specifiers.length; i < iz; ++i) { - result.push(indent); - result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT)); - if (i + 1 < iz) { - result.push(',' + newline); - } - } - }); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - result.push(base + '}'); - } - if (stmt.source) { - result = join(result, [ - 'from' + space, - this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), - this.semicolon(flags) - ]); - } else { - result.push(this.semicolon(flags)); - } - } - return result; - }, - ExportAllDeclaration: function (stmt, flags) { - return [ - 'export' + space, - '*' + space, - 'from' + space, - this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), - this.semicolon(flags) - ]; - }, - ExpressionStatement: function (stmt, flags) { - var result, fragment; - function isClassPrefixed(fragment) { - var code; - if (fragment.slice(0, 5) !== 'class') { - return false; - } - code = fragment.charCodeAt(5); - return code === 0x7B || esutils.code.isWhiteSpace(code) || esutils.code.isLineTerminator(code); - } - function isFunctionPrefixed(fragment) { - var code; - if (fragment.slice(0, 8) !== 'function') { - return false; - } - code = fragment.charCodeAt(8); - return code === 0x28 || esutils.code.isWhiteSpace(code) || code === 0x2A || esutils.code.isLineTerminator(code); - } - function isAsyncPrefixed(fragment) { - var code, i, iz; - if (fragment.slice(0, 5) !== 'async') { - return false; - } - if (!esutils.code.isWhiteSpace(fragment.charCodeAt(5))) { - return false; - } - for (i = 6, iz = fragment.length; i < iz; ++i) { - if (!esutils.code.isWhiteSpace(fragment.charCodeAt(i))) { - break; - } - } - if (i === iz) { - return false; - } - if (fragment.slice(i, i + 8) !== 'function') { - return false; - } - code = fragment.charCodeAt(i + 8); - return code === 0x28 || esutils.code.isWhiteSpace(code) || code === 0x2A || esutils.code.isLineTerminator(code); - } - result = [this.generateExpression(stmt.expression, Precedence.Sequence, E_TTT)]; - fragment = toSourceNodeWhenNeeded(result).toString(); - if (fragment.charCodeAt(0) === 0x7B || - isClassPrefixed(fragment) || - isFunctionPrefixed(fragment) || - isAsyncPrefixed(fragment) || - (directive && (flags & F_DIRECTIVE_CTX) && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) { - result = ['(', result, ')' + this.semicolon(flags)]; - } else { - result.push(this.semicolon(flags)); - } - return result; - }, - ImportDeclaration: function (stmt, flags) { - var result, cursor, that = this; - if (stmt.specifiers.length === 0) { - return [ - 'import', - space, - this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), - this.semicolon(flags) - ]; - } - result = [ - 'import' - ]; - cursor = 0; - if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) { - result = join(result, [ - this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT) - ]); - ++cursor; - } - if (stmt.specifiers[cursor]) { - if (cursor !== 0) { - result.push(','); - } - if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) { - result = join(result, [ - space, - this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT) - ]); - } else { - result.push(space + '{'); - if ((stmt.specifiers.length - cursor) === 1) { - result.push(space); - result.push(this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)); - result.push(space + '}' + space); - } else { - withIndent(function (indent) { - var i, iz; - result.push(newline); - for (i = cursor, iz = stmt.specifiers.length; i < iz; ++i) { - result.push(indent); - result.push(that.generateExpression(stmt.specifiers[i], Precedence.Sequence, E_TTT)); - if (i + 1 < iz) { - result.push(',' + newline); - } - } - }); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - result.push(base + '}' + space); - } - } - } - result = join(result, [ - 'from' + space, - this.generateExpression(stmt.source, Precedence.Sequence, E_TTT), - this.semicolon(flags) - ]); - return result; - }, - VariableDeclarator: function (stmt, flags) { - var itemFlags = (flags & F_ALLOW_IN) ? E_TTT : E_FTT; - if (stmt.init) { - return [ - this.generateExpression(stmt.id, Precedence.Assignment, itemFlags), - space, - '=', - space, - this.generateExpression(stmt.init, Precedence.Assignment, itemFlags) - ]; - } - return this.generatePattern(stmt.id, Precedence.Assignment, itemFlags); - }, - VariableDeclaration: function (stmt, flags) { - var result, i, iz, node, bodyFlags, that = this; - result = [ stmt.kind ]; - bodyFlags = (flags & F_ALLOW_IN) ? S_TFFF : S_FFFF; - function block() { - node = stmt.declarations[0]; - if (extra.comment && node.leadingComments) { - result.push('\n'); - result.push(addIndent(that.generateStatement(node, bodyFlags))); - } else { - result.push(noEmptySpace()); - result.push(that.generateStatement(node, bodyFlags)); - } - for (i = 1, iz = stmt.declarations.length; i < iz; ++i) { - node = stmt.declarations[i]; - if (extra.comment && node.leadingComments) { - result.push(',' + newline); - result.push(addIndent(that.generateStatement(node, bodyFlags))); - } else { - result.push(',' + space); - result.push(that.generateStatement(node, bodyFlags)); - } - } - } - if (stmt.declarations.length > 1) { - withIndent(block); - } else { - block(); - } - result.push(this.semicolon(flags)); - return result; - }, - ThrowStatement: function (stmt, flags) { - return [join( - 'throw', - this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) - ), this.semicolon(flags)]; - }, - TryStatement: function (stmt, flags) { - var result, i, iz, guardedHandlers; - result = ['try', this.maybeBlock(stmt.block, S_TFFF)]; - result = this.maybeBlockSuffix(stmt.block, result); - if (stmt.handlers) { - for (i = 0, iz = stmt.handlers.length; i < iz; ++i) { - result = join(result, this.generateStatement(stmt.handlers[i], S_TFFF)); - if (stmt.finalizer || i + 1 !== iz) { - result = this.maybeBlockSuffix(stmt.handlers[i].body, result); - } - } - } else { - guardedHandlers = stmt.guardedHandlers || []; - for (i = 0, iz = guardedHandlers.length; i < iz; ++i) { - result = join(result, this.generateStatement(guardedHandlers[i], S_TFFF)); - if (stmt.finalizer || i + 1 !== iz) { - result = this.maybeBlockSuffix(guardedHandlers[i].body, result); - } - } - if (stmt.handler) { - if (Array.isArray(stmt.handler)) { - for (i = 0, iz = stmt.handler.length; i < iz; ++i) { - result = join(result, this.generateStatement(stmt.handler[i], S_TFFF)); - if (stmt.finalizer || i + 1 !== iz) { - result = this.maybeBlockSuffix(stmt.handler[i].body, result); - } - } - } else { - result = join(result, this.generateStatement(stmt.handler, S_TFFF)); - if (stmt.finalizer) { - result = this.maybeBlockSuffix(stmt.handler.body, result); - } - } - } - } - if (stmt.finalizer) { - result = join(result, ['finally', this.maybeBlock(stmt.finalizer, S_TFFF)]); - } - return result; - }, - SwitchStatement: function (stmt, flags) { - var result, fragment, i, iz, bodyFlags, that = this; - withIndent(function () { - result = [ - 'switch' + space + '(', - that.generateExpression(stmt.discriminant, Precedence.Sequence, E_TTT), - ')' + space + '{' + newline - ]; - }); - if (stmt.cases) { - bodyFlags = S_TFFF; - for (i = 0, iz = stmt.cases.length; i < iz; ++i) { - if (i === iz - 1) { - bodyFlags |= F_SEMICOLON_OPT; - } - fragment = addIndent(this.generateStatement(stmt.cases[i], bodyFlags)); - result.push(fragment); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { - result.push(newline); - } - } - } - result.push(addIndent('}')); - return result; - }, - SwitchCase: function (stmt, flags) { - var result, fragment, i, iz, bodyFlags, that = this; - withIndent(function () { - if (stmt.test) { - result = [ - join('case', that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)), - ':' - ]; - } else { - result = ['default:']; - } - i = 0; - iz = stmt.consequent.length; - if (iz && stmt.consequent[0].type === Syntax.BlockStatement) { - fragment = that.maybeBlock(stmt.consequent[0], S_TFFF); - result.push(fragment); - i = 1; - } - if (i !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - bodyFlags = S_TFFF; - for (; i < iz; ++i) { - if (i === iz - 1 && flags & F_SEMICOLON_OPT) { - bodyFlags |= F_SEMICOLON_OPT; - } - fragment = addIndent(that.generateStatement(stmt.consequent[i], bodyFlags)); - result.push(fragment); - if (i + 1 !== iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { - result.push(newline); - } - } - }); - return result; - }, - IfStatement: function (stmt, flags) { - var result, bodyFlags, semicolonOptional, that = this; - withIndent(function () { - result = [ - 'if' + space + '(', - that.generateExpression(stmt.test, Precedence.Sequence, E_TTT), - ')' - ]; - }); - semicolonOptional = flags & F_SEMICOLON_OPT; - bodyFlags = S_TFFF; - if (semicolonOptional) { - bodyFlags |= F_SEMICOLON_OPT; - } - if (stmt.alternate) { - result.push(this.maybeBlock(stmt.consequent, S_TFFF)); - result = this.maybeBlockSuffix(stmt.consequent, result); - if (stmt.alternate.type === Syntax.IfStatement) { - result = join(result, ['else ', this.generateStatement(stmt.alternate, bodyFlags)]); - } else { - result = join(result, join('else', this.maybeBlock(stmt.alternate, bodyFlags))); - } - } else { - result.push(this.maybeBlock(stmt.consequent, bodyFlags)); - } - return result; - }, - ForStatement: function (stmt, flags) { - var result, that = this; - withIndent(function () { - result = ['for' + space + '(']; - if (stmt.init) { - if (stmt.init.type === Syntax.VariableDeclaration) { - result.push(that.generateStatement(stmt.init, S_FFFF)); - } else { - result.push(that.generateExpression(stmt.init, Precedence.Sequence, E_FTT)); - result.push(';'); - } - } else { - result.push(';'); - } - if (stmt.test) { - result.push(space); - result.push(that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)); - result.push(';'); - } else { - result.push(';'); - } - if (stmt.update) { - result.push(space); - result.push(that.generateExpression(stmt.update, Precedence.Sequence, E_TTT)); - result.push(')'); - } else { - result.push(')'); - } - }); - result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); - return result; - }, - ForInStatement: function (stmt, flags) { - return this.generateIterationForStatement('in', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF); - }, - ForOfStatement: function (stmt, flags) { - return this.generateIterationForStatement('of', stmt, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF); - }, - LabeledStatement: function (stmt, flags) { - return [stmt.label.name + ':', this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)]; - }, - Program: function (stmt, flags) { - var result, fragment, i, iz, bodyFlags; - iz = stmt.body.length; - result = [safeConcatenation && iz > 0 ? '\n' : '']; - bodyFlags = S_TFTF; - for (i = 0; i < iz; ++i) { - if (!safeConcatenation && i === iz - 1) { - bodyFlags |= F_SEMICOLON_OPT; - } - if (preserveBlankLines) { - if (i === 0) { - if (!stmt.body[0].leadingComments) { - generateBlankLines(stmt.range[0], stmt.body[i].range[0], result); - } - } - if (i > 0) { - if (!stmt.body[i - 1].trailingComments && !stmt.body[i].leadingComments) { - generateBlankLines(stmt.body[i - 1].range[1], stmt.body[i].range[0], result); - } - } - } - fragment = addIndent(this.generateStatement(stmt.body[i], bodyFlags)); - result.push(fragment); - if (i + 1 < iz && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { - if (preserveBlankLines) { - if (!stmt.body[i + 1].leadingComments) { - result.push(newline); - } - } else { - result.push(newline); - } - } - if (preserveBlankLines) { - if (i === iz - 1) { - if (!stmt.body[i].trailingComments) { - generateBlankLines(stmt.body[i].range[1], stmt.range[1], result); - } - } - } - } - return result; - }, - FunctionDeclaration: function (stmt, flags) { - return [ - generateAsyncPrefix(stmt, true), - 'function', - generateStarSuffix(stmt) || noEmptySpace(), - stmt.id ? generateIdentifier(stmt.id) : '', - this.generateFunctionBody(stmt) - ]; - }, - ReturnStatement: function (stmt, flags) { - if (stmt.argument) { - return [join( - 'return', - this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT) - ), this.semicolon(flags)]; - } - return ['return' + this.semicolon(flags)]; - }, - WhileStatement: function (stmt, flags) { - var result, that = this; - withIndent(function () { - result = [ - 'while' + space + '(', - that.generateExpression(stmt.test, Precedence.Sequence, E_TTT), - ')' - ]; - }); - result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); - return result; - }, - WithStatement: function (stmt, flags) { - var result, that = this; - withIndent(function () { - result = [ - 'with' + space + '(', - that.generateExpression(stmt.object, Precedence.Sequence, E_TTT), - ')' - ]; - }); - result.push(this.maybeBlock(stmt.body, flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF)); - return result; - } - }; - merge(CodeGenerator.prototype, CodeGenerator.Statement); - CodeGenerator.Expression = { - SequenceExpression: function (expr, precedence, flags) { - var result, i, iz; - if (Precedence.Sequence < precedence) { - flags |= F_ALLOW_IN; - } - result = []; - for (i = 0, iz = expr.expressions.length; i < iz; ++i) { - result.push(this.generateExpression(expr.expressions[i], Precedence.Assignment, flags)); - if (i + 1 < iz) { - result.push(',' + space); - } - } - return parenthesize(result, Precedence.Sequence, precedence); - }, - AssignmentExpression: function (expr, precedence, flags) { - return this.generateAssignment(expr.left, expr.right, expr.operator, precedence, flags); - }, - ArrowFunctionExpression: function (expr, precedence, flags) { - return parenthesize(this.generateFunctionBody(expr), Precedence.ArrowFunction, precedence); - }, - ConditionalExpression: function (expr, precedence, flags) { - if (Precedence.Conditional < precedence) { - flags |= F_ALLOW_IN; - } - return parenthesize( - [ - this.generateExpression(expr.test, Precedence.Coalesce, flags), - space + '?' + space, - this.generateExpression(expr.consequent, Precedence.Assignment, flags), - space + ':' + space, - this.generateExpression(expr.alternate, Precedence.Assignment, flags) - ], - Precedence.Conditional, - precedence - ); - }, - LogicalExpression: function (expr, precedence, flags) { - if (expr.operator === '??') { - flags |= F_FOUND_COALESCE; - } - return this.BinaryExpression(expr, precedence, flags); - }, - BinaryExpression: function (expr, precedence, flags) { - var result, leftPrecedence, rightPrecedence, currentPrecedence, fragment, leftSource; - currentPrecedence = BinaryPrecedence[expr.operator]; - leftPrecedence = expr.operator === '**' ? Precedence.Postfix : currentPrecedence; - rightPrecedence = expr.operator === '**' ? currentPrecedence : currentPrecedence + 1; - if (currentPrecedence < precedence) { - flags |= F_ALLOW_IN; - } - fragment = this.generateExpression(expr.left, leftPrecedence, flags); - leftSource = fragment.toString(); - if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) { - result = [fragment, noEmptySpace(), expr.operator]; - } else { - result = join(fragment, expr.operator); - } - fragment = this.generateExpression(expr.right, rightPrecedence, flags); - if (expr.operator === '/' && fragment.toString().charAt(0) === '/' || - expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') { - result.push(noEmptySpace()); - result.push(fragment); - } else { - result = join(result, fragment); - } - if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) { - return ['(', result, ')']; - } - if ((expr.operator === '||' || expr.operator === '&&') && (flags & F_FOUND_COALESCE)) { - return ['(', result, ')']; - } - return parenthesize(result, currentPrecedence, precedence); - }, - CallExpression: function (expr, precedence, flags) { - var result, i, iz; - result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)]; - if (expr.optional) { - result.push('?.'); - } - result.push('('); - for (i = 0, iz = expr['arguments'].length; i < iz; ++i) { - result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT)); - if (i + 1 < iz) { - result.push(',' + space); - } - } - result.push(')'); - if (!(flags & F_ALLOW_CALL)) { - return ['(', result, ')']; - } - return parenthesize(result, Precedence.Call, precedence); - }, - ChainExpression: function (expr, precedence, flags) { - if (Precedence.OptionalChaining < precedence) { - flags |= F_ALLOW_CALL; - } - var result = this.generateExpression(expr.expression, Precedence.OptionalChaining, flags); - return parenthesize(result, Precedence.OptionalChaining, precedence); - }, - NewExpression: function (expr, precedence, flags) { - var result, length, i, iz, itemFlags; - length = expr['arguments'].length; - itemFlags = (flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0) ? E_TFT : E_TFF; - result = join( - 'new', - this.generateExpression(expr.callee, Precedence.New, itemFlags) - ); - if (!(flags & F_ALLOW_UNPARATH_NEW) || parentheses || length > 0) { - result.push('('); - for (i = 0, iz = length; i < iz; ++i) { - result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT)); - if (i + 1 < iz) { - result.push(',' + space); - } - } - result.push(')'); - } - return parenthesize(result, Precedence.New, precedence); - }, - MemberExpression: function (expr, precedence, flags) { - var result, fragment; - result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)]; - if (expr.computed) { - if (expr.optional) { - result.push('?.'); - } - result.push('['); - result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT)); - result.push(']'); - } else { - if (!expr.optional && expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') { - fragment = toSourceNodeWhenNeeded(result).toString(); - if ( - fragment.indexOf('.') < 0 && - !/[eExX]/.test(fragment) && - esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) && - !(fragment.length >= 2 && fragment.charCodeAt(0) === 48) - ) { - result.push(' '); - } - } - result.push(expr.optional ? '?.' : '.'); - result.push(generateIdentifier(expr.property)); - } - return parenthesize(result, Precedence.Member, precedence); - }, - MetaProperty: function (expr, precedence, flags) { - var result; - result = []; - result.push(typeof expr.meta === "string" ? expr.meta : generateIdentifier(expr.meta)); - result.push('.'); - result.push(typeof expr.property === "string" ? expr.property : generateIdentifier(expr.property)); - return parenthesize(result, Precedence.Member, precedence); - }, - UnaryExpression: function (expr, precedence, flags) { - var result, fragment, rightCharCode, leftSource, leftCharCode; - fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT); - if (space === '') { - result = join(expr.operator, fragment); - } else { - result = [expr.operator]; - if (expr.operator.length > 2) { - result = join(result, fragment); - } else { - leftSource = toSourceNodeWhenNeeded(result).toString(); - leftCharCode = leftSource.charCodeAt(leftSource.length - 1); - rightCharCode = fragment.toString().charCodeAt(0); - if (((leftCharCode === 0x2B || leftCharCode === 0x2D ) && leftCharCode === rightCharCode) || - (esutils.code.isIdentifierPartES5(leftCharCode) && esutils.code.isIdentifierPartES5(rightCharCode))) { - result.push(noEmptySpace()); - result.push(fragment); - } else { - result.push(fragment); - } - } - } - return parenthesize(result, Precedence.Unary, precedence); - }, - YieldExpression: function (expr, precedence, flags) { - var result; - if (expr.delegate) { - result = 'yield*'; - } else { - result = 'yield'; - } - if (expr.argument) { - result = join( - result, - this.generateExpression(expr.argument, Precedence.Yield, E_TTT) - ); - } - return parenthesize(result, Precedence.Yield, precedence); - }, - AwaitExpression: function (expr, precedence, flags) { - var result = join( - expr.all ? 'await*' : 'await', - this.generateExpression(expr.argument, Precedence.Await, E_TTT) - ); - return parenthesize(result, Precedence.Await, precedence); - }, - UpdateExpression: function (expr, precedence, flags) { - if (expr.prefix) { - return parenthesize( - [ - expr.operator, - this.generateExpression(expr.argument, Precedence.Unary, E_TTT) - ], - Precedence.Unary, - precedence - ); - } - return parenthesize( - [ - this.generateExpression(expr.argument, Precedence.Postfix, E_TTT), - expr.operator - ], - Precedence.Postfix, - precedence - ); - }, - FunctionExpression: function (expr, precedence, flags) { - var result = [ - generateAsyncPrefix(expr, true), - 'function' - ]; - if (expr.id) { - result.push(generateStarSuffix(expr) || noEmptySpace()); - result.push(generateIdentifier(expr.id)); - } else { - result.push(generateStarSuffix(expr) || space); - } - result.push(this.generateFunctionBody(expr)); - return result; - }, - ArrayPattern: function (expr, precedence, flags) { - return this.ArrayExpression(expr, precedence, flags, true); - }, - ArrayExpression: function (expr, precedence, flags, isPattern) { - var result, multiline, that = this; - if (!expr.elements.length) { - return '[]'; - } - multiline = isPattern ? false : expr.elements.length > 1; - result = ['[', multiline ? newline : '']; - withIndent(function (indent) { - var i, iz; - for (i = 0, iz = expr.elements.length; i < iz; ++i) { - if (!expr.elements[i]) { - if (multiline) { - result.push(indent); - } - if (i + 1 === iz) { - result.push(','); - } - } else { - result.push(multiline ? indent : ''); - result.push(that.generateExpression(expr.elements[i], Precedence.Assignment, E_TTT)); - } - if (i + 1 < iz) { - result.push(',' + (multiline ? newline : space)); - } - } - }); - if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - result.push(multiline ? base : ''); - result.push(']'); - return result; - }, - RestElement: function(expr, precedence, flags) { - return '...' + this.generatePattern(expr.argument); - }, - ClassExpression: function (expr, precedence, flags) { - var result, fragment; - result = ['class']; - if (expr.id) { - result = join(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT)); - } - if (expr.superClass) { - fragment = join('extends', this.generateExpression(expr.superClass, Precedence.Unary, E_TTT)); - result = join(result, fragment); - } - result.push(space); - result.push(this.generateStatement(expr.body, S_TFFT)); - return result; - }, - MethodDefinition: function (expr, precedence, flags) { - var result, fragment; - if (expr['static']) { - result = ['static' + space]; - } else { - result = []; - } - if (expr.kind === 'get' || expr.kind === 'set') { - fragment = [ - join(expr.kind, this.generatePropertyKey(expr.key, expr.computed)), - this.generateFunctionBody(expr.value) - ]; - } else { - fragment = [ - generateMethodPrefix(expr), - this.generatePropertyKey(expr.key, expr.computed), - this.generateFunctionBody(expr.value) - ]; - } - return join(result, fragment); - }, - Property: function (expr, precedence, flags) { - if (expr.kind === 'get' || expr.kind === 'set') { - return [ - expr.kind, noEmptySpace(), - this.generatePropertyKey(expr.key, expr.computed), - this.generateFunctionBody(expr.value) - ]; - } - if (expr.shorthand) { - if (expr.value.type === "AssignmentPattern") { - return this.AssignmentPattern(expr.value, Precedence.Sequence, E_TTT); - } - return this.generatePropertyKey(expr.key, expr.computed); - } - if (expr.method) { - return [ - generateMethodPrefix(expr), - this.generatePropertyKey(expr.key, expr.computed), - this.generateFunctionBody(expr.value) - ]; - } - return [ - this.generatePropertyKey(expr.key, expr.computed), - ':' + space, - this.generateExpression(expr.value, Precedence.Assignment, E_TTT) - ]; - }, - ObjectExpression: function (expr, precedence, flags) { - var multiline, result, fragment, that = this; - if (!expr.properties.length) { - return '{}'; - } - multiline = expr.properties.length > 1; - withIndent(function () { - fragment = that.generateExpression(expr.properties[0], Precedence.Sequence, E_TTT); - }); - if (!multiline) { - if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { - return [ '{', space, fragment, space, '}' ]; - } - } - withIndent(function (indent) { - var i, iz; - result = [ '{', newline, indent, fragment ]; - if (multiline) { - result.push(',' + newline); - for (i = 1, iz = expr.properties.length; i < iz; ++i) { - result.push(indent); - result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT)); - if (i + 1 < iz) { - result.push(',' + newline); - } - } - } - }); - if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - result.push(base); - result.push('}'); - return result; - }, - AssignmentPattern: function(expr, precedence, flags) { - return this.generateAssignment(expr.left, expr.right, '=', precedence, flags); - }, - ObjectPattern: function (expr, precedence, flags) { - var result, i, iz, multiline, property, that = this; - if (!expr.properties.length) { - return '{}'; - } - multiline = false; - if (expr.properties.length === 1) { - property = expr.properties[0]; - if ( - property.type === Syntax.Property - && property.value.type !== Syntax.Identifier - ) { - multiline = true; - } - } else { - for (i = 0, iz = expr.properties.length; i < iz; ++i) { - property = expr.properties[i]; - if ( - property.type === Syntax.Property - && !property.shorthand - ) { - multiline = true; - break; - } - } - } - result = ['{', multiline ? newline : '' ]; - withIndent(function (indent) { - var i, iz; - for (i = 0, iz = expr.properties.length; i < iz; ++i) { - result.push(multiline ? indent : ''); - result.push(that.generateExpression(expr.properties[i], Precedence.Sequence, E_TTT)); - if (i + 1 < iz) { - result.push(',' + (multiline ? newline : space)); - } - } - }); - if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { - result.push(newline); - } - result.push(multiline ? base : ''); - result.push('}'); - return result; - }, - ThisExpression: function (expr, precedence, flags) { - return 'this'; - }, - Super: function (expr, precedence, flags) { - return 'super'; - }, - Identifier: function (expr, precedence, flags) { - return generateIdentifier(expr); - }, - ImportDefaultSpecifier: function (expr, precedence, flags) { - return generateIdentifier(expr.id || expr.local); - }, - ImportNamespaceSpecifier: function (expr, precedence, flags) { - var result = ['*']; - var id = expr.id || expr.local; - if (id) { - result.push(space + 'as' + noEmptySpace() + generateIdentifier(id)); - } - return result; - }, - ImportSpecifier: function (expr, precedence, flags) { - var imported = expr.imported; - var result = [ imported.name ]; - var local = expr.local; - if (local && local.name !== imported.name) { - result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(local)); - } - return result; - }, - ExportSpecifier: function (expr, precedence, flags) { - var local = expr.local; - var result = [ local.name ]; - var exported = expr.exported; - if (exported && exported.name !== local.name) { - result.push(noEmptySpace() + 'as' + noEmptySpace() + generateIdentifier(exported)); - } - return result; - }, - Literal: function (expr, precedence, flags) { - var raw; - if (expr.hasOwnProperty('raw') && parse && extra.raw) { - try { - raw = parse(expr.raw).body[0].expression; - if (raw.type === Syntax.Literal) { - if (raw.value === expr.value) { - return expr.raw; - } - } - } catch (e) { - } - } - if (expr.regex) { - return '/' + expr.regex.pattern + '/' + expr.regex.flags; - } - if (typeof expr.value === 'bigint') { - return expr.value.toString() + 'n'; - } - if (expr.bigint) { - return expr.bigint + 'n'; - } - if (expr.value === null) { - return 'null'; - } - if (typeof expr.value === 'string') { - return escapeString(expr.value); - } - if (typeof expr.value === 'number') { - return generateNumber(expr.value); - } - if (typeof expr.value === 'boolean') { - return expr.value ? 'true' : 'false'; - } - return generateRegExp(expr.value); - }, - GeneratorExpression: function (expr, precedence, flags) { - return this.ComprehensionExpression(expr, precedence, flags); - }, - ComprehensionExpression: function (expr, precedence, flags) { - var result, i, iz, fragment, that = this; - result = (expr.type === Syntax.GeneratorExpression) ? ['('] : ['[']; - if (extra.moz.comprehensionExpressionStartsWithAssignment) { - fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); - result.push(fragment); - } - if (expr.blocks) { - withIndent(function () { - for (i = 0, iz = expr.blocks.length; i < iz; ++i) { - fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT); - if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) { - result = join(result, fragment); - } else { - result.push(fragment); - } - } - }); - } - if (expr.filter) { - result = join(result, 'if' + space); - fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT); - result = join(result, [ '(', fragment, ')' ]); - } - if (!extra.moz.comprehensionExpressionStartsWithAssignment) { - fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT); - result = join(result, fragment); - } - result.push((expr.type === Syntax.GeneratorExpression) ? ')' : ']'); - return result; - }, - ComprehensionBlock: function (expr, precedence, flags) { - var fragment; - if (expr.left.type === Syntax.VariableDeclaration) { - fragment = [ - expr.left.kind, noEmptySpace(), - this.generateStatement(expr.left.declarations[0], S_FFFF) - ]; - } else { - fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT); - } - fragment = join(fragment, expr.of ? 'of' : 'in'); - fragment = join(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT)); - return [ 'for' + space + '(', fragment, ')' ]; - }, - SpreadElement: function (expr, precedence, flags) { - return [ - '...', - this.generateExpression(expr.argument, Precedence.Assignment, E_TTT) - ]; - }, - TaggedTemplateExpression: function (expr, precedence, flags) { - var itemFlags = E_TTF; - if (!(flags & F_ALLOW_CALL)) { - itemFlags = E_TFF; - } - var result = [ - this.generateExpression(expr.tag, Precedence.Call, itemFlags), - this.generateExpression(expr.quasi, Precedence.Primary, E_FFT) - ]; - return parenthesize(result, Precedence.TaggedTemplate, precedence); - }, - TemplateElement: function (expr, precedence, flags) { - return expr.value.raw; - }, - TemplateLiteral: function (expr, precedence, flags) { - var result, i, iz; - result = [ '`' ]; - for (i = 0, iz = expr.quasis.length; i < iz; ++i) { - result.push(this.generateExpression(expr.quasis[i], Precedence.Primary, E_TTT)); - if (i + 1 < iz) { - result.push('${' + space); - result.push(this.generateExpression(expr.expressions[i], Precedence.Sequence, E_TTT)); - result.push(space + '}'); - } - } - result.push('`'); - return result; - }, - ModuleSpecifier: function (expr, precedence, flags) { - return this.Literal(expr, precedence, flags); - }, - ImportExpression: function(expr, precedence, flag) { - return parenthesize([ - 'import(', - this.generateExpression(expr.source, Precedence.Assignment, E_TTT), - ')' - ], Precedence.Call, precedence); - } - }; - merge(CodeGenerator.prototype, CodeGenerator.Expression); - CodeGenerator.prototype.generateExpression = function (expr, precedence, flags) { - var result, type; - type = expr.type || Syntax.Property; - if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { - return generateVerbatim(expr, precedence); - } - result = this[type](expr, precedence, flags); - if (extra.comment) { - result = addComments(expr, result); - } - return toSourceNodeWhenNeeded(result, expr); - }; - CodeGenerator.prototype.generateStatement = function (stmt, flags) { - var result, - fragment; - result = this[stmt.type](stmt, flags); - if (extra.comment) { - result = addComments(stmt, result); - } - fragment = toSourceNodeWhenNeeded(result).toString(); - if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') { - result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, ''); - } - return toSourceNodeWhenNeeded(result, stmt); - }; - function generateInternal(node) { - var codegen; - codegen = new CodeGenerator(); - if (isStatement(node)) { - return codegen.generateStatement(node, S_TFFF); - } - if (isExpression(node)) { - return codegen.generateExpression(node, Precedence.Sequence, E_TTT); - } - throw new Error('Unknown node type: ' + node.type); - } - function generate(node, options) { - var defaultOptions = getDefaultOptions(), result, pair; - if (options != null) { - if (typeof options.indent === 'string') { - defaultOptions.format.indent.style = options.indent; - } - if (typeof options.base === 'number') { - defaultOptions.format.indent.base = options.base; - } - options = updateDeeply(defaultOptions, options); - indent = options.format.indent.style; - if (typeof options.base === 'string') { - base = options.base; - } else { - base = stringRepeat(indent, options.format.indent.base); - } - } else { - options = defaultOptions; - indent = options.format.indent.style; - base = stringRepeat(indent, options.format.indent.base); - } - json = options.format.json; - renumber = options.format.renumber; - hexadecimal = json ? false : options.format.hexadecimal; - quotes = json ? 'double' : options.format.quotes; - escapeless = options.format.escapeless; - newline = options.format.newline; - space = options.format.space; - if (options.format.compact) { - newline = space = indent = base = ''; - } - parentheses = options.format.parentheses; - semicolons = options.format.semicolons; - safeConcatenation = options.format.safeConcatenation; - directive = options.directive; - parse = json ? null : options.parse; - sourceMap = options.sourceMap; - sourceCode = options.sourceCode; - preserveBlankLines = options.format.preserveBlankLines && sourceCode !== null; - extra = options; - if (sourceMap) { - if (!exports$1.browser) { - SourceNode = requireSourceMap().SourceNode; - } else { - SourceNode = commonjsGlobal.sourceMap.SourceNode; - } - } - result = generateInternal(node); - if (!sourceMap) { - pair = {code: result.toString(), map: null}; - return options.sourceMapWithCode ? pair : pair.code; - } - pair = result.toStringWithSourceMap({ - file: options.file, - sourceRoot: options.sourceMapRoot - }); - if (options.sourceContent) { - pair.map.setSourceContent(options.sourceMap, - options.sourceContent); - } - if (options.sourceMapWithCode) { - return pair; - } - return pair.map.toString(); - } - FORMAT_MINIFY = { - indent: { - style: '', - base: 0 - }, - renumber: true, - hexadecimal: true, - quotes: 'auto', - escapeless: true, - compact: true, - parentheses: false, - semicolons: false - }; - FORMAT_DEFAULTS = getDefaultOptions().format; - exports$1.version = require$$3.version; - exports$1.generate = generate; - exports$1.attachComments = estraverse.attachComments; - exports$1.Precedence = updateDeeply({}, Precedence); - exports$1.browser = false; - exports$1.FORMAT_MINIFY = FORMAT_MINIFY; - exports$1.FORMAT_DEFAULTS = FORMAT_DEFAULTS; - }()); - } (escodegen)); - return escodegen; -} - -var esprima$2 = {exports: {}}; - -var esprima$1 = esprima$2.exports; - -var hasRequiredEsprima$1; - -function requireEsprima$1 () { - if (hasRequiredEsprima$1) return esprima$2.exports; - hasRequiredEsprima$1 = 1; - (function (module, exports$1) { - (function webpackUniversalModuleDefinition(root, factory) { - module.exports = factory(); - })(esprima$1, function() { - return (function(modules) { - var installedModules = {}; - function __webpack_require__(moduleId) { - if(installedModules[moduleId]) - return installedModules[moduleId].exports; - var module = installedModules[moduleId] = { - exports: {}, - id: moduleId, - loaded: false - }; - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - module.loaded = true; - return module.exports; - } - __webpack_require__.m = modules; - __webpack_require__.c = installedModules; - __webpack_require__.p = ""; - return __webpack_require__(0); - }) - ([ - function(module, exports$1, __webpack_require__) { - /* - Copyright JS Foundation and other contributors, https://js.foundation/ - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - Object.defineProperty(exports$1, "__esModule", { value: true }); - var comment_handler_1 = __webpack_require__(1); - var jsx_parser_1 = __webpack_require__(3); - var parser_1 = __webpack_require__(8); - var tokenizer_1 = __webpack_require__(15); - function parse(code, options, delegate) { - var commentHandler = null; - var proxyDelegate = function (node, metadata) { - if (delegate) { - delegate(node, metadata); - } - if (commentHandler) { - commentHandler.visit(node, metadata); - } - }; - var parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null; - var collectComment = false; - if (options) { - collectComment = (typeof options.comment === 'boolean' && options.comment); - var attachComment = (typeof options.attachComment === 'boolean' && options.attachComment); - if (collectComment || attachComment) { - commentHandler = new comment_handler_1.CommentHandler(); - commentHandler.attach = attachComment; - options.comment = true; - parserDelegate = proxyDelegate; - } - } - var isModule = false; - if (options && typeof options.sourceType === 'string') { - isModule = (options.sourceType === 'module'); - } - var parser; - if (options && typeof options.jsx === 'boolean' && options.jsx) { - parser = new jsx_parser_1.JSXParser(code, options, parserDelegate); - } - else { - parser = new parser_1.Parser(code, options, parserDelegate); - } - var program = isModule ? parser.parseModule() : parser.parseScript(); - var ast = program; - if (collectComment && commentHandler) { - ast.comments = commentHandler.comments; - } - if (parser.config.tokens) { - ast.tokens = parser.tokens; - } - if (parser.config.tolerant) { - ast.errors = parser.errorHandler.errors; - } - return ast; - } - exports$1.parse = parse; - function parseModule(code, options, delegate) { - var parsingOptions = options || {}; - parsingOptions.sourceType = 'module'; - return parse(code, parsingOptions, delegate); - } - exports$1.parseModule = parseModule; - function parseScript(code, options, delegate) { - var parsingOptions = options || {}; - parsingOptions.sourceType = 'script'; - return parse(code, parsingOptions, delegate); - } - exports$1.parseScript = parseScript; - function tokenize(code, options, delegate) { - var tokenizer = new tokenizer_1.Tokenizer(code, options); - var tokens; - tokens = []; - try { - while (true) { - var token = tokenizer.getNextToken(); - if (!token) { - break; - } - if (delegate) { - token = delegate(token); - } - tokens.push(token); - } - } - catch (e) { - tokenizer.errorHandler.tolerate(e); - } - if (tokenizer.errorHandler.tolerant) { - tokens.errors = tokenizer.errors(); - } - return tokens; - } - exports$1.tokenize = tokenize; - var syntax_1 = __webpack_require__(2); - exports$1.Syntax = syntax_1.Syntax; - exports$1.version = '4.0.1'; - }, - function(module, exports$1, __webpack_require__) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var syntax_1 = __webpack_require__(2); - var CommentHandler = (function () { - function CommentHandler() { - this.attach = false; - this.comments = []; - this.stack = []; - this.leading = []; - this.trailing = []; - } - CommentHandler.prototype.insertInnerComments = function (node, metadata) { - if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) { - var innerComments = []; - for (var i = this.leading.length - 1; i >= 0; --i) { - var entry = this.leading[i]; - if (metadata.end.offset >= entry.start) { - innerComments.unshift(entry.comment); - this.leading.splice(i, 1); - this.trailing.splice(i, 1); - } - } - if (innerComments.length) { - node.innerComments = innerComments; - } - } - }; - CommentHandler.prototype.findTrailingComments = function (metadata) { - var trailingComments = []; - if (this.trailing.length > 0) { - for (var i = this.trailing.length - 1; i >= 0; --i) { - var entry_1 = this.trailing[i]; - if (entry_1.start >= metadata.end.offset) { - trailingComments.unshift(entry_1.comment); - } - } - this.trailing.length = 0; - return trailingComments; - } - var entry = this.stack[this.stack.length - 1]; - if (entry && entry.node.trailingComments) { - var firstComment = entry.node.trailingComments[0]; - if (firstComment && firstComment.range[0] >= metadata.end.offset) { - trailingComments = entry.node.trailingComments; - delete entry.node.trailingComments; - } - } - return trailingComments; - }; - CommentHandler.prototype.findLeadingComments = function (metadata) { - var leadingComments = []; - var target; - while (this.stack.length > 0) { - var entry = this.stack[this.stack.length - 1]; - if (entry && entry.start >= metadata.start.offset) { - target = entry.node; - this.stack.pop(); - } - else { - break; - } - } - if (target) { - var count = target.leadingComments ? target.leadingComments.length : 0; - for (var i = count - 1; i >= 0; --i) { - var comment = target.leadingComments[i]; - if (comment.range[1] <= metadata.start.offset) { - leadingComments.unshift(comment); - target.leadingComments.splice(i, 1); - } - } - if (target.leadingComments && target.leadingComments.length === 0) { - delete target.leadingComments; - } - return leadingComments; - } - for (var i = this.leading.length - 1; i >= 0; --i) { - var entry = this.leading[i]; - if (entry.start <= metadata.start.offset) { - leadingComments.unshift(entry.comment); - this.leading.splice(i, 1); - } - } - return leadingComments; - }; - CommentHandler.prototype.visitNode = function (node, metadata) { - if (node.type === syntax_1.Syntax.Program && node.body.length > 0) { - return; - } - this.insertInnerComments(node, metadata); - var trailingComments = this.findTrailingComments(metadata); - var leadingComments = this.findLeadingComments(metadata); - if (leadingComments.length > 0) { - node.leadingComments = leadingComments; - } - if (trailingComments.length > 0) { - node.trailingComments = trailingComments; - } - this.stack.push({ - node: node, - start: metadata.start.offset - }); - }; - CommentHandler.prototype.visitComment = function (node, metadata) { - var type = (node.type[0] === 'L') ? 'Line' : 'Block'; - var comment = { - type: type, - value: node.value - }; - if (node.range) { - comment.range = node.range; - } - if (node.loc) { - comment.loc = node.loc; - } - this.comments.push(comment); - if (this.attach) { - var entry = { - comment: { - type: type, - value: node.value, - range: [metadata.start.offset, metadata.end.offset] - }, - start: metadata.start.offset - }; - if (node.loc) { - entry.comment.loc = node.loc; - } - node.type = type; - this.leading.push(entry); - this.trailing.push(entry); - } - }; - CommentHandler.prototype.visit = function (node, metadata) { - if (node.type === 'LineComment') { - this.visitComment(node, metadata); - } - else if (node.type === 'BlockComment') { - this.visitComment(node, metadata); - } - else if (this.attach) { - this.visitNode(node, metadata); - } - }; - return CommentHandler; - }()); - exports$1.CommentHandler = CommentHandler; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AwaitExpression: 'AwaitExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForOfStatement: 'ForOfStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchCase: 'SwitchCase', - SwitchStatement: 'SwitchStatement', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; - }, - function(module, exports$1, __webpack_require__) { - var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - })(); - Object.defineProperty(exports$1, "__esModule", { value: true }); - var character_1 = __webpack_require__(4); - var JSXNode = __webpack_require__(5); - var jsx_syntax_1 = __webpack_require__(6); - var Node = __webpack_require__(7); - var parser_1 = __webpack_require__(8); - var token_1 = __webpack_require__(13); - var xhtml_entities_1 = __webpack_require__(14); - token_1.TokenName[100 ] = 'JSXIdentifier'; - token_1.TokenName[101 ] = 'JSXText'; - function getQualifiedElementName(elementName) { - var qualifiedName; - switch (elementName.type) { - case jsx_syntax_1.JSXSyntax.JSXIdentifier: - var id = elementName; - qualifiedName = id.name; - break; - case jsx_syntax_1.JSXSyntax.JSXNamespacedName: - var ns = elementName; - qualifiedName = getQualifiedElementName(ns.namespace) + ':' + - getQualifiedElementName(ns.name); - break; - case jsx_syntax_1.JSXSyntax.JSXMemberExpression: - var expr = elementName; - qualifiedName = getQualifiedElementName(expr.object) + '.' + - getQualifiedElementName(expr.property); - break; - } - return qualifiedName; - } - var JSXParser = (function (_super) { - __extends(JSXParser, _super); - function JSXParser(code, options, delegate) { - return _super.call(this, code, options, delegate) || this; - } - JSXParser.prototype.parsePrimaryExpression = function () { - return this.match('<') ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this); - }; - JSXParser.prototype.startJSX = function () { - this.scanner.index = this.startMarker.index; - this.scanner.lineNumber = this.startMarker.line; - this.scanner.lineStart = this.startMarker.index - this.startMarker.column; - }; - JSXParser.prototype.finishJSX = function () { - this.nextToken(); - }; - JSXParser.prototype.reenterJSX = function () { - this.startJSX(); - this.expectJSX('}'); - if (this.config.tokens) { - this.tokens.pop(); - } - }; - JSXParser.prototype.createJSXNode = function () { - this.collectComments(); - return { - index: this.scanner.index, - line: this.scanner.lineNumber, - column: this.scanner.index - this.scanner.lineStart - }; - }; - JSXParser.prototype.createJSXChildNode = function () { - return { - index: this.scanner.index, - line: this.scanner.lineNumber, - column: this.scanner.index - this.scanner.lineStart - }; - }; - JSXParser.prototype.scanXHTMLEntity = function (quote) { - var result = '&'; - var valid = true; - var terminated = false; - var numeric = false; - var hex = false; - while (!this.scanner.eof() && valid && !terminated) { - var ch = this.scanner.source[this.scanner.index]; - if (ch === quote) { - break; - } - terminated = (ch === ';'); - result += ch; - ++this.scanner.index; - if (!terminated) { - switch (result.length) { - case 2: - numeric = (ch === '#'); - break; - case 3: - if (numeric) { - hex = (ch === 'x'); - valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0)); - numeric = numeric && !hex; - } - break; - default: - valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0))); - valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0))); - break; - } - } - } - if (valid && terminated && result.length > 2) { - var str = result.substr(1, result.length - 2); - if (numeric && str.length > 1) { - result = String.fromCharCode(parseInt(str.substr(1), 10)); - } - else if (hex && str.length > 2) { - result = String.fromCharCode(parseInt('0' + str.substr(1), 16)); - } - else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) { - result = xhtml_entities_1.XHTMLEntities[str]; - } - } - return result; - }; - JSXParser.prototype.lexJSX = function () { - var cp = this.scanner.source.charCodeAt(this.scanner.index); - if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) { - var value = this.scanner.source[this.scanner.index++]; - return { - type: 7 , - value: value, - lineNumber: this.scanner.lineNumber, - lineStart: this.scanner.lineStart, - start: this.scanner.index - 1, - end: this.scanner.index - }; - } - if (cp === 34 || cp === 39) { - var start = this.scanner.index; - var quote = this.scanner.source[this.scanner.index++]; - var str = ''; - while (!this.scanner.eof()) { - var ch = this.scanner.source[this.scanner.index++]; - if (ch === quote) { - break; - } - else if (ch === '&') { - str += this.scanXHTMLEntity(quote); - } - else { - str += ch; - } - } - return { - type: 8 , - value: str, - lineNumber: this.scanner.lineNumber, - lineStart: this.scanner.lineStart, - start: start, - end: this.scanner.index - }; - } - if (cp === 46) { - var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1); - var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2); - var value = (n1 === 46 && n2 === 46) ? '...' : '.'; - var start = this.scanner.index; - this.scanner.index += value.length; - return { - type: 7 , - value: value, - lineNumber: this.scanner.lineNumber, - lineStart: this.scanner.lineStart, - start: start, - end: this.scanner.index - }; - } - if (cp === 96) { - return { - type: 10 , - value: '', - lineNumber: this.scanner.lineNumber, - lineStart: this.scanner.lineStart, - start: this.scanner.index, - end: this.scanner.index - }; - } - if (character_1.Character.isIdentifierStart(cp) && (cp !== 92)) { - var start = this.scanner.index; - ++this.scanner.index; - while (!this.scanner.eof()) { - var ch = this.scanner.source.charCodeAt(this.scanner.index); - if (character_1.Character.isIdentifierPart(ch) && (ch !== 92)) { - ++this.scanner.index; - } - else if (ch === 45) { - ++this.scanner.index; - } - else { - break; - } - } - var id = this.scanner.source.slice(start, this.scanner.index); - return { - type: 100 , - value: id, - lineNumber: this.scanner.lineNumber, - lineStart: this.scanner.lineStart, - start: start, - end: this.scanner.index - }; - } - return this.scanner.lex(); - }; - JSXParser.prototype.nextJSXToken = function () { - this.collectComments(); - this.startMarker.index = this.scanner.index; - this.startMarker.line = this.scanner.lineNumber; - this.startMarker.column = this.scanner.index - this.scanner.lineStart; - var token = this.lexJSX(); - this.lastMarker.index = this.scanner.index; - this.lastMarker.line = this.scanner.lineNumber; - this.lastMarker.column = this.scanner.index - this.scanner.lineStart; - if (this.config.tokens) { - this.tokens.push(this.convertToken(token)); - } - return token; - }; - JSXParser.prototype.nextJSXText = function () { - this.startMarker.index = this.scanner.index; - this.startMarker.line = this.scanner.lineNumber; - this.startMarker.column = this.scanner.index - this.scanner.lineStart; - var start = this.scanner.index; - var text = ''; - while (!this.scanner.eof()) { - var ch = this.scanner.source[this.scanner.index]; - if (ch === '{' || ch === '<') { - break; - } - ++this.scanner.index; - text += ch; - if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - ++this.scanner.lineNumber; - if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') { - ++this.scanner.index; - } - this.scanner.lineStart = this.scanner.index; - } - } - this.lastMarker.index = this.scanner.index; - this.lastMarker.line = this.scanner.lineNumber; - this.lastMarker.column = this.scanner.index - this.scanner.lineStart; - var token = { - type: 101 , - value: text, - lineNumber: this.scanner.lineNumber, - lineStart: this.scanner.lineStart, - start: start, - end: this.scanner.index - }; - if ((text.length > 0) && this.config.tokens) { - this.tokens.push(this.convertToken(token)); - } - return token; - }; - JSXParser.prototype.peekJSXToken = function () { - var state = this.scanner.saveState(); - this.scanner.scanComments(); - var next = this.lexJSX(); - this.scanner.restoreState(state); - return next; - }; - JSXParser.prototype.expectJSX = function (value) { - var token = this.nextJSXToken(); - if (token.type !== 7 || token.value !== value) { - this.throwUnexpectedToken(token); - } - }; - JSXParser.prototype.matchJSX = function (value) { - var next = this.peekJSXToken(); - return next.type === 7 && next.value === value; - }; - JSXParser.prototype.parseJSXIdentifier = function () { - var node = this.createJSXNode(); - var token = this.nextJSXToken(); - if (token.type !== 100 ) { - this.throwUnexpectedToken(token); - } - return this.finalize(node, new JSXNode.JSXIdentifier(token.value)); - }; - JSXParser.prototype.parseJSXElementName = function () { - var node = this.createJSXNode(); - var elementName = this.parseJSXIdentifier(); - if (this.matchJSX(':')) { - var namespace = elementName; - this.expectJSX(':'); - var name_1 = this.parseJSXIdentifier(); - elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1)); - } - else if (this.matchJSX('.')) { - while (this.matchJSX('.')) { - var object = elementName; - this.expectJSX('.'); - var property = this.parseJSXIdentifier(); - elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property)); - } - } - return elementName; - }; - JSXParser.prototype.parseJSXAttributeName = function () { - var node = this.createJSXNode(); - var attributeName; - var identifier = this.parseJSXIdentifier(); - if (this.matchJSX(':')) { - var namespace = identifier; - this.expectJSX(':'); - var name_2 = this.parseJSXIdentifier(); - attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2)); - } - else { - attributeName = identifier; - } - return attributeName; - }; - JSXParser.prototype.parseJSXStringLiteralAttribute = function () { - var node = this.createJSXNode(); - var token = this.nextJSXToken(); - if (token.type !== 8 ) { - this.throwUnexpectedToken(token); - } - var raw = this.getTokenRaw(token); - return this.finalize(node, new Node.Literal(token.value, raw)); - }; - JSXParser.prototype.parseJSXExpressionAttribute = function () { - var node = this.createJSXNode(); - this.expectJSX('{'); - this.finishJSX(); - if (this.match('}')) { - this.tolerateError('JSX attributes must only be assigned a non-empty expression'); - } - var expression = this.parseAssignmentExpression(); - this.reenterJSX(); - return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); - }; - JSXParser.prototype.parseJSXAttributeValue = function () { - return this.matchJSX('{') ? this.parseJSXExpressionAttribute() : - this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); - }; - JSXParser.prototype.parseJSXNameValueAttribute = function () { - var node = this.createJSXNode(); - var name = this.parseJSXAttributeName(); - var value = null; - if (this.matchJSX('=')) { - this.expectJSX('='); - value = this.parseJSXAttributeValue(); - } - return this.finalize(node, new JSXNode.JSXAttribute(name, value)); - }; - JSXParser.prototype.parseJSXSpreadAttribute = function () { - var node = this.createJSXNode(); - this.expectJSX('{'); - this.expectJSX('...'); - this.finishJSX(); - var argument = this.parseAssignmentExpression(); - this.reenterJSX(); - return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument)); - }; - JSXParser.prototype.parseJSXAttributes = function () { - var attributes = []; - while (!this.matchJSX('/') && !this.matchJSX('>')) { - var attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() : - this.parseJSXNameValueAttribute(); - attributes.push(attribute); - } - return attributes; - }; - JSXParser.prototype.parseJSXOpeningElement = function () { - var node = this.createJSXNode(); - this.expectJSX('<'); - var name = this.parseJSXElementName(); - var attributes = this.parseJSXAttributes(); - var selfClosing = this.matchJSX('/'); - if (selfClosing) { - this.expectJSX('/'); - } - this.expectJSX('>'); - return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); - }; - JSXParser.prototype.parseJSXBoundaryElement = function () { - var node = this.createJSXNode(); - this.expectJSX('<'); - if (this.matchJSX('/')) { - this.expectJSX('/'); - var name_3 = this.parseJSXElementName(); - this.expectJSX('>'); - return this.finalize(node, new JSXNode.JSXClosingElement(name_3)); - } - var name = this.parseJSXElementName(); - var attributes = this.parseJSXAttributes(); - var selfClosing = this.matchJSX('/'); - if (selfClosing) { - this.expectJSX('/'); - } - this.expectJSX('>'); - return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); - }; - JSXParser.prototype.parseJSXEmptyExpression = function () { - var node = this.createJSXChildNode(); - this.collectComments(); - this.lastMarker.index = this.scanner.index; - this.lastMarker.line = this.scanner.lineNumber; - this.lastMarker.column = this.scanner.index - this.scanner.lineStart; - return this.finalize(node, new JSXNode.JSXEmptyExpression()); - }; - JSXParser.prototype.parseJSXExpressionContainer = function () { - var node = this.createJSXNode(); - this.expectJSX('{'); - var expression; - if (this.matchJSX('}')) { - expression = this.parseJSXEmptyExpression(); - this.expectJSX('}'); - } - else { - this.finishJSX(); - expression = this.parseAssignmentExpression(); - this.reenterJSX(); - } - return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); - }; - JSXParser.prototype.parseJSXChildren = function () { - var children = []; - while (!this.scanner.eof()) { - var node = this.createJSXChildNode(); - var token = this.nextJSXText(); - if (token.start < token.end) { - var raw = this.getTokenRaw(token); - var child = this.finalize(node, new JSXNode.JSXText(token.value, raw)); - children.push(child); - } - if (this.scanner.source[this.scanner.index] === '{') { - var container = this.parseJSXExpressionContainer(); - children.push(container); - } - else { - break; - } - } - return children; - }; - JSXParser.prototype.parseComplexJSXElement = function (el) { - var stack = []; - while (!this.scanner.eof()) { - el.children = el.children.concat(this.parseJSXChildren()); - var node = this.createJSXChildNode(); - var element = this.parseJSXBoundaryElement(); - if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) { - var opening = element; - if (opening.selfClosing) { - var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null)); - el.children.push(child); - } - else { - stack.push(el); - el = { node: node, opening: opening, closing: null, children: [] }; - } - } - if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) { - el.closing = element; - var open_1 = getQualifiedElementName(el.opening.name); - var close_1 = getQualifiedElementName(el.closing.name); - if (open_1 !== close_1) { - this.tolerateError('Expected corresponding JSX closing tag for %0', open_1); - } - if (stack.length > 0) { - var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing)); - el = stack[stack.length - 1]; - el.children.push(child); - stack.pop(); - } - else { - break; - } - } - } - return el; - }; - JSXParser.prototype.parseJSXElement = function () { - var node = this.createJSXNode(); - var opening = this.parseJSXOpeningElement(); - var children = []; - var closing = null; - if (!opening.selfClosing) { - var el = this.parseComplexJSXElement({ node: node, opening: opening, closing: closing, children: children }); - children = el.children; - closing = el.closing; - } - return this.finalize(node, new JSXNode.JSXElement(opening, children, closing)); - }; - JSXParser.prototype.parseJSXRoot = function () { - if (this.config.tokens) { - this.tokens.pop(); - } - this.startJSX(); - var element = this.parseJSXElement(); - this.finishJSX(); - return element; - }; - JSXParser.prototype.isStartOfExpression = function () { - return _super.prototype.isStartOfExpression.call(this) || this.match('<'); - }; - return JSXParser; - }(parser_1.Parser)); - exports$1.JSXParser = JSXParser; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var Regex = { - NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, - NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A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D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\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D30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ - }; - exports$1.Character = { - fromCodePoint: function (cp) { - return (cp < 0x10000) ? String.fromCharCode(cp) : - String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + - String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); - }, - isWhiteSpace: function (cp) { - return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) || - (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0); - }, - isLineTerminator: function (cp) { - return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029); - }, - isIdentifierStart: function (cp) { - return (cp === 0x24) || (cp === 0x5F) || - (cp >= 0x41 && cp <= 0x5A) || - (cp >= 0x61 && cp <= 0x7A) || - (cp === 0x5C) || - ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(exports$1.Character.fromCodePoint(cp))); - }, - isIdentifierPart: function (cp) { - return (cp === 0x24) || (cp === 0x5F) || - (cp >= 0x41 && cp <= 0x5A) || - (cp >= 0x61 && cp <= 0x7A) || - (cp >= 0x30 && cp <= 0x39) || - (cp === 0x5C) || - ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(exports$1.Character.fromCodePoint(cp))); - }, - isDecimalDigit: function (cp) { - return (cp >= 0x30 && cp <= 0x39); - }, - isHexDigit: function (cp) { - return (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x46) || - (cp >= 0x61 && cp <= 0x66); - }, - isOctalDigit: function (cp) { - return (cp >= 0x30 && cp <= 0x37); - } - }; - }, - function(module, exports$1, __webpack_require__) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var jsx_syntax_1 = __webpack_require__(6); - var JSXClosingElement = (function () { - function JSXClosingElement(name) { - this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement; - this.name = name; - } - return JSXClosingElement; - }()); - exports$1.JSXClosingElement = JSXClosingElement; - var JSXElement = (function () { - function JSXElement(openingElement, children, closingElement) { - this.type = jsx_syntax_1.JSXSyntax.JSXElement; - this.openingElement = openingElement; - this.children = children; - this.closingElement = closingElement; - } - return JSXElement; - }()); - exports$1.JSXElement = JSXElement; - var JSXEmptyExpression = (function () { - function JSXEmptyExpression() { - this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression; - } - return JSXEmptyExpression; - }()); - exports$1.JSXEmptyExpression = JSXEmptyExpression; - var JSXExpressionContainer = (function () { - function JSXExpressionContainer(expression) { - this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer; - this.expression = expression; - } - return JSXExpressionContainer; - }()); - exports$1.JSXExpressionContainer = JSXExpressionContainer; - var JSXIdentifier = (function () { - function JSXIdentifier(name) { - this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier; - this.name = name; - } - return JSXIdentifier; - }()); - exports$1.JSXIdentifier = JSXIdentifier; - var JSXMemberExpression = (function () { - function JSXMemberExpression(object, property) { - this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression; - this.object = object; - this.property = property; - } - return JSXMemberExpression; - }()); - exports$1.JSXMemberExpression = JSXMemberExpression; - var JSXAttribute = (function () { - function JSXAttribute(name, value) { - this.type = jsx_syntax_1.JSXSyntax.JSXAttribute; - this.name = name; - this.value = value; - } - return JSXAttribute; - }()); - exports$1.JSXAttribute = JSXAttribute; - var JSXNamespacedName = (function () { - function JSXNamespacedName(namespace, name) { - this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName; - this.namespace = namespace; - this.name = name; - } - return JSXNamespacedName; - }()); - exports$1.JSXNamespacedName = JSXNamespacedName; - var JSXOpeningElement = (function () { - function JSXOpeningElement(name, selfClosing, attributes) { - this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement; - this.name = name; - this.selfClosing = selfClosing; - this.attributes = attributes; - } - return JSXOpeningElement; - }()); - exports$1.JSXOpeningElement = JSXOpeningElement; - var JSXSpreadAttribute = (function () { - function JSXSpreadAttribute(argument) { - this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute; - this.argument = argument; - } - return JSXSpreadAttribute; - }()); - exports$1.JSXSpreadAttribute = JSXSpreadAttribute; - var JSXText = (function () { - function JSXText(value, raw) { - this.type = jsx_syntax_1.JSXSyntax.JSXText; - this.value = value; - this.raw = raw; - } - return JSXText; - }()); - exports$1.JSXText = JSXText; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.JSXSyntax = { - JSXAttribute: 'JSXAttribute', - JSXClosingElement: 'JSXClosingElement', - JSXElement: 'JSXElement', - JSXEmptyExpression: 'JSXEmptyExpression', - JSXExpressionContainer: 'JSXExpressionContainer', - JSXIdentifier: 'JSXIdentifier', - JSXMemberExpression: 'JSXMemberExpression', - JSXNamespacedName: 'JSXNamespacedName', - JSXOpeningElement: 'JSXOpeningElement', - JSXSpreadAttribute: 'JSXSpreadAttribute', - JSXText: 'JSXText' - }; - }, - function(module, exports$1, __webpack_require__) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var syntax_1 = __webpack_require__(2); - var ArrayExpression = (function () { - function ArrayExpression(elements) { - this.type = syntax_1.Syntax.ArrayExpression; - this.elements = elements; - } - return ArrayExpression; - }()); - exports$1.ArrayExpression = ArrayExpression; - var ArrayPattern = (function () { - function ArrayPattern(elements) { - this.type = syntax_1.Syntax.ArrayPattern; - this.elements = elements; - } - return ArrayPattern; - }()); - exports$1.ArrayPattern = ArrayPattern; - var ArrowFunctionExpression = (function () { - function ArrowFunctionExpression(params, body, expression) { - this.type = syntax_1.Syntax.ArrowFunctionExpression; - this.id = null; - this.params = params; - this.body = body; - this.generator = false; - this.expression = expression; - this.async = false; - } - return ArrowFunctionExpression; - }()); - exports$1.ArrowFunctionExpression = ArrowFunctionExpression; - var AssignmentExpression = (function () { - function AssignmentExpression(operator, left, right) { - this.type = syntax_1.Syntax.AssignmentExpression; - this.operator = operator; - this.left = left; - this.right = right; - } - return AssignmentExpression; - }()); - exports$1.AssignmentExpression = AssignmentExpression; - var AssignmentPattern = (function () { - function AssignmentPattern(left, right) { - this.type = syntax_1.Syntax.AssignmentPattern; - this.left = left; - this.right = right; - } - return AssignmentPattern; - }()); - exports$1.AssignmentPattern = AssignmentPattern; - var AsyncArrowFunctionExpression = (function () { - function AsyncArrowFunctionExpression(params, body, expression) { - this.type = syntax_1.Syntax.ArrowFunctionExpression; - this.id = null; - this.params = params; - this.body = body; - this.generator = false; - this.expression = expression; - this.async = true; - } - return AsyncArrowFunctionExpression; - }()); - exports$1.AsyncArrowFunctionExpression = AsyncArrowFunctionExpression; - var AsyncFunctionDeclaration = (function () { - function AsyncFunctionDeclaration(id, params, body) { - this.type = syntax_1.Syntax.FunctionDeclaration; - this.id = id; - this.params = params; - this.body = body; - this.generator = false; - this.expression = false; - this.async = true; - } - return AsyncFunctionDeclaration; - }()); - exports$1.AsyncFunctionDeclaration = AsyncFunctionDeclaration; - var AsyncFunctionExpression = (function () { - function AsyncFunctionExpression(id, params, body) { - this.type = syntax_1.Syntax.FunctionExpression; - this.id = id; - this.params = params; - this.body = body; - this.generator = false; - this.expression = false; - this.async = true; - } - return AsyncFunctionExpression; - }()); - exports$1.AsyncFunctionExpression = AsyncFunctionExpression; - var AwaitExpression = (function () { - function AwaitExpression(argument) { - this.type = syntax_1.Syntax.AwaitExpression; - this.argument = argument; - } - return AwaitExpression; - }()); - exports$1.AwaitExpression = AwaitExpression; - var BinaryExpression = (function () { - function BinaryExpression(operator, left, right) { - var logical = (operator === '||' || operator === '&&'); - this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression; - this.operator = operator; - this.left = left; - this.right = right; - } - return BinaryExpression; - }()); - exports$1.BinaryExpression = BinaryExpression; - var BlockStatement = (function () { - function BlockStatement(body) { - this.type = syntax_1.Syntax.BlockStatement; - this.body = body; - } - return BlockStatement; - }()); - exports$1.BlockStatement = BlockStatement; - var BreakStatement = (function () { - function BreakStatement(label) { - this.type = syntax_1.Syntax.BreakStatement; - this.label = label; - } - return BreakStatement; - }()); - exports$1.BreakStatement = BreakStatement; - var CallExpression = (function () { - function CallExpression(callee, args) { - this.type = syntax_1.Syntax.CallExpression; - this.callee = callee; - this.arguments = args; - } - return CallExpression; - }()); - exports$1.CallExpression = CallExpression; - var CatchClause = (function () { - function CatchClause(param, body) { - this.type = syntax_1.Syntax.CatchClause; - this.param = param; - this.body = body; - } - return CatchClause; - }()); - exports$1.CatchClause = CatchClause; - var ClassBody = (function () { - function ClassBody(body) { - this.type = syntax_1.Syntax.ClassBody; - this.body = body; - } - return ClassBody; - }()); - exports$1.ClassBody = ClassBody; - var ClassDeclaration = (function () { - function ClassDeclaration(id, superClass, body) { - this.type = syntax_1.Syntax.ClassDeclaration; - this.id = id; - this.superClass = superClass; - this.body = body; - } - return ClassDeclaration; - }()); - exports$1.ClassDeclaration = ClassDeclaration; - var ClassExpression = (function () { - function ClassExpression(id, superClass, body) { - this.type = syntax_1.Syntax.ClassExpression; - this.id = id; - this.superClass = superClass; - this.body = body; - } - return ClassExpression; - }()); - exports$1.ClassExpression = ClassExpression; - var ComputedMemberExpression = (function () { - function ComputedMemberExpression(object, property) { - this.type = syntax_1.Syntax.MemberExpression; - this.computed = true; - this.object = object; - this.property = property; - } - return ComputedMemberExpression; - }()); - exports$1.ComputedMemberExpression = ComputedMemberExpression; - var ConditionalExpression = (function () { - function ConditionalExpression(test, consequent, alternate) { - this.type = syntax_1.Syntax.ConditionalExpression; - this.test = test; - this.consequent = consequent; - this.alternate = alternate; - } - return ConditionalExpression; - }()); - exports$1.ConditionalExpression = ConditionalExpression; - var ContinueStatement = (function () { - function ContinueStatement(label) { - this.type = syntax_1.Syntax.ContinueStatement; - this.label = label; - } - return ContinueStatement; - }()); - exports$1.ContinueStatement = ContinueStatement; - var DebuggerStatement = (function () { - function DebuggerStatement() { - this.type = syntax_1.Syntax.DebuggerStatement; - } - return DebuggerStatement; - }()); - exports$1.DebuggerStatement = DebuggerStatement; - var Directive = (function () { - function Directive(expression, directive) { - this.type = syntax_1.Syntax.ExpressionStatement; - this.expression = expression; - this.directive = directive; - } - return Directive; - }()); - exports$1.Directive = Directive; - var DoWhileStatement = (function () { - function DoWhileStatement(body, test) { - this.type = syntax_1.Syntax.DoWhileStatement; - this.body = body; - this.test = test; - } - return DoWhileStatement; - }()); - exports$1.DoWhileStatement = DoWhileStatement; - var EmptyStatement = (function () { - function EmptyStatement() { - this.type = syntax_1.Syntax.EmptyStatement; - } - return EmptyStatement; - }()); - exports$1.EmptyStatement = EmptyStatement; - var ExportAllDeclaration = (function () { - function ExportAllDeclaration(source) { - this.type = syntax_1.Syntax.ExportAllDeclaration; - this.source = source; - } - return ExportAllDeclaration; - }()); - exports$1.ExportAllDeclaration = ExportAllDeclaration; - var ExportDefaultDeclaration = (function () { - function ExportDefaultDeclaration(declaration) { - this.type = syntax_1.Syntax.ExportDefaultDeclaration; - this.declaration = declaration; - } - return ExportDefaultDeclaration; - }()); - exports$1.ExportDefaultDeclaration = ExportDefaultDeclaration; - var ExportNamedDeclaration = (function () { - function ExportNamedDeclaration(declaration, specifiers, source) { - this.type = syntax_1.Syntax.ExportNamedDeclaration; - this.declaration = declaration; - this.specifiers = specifiers; - this.source = source; - } - return ExportNamedDeclaration; - }()); - exports$1.ExportNamedDeclaration = ExportNamedDeclaration; - var ExportSpecifier = (function () { - function ExportSpecifier(local, exported) { - this.type = syntax_1.Syntax.ExportSpecifier; - this.exported = exported; - this.local = local; - } - return ExportSpecifier; - }()); - exports$1.ExportSpecifier = ExportSpecifier; - var ExpressionStatement = (function () { - function ExpressionStatement(expression) { - this.type = syntax_1.Syntax.ExpressionStatement; - this.expression = expression; - } - return ExpressionStatement; - }()); - exports$1.ExpressionStatement = ExpressionStatement; - var ForInStatement = (function () { - function ForInStatement(left, right, body) { - this.type = syntax_1.Syntax.ForInStatement; - this.left = left; - this.right = right; - this.body = body; - this.each = false; - } - return ForInStatement; - }()); - exports$1.ForInStatement = ForInStatement; - var ForOfStatement = (function () { - function ForOfStatement(left, right, body) { - this.type = syntax_1.Syntax.ForOfStatement; - this.left = left; - this.right = right; - this.body = body; - } - return ForOfStatement; - }()); - exports$1.ForOfStatement = ForOfStatement; - var ForStatement = (function () { - function ForStatement(init, test, update, body) { - this.type = syntax_1.Syntax.ForStatement; - this.init = init; - this.test = test; - this.update = update; - this.body = body; - } - return ForStatement; - }()); - exports$1.ForStatement = ForStatement; - var FunctionDeclaration = (function () { - function FunctionDeclaration(id, params, body, generator) { - this.type = syntax_1.Syntax.FunctionDeclaration; - this.id = id; - this.params = params; - this.body = body; - this.generator = generator; - this.expression = false; - this.async = false; - } - return FunctionDeclaration; - }()); - exports$1.FunctionDeclaration = FunctionDeclaration; - var FunctionExpression = (function () { - function FunctionExpression(id, params, body, generator) { - this.type = syntax_1.Syntax.FunctionExpression; - this.id = id; - this.params = params; - this.body = body; - this.generator = generator; - this.expression = false; - this.async = false; - } - return FunctionExpression; - }()); - exports$1.FunctionExpression = FunctionExpression; - var Identifier = (function () { - function Identifier(name) { - this.type = syntax_1.Syntax.Identifier; - this.name = name; - } - return Identifier; - }()); - exports$1.Identifier = Identifier; - var IfStatement = (function () { - function IfStatement(test, consequent, alternate) { - this.type = syntax_1.Syntax.IfStatement; - this.test = test; - this.consequent = consequent; - this.alternate = alternate; - } - return IfStatement; - }()); - exports$1.IfStatement = IfStatement; - var ImportDeclaration = (function () { - function ImportDeclaration(specifiers, source) { - this.type = syntax_1.Syntax.ImportDeclaration; - this.specifiers = specifiers; - this.source = source; - } - return ImportDeclaration; - }()); - exports$1.ImportDeclaration = ImportDeclaration; - var ImportDefaultSpecifier = (function () { - function ImportDefaultSpecifier(local) { - this.type = syntax_1.Syntax.ImportDefaultSpecifier; - this.local = local; - } - return ImportDefaultSpecifier; - }()); - exports$1.ImportDefaultSpecifier = ImportDefaultSpecifier; - var ImportNamespaceSpecifier = (function () { - function ImportNamespaceSpecifier(local) { - this.type = syntax_1.Syntax.ImportNamespaceSpecifier; - this.local = local; - } - return ImportNamespaceSpecifier; - }()); - exports$1.ImportNamespaceSpecifier = ImportNamespaceSpecifier; - var ImportSpecifier = (function () { - function ImportSpecifier(local, imported) { - this.type = syntax_1.Syntax.ImportSpecifier; - this.local = local; - this.imported = imported; - } - return ImportSpecifier; - }()); - exports$1.ImportSpecifier = ImportSpecifier; - var LabeledStatement = (function () { - function LabeledStatement(label, body) { - this.type = syntax_1.Syntax.LabeledStatement; - this.label = label; - this.body = body; - } - return LabeledStatement; - }()); - exports$1.LabeledStatement = LabeledStatement; - var Literal = (function () { - function Literal(value, raw) { - this.type = syntax_1.Syntax.Literal; - this.value = value; - this.raw = raw; - } - return Literal; - }()); - exports$1.Literal = Literal; - var MetaProperty = (function () { - function MetaProperty(meta, property) { - this.type = syntax_1.Syntax.MetaProperty; - this.meta = meta; - this.property = property; - } - return MetaProperty; - }()); - exports$1.MetaProperty = MetaProperty; - var MethodDefinition = (function () { - function MethodDefinition(key, computed, value, kind, isStatic) { - this.type = syntax_1.Syntax.MethodDefinition; - this.key = key; - this.computed = computed; - this.value = value; - this.kind = kind; - this.static = isStatic; - } - return MethodDefinition; - }()); - exports$1.MethodDefinition = MethodDefinition; - var Module = (function () { - function Module(body) { - this.type = syntax_1.Syntax.Program; - this.body = body; - this.sourceType = 'module'; - } - return Module; - }()); - exports$1.Module = Module; - var NewExpression = (function () { - function NewExpression(callee, args) { - this.type = syntax_1.Syntax.NewExpression; - this.callee = callee; - this.arguments = args; - } - return NewExpression; - }()); - exports$1.NewExpression = NewExpression; - var ObjectExpression = (function () { - function ObjectExpression(properties) { - this.type = syntax_1.Syntax.ObjectExpression; - this.properties = properties; - } - return ObjectExpression; - }()); - exports$1.ObjectExpression = ObjectExpression; - var ObjectPattern = (function () { - function ObjectPattern(properties) { - this.type = syntax_1.Syntax.ObjectPattern; - this.properties = properties; - } - return ObjectPattern; - }()); - exports$1.ObjectPattern = ObjectPattern; - var Property = (function () { - function Property(kind, key, computed, value, method, shorthand) { - this.type = syntax_1.Syntax.Property; - this.key = key; - this.computed = computed; - this.value = value; - this.kind = kind; - this.method = method; - this.shorthand = shorthand; - } - return Property; - }()); - exports$1.Property = Property; - var RegexLiteral = (function () { - function RegexLiteral(value, raw, pattern, flags) { - this.type = syntax_1.Syntax.Literal; - this.value = value; - this.raw = raw; - this.regex = { pattern: pattern, flags: flags }; - } - return RegexLiteral; - }()); - exports$1.RegexLiteral = RegexLiteral; - var RestElement = (function () { - function RestElement(argument) { - this.type = syntax_1.Syntax.RestElement; - this.argument = argument; - } - return RestElement; - }()); - exports$1.RestElement = RestElement; - var ReturnStatement = (function () { - function ReturnStatement(argument) { - this.type = syntax_1.Syntax.ReturnStatement; - this.argument = argument; - } - return ReturnStatement; - }()); - exports$1.ReturnStatement = ReturnStatement; - var Script = (function () { - function Script(body) { - this.type = syntax_1.Syntax.Program; - this.body = body; - this.sourceType = 'script'; - } - return Script; - }()); - exports$1.Script = Script; - var SequenceExpression = (function () { - function SequenceExpression(expressions) { - this.type = syntax_1.Syntax.SequenceExpression; - this.expressions = expressions; - } - return SequenceExpression; - }()); - exports$1.SequenceExpression = SequenceExpression; - var SpreadElement = (function () { - function SpreadElement(argument) { - this.type = syntax_1.Syntax.SpreadElement; - this.argument = argument; - } - return SpreadElement; - }()); - exports$1.SpreadElement = SpreadElement; - var StaticMemberExpression = (function () { - function StaticMemberExpression(object, property) { - this.type = syntax_1.Syntax.MemberExpression; - this.computed = false; - this.object = object; - this.property = property; - } - return StaticMemberExpression; - }()); - exports$1.StaticMemberExpression = StaticMemberExpression; - var Super = (function () { - function Super() { - this.type = syntax_1.Syntax.Super; - } - return Super; - }()); - exports$1.Super = Super; - var SwitchCase = (function () { - function SwitchCase(test, consequent) { - this.type = syntax_1.Syntax.SwitchCase; - this.test = test; - this.consequent = consequent; - } - return SwitchCase; - }()); - exports$1.SwitchCase = SwitchCase; - var SwitchStatement = (function () { - function SwitchStatement(discriminant, cases) { - this.type = syntax_1.Syntax.SwitchStatement; - this.discriminant = discriminant; - this.cases = cases; - } - return SwitchStatement; - }()); - exports$1.SwitchStatement = SwitchStatement; - var TaggedTemplateExpression = (function () { - function TaggedTemplateExpression(tag, quasi) { - this.type = syntax_1.Syntax.TaggedTemplateExpression; - this.tag = tag; - this.quasi = quasi; - } - return TaggedTemplateExpression; - }()); - exports$1.TaggedTemplateExpression = TaggedTemplateExpression; - var TemplateElement = (function () { - function TemplateElement(value, tail) { - this.type = syntax_1.Syntax.TemplateElement; - this.value = value; - this.tail = tail; - } - return TemplateElement; - }()); - exports$1.TemplateElement = TemplateElement; - var TemplateLiteral = (function () { - function TemplateLiteral(quasis, expressions) { - this.type = syntax_1.Syntax.TemplateLiteral; - this.quasis = quasis; - this.expressions = expressions; - } - return TemplateLiteral; - }()); - exports$1.TemplateLiteral = TemplateLiteral; - var ThisExpression = (function () { - function ThisExpression() { - this.type = syntax_1.Syntax.ThisExpression; - } - return ThisExpression; - }()); - exports$1.ThisExpression = ThisExpression; - var ThrowStatement = (function () { - function ThrowStatement(argument) { - this.type = syntax_1.Syntax.ThrowStatement; - this.argument = argument; - } - return ThrowStatement; - }()); - exports$1.ThrowStatement = ThrowStatement; - var TryStatement = (function () { - function TryStatement(block, handler, finalizer) { - this.type = syntax_1.Syntax.TryStatement; - this.block = block; - this.handler = handler; - this.finalizer = finalizer; - } - return TryStatement; - }()); - exports$1.TryStatement = TryStatement; - var UnaryExpression = (function () { - function UnaryExpression(operator, argument) { - this.type = syntax_1.Syntax.UnaryExpression; - this.operator = operator; - this.argument = argument; - this.prefix = true; - } - return UnaryExpression; - }()); - exports$1.UnaryExpression = UnaryExpression; - var UpdateExpression = (function () { - function UpdateExpression(operator, argument, prefix) { - this.type = syntax_1.Syntax.UpdateExpression; - this.operator = operator; - this.argument = argument; - this.prefix = prefix; - } - return UpdateExpression; - }()); - exports$1.UpdateExpression = UpdateExpression; - var VariableDeclaration = (function () { - function VariableDeclaration(declarations, kind) { - this.type = syntax_1.Syntax.VariableDeclaration; - this.declarations = declarations; - this.kind = kind; - } - return VariableDeclaration; - }()); - exports$1.VariableDeclaration = VariableDeclaration; - var VariableDeclarator = (function () { - function VariableDeclarator(id, init) { - this.type = syntax_1.Syntax.VariableDeclarator; - this.id = id; - this.init = init; - } - return VariableDeclarator; - }()); - exports$1.VariableDeclarator = VariableDeclarator; - var WhileStatement = (function () { - function WhileStatement(test, body) { - this.type = syntax_1.Syntax.WhileStatement; - this.test = test; - this.body = body; - } - return WhileStatement; - }()); - exports$1.WhileStatement = WhileStatement; - var WithStatement = (function () { - function WithStatement(object, body) { - this.type = syntax_1.Syntax.WithStatement; - this.object = object; - this.body = body; - } - return WithStatement; - }()); - exports$1.WithStatement = WithStatement; - var YieldExpression = (function () { - function YieldExpression(argument, delegate) { - this.type = syntax_1.Syntax.YieldExpression; - this.argument = argument; - this.delegate = delegate; - } - return YieldExpression; - }()); - exports$1.YieldExpression = YieldExpression; - }, - function(module, exports$1, __webpack_require__) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var assert_1 = __webpack_require__(9); - var error_handler_1 = __webpack_require__(10); - var messages_1 = __webpack_require__(11); - var Node = __webpack_require__(7); - var scanner_1 = __webpack_require__(12); - var syntax_1 = __webpack_require__(2); - var token_1 = __webpack_require__(13); - var ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder'; - var Parser = (function () { - function Parser(code, options, delegate) { - if (options === void 0) { options = {}; } - this.config = { - range: (typeof options.range === 'boolean') && options.range, - loc: (typeof options.loc === 'boolean') && options.loc, - source: null, - tokens: (typeof options.tokens === 'boolean') && options.tokens, - comment: (typeof options.comment === 'boolean') && options.comment, - tolerant: (typeof options.tolerant === 'boolean') && options.tolerant - }; - if (this.config.loc && options.source && options.source !== null) { - this.config.source = String(options.source); - } - this.delegate = delegate; - this.errorHandler = new error_handler_1.ErrorHandler(); - this.errorHandler.tolerant = this.config.tolerant; - this.scanner = new scanner_1.Scanner(code, this.errorHandler); - this.scanner.trackComment = this.config.comment; - this.operatorPrecedence = { - ')': 0, - ';': 0, - ',': 0, - '=': 0, - ']': 0, - '||': 1, - '&&': 2, - '|': 3, - '^': 4, - '&': 5, - '==': 6, - '!=': 6, - '===': 6, - '!==': 6, - '<': 7, - '>': 7, - '<=': 7, - '>=': 7, - '<<': 8, - '>>': 8, - '>>>': 8, - '+': 9, - '-': 9, - '*': 11, - '/': 11, - '%': 11 - }; - this.lookahead = { - type: 2 , - value: '', - lineNumber: this.scanner.lineNumber, - lineStart: 0, - start: 0, - end: 0 - }; - this.hasLineTerminator = false; - this.context = { - isModule: false, - await: false, - allowIn: true, - allowStrictDirective: true, - allowYield: true, - firstCoverInitializedNameError: null, - isAssignmentTarget: false, - isBindingElement: false, - inFunctionBody: false, - inIteration: false, - inSwitch: false, - labelSet: {}, - strict: false - }; - this.tokens = []; - this.startMarker = { - index: 0, - line: this.scanner.lineNumber, - column: 0 - }; - this.lastMarker = { - index: 0, - line: this.scanner.lineNumber, - column: 0 - }; - this.nextToken(); - this.lastMarker = { - index: this.scanner.index, - line: this.scanner.lineNumber, - column: this.scanner.index - this.scanner.lineStart - }; - } - Parser.prototype.throwError = function (messageFormat) { - var args = Array.prototype.slice.call(arguments, 1); - var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { - assert_1.assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - }); - var index = this.lastMarker.index; - var line = this.lastMarker.line; - var column = this.lastMarker.column + 1; - throw this.errorHandler.createError(index, line, column, msg); - }; - Parser.prototype.tolerateError = function (messageFormat) { - var args = Array.prototype.slice.call(arguments, 1); - var msg = messageFormat.replace(/%(\d)/g, function (whole, idx) { - assert_1.assert(idx < args.length, 'Message reference must be in range'); - return args[idx]; - }); - var index = this.lastMarker.index; - var line = this.scanner.lineNumber; - var column = this.lastMarker.column + 1; - this.errorHandler.tolerateError(index, line, column, msg); - }; - Parser.prototype.unexpectedTokenError = function (token, message) { - var msg = message || messages_1.Messages.UnexpectedToken; - var value; - if (token) { - if (!message) { - msg = (token.type === 2 ) ? messages_1.Messages.UnexpectedEOS : - (token.type === 3 ) ? messages_1.Messages.UnexpectedIdentifier : - (token.type === 6 ) ? messages_1.Messages.UnexpectedNumber : - (token.type === 8 ) ? messages_1.Messages.UnexpectedString : - (token.type === 10 ) ? messages_1.Messages.UnexpectedTemplate : - messages_1.Messages.UnexpectedToken; - if (token.type === 4 ) { - if (this.scanner.isFutureReservedWord(token.value)) { - msg = messages_1.Messages.UnexpectedReserved; - } - else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) { - msg = messages_1.Messages.StrictReservedWord; - } - } - } - value = token.value; - } - else { - value = 'ILLEGAL'; - } - msg = msg.replace('%0', value); - if (token && typeof token.lineNumber === 'number') { - var index = token.start; - var line = token.lineNumber; - var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column; - var column = token.start - lastMarkerLineStart + 1; - return this.errorHandler.createError(index, line, column, msg); - } - else { - var index = this.lastMarker.index; - var line = this.lastMarker.line; - var column = this.lastMarker.column + 1; - return this.errorHandler.createError(index, line, column, msg); - } - }; - Parser.prototype.throwUnexpectedToken = function (token, message) { - throw this.unexpectedTokenError(token, message); - }; - Parser.prototype.tolerateUnexpectedToken = function (token, message) { - this.errorHandler.tolerate(this.unexpectedTokenError(token, message)); - }; - Parser.prototype.collectComments = function () { - if (!this.config.comment) { - this.scanner.scanComments(); - } - else { - var comments = this.scanner.scanComments(); - if (comments.length > 0 && this.delegate) { - for (var i = 0; i < comments.length; ++i) { - var e = comments[i]; - var node = void 0; - node = { - type: e.multiLine ? 'BlockComment' : 'LineComment', - value: this.scanner.source.slice(e.slice[0], e.slice[1]) - }; - if (this.config.range) { - node.range = e.range; - } - if (this.config.loc) { - node.loc = e.loc; - } - var metadata = { - start: { - line: e.loc.start.line, - column: e.loc.start.column, - offset: e.range[0] - }, - end: { - line: e.loc.end.line, - column: e.loc.end.column, - offset: e.range[1] - } - }; - this.delegate(node, metadata); - } - } - } - }; - Parser.prototype.getTokenRaw = function (token) { - return this.scanner.source.slice(token.start, token.end); - }; - Parser.prototype.convertToken = function (token) { - var t = { - type: token_1.TokenName[token.type], - value: this.getTokenRaw(token) - }; - if (this.config.range) { - t.range = [token.start, token.end]; - } - if (this.config.loc) { - t.loc = { - start: { - line: this.startMarker.line, - column: this.startMarker.column - }, - end: { - line: this.scanner.lineNumber, - column: this.scanner.index - this.scanner.lineStart - } - }; - } - if (token.type === 9 ) { - var pattern = token.pattern; - var flags = token.flags; - t.regex = { pattern: pattern, flags: flags }; - } - return t; - }; - Parser.prototype.nextToken = function () { - var token = this.lookahead; - this.lastMarker.index = this.scanner.index; - this.lastMarker.line = this.scanner.lineNumber; - this.lastMarker.column = this.scanner.index - this.scanner.lineStart; - this.collectComments(); - if (this.scanner.index !== this.startMarker.index) { - this.startMarker.index = this.scanner.index; - this.startMarker.line = this.scanner.lineNumber; - this.startMarker.column = this.scanner.index - this.scanner.lineStart; - } - var next = this.scanner.lex(); - this.hasLineTerminator = (token.lineNumber !== next.lineNumber); - if (next && this.context.strict && next.type === 3 ) { - if (this.scanner.isStrictModeReservedWord(next.value)) { - next.type = 4 ; - } - } - this.lookahead = next; - if (this.config.tokens && next.type !== 2 ) { - this.tokens.push(this.convertToken(next)); - } - return token; - }; - Parser.prototype.nextRegexToken = function () { - this.collectComments(); - var token = this.scanner.scanRegExp(); - if (this.config.tokens) { - this.tokens.pop(); - this.tokens.push(this.convertToken(token)); - } - this.lookahead = token; - this.nextToken(); - return token; - }; - Parser.prototype.createNode = function () { - return { - index: this.startMarker.index, - line: this.startMarker.line, - column: this.startMarker.column - }; - }; - Parser.prototype.startNode = function (token, lastLineStart) { - if (lastLineStart === void 0) { lastLineStart = 0; } - var column = token.start - token.lineStart; - var line = token.lineNumber; - if (column < 0) { - column += lastLineStart; - line--; - } - return { - index: token.start, - line: line, - column: column - }; - }; - Parser.prototype.finalize = function (marker, node) { - if (this.config.range) { - node.range = [marker.index, this.lastMarker.index]; - } - if (this.config.loc) { - node.loc = { - start: { - line: marker.line, - column: marker.column, - }, - end: { - line: this.lastMarker.line, - column: this.lastMarker.column - } - }; - if (this.config.source) { - node.loc.source = this.config.source; - } - } - if (this.delegate) { - var metadata = { - start: { - line: marker.line, - column: marker.column, - offset: marker.index - }, - end: { - line: this.lastMarker.line, - column: this.lastMarker.column, - offset: this.lastMarker.index - } - }; - this.delegate(node, metadata); - } - return node; - }; - Parser.prototype.expect = function (value) { - var token = this.nextToken(); - if (token.type !== 7 || token.value !== value) { - this.throwUnexpectedToken(token); - } - }; - Parser.prototype.expectCommaSeparator = function () { - if (this.config.tolerant) { - var token = this.lookahead; - if (token.type === 7 && token.value === ',') { - this.nextToken(); - } - else if (token.type === 7 && token.value === ';') { - this.nextToken(); - this.tolerateUnexpectedToken(token); - } - else { - this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken); - } - } - else { - this.expect(','); - } - }; - Parser.prototype.expectKeyword = function (keyword) { - var token = this.nextToken(); - if (token.type !== 4 || token.value !== keyword) { - this.throwUnexpectedToken(token); - } - }; - Parser.prototype.match = function (value) { - return this.lookahead.type === 7 && this.lookahead.value === value; - }; - Parser.prototype.matchKeyword = function (keyword) { - return this.lookahead.type === 4 && this.lookahead.value === keyword; - }; - Parser.prototype.matchContextualKeyword = function (keyword) { - return this.lookahead.type === 3 && this.lookahead.value === keyword; - }; - Parser.prototype.matchAssign = function () { - if (this.lookahead.type !== 7 ) { - return false; - } - var op = this.lookahead.value; - return op === '=' || - op === '*=' || - op === '**=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - }; - Parser.prototype.isolateCoverGrammar = function (parseFunction) { - var previousIsBindingElement = this.context.isBindingElement; - var previousIsAssignmentTarget = this.context.isAssignmentTarget; - var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; - this.context.isBindingElement = true; - this.context.isAssignmentTarget = true; - this.context.firstCoverInitializedNameError = null; - var result = parseFunction.call(this); - if (this.context.firstCoverInitializedNameError !== null) { - this.throwUnexpectedToken(this.context.firstCoverInitializedNameError); - } - this.context.isBindingElement = previousIsBindingElement; - this.context.isAssignmentTarget = previousIsAssignmentTarget; - this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError; - return result; - }; - Parser.prototype.inheritCoverGrammar = function (parseFunction) { - var previousIsBindingElement = this.context.isBindingElement; - var previousIsAssignmentTarget = this.context.isAssignmentTarget; - var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; - this.context.isBindingElement = true; - this.context.isAssignmentTarget = true; - this.context.firstCoverInitializedNameError = null; - var result = parseFunction.call(this); - this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement; - this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget; - this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError; - return result; - }; - Parser.prototype.consumeSemicolon = function () { - if (this.match(';')) { - this.nextToken(); - } - else if (!this.hasLineTerminator) { - if (this.lookahead.type !== 2 && !this.match('}')) { - this.throwUnexpectedToken(this.lookahead); - } - this.lastMarker.index = this.startMarker.index; - this.lastMarker.line = this.startMarker.line; - this.lastMarker.column = this.startMarker.column; - } - }; - Parser.prototype.parsePrimaryExpression = function () { - var node = this.createNode(); - var expr; - var token, raw; - switch (this.lookahead.type) { - case 3 : - if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') { - this.tolerateUnexpectedToken(this.lookahead); - } - expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); - break; - case 6 : - case 8 : - if (this.context.strict && this.lookahead.octal) { - this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral); - } - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - token = this.nextToken(); - raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node.Literal(token.value, raw)); - break; - case 1 : - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - token = this.nextToken(); - raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node.Literal(token.value === 'true', raw)); - break; - case 5 : - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - token = this.nextToken(); - raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node.Literal(null, raw)); - break; - case 10 : - expr = this.parseTemplateLiteral(); - break; - case 7 : - switch (this.lookahead.value) { - case '(': - this.context.isBindingElement = false; - expr = this.inheritCoverGrammar(this.parseGroupExpression); - break; - case '[': - expr = this.inheritCoverGrammar(this.parseArrayInitializer); - break; - case '{': - expr = this.inheritCoverGrammar(this.parseObjectInitializer); - break; - case '/': - case '/=': - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - this.scanner.index = this.startMarker.index; - token = this.nextRegexToken(); - raw = this.getTokenRaw(token); - expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags)); - break; - default: - expr = this.throwUnexpectedToken(this.nextToken()); - } - break; - case 4 : - if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) { - expr = this.parseIdentifierName(); - } - else if (!this.context.strict && this.matchKeyword('let')) { - expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); - } - else { - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - if (this.matchKeyword('function')) { - expr = this.parseFunctionExpression(); - } - else if (this.matchKeyword('this')) { - this.nextToken(); - expr = this.finalize(node, new Node.ThisExpression()); - } - else if (this.matchKeyword('class')) { - expr = this.parseClassExpression(); - } - else { - expr = this.throwUnexpectedToken(this.nextToken()); - } - } - break; - default: - expr = this.throwUnexpectedToken(this.nextToken()); - } - return expr; - }; - Parser.prototype.parseSpreadElement = function () { - var node = this.createNode(); - this.expect('...'); - var arg = this.inheritCoverGrammar(this.parseAssignmentExpression); - return this.finalize(node, new Node.SpreadElement(arg)); - }; - Parser.prototype.parseArrayInitializer = function () { - var node = this.createNode(); - var elements = []; - this.expect('['); - while (!this.match(']')) { - if (this.match(',')) { - this.nextToken(); - elements.push(null); - } - else if (this.match('...')) { - var element = this.parseSpreadElement(); - if (!this.match(']')) { - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - this.expect(','); - } - elements.push(element); - } - else { - elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); - if (!this.match(']')) { - this.expect(','); - } - } - } - this.expect(']'); - return this.finalize(node, new Node.ArrayExpression(elements)); - }; - Parser.prototype.parsePropertyMethod = function (params) { - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - var previousStrict = this.context.strict; - var previousAllowStrictDirective = this.context.allowStrictDirective; - this.context.allowStrictDirective = params.simple; - var body = this.isolateCoverGrammar(this.parseFunctionSourceElements); - if (this.context.strict && params.firstRestricted) { - this.tolerateUnexpectedToken(params.firstRestricted, params.message); - } - if (this.context.strict && params.stricted) { - this.tolerateUnexpectedToken(params.stricted, params.message); - } - this.context.strict = previousStrict; - this.context.allowStrictDirective = previousAllowStrictDirective; - return body; - }; - Parser.prototype.parsePropertyMethodFunction = function () { - var isGenerator = false; - var node = this.createNode(); - var previousAllowYield = this.context.allowYield; - this.context.allowYield = true; - var params = this.parseFormalParameters(); - var method = this.parsePropertyMethod(params); - this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); - }; - Parser.prototype.parsePropertyMethodAsyncFunction = function () { - var node = this.createNode(); - var previousAllowYield = this.context.allowYield; - var previousAwait = this.context.await; - this.context.allowYield = false; - this.context.await = true; - var params = this.parseFormalParameters(); - var method = this.parsePropertyMethod(params); - this.context.allowYield = previousAllowYield; - this.context.await = previousAwait; - return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); - }; - Parser.prototype.parseObjectPropertyKey = function () { - var node = this.createNode(); - var token = this.nextToken(); - var key; - switch (token.type) { - case 8 : - case 6 : - if (this.context.strict && token.octal) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral); - } - var raw = this.getTokenRaw(token); - key = this.finalize(node, new Node.Literal(token.value, raw)); - break; - case 3 : - case 1 : - case 5 : - case 4 : - key = this.finalize(node, new Node.Identifier(token.value)); - break; - case 7 : - if (token.value === '[') { - key = this.isolateCoverGrammar(this.parseAssignmentExpression); - this.expect(']'); - } - else { - key = this.throwUnexpectedToken(token); - } - break; - default: - key = this.throwUnexpectedToken(token); - } - return key; - }; - Parser.prototype.isPropertyKey = function (key, value) { - return (key.type === syntax_1.Syntax.Identifier && key.name === value) || - (key.type === syntax_1.Syntax.Literal && key.value === value); - }; - Parser.prototype.parseObjectProperty = function (hasProto) { - var node = this.createNode(); - var token = this.lookahead; - var kind; - var key = null; - var value = null; - var computed = false; - var method = false; - var shorthand = false; - var isAsync = false; - if (token.type === 3 ) { - var id = token.value; - this.nextToken(); - computed = this.match('['); - isAsync = !this.hasLineTerminator && (id === 'async') && - !this.match(':') && !this.match('(') && !this.match('*') && !this.match(','); - key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); - } - else if (this.match('*')) { - this.nextToken(); - } - else { - computed = this.match('['); - key = this.parseObjectPropertyKey(); - } - var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); - if (token.type === 3 && !isAsync && token.value === 'get' && lookaheadPropertyKey) { - kind = 'get'; - computed = this.match('['); - key = this.parseObjectPropertyKey(); - this.context.allowYield = false; - value = this.parseGetterMethod(); - } - else if (token.type === 3 && !isAsync && token.value === 'set' && lookaheadPropertyKey) { - kind = 'set'; - computed = this.match('['); - key = this.parseObjectPropertyKey(); - value = this.parseSetterMethod(); - } - else if (token.type === 7 && token.value === '*' && lookaheadPropertyKey) { - kind = 'init'; - computed = this.match('['); - key = this.parseObjectPropertyKey(); - value = this.parseGeneratorMethod(); - method = true; - } - else { - if (!key) { - this.throwUnexpectedToken(this.lookahead); - } - kind = 'init'; - if (this.match(':') && !isAsync) { - if (!computed && this.isPropertyKey(key, '__proto__')) { - if (hasProto.value) { - this.tolerateError(messages_1.Messages.DuplicateProtoProperty); - } - hasProto.value = true; - } - this.nextToken(); - value = this.inheritCoverGrammar(this.parseAssignmentExpression); - } - else if (this.match('(')) { - value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); - method = true; - } - else if (token.type === 3 ) { - var id = this.finalize(node, new Node.Identifier(token.value)); - if (this.match('=')) { - this.context.firstCoverInitializedNameError = this.lookahead; - this.nextToken(); - shorthand = true; - var init = this.isolateCoverGrammar(this.parseAssignmentExpression); - value = this.finalize(node, new Node.AssignmentPattern(id, init)); - } - else { - shorthand = true; - value = id; - } - } - else { - this.throwUnexpectedToken(this.nextToken()); - } - } - return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand)); - }; - Parser.prototype.parseObjectInitializer = function () { - var node = this.createNode(); - this.expect('{'); - var properties = []; - var hasProto = { value: false }; - while (!this.match('}')) { - properties.push(this.parseObjectProperty(hasProto)); - if (!this.match('}')) { - this.expectCommaSeparator(); - } - } - this.expect('}'); - return this.finalize(node, new Node.ObjectExpression(properties)); - }; - Parser.prototype.parseTemplateHead = function () { - assert_1.assert(this.lookahead.head, 'Template literal must start with a template head'); - var node = this.createNode(); - var token = this.nextToken(); - var raw = token.value; - var cooked = token.cooked; - return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); - }; - Parser.prototype.parseTemplateElement = function () { - if (this.lookahead.type !== 10 ) { - this.throwUnexpectedToken(); - } - var node = this.createNode(); - var token = this.nextToken(); - var raw = token.value; - var cooked = token.cooked; - return this.finalize(node, new Node.TemplateElement({ raw: raw, cooked: cooked }, token.tail)); - }; - Parser.prototype.parseTemplateLiteral = function () { - var node = this.createNode(); - var expressions = []; - var quasis = []; - var quasi = this.parseTemplateHead(); - quasis.push(quasi); - while (!quasi.tail) { - expressions.push(this.parseExpression()); - quasi = this.parseTemplateElement(); - quasis.push(quasi); - } - return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); - }; - Parser.prototype.reinterpretExpressionAsPattern = function (expr) { - switch (expr.type) { - case syntax_1.Syntax.Identifier: - case syntax_1.Syntax.MemberExpression: - case syntax_1.Syntax.RestElement: - case syntax_1.Syntax.AssignmentPattern: - break; - case syntax_1.Syntax.SpreadElement: - expr.type = syntax_1.Syntax.RestElement; - this.reinterpretExpressionAsPattern(expr.argument); - break; - case syntax_1.Syntax.ArrayExpression: - expr.type = syntax_1.Syntax.ArrayPattern; - for (var i = 0; i < expr.elements.length; i++) { - if (expr.elements[i] !== null) { - this.reinterpretExpressionAsPattern(expr.elements[i]); - } - } - break; - case syntax_1.Syntax.ObjectExpression: - expr.type = syntax_1.Syntax.ObjectPattern; - for (var i = 0; i < expr.properties.length; i++) { - this.reinterpretExpressionAsPattern(expr.properties[i].value); - } - break; - case syntax_1.Syntax.AssignmentExpression: - expr.type = syntax_1.Syntax.AssignmentPattern; - delete expr.operator; - this.reinterpretExpressionAsPattern(expr.left); - break; - } - }; - Parser.prototype.parseGroupExpression = function () { - var expr; - this.expect('('); - if (this.match(')')) { - this.nextToken(); - if (!this.match('=>')) { - this.expect('=>'); - } - expr = { - type: ArrowParameterPlaceHolder, - params: [], - async: false - }; - } - else { - var startToken = this.lookahead; - var params = []; - if (this.match('...')) { - expr = this.parseRestElement(params); - this.expect(')'); - if (!this.match('=>')) { - this.expect('=>'); - } - expr = { - type: ArrowParameterPlaceHolder, - params: [expr], - async: false - }; - } - else { - var arrow = false; - this.context.isBindingElement = true; - expr = this.inheritCoverGrammar(this.parseAssignmentExpression); - if (this.match(',')) { - var expressions = []; - this.context.isAssignmentTarget = false; - expressions.push(expr); - while (this.lookahead.type !== 2 ) { - if (!this.match(',')) { - break; - } - this.nextToken(); - if (this.match(')')) { - this.nextToken(); - for (var i = 0; i < expressions.length; i++) { - this.reinterpretExpressionAsPattern(expressions[i]); - } - arrow = true; - expr = { - type: ArrowParameterPlaceHolder, - params: expressions, - async: false - }; - } - else if (this.match('...')) { - if (!this.context.isBindingElement) { - this.throwUnexpectedToken(this.lookahead); - } - expressions.push(this.parseRestElement(params)); - this.expect(')'); - if (!this.match('=>')) { - this.expect('=>'); - } - this.context.isBindingElement = false; - for (var i = 0; i < expressions.length; i++) { - this.reinterpretExpressionAsPattern(expressions[i]); - } - arrow = true; - expr = { - type: ArrowParameterPlaceHolder, - params: expressions, - async: false - }; - } - else { - expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); - } - if (arrow) { - break; - } - } - if (!arrow) { - expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); - } - } - if (!arrow) { - this.expect(')'); - if (this.match('=>')) { - if (expr.type === syntax_1.Syntax.Identifier && expr.name === 'yield') { - arrow = true; - expr = { - type: ArrowParameterPlaceHolder, - params: [expr], - async: false - }; - } - if (!arrow) { - if (!this.context.isBindingElement) { - this.throwUnexpectedToken(this.lookahead); - } - if (expr.type === syntax_1.Syntax.SequenceExpression) { - for (var i = 0; i < expr.expressions.length; i++) { - this.reinterpretExpressionAsPattern(expr.expressions[i]); - } - } - else { - this.reinterpretExpressionAsPattern(expr); - } - var parameters = (expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr]); - expr = { - type: ArrowParameterPlaceHolder, - params: parameters, - async: false - }; - } - } - this.context.isBindingElement = false; - } - } - } - return expr; - }; - Parser.prototype.parseArguments = function () { - this.expect('('); - var args = []; - if (!this.match(')')) { - while (true) { - var expr = this.match('...') ? this.parseSpreadElement() : - this.isolateCoverGrammar(this.parseAssignmentExpression); - args.push(expr); - if (this.match(')')) { - break; - } - this.expectCommaSeparator(); - if (this.match(')')) { - break; - } - } - } - this.expect(')'); - return args; - }; - Parser.prototype.isIdentifierName = function (token) { - return token.type === 3 || - token.type === 4 || - token.type === 1 || - token.type === 5 ; - }; - Parser.prototype.parseIdentifierName = function () { - var node = this.createNode(); - var token = this.nextToken(); - if (!this.isIdentifierName(token)) { - this.throwUnexpectedToken(token); - } - return this.finalize(node, new Node.Identifier(token.value)); - }; - Parser.prototype.parseNewExpression = function () { - var node = this.createNode(); - var id = this.parseIdentifierName(); - assert_1.assert(id.name === 'new', 'New expression must start with `new`'); - var expr; - if (this.match('.')) { - this.nextToken(); - if (this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === 'target') { - var property = this.parseIdentifierName(); - expr = new Node.MetaProperty(id, property); - } - else { - this.throwUnexpectedToken(this.lookahead); - } - } - else { - var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); - var args = this.match('(') ? this.parseArguments() : []; - expr = new Node.NewExpression(callee, args); - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - } - return this.finalize(node, expr); - }; - Parser.prototype.parseAsyncArgument = function () { - var arg = this.parseAssignmentExpression(); - this.context.firstCoverInitializedNameError = null; - return arg; - }; - Parser.prototype.parseAsyncArguments = function () { - this.expect('('); - var args = []; - if (!this.match(')')) { - while (true) { - var expr = this.match('...') ? this.parseSpreadElement() : - this.isolateCoverGrammar(this.parseAsyncArgument); - args.push(expr); - if (this.match(')')) { - break; - } - this.expectCommaSeparator(); - if (this.match(')')) { - break; - } - } - } - this.expect(')'); - return args; - }; - Parser.prototype.parseLeftHandSideExpressionAllowCall = function () { - var startToken = this.lookahead; - var maybeAsync = this.matchContextualKeyword('async'); - var previousAllowIn = this.context.allowIn; - this.context.allowIn = true; - var expr; - if (this.matchKeyword('super') && this.context.inFunctionBody) { - expr = this.createNode(); - this.nextToken(); - expr = this.finalize(expr, new Node.Super()); - if (!this.match('(') && !this.match('.') && !this.match('[')) { - this.throwUnexpectedToken(this.lookahead); - } - } - else { - expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); - } - while (true) { - if (this.match('.')) { - this.context.isBindingElement = false; - this.context.isAssignmentTarget = true; - this.expect('.'); - var property = this.parseIdentifierName(); - expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); - } - else if (this.match('(')) { - var asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber); - this.context.isBindingElement = false; - this.context.isAssignmentTarget = false; - var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); - expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); - if (asyncArrow && this.match('=>')) { - for (var i = 0; i < args.length; ++i) { - this.reinterpretExpressionAsPattern(args[i]); - } - expr = { - type: ArrowParameterPlaceHolder, - params: args, - async: true - }; - } - } - else if (this.match('[')) { - this.context.isBindingElement = false; - this.context.isAssignmentTarget = true; - this.expect('['); - var property = this.isolateCoverGrammar(this.parseExpression); - this.expect(']'); - expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); - } - else if (this.lookahead.type === 10 && this.lookahead.head) { - var quasi = this.parseTemplateLiteral(); - expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); - } - else { - break; - } - } - this.context.allowIn = previousAllowIn; - return expr; - }; - Parser.prototype.parseSuper = function () { - var node = this.createNode(); - this.expectKeyword('super'); - if (!this.match('[') && !this.match('.')) { - this.throwUnexpectedToken(this.lookahead); - } - return this.finalize(node, new Node.Super()); - }; - Parser.prototype.parseLeftHandSideExpression = function () { - assert_1.assert(this.context.allowIn, 'callee of new expression always allow in keyword.'); - var node = this.startNode(this.lookahead); - var expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() : - this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); - while (true) { - if (this.match('[')) { - this.context.isBindingElement = false; - this.context.isAssignmentTarget = true; - this.expect('['); - var property = this.isolateCoverGrammar(this.parseExpression); - this.expect(']'); - expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); - } - else if (this.match('.')) { - this.context.isBindingElement = false; - this.context.isAssignmentTarget = true; - this.expect('.'); - var property = this.parseIdentifierName(); - expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); - } - else if (this.lookahead.type === 10 && this.lookahead.head) { - var quasi = this.parseTemplateLiteral(); - expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); - } - else { - break; - } - } - return expr; - }; - Parser.prototype.parseUpdateExpression = function () { - var expr; - var startToken = this.lookahead; - if (this.match('++') || this.match('--')) { - var node = this.startNode(startToken); - var token = this.nextToken(); - expr = this.inheritCoverGrammar(this.parseUnaryExpression); - if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { - this.tolerateError(messages_1.Messages.StrictLHSPrefix); - } - if (!this.context.isAssignmentTarget) { - this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); - } - var prefix = true; - expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - } - else { - expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall); - if (!this.hasLineTerminator && this.lookahead.type === 7 ) { - if (this.match('++') || this.match('--')) { - if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { - this.tolerateError(messages_1.Messages.StrictLHSPostfix); - } - if (!this.context.isAssignmentTarget) { - this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); - } - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - var operator = this.nextToken().value; - var prefix = false; - expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); - } - } - } - return expr; - }; - Parser.prototype.parseAwaitExpression = function () { - var node = this.createNode(); - this.nextToken(); - var argument = this.parseUnaryExpression(); - return this.finalize(node, new Node.AwaitExpression(argument)); - }; - Parser.prototype.parseUnaryExpression = function () { - var expr; - if (this.match('+') || this.match('-') || this.match('~') || this.match('!') || - this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) { - var node = this.startNode(this.lookahead); - var token = this.nextToken(); - expr = this.inheritCoverGrammar(this.parseUnaryExpression); - expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); - if (this.context.strict && expr.operator === 'delete' && expr.argument.type === syntax_1.Syntax.Identifier) { - this.tolerateError(messages_1.Messages.StrictDelete); - } - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - } - else if (this.context.await && this.matchContextualKeyword('await')) { - expr = this.parseAwaitExpression(); - } - else { - expr = this.parseUpdateExpression(); - } - return expr; - }; - Parser.prototype.parseExponentiationExpression = function () { - var startToken = this.lookahead; - var expr = this.inheritCoverGrammar(this.parseUnaryExpression); - if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match('**')) { - this.nextToken(); - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - var left = expr; - var right = this.isolateCoverGrammar(this.parseExponentiationExpression); - expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right)); - } - return expr; - }; - Parser.prototype.binaryPrecedence = function (token) { - var op = token.value; - var precedence; - if (token.type === 7 ) { - precedence = this.operatorPrecedence[op] || 0; - } - else if (token.type === 4 ) { - precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0; - } - else { - precedence = 0; - } - return precedence; - }; - Parser.prototype.parseBinaryExpression = function () { - var startToken = this.lookahead; - var expr = this.inheritCoverGrammar(this.parseExponentiationExpression); - var token = this.lookahead; - var prec = this.binaryPrecedence(token); - if (prec > 0) { - this.nextToken(); - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - var markers = [startToken, this.lookahead]; - var left = expr; - var right = this.isolateCoverGrammar(this.parseExponentiationExpression); - var stack = [left, token.value, right]; - var precedences = [prec]; - while (true) { - prec = this.binaryPrecedence(this.lookahead); - if (prec <= 0) { - break; - } - while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) { - right = stack.pop(); - var operator = stack.pop(); - precedences.pop(); - left = stack.pop(); - markers.pop(); - var node = this.startNode(markers[markers.length - 1]); - stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); - } - stack.push(this.nextToken().value); - precedences.push(prec); - markers.push(this.lookahead); - stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); - } - var i = stack.length - 1; - expr = stack[i]; - var lastMarker = markers.pop(); - while (i > 1) { - var marker = markers.pop(); - var lastLineStart = lastMarker && lastMarker.lineStart; - var node = this.startNode(marker, lastLineStart); - var operator = stack[i - 1]; - expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); - i -= 2; - lastMarker = marker; - } - } - return expr; - }; - Parser.prototype.parseConditionalExpression = function () { - var startToken = this.lookahead; - var expr = this.inheritCoverGrammar(this.parseBinaryExpression); - if (this.match('?')) { - this.nextToken(); - var previousAllowIn = this.context.allowIn; - this.context.allowIn = true; - var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression); - this.context.allowIn = previousAllowIn; - this.expect(':'); - var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); - expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - } - return expr; - }; - Parser.prototype.checkPatternParam = function (options, param) { - switch (param.type) { - case syntax_1.Syntax.Identifier: - this.validateParam(options, param, param.name); - break; - case syntax_1.Syntax.RestElement: - this.checkPatternParam(options, param.argument); - break; - case syntax_1.Syntax.AssignmentPattern: - this.checkPatternParam(options, param.left); - break; - case syntax_1.Syntax.ArrayPattern: - for (var i = 0; i < param.elements.length; i++) { - if (param.elements[i] !== null) { - this.checkPatternParam(options, param.elements[i]); - } - } - break; - case syntax_1.Syntax.ObjectPattern: - for (var i = 0; i < param.properties.length; i++) { - this.checkPatternParam(options, param.properties[i].value); - } - break; - } - options.simple = options.simple && (param instanceof Node.Identifier); - }; - Parser.prototype.reinterpretAsCoverFormalsList = function (expr) { - var params = [expr]; - var options; - var asyncArrow = false; - switch (expr.type) { - case syntax_1.Syntax.Identifier: - break; - case ArrowParameterPlaceHolder: - params = expr.params; - asyncArrow = expr.async; - break; - default: - return null; - } - options = { - simple: true, - paramSet: {} - }; - for (var i = 0; i < params.length; ++i) { - var param = params[i]; - if (param.type === syntax_1.Syntax.AssignmentPattern) { - if (param.right.type === syntax_1.Syntax.YieldExpression) { - if (param.right.argument) { - this.throwUnexpectedToken(this.lookahead); - } - param.right.type = syntax_1.Syntax.Identifier; - param.right.name = 'yield'; - delete param.right.argument; - delete param.right.delegate; - } - } - else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === 'await') { - this.throwUnexpectedToken(this.lookahead); - } - this.checkPatternParam(options, param); - params[i] = param; - } - if (this.context.strict || !this.context.allowYield) { - for (var i = 0; i < params.length; ++i) { - var param = params[i]; - if (param.type === syntax_1.Syntax.YieldExpression) { - this.throwUnexpectedToken(this.lookahead); - } - } - } - if (options.message === messages_1.Messages.StrictParamDupe) { - var token = this.context.strict ? options.stricted : options.firstRestricted; - this.throwUnexpectedToken(token, options.message); - } - return { - simple: options.simple, - params: params, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; - }; - Parser.prototype.parseAssignmentExpression = function () { - var expr; - if (!this.context.allowYield && this.matchKeyword('yield')) { - expr = this.parseYieldExpression(); - } - else { - var startToken = this.lookahead; - var token = startToken; - expr = this.parseConditionalExpression(); - if (token.type === 3 && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') { - if (this.lookahead.type === 3 || this.matchKeyword('yield')) { - var arg = this.parsePrimaryExpression(); - this.reinterpretExpressionAsPattern(arg); - expr = { - type: ArrowParameterPlaceHolder, - params: [arg], - async: true - }; - } - } - if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) { - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - var isAsync = expr.async; - var list = this.reinterpretAsCoverFormalsList(expr); - if (list) { - if (this.hasLineTerminator) { - this.tolerateUnexpectedToken(this.lookahead); - } - this.context.firstCoverInitializedNameError = null; - var previousStrict = this.context.strict; - var previousAllowStrictDirective = this.context.allowStrictDirective; - this.context.allowStrictDirective = list.simple; - var previousAllowYield = this.context.allowYield; - var previousAwait = this.context.await; - this.context.allowYield = true; - this.context.await = isAsync; - var node = this.startNode(startToken); - this.expect('=>'); - var body = void 0; - if (this.match('{')) { - var previousAllowIn = this.context.allowIn; - this.context.allowIn = true; - body = this.parseFunctionSourceElements(); - this.context.allowIn = previousAllowIn; - } - else { - body = this.isolateCoverGrammar(this.parseAssignmentExpression); - } - var expression = body.type !== syntax_1.Syntax.BlockStatement; - if (this.context.strict && list.firstRestricted) { - this.throwUnexpectedToken(list.firstRestricted, list.message); - } - if (this.context.strict && list.stricted) { - this.tolerateUnexpectedToken(list.stricted, list.message); - } - expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : - this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); - this.context.strict = previousStrict; - this.context.allowStrictDirective = previousAllowStrictDirective; - this.context.allowYield = previousAllowYield; - this.context.await = previousAwait; - } - } - else { - if (this.matchAssign()) { - if (!this.context.isAssignmentTarget) { - this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); - } - if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) { - var id = expr; - if (this.scanner.isRestrictedWord(id.name)) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment); - } - if (this.scanner.isStrictModeReservedWord(id.name)) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); - } - } - if (!this.match('=')) { - this.context.isAssignmentTarget = false; - this.context.isBindingElement = false; - } - else { - this.reinterpretExpressionAsPattern(expr); - } - token = this.nextToken(); - var operator = token.value; - var right = this.isolateCoverGrammar(this.parseAssignmentExpression); - expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); - this.context.firstCoverInitializedNameError = null; - } - } - } - return expr; - }; - Parser.prototype.parseExpression = function () { - var startToken = this.lookahead; - var expr = this.isolateCoverGrammar(this.parseAssignmentExpression); - if (this.match(',')) { - var expressions = []; - expressions.push(expr); - while (this.lookahead.type !== 2 ) { - if (!this.match(',')) { - break; - } - this.nextToken(); - expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); - } - expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); - } - return expr; - }; - Parser.prototype.parseStatementListItem = function () { - var statement; - this.context.isAssignmentTarget = true; - this.context.isBindingElement = true; - if (this.lookahead.type === 4 ) { - switch (this.lookahead.value) { - case 'export': - if (!this.context.isModule) { - this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration); - } - statement = this.parseExportDeclaration(); - break; - case 'import': - if (!this.context.isModule) { - this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration); - } - statement = this.parseImportDeclaration(); - break; - case 'const': - statement = this.parseLexicalDeclaration({ inFor: false }); - break; - case 'function': - statement = this.parseFunctionDeclaration(); - break; - case 'class': - statement = this.parseClassDeclaration(); - break; - case 'let': - statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement(); - break; - default: - statement = this.parseStatement(); - break; - } - } - else { - statement = this.parseStatement(); - } - return statement; - }; - Parser.prototype.parseBlock = function () { - var node = this.createNode(); - this.expect('{'); - var block = []; - while (true) { - if (this.match('}')) { - break; - } - block.push(this.parseStatementListItem()); - } - this.expect('}'); - return this.finalize(node, new Node.BlockStatement(block)); - }; - Parser.prototype.parseLexicalBinding = function (kind, options) { - var node = this.createNode(); - var params = []; - var id = this.parsePattern(params, kind); - if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { - if (this.scanner.isRestrictedWord(id.name)) { - this.tolerateError(messages_1.Messages.StrictVarName); - } - } - var init = null; - if (kind === 'const') { - if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) { - if (this.match('=')) { - this.nextToken(); - init = this.isolateCoverGrammar(this.parseAssignmentExpression); - } - else { - this.throwError(messages_1.Messages.DeclarationMissingInitializer, 'const'); - } - } - } - else if ((!options.inFor && id.type !== syntax_1.Syntax.Identifier) || this.match('=')) { - this.expect('='); - init = this.isolateCoverGrammar(this.parseAssignmentExpression); - } - return this.finalize(node, new Node.VariableDeclarator(id, init)); - }; - Parser.prototype.parseBindingList = function (kind, options) { - var list = [this.parseLexicalBinding(kind, options)]; - while (this.match(',')) { - this.nextToken(); - list.push(this.parseLexicalBinding(kind, options)); - } - return list; - }; - Parser.prototype.isLexicalDeclaration = function () { - var state = this.scanner.saveState(); - this.scanner.scanComments(); - var next = this.scanner.lex(); - this.scanner.restoreState(state); - return (next.type === 3 ) || - (next.type === 7 && next.value === '[') || - (next.type === 7 && next.value === '{') || - (next.type === 4 && next.value === 'let') || - (next.type === 4 && next.value === 'yield'); - }; - Parser.prototype.parseLexicalDeclaration = function (options) { - var node = this.createNode(); - var kind = this.nextToken().value; - assert_1.assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); - var declarations = this.parseBindingList(kind, options); - this.consumeSemicolon(); - return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); - }; - Parser.prototype.parseBindingRestElement = function (params, kind) { - var node = this.createNode(); - this.expect('...'); - var arg = this.parsePattern(params, kind); - return this.finalize(node, new Node.RestElement(arg)); - }; - Parser.prototype.parseArrayPattern = function (params, kind) { - var node = this.createNode(); - this.expect('['); - var elements = []; - while (!this.match(']')) { - if (this.match(',')) { - this.nextToken(); - elements.push(null); - } - else { - if (this.match('...')) { - elements.push(this.parseBindingRestElement(params, kind)); - break; - } - else { - elements.push(this.parsePatternWithDefault(params, kind)); - } - if (!this.match(']')) { - this.expect(','); - } - } - } - this.expect(']'); - return this.finalize(node, new Node.ArrayPattern(elements)); - }; - Parser.prototype.parsePropertyPattern = function (params, kind) { - var node = this.createNode(); - var computed = false; - var shorthand = false; - var method = false; - var key; - var value; - if (this.lookahead.type === 3 ) { - var keyToken = this.lookahead; - key = this.parseVariableIdentifier(); - var init = this.finalize(node, new Node.Identifier(keyToken.value)); - if (this.match('=')) { - params.push(keyToken); - shorthand = true; - this.nextToken(); - var expr = this.parseAssignmentExpression(); - value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); - } - else if (!this.match(':')) { - params.push(keyToken); - shorthand = true; - value = init; - } - else { - this.expect(':'); - value = this.parsePatternWithDefault(params, kind); - } - } - else { - computed = this.match('['); - key = this.parseObjectPropertyKey(); - this.expect(':'); - value = this.parsePatternWithDefault(params, kind); - } - return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand)); - }; - Parser.prototype.parseObjectPattern = function (params, kind) { - var node = this.createNode(); - var properties = []; - this.expect('{'); - while (!this.match('}')) { - properties.push(this.parsePropertyPattern(params, kind)); - if (!this.match('}')) { - this.expect(','); - } - } - this.expect('}'); - return this.finalize(node, new Node.ObjectPattern(properties)); - }; - Parser.prototype.parsePattern = function (params, kind) { - var pattern; - if (this.match('[')) { - pattern = this.parseArrayPattern(params, kind); - } - else if (this.match('{')) { - pattern = this.parseObjectPattern(params, kind); - } - else { - if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) { - this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding); - } - params.push(this.lookahead); - pattern = this.parseVariableIdentifier(kind); - } - return pattern; - }; - Parser.prototype.parsePatternWithDefault = function (params, kind) { - var startToken = this.lookahead; - var pattern = this.parsePattern(params, kind); - if (this.match('=')) { - this.nextToken(); - var previousAllowYield = this.context.allowYield; - this.context.allowYield = true; - var right = this.isolateCoverGrammar(this.parseAssignmentExpression); - this.context.allowYield = previousAllowYield; - pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); - } - return pattern; - }; - Parser.prototype.parseVariableIdentifier = function (kind) { - var node = this.createNode(); - var token = this.nextToken(); - if (token.type === 4 && token.value === 'yield') { - if (this.context.strict) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); - } - else if (!this.context.allowYield) { - this.throwUnexpectedToken(token); - } - } - else if (token.type !== 3 ) { - if (this.context.strict && token.type === 4 && this.scanner.isStrictModeReservedWord(token.value)) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); - } - else { - if (this.context.strict || token.value !== 'let' || kind !== 'var') { - this.throwUnexpectedToken(token); - } - } - } - else if ((this.context.isModule || this.context.await) && token.type === 3 && token.value === 'await') { - this.tolerateUnexpectedToken(token); - } - return this.finalize(node, new Node.Identifier(token.value)); - }; - Parser.prototype.parseVariableDeclaration = function (options) { - var node = this.createNode(); - var params = []; - var id = this.parsePattern(params, 'var'); - if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { - if (this.scanner.isRestrictedWord(id.name)) { - this.tolerateError(messages_1.Messages.StrictVarName); - } - } - var init = null; - if (this.match('=')) { - this.nextToken(); - init = this.isolateCoverGrammar(this.parseAssignmentExpression); - } - else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) { - this.expect('='); - } - return this.finalize(node, new Node.VariableDeclarator(id, init)); - }; - Parser.prototype.parseVariableDeclarationList = function (options) { - var opt = { inFor: options.inFor }; - var list = []; - list.push(this.parseVariableDeclaration(opt)); - while (this.match(',')) { - this.nextToken(); - list.push(this.parseVariableDeclaration(opt)); - } - return list; - }; - Parser.prototype.parseVariableStatement = function () { - var node = this.createNode(); - this.expectKeyword('var'); - var declarations = this.parseVariableDeclarationList({ inFor: false }); - this.consumeSemicolon(); - return this.finalize(node, new Node.VariableDeclaration(declarations, 'var')); - }; - Parser.prototype.parseEmptyStatement = function () { - var node = this.createNode(); - this.expect(';'); - return this.finalize(node, new Node.EmptyStatement()); - }; - Parser.prototype.parseExpressionStatement = function () { - var node = this.createNode(); - var expr = this.parseExpression(); - this.consumeSemicolon(); - return this.finalize(node, new Node.ExpressionStatement(expr)); - }; - Parser.prototype.parseIfClause = function () { - if (this.context.strict && this.matchKeyword('function')) { - this.tolerateError(messages_1.Messages.StrictFunction); - } - return this.parseStatement(); - }; - Parser.prototype.parseIfStatement = function () { - var node = this.createNode(); - var consequent; - var alternate = null; - this.expectKeyword('if'); - this.expect('('); - var test = this.parseExpression(); - if (!this.match(')') && this.config.tolerant) { - this.tolerateUnexpectedToken(this.nextToken()); - consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); - } - else { - this.expect(')'); - consequent = this.parseIfClause(); - if (this.matchKeyword('else')) { - this.nextToken(); - alternate = this.parseIfClause(); - } - } - return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); - }; - Parser.prototype.parseDoWhileStatement = function () { - var node = this.createNode(); - this.expectKeyword('do'); - var previousInIteration = this.context.inIteration; - this.context.inIteration = true; - var body = this.parseStatement(); - this.context.inIteration = previousInIteration; - this.expectKeyword('while'); - this.expect('('); - var test = this.parseExpression(); - if (!this.match(')') && this.config.tolerant) { - this.tolerateUnexpectedToken(this.nextToken()); - } - else { - this.expect(')'); - if (this.match(';')) { - this.nextToken(); - } - } - return this.finalize(node, new Node.DoWhileStatement(body, test)); - }; - Parser.prototype.parseWhileStatement = function () { - var node = this.createNode(); - var body; - this.expectKeyword('while'); - this.expect('('); - var test = this.parseExpression(); - if (!this.match(')') && this.config.tolerant) { - this.tolerateUnexpectedToken(this.nextToken()); - body = this.finalize(this.createNode(), new Node.EmptyStatement()); - } - else { - this.expect(')'); - var previousInIteration = this.context.inIteration; - this.context.inIteration = true; - body = this.parseStatement(); - this.context.inIteration = previousInIteration; - } - return this.finalize(node, new Node.WhileStatement(test, body)); - }; - Parser.prototype.parseForStatement = function () { - var init = null; - var test = null; - var update = null; - var forIn = true; - var left, right; - var node = this.createNode(); - this.expectKeyword('for'); - this.expect('('); - if (this.match(';')) { - this.nextToken(); - } - else { - if (this.matchKeyword('var')) { - init = this.createNode(); - this.nextToken(); - var previousAllowIn = this.context.allowIn; - this.context.allowIn = false; - var declarations = this.parseVariableDeclarationList({ inFor: true }); - this.context.allowIn = previousAllowIn; - if (declarations.length === 1 && this.matchKeyword('in')) { - var decl = declarations[0]; - if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) { - this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, 'for-in'); - } - init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); - this.nextToken(); - left = init; - right = this.parseExpression(); - init = null; - } - else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { - init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); - this.nextToken(); - left = init; - right = this.parseAssignmentExpression(); - init = null; - forIn = false; - } - else { - init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); - this.expect(';'); - } - } - else if (this.matchKeyword('const') || this.matchKeyword('let')) { - init = this.createNode(); - var kind = this.nextToken().value; - if (!this.context.strict && this.lookahead.value === 'in') { - init = this.finalize(init, new Node.Identifier(kind)); - this.nextToken(); - left = init; - right = this.parseExpression(); - init = null; - } - else { - var previousAllowIn = this.context.allowIn; - this.context.allowIn = false; - var declarations = this.parseBindingList(kind, { inFor: true }); - this.context.allowIn = previousAllowIn; - if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) { - init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); - this.nextToken(); - left = init; - right = this.parseExpression(); - init = null; - } - else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { - init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); - this.nextToken(); - left = init; - right = this.parseAssignmentExpression(); - init = null; - forIn = false; - } - else { - this.consumeSemicolon(); - init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); - } - } - } - else { - var initStartToken = this.lookahead; - var previousAllowIn = this.context.allowIn; - this.context.allowIn = false; - init = this.inheritCoverGrammar(this.parseAssignmentExpression); - this.context.allowIn = previousAllowIn; - if (this.matchKeyword('in')) { - if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { - this.tolerateError(messages_1.Messages.InvalidLHSInForIn); - } - this.nextToken(); - this.reinterpretExpressionAsPattern(init); - left = init; - right = this.parseExpression(); - init = null; - } - else if (this.matchContextualKeyword('of')) { - if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) { - this.tolerateError(messages_1.Messages.InvalidLHSInForLoop); - } - this.nextToken(); - this.reinterpretExpressionAsPattern(init); - left = init; - right = this.parseAssignmentExpression(); - init = null; - forIn = false; - } - else { - if (this.match(',')) { - var initSeq = [init]; - while (this.match(',')) { - this.nextToken(); - initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); - } - init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); - } - this.expect(';'); - } - } - } - if (typeof left === 'undefined') { - if (!this.match(';')) { - test = this.parseExpression(); - } - this.expect(';'); - if (!this.match(')')) { - update = this.parseExpression(); - } - } - var body; - if (!this.match(')') && this.config.tolerant) { - this.tolerateUnexpectedToken(this.nextToken()); - body = this.finalize(this.createNode(), new Node.EmptyStatement()); - } - else { - this.expect(')'); - var previousInIteration = this.context.inIteration; - this.context.inIteration = true; - body = this.isolateCoverGrammar(this.parseStatement); - this.context.inIteration = previousInIteration; - } - return (typeof left === 'undefined') ? - this.finalize(node, new Node.ForStatement(init, test, update, body)) : - forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : - this.finalize(node, new Node.ForOfStatement(left, right, body)); - }; - Parser.prototype.parseContinueStatement = function () { - var node = this.createNode(); - this.expectKeyword('continue'); - var label = null; - if (this.lookahead.type === 3 && !this.hasLineTerminator) { - var id = this.parseVariableIdentifier(); - label = id; - var key = '$' + id.name; - if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { - this.throwError(messages_1.Messages.UnknownLabel, id.name); - } - } - this.consumeSemicolon(); - if (label === null && !this.context.inIteration) { - this.throwError(messages_1.Messages.IllegalContinue); - } - return this.finalize(node, new Node.ContinueStatement(label)); - }; - Parser.prototype.parseBreakStatement = function () { - var node = this.createNode(); - this.expectKeyword('break'); - var label = null; - if (this.lookahead.type === 3 && !this.hasLineTerminator) { - var id = this.parseVariableIdentifier(); - var key = '$' + id.name; - if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { - this.throwError(messages_1.Messages.UnknownLabel, id.name); - } - label = id; - } - this.consumeSemicolon(); - if (label === null && !this.context.inIteration && !this.context.inSwitch) { - this.throwError(messages_1.Messages.IllegalBreak); - } - return this.finalize(node, new Node.BreakStatement(label)); - }; - Parser.prototype.parseReturnStatement = function () { - if (!this.context.inFunctionBody) { - this.tolerateError(messages_1.Messages.IllegalReturn); - } - var node = this.createNode(); - this.expectKeyword('return'); - var hasArgument = (!this.match(';') && !this.match('}') && - !this.hasLineTerminator && this.lookahead.type !== 2 ) || - this.lookahead.type === 8 || - this.lookahead.type === 10 ; - var argument = hasArgument ? this.parseExpression() : null; - this.consumeSemicolon(); - return this.finalize(node, new Node.ReturnStatement(argument)); - }; - Parser.prototype.parseWithStatement = function () { - if (this.context.strict) { - this.tolerateError(messages_1.Messages.StrictModeWith); - } - var node = this.createNode(); - var body; - this.expectKeyword('with'); - this.expect('('); - var object = this.parseExpression(); - if (!this.match(')') && this.config.tolerant) { - this.tolerateUnexpectedToken(this.nextToken()); - body = this.finalize(this.createNode(), new Node.EmptyStatement()); - } - else { - this.expect(')'); - body = this.parseStatement(); - } - return this.finalize(node, new Node.WithStatement(object, body)); - }; - Parser.prototype.parseSwitchCase = function () { - var node = this.createNode(); - var test; - if (this.matchKeyword('default')) { - this.nextToken(); - test = null; - } - else { - this.expectKeyword('case'); - test = this.parseExpression(); - } - this.expect(':'); - var consequent = []; - while (true) { - if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) { - break; - } - consequent.push(this.parseStatementListItem()); - } - return this.finalize(node, new Node.SwitchCase(test, consequent)); - }; - Parser.prototype.parseSwitchStatement = function () { - var node = this.createNode(); - this.expectKeyword('switch'); - this.expect('('); - var discriminant = this.parseExpression(); - this.expect(')'); - var previousInSwitch = this.context.inSwitch; - this.context.inSwitch = true; - var cases = []; - var defaultFound = false; - this.expect('{'); - while (true) { - if (this.match('}')) { - break; - } - var clause = this.parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - this.throwError(messages_1.Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - this.expect('}'); - this.context.inSwitch = previousInSwitch; - return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); - }; - Parser.prototype.parseLabelledStatement = function () { - var node = this.createNode(); - var expr = this.parseExpression(); - var statement; - if ((expr.type === syntax_1.Syntax.Identifier) && this.match(':')) { - this.nextToken(); - var id = expr; - var key = '$' + id.name; - if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { - this.throwError(messages_1.Messages.Redeclaration, 'Label', id.name); - } - this.context.labelSet[key] = true; - var body = void 0; - if (this.matchKeyword('class')) { - this.tolerateUnexpectedToken(this.lookahead); - body = this.parseClassDeclaration(); - } - else if (this.matchKeyword('function')) { - var token = this.lookahead; - var declaration = this.parseFunctionDeclaration(); - if (this.context.strict) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction); - } - else if (declaration.generator) { - this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext); - } - body = declaration; - } - else { - body = this.parseStatement(); - } - delete this.context.labelSet[key]; - statement = new Node.LabeledStatement(id, body); - } - else { - this.consumeSemicolon(); - statement = new Node.ExpressionStatement(expr); - } - return this.finalize(node, statement); - }; - Parser.prototype.parseThrowStatement = function () { - var node = this.createNode(); - this.expectKeyword('throw'); - if (this.hasLineTerminator) { - this.throwError(messages_1.Messages.NewlineAfterThrow); - } - var argument = this.parseExpression(); - this.consumeSemicolon(); - return this.finalize(node, new Node.ThrowStatement(argument)); - }; - Parser.prototype.parseCatchClause = function () { - var node = this.createNode(); - this.expectKeyword('catch'); - this.expect('('); - if (this.match(')')) { - this.throwUnexpectedToken(this.lookahead); - } - var params = []; - var param = this.parsePattern(params); - var paramMap = {}; - for (var i = 0; i < params.length; i++) { - var key = '$' + params[i].value; - if (Object.prototype.hasOwnProperty.call(paramMap, key)) { - this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value); - } - paramMap[key] = true; - } - if (this.context.strict && param.type === syntax_1.Syntax.Identifier) { - if (this.scanner.isRestrictedWord(param.name)) { - this.tolerateError(messages_1.Messages.StrictCatchVariable); - } - } - this.expect(')'); - var body = this.parseBlock(); - return this.finalize(node, new Node.CatchClause(param, body)); - }; - Parser.prototype.parseFinallyClause = function () { - this.expectKeyword('finally'); - return this.parseBlock(); - }; - Parser.prototype.parseTryStatement = function () { - var node = this.createNode(); - this.expectKeyword('try'); - var block = this.parseBlock(); - var handler = this.matchKeyword('catch') ? this.parseCatchClause() : null; - var finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null; - if (!handler && !finalizer) { - this.throwError(messages_1.Messages.NoCatchOrFinally); - } - return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); - }; - Parser.prototype.parseDebuggerStatement = function () { - var node = this.createNode(); - this.expectKeyword('debugger'); - this.consumeSemicolon(); - return this.finalize(node, new Node.DebuggerStatement()); - }; - Parser.prototype.parseStatement = function () { - var statement; - switch (this.lookahead.type) { - case 1 : - case 5 : - case 6 : - case 8 : - case 10 : - case 9 : - statement = this.parseExpressionStatement(); - break; - case 7 : - var value = this.lookahead.value; - if (value === '{') { - statement = this.parseBlock(); - } - else if (value === '(') { - statement = this.parseExpressionStatement(); - } - else if (value === ';') { - statement = this.parseEmptyStatement(); - } - else { - statement = this.parseExpressionStatement(); - } - break; - case 3 : - statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); - break; - case 4 : - switch (this.lookahead.value) { - case 'break': - statement = this.parseBreakStatement(); - break; - case 'continue': - statement = this.parseContinueStatement(); - break; - case 'debugger': - statement = this.parseDebuggerStatement(); - break; - case 'do': - statement = this.parseDoWhileStatement(); - break; - case 'for': - statement = this.parseForStatement(); - break; - case 'function': - statement = this.parseFunctionDeclaration(); - break; - case 'if': - statement = this.parseIfStatement(); - break; - case 'return': - statement = this.parseReturnStatement(); - break; - case 'switch': - statement = this.parseSwitchStatement(); - break; - case 'throw': - statement = this.parseThrowStatement(); - break; - case 'try': - statement = this.parseTryStatement(); - break; - case 'var': - statement = this.parseVariableStatement(); - break; - case 'while': - statement = this.parseWhileStatement(); - break; - case 'with': - statement = this.parseWithStatement(); - break; - default: - statement = this.parseExpressionStatement(); - break; - } - break; - default: - statement = this.throwUnexpectedToken(this.lookahead); - } - return statement; - }; - Parser.prototype.parseFunctionSourceElements = function () { - var node = this.createNode(); - this.expect('{'); - var body = this.parseDirectivePrologues(); - var previousLabelSet = this.context.labelSet; - var previousInIteration = this.context.inIteration; - var previousInSwitch = this.context.inSwitch; - var previousInFunctionBody = this.context.inFunctionBody; - this.context.labelSet = {}; - this.context.inIteration = false; - this.context.inSwitch = false; - this.context.inFunctionBody = true; - while (this.lookahead.type !== 2 ) { - if (this.match('}')) { - break; - } - body.push(this.parseStatementListItem()); - } - this.expect('}'); - this.context.labelSet = previousLabelSet; - this.context.inIteration = previousInIteration; - this.context.inSwitch = previousInSwitch; - this.context.inFunctionBody = previousInFunctionBody; - return this.finalize(node, new Node.BlockStatement(body)); - }; - Parser.prototype.validateParam = function (options, param, name) { - var key = '$' + name; - if (this.context.strict) { - if (this.scanner.isRestrictedWord(name)) { - options.stricted = param; - options.message = messages_1.Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.stricted = param; - options.message = messages_1.Messages.StrictParamDupe; - } - } - else if (!options.firstRestricted) { - if (this.scanner.isRestrictedWord(name)) { - options.firstRestricted = param; - options.message = messages_1.Messages.StrictParamName; - } - else if (this.scanner.isStrictModeReservedWord(name)) { - options.firstRestricted = param; - options.message = messages_1.Messages.StrictReservedWord; - } - else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { - options.stricted = param; - options.message = messages_1.Messages.StrictParamDupe; - } - } - if (typeof Object.defineProperty === 'function') { - Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true }); - } - else { - options.paramSet[key] = true; - } - }; - Parser.prototype.parseRestElement = function (params) { - var node = this.createNode(); - this.expect('...'); - var arg = this.parsePattern(params); - if (this.match('=')) { - this.throwError(messages_1.Messages.DefaultRestParameter); - } - if (!this.match(')')) { - this.throwError(messages_1.Messages.ParameterAfterRestParameter); - } - return this.finalize(node, new Node.RestElement(arg)); - }; - Parser.prototype.parseFormalParameter = function (options) { - var params = []; - var param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params); - for (var i = 0; i < params.length; i++) { - this.validateParam(options, params[i], params[i].value); - } - options.simple = options.simple && (param instanceof Node.Identifier); - options.params.push(param); - }; - Parser.prototype.parseFormalParameters = function (firstRestricted) { - var options; - options = { - simple: true, - params: [], - firstRestricted: firstRestricted - }; - this.expect('('); - if (!this.match(')')) { - options.paramSet = {}; - while (this.lookahead.type !== 2 ) { - this.parseFormalParameter(options); - if (this.match(')')) { - break; - } - this.expect(','); - if (this.match(')')) { - break; - } - } - } - this.expect(')'); - return { - simple: options.simple, - params: options.params, - stricted: options.stricted, - firstRestricted: options.firstRestricted, - message: options.message - }; - }; - Parser.prototype.matchAsyncFunction = function () { - var match = this.matchContextualKeyword('async'); - if (match) { - var state = this.scanner.saveState(); - this.scanner.scanComments(); - var next = this.scanner.lex(); - this.scanner.restoreState(state); - match = (state.lineNumber === next.lineNumber) && (next.type === 4 ) && (next.value === 'function'); - } - return match; - }; - Parser.prototype.parseFunctionDeclaration = function (identifierIsOptional) { - var node = this.createNode(); - var isAsync = this.matchContextualKeyword('async'); - if (isAsync) { - this.nextToken(); - } - this.expectKeyword('function'); - var isGenerator = isAsync ? false : this.match('*'); - if (isGenerator) { - this.nextToken(); - } - var message; - var id = null; - var firstRestricted = null; - if (!identifierIsOptional || !this.match('(')) { - var token = this.lookahead; - id = this.parseVariableIdentifier(); - if (this.context.strict) { - if (this.scanner.isRestrictedWord(token.value)) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); - } - } - else { - if (this.scanner.isRestrictedWord(token.value)) { - firstRestricted = token; - message = messages_1.Messages.StrictFunctionName; - } - else if (this.scanner.isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = messages_1.Messages.StrictReservedWord; - } - } - } - var previousAllowAwait = this.context.await; - var previousAllowYield = this.context.allowYield; - this.context.await = isAsync; - this.context.allowYield = !isGenerator; - var formalParameters = this.parseFormalParameters(firstRestricted); - var params = formalParameters.params; - var stricted = formalParameters.stricted; - firstRestricted = formalParameters.firstRestricted; - if (formalParameters.message) { - message = formalParameters.message; - } - var previousStrict = this.context.strict; - var previousAllowStrictDirective = this.context.allowStrictDirective; - this.context.allowStrictDirective = formalParameters.simple; - var body = this.parseFunctionSourceElements(); - if (this.context.strict && firstRestricted) { - this.throwUnexpectedToken(firstRestricted, message); - } - if (this.context.strict && stricted) { - this.tolerateUnexpectedToken(stricted, message); - } - this.context.strict = previousStrict; - this.context.allowStrictDirective = previousAllowStrictDirective; - this.context.await = previousAllowAwait; - this.context.allowYield = previousAllowYield; - return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : - this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); - }; - Parser.prototype.parseFunctionExpression = function () { - var node = this.createNode(); - var isAsync = this.matchContextualKeyword('async'); - if (isAsync) { - this.nextToken(); - } - this.expectKeyword('function'); - var isGenerator = isAsync ? false : this.match('*'); - if (isGenerator) { - this.nextToken(); - } - var message; - var id = null; - var firstRestricted; - var previousAllowAwait = this.context.await; - var previousAllowYield = this.context.allowYield; - this.context.await = isAsync; - this.context.allowYield = !isGenerator; - if (!this.match('(')) { - var token = this.lookahead; - id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier(); - if (this.context.strict) { - if (this.scanner.isRestrictedWord(token.value)) { - this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); - } - } - else { - if (this.scanner.isRestrictedWord(token.value)) { - firstRestricted = token; - message = messages_1.Messages.StrictFunctionName; - } - else if (this.scanner.isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = messages_1.Messages.StrictReservedWord; - } - } - } - var formalParameters = this.parseFormalParameters(firstRestricted); - var params = formalParameters.params; - var stricted = formalParameters.stricted; - firstRestricted = formalParameters.firstRestricted; - if (formalParameters.message) { - message = formalParameters.message; - } - var previousStrict = this.context.strict; - var previousAllowStrictDirective = this.context.allowStrictDirective; - this.context.allowStrictDirective = formalParameters.simple; - var body = this.parseFunctionSourceElements(); - if (this.context.strict && firstRestricted) { - this.throwUnexpectedToken(firstRestricted, message); - } - if (this.context.strict && stricted) { - this.tolerateUnexpectedToken(stricted, message); - } - this.context.strict = previousStrict; - this.context.allowStrictDirective = previousAllowStrictDirective; - this.context.await = previousAllowAwait; - this.context.allowYield = previousAllowYield; - return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : - this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); - }; - Parser.prototype.parseDirective = function () { - var token = this.lookahead; - var node = this.createNode(); - var expr = this.parseExpression(); - var directive = (expr.type === syntax_1.Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null; - this.consumeSemicolon(); - return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); - }; - Parser.prototype.parseDirectivePrologues = function () { - var firstRestricted = null; - var body = []; - while (true) { - var token = this.lookahead; - if (token.type !== 8 ) { - break; - } - var statement = this.parseDirective(); - body.push(statement); - var directive = statement.directive; - if (typeof directive !== 'string') { - break; - } - if (directive === 'use strict') { - this.context.strict = true; - if (firstRestricted) { - this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral); - } - if (!this.context.allowStrictDirective) { - this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective); - } - } - else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - return body; - }; - Parser.prototype.qualifiedPropertyName = function (token) { - switch (token.type) { - case 3 : - case 8 : - case 1 : - case 5 : - case 6 : - case 4 : - return true; - case 7 : - return token.value === '['; - } - return false; - }; - Parser.prototype.parseGetterMethod = function () { - var node = this.createNode(); - var isGenerator = false; - var previousAllowYield = this.context.allowYield; - this.context.allowYield = !isGenerator; - var formalParameters = this.parseFormalParameters(); - if (formalParameters.params.length > 0) { - this.tolerateError(messages_1.Messages.BadGetterArity); - } - var method = this.parsePropertyMethod(formalParameters); - this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); - }; - Parser.prototype.parseSetterMethod = function () { - var node = this.createNode(); - var isGenerator = false; - var previousAllowYield = this.context.allowYield; - this.context.allowYield = !isGenerator; - var formalParameters = this.parseFormalParameters(); - if (formalParameters.params.length !== 1) { - this.tolerateError(messages_1.Messages.BadSetterArity); - } - else if (formalParameters.params[0] instanceof Node.RestElement) { - this.tolerateError(messages_1.Messages.BadSetterRestParameter); - } - var method = this.parsePropertyMethod(formalParameters); - this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); - }; - Parser.prototype.parseGeneratorMethod = function () { - var node = this.createNode(); - var isGenerator = true; - var previousAllowYield = this.context.allowYield; - this.context.allowYield = true; - var params = this.parseFormalParameters(); - this.context.allowYield = false; - var method = this.parsePropertyMethod(params); - this.context.allowYield = previousAllowYield; - return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); - }; - Parser.prototype.isStartOfExpression = function () { - var start = true; - var value = this.lookahead.value; - switch (this.lookahead.type) { - case 7 : - start = (value === '[') || (value === '(') || (value === '{') || - (value === '+') || (value === '-') || - (value === '!') || (value === '~') || - (value === '++') || (value === '--') || - (value === '/') || (value === '/='); - break; - case 4 : - start = (value === 'class') || (value === 'delete') || - (value === 'function') || (value === 'let') || (value === 'new') || - (value === 'super') || (value === 'this') || (value === 'typeof') || - (value === 'void') || (value === 'yield'); - break; - } - return start; - }; - Parser.prototype.parseYieldExpression = function () { - var node = this.createNode(); - this.expectKeyword('yield'); - var argument = null; - var delegate = false; - if (!this.hasLineTerminator) { - var previousAllowYield = this.context.allowYield; - this.context.allowYield = false; - delegate = this.match('*'); - if (delegate) { - this.nextToken(); - argument = this.parseAssignmentExpression(); - } - else if (this.isStartOfExpression()) { - argument = this.parseAssignmentExpression(); - } - this.context.allowYield = previousAllowYield; - } - return this.finalize(node, new Node.YieldExpression(argument, delegate)); - }; - Parser.prototype.parseClassElement = function (hasConstructor) { - var token = this.lookahead; - var node = this.createNode(); - var kind = ''; - var key = null; - var value = null; - var computed = false; - var method = false; - var isStatic = false; - var isAsync = false; - if (this.match('*')) { - this.nextToken(); - } - else { - computed = this.match('['); - key = this.parseObjectPropertyKey(); - var id = key; - if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) { - token = this.lookahead; - isStatic = true; - computed = this.match('['); - if (this.match('*')) { - this.nextToken(); - } - else { - key = this.parseObjectPropertyKey(); - } - } - if ((token.type === 3 ) && !this.hasLineTerminator && (token.value === 'async')) { - var punctuator = this.lookahead.value; - if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') { - isAsync = true; - token = this.lookahead; - key = this.parseObjectPropertyKey(); - if (token.type === 3 && token.value === 'constructor') { - this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync); - } - } - } - } - var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); - if (token.type === 3 ) { - if (token.value === 'get' && lookaheadPropertyKey) { - kind = 'get'; - computed = this.match('['); - key = this.parseObjectPropertyKey(); - this.context.allowYield = false; - value = this.parseGetterMethod(); - } - else if (token.value === 'set' && lookaheadPropertyKey) { - kind = 'set'; - computed = this.match('['); - key = this.parseObjectPropertyKey(); - value = this.parseSetterMethod(); - } - } - else if (token.type === 7 && token.value === '*' && lookaheadPropertyKey) { - kind = 'init'; - computed = this.match('['); - key = this.parseObjectPropertyKey(); - value = this.parseGeneratorMethod(); - method = true; - } - if (!kind && key && this.match('(')) { - kind = 'init'; - value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); - method = true; - } - if (!kind) { - this.throwUnexpectedToken(this.lookahead); - } - if (kind === 'init') { - kind = 'method'; - } - if (!computed) { - if (isStatic && this.isPropertyKey(key, 'prototype')) { - this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype); - } - if (!isStatic && this.isPropertyKey(key, 'constructor')) { - if (kind !== 'method' || !method || (value && value.generator)) { - this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod); - } - if (hasConstructor.value) { - this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor); - } - else { - hasConstructor.value = true; - } - kind = 'constructor'; - } - } - return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); - }; - Parser.prototype.parseClassElementList = function () { - var body = []; - var hasConstructor = { value: false }; - this.expect('{'); - while (!this.match('}')) { - if (this.match(';')) { - this.nextToken(); - } - else { - body.push(this.parseClassElement(hasConstructor)); - } - } - this.expect('}'); - return body; - }; - Parser.prototype.parseClassBody = function () { - var node = this.createNode(); - var elementList = this.parseClassElementList(); - return this.finalize(node, new Node.ClassBody(elementList)); - }; - Parser.prototype.parseClassDeclaration = function (identifierIsOptional) { - var node = this.createNode(); - var previousStrict = this.context.strict; - this.context.strict = true; - this.expectKeyword('class'); - var id = (identifierIsOptional && (this.lookahead.type !== 3 )) ? null : this.parseVariableIdentifier(); - var superClass = null; - if (this.matchKeyword('extends')) { - this.nextToken(); - superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); - } - var classBody = this.parseClassBody(); - this.context.strict = previousStrict; - return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); - }; - Parser.prototype.parseClassExpression = function () { - var node = this.createNode(); - var previousStrict = this.context.strict; - this.context.strict = true; - this.expectKeyword('class'); - var id = (this.lookahead.type === 3 ) ? this.parseVariableIdentifier() : null; - var superClass = null; - if (this.matchKeyword('extends')) { - this.nextToken(); - superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); - } - var classBody = this.parseClassBody(); - this.context.strict = previousStrict; - return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); - }; - Parser.prototype.parseModule = function () { - this.context.strict = true; - this.context.isModule = true; - this.scanner.isModule = true; - var node = this.createNode(); - var body = this.parseDirectivePrologues(); - while (this.lookahead.type !== 2 ) { - body.push(this.parseStatementListItem()); - } - return this.finalize(node, new Node.Module(body)); - }; - Parser.prototype.parseScript = function () { - var node = this.createNode(); - var body = this.parseDirectivePrologues(); - while (this.lookahead.type !== 2 ) { - body.push(this.parseStatementListItem()); - } - return this.finalize(node, new Node.Script(body)); - }; - Parser.prototype.parseModuleSpecifier = function () { - var node = this.createNode(); - if (this.lookahead.type !== 8 ) { - this.throwError(messages_1.Messages.InvalidModuleSpecifier); - } - var token = this.nextToken(); - var raw = this.getTokenRaw(token); - return this.finalize(node, new Node.Literal(token.value, raw)); - }; - Parser.prototype.parseImportSpecifier = function () { - var node = this.createNode(); - var imported; - var local; - if (this.lookahead.type === 3 ) { - imported = this.parseVariableIdentifier(); - local = imported; - if (this.matchContextualKeyword('as')) { - this.nextToken(); - local = this.parseVariableIdentifier(); - } - } - else { - imported = this.parseIdentifierName(); - local = imported; - if (this.matchContextualKeyword('as')) { - this.nextToken(); - local = this.parseVariableIdentifier(); - } - else { - this.throwUnexpectedToken(this.nextToken()); - } - } - return this.finalize(node, new Node.ImportSpecifier(local, imported)); - }; - Parser.prototype.parseNamedImports = function () { - this.expect('{'); - var specifiers = []; - while (!this.match('}')) { - specifiers.push(this.parseImportSpecifier()); - if (!this.match('}')) { - this.expect(','); - } - } - this.expect('}'); - return specifiers; - }; - Parser.prototype.parseImportDefaultSpecifier = function () { - var node = this.createNode(); - var local = this.parseIdentifierName(); - return this.finalize(node, new Node.ImportDefaultSpecifier(local)); - }; - Parser.prototype.parseImportNamespaceSpecifier = function () { - var node = this.createNode(); - this.expect('*'); - if (!this.matchContextualKeyword('as')) { - this.throwError(messages_1.Messages.NoAsAfterImportNamespace); - } - this.nextToken(); - var local = this.parseIdentifierName(); - return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); - }; - Parser.prototype.parseImportDeclaration = function () { - if (this.context.inFunctionBody) { - this.throwError(messages_1.Messages.IllegalImportDeclaration); - } - var node = this.createNode(); - this.expectKeyword('import'); - var src; - var specifiers = []; - if (this.lookahead.type === 8 ) { - src = this.parseModuleSpecifier(); - } - else { - if (this.match('{')) { - specifiers = specifiers.concat(this.parseNamedImports()); - } - else if (this.match('*')) { - specifiers.push(this.parseImportNamespaceSpecifier()); - } - else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) { - specifiers.push(this.parseImportDefaultSpecifier()); - if (this.match(',')) { - this.nextToken(); - if (this.match('*')) { - specifiers.push(this.parseImportNamespaceSpecifier()); - } - else if (this.match('{')) { - specifiers = specifiers.concat(this.parseNamedImports()); - } - else { - this.throwUnexpectedToken(this.lookahead); - } - } - } - else { - this.throwUnexpectedToken(this.nextToken()); - } - if (!this.matchContextualKeyword('from')) { - var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; - this.throwError(message, this.lookahead.value); - } - this.nextToken(); - src = this.parseModuleSpecifier(); - } - this.consumeSemicolon(); - return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); - }; - Parser.prototype.parseExportSpecifier = function () { - var node = this.createNode(); - var local = this.parseIdentifierName(); - var exported = local; - if (this.matchContextualKeyword('as')) { - this.nextToken(); - exported = this.parseIdentifierName(); - } - return this.finalize(node, new Node.ExportSpecifier(local, exported)); - }; - Parser.prototype.parseExportDeclaration = function () { - if (this.context.inFunctionBody) { - this.throwError(messages_1.Messages.IllegalExportDeclaration); - } - var node = this.createNode(); - this.expectKeyword('export'); - var exportDeclaration; - if (this.matchKeyword('default')) { - this.nextToken(); - if (this.matchKeyword('function')) { - var declaration = this.parseFunctionDeclaration(true); - exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); - } - else if (this.matchKeyword('class')) { - var declaration = this.parseClassDeclaration(true); - exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); - } - else if (this.matchContextualKeyword('async')) { - var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); - exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); - } - else { - if (this.matchContextualKeyword('from')) { - this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value); - } - var declaration = this.match('{') ? this.parseObjectInitializer() : - this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression(); - this.consumeSemicolon(); - exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); - } - } - else if (this.match('*')) { - this.nextToken(); - if (!this.matchContextualKeyword('from')) { - var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; - this.throwError(message, this.lookahead.value); - } - this.nextToken(); - var src = this.parseModuleSpecifier(); - this.consumeSemicolon(); - exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); - } - else if (this.lookahead.type === 4 ) { - var declaration = void 0; - switch (this.lookahead.value) { - case 'let': - case 'const': - declaration = this.parseLexicalDeclaration({ inFor: false }); - break; - case 'var': - case 'class': - case 'function': - declaration = this.parseStatementListItem(); - break; - default: - this.throwUnexpectedToken(this.lookahead); - } - exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); - } - else if (this.matchAsyncFunction()) { - var declaration = this.parseFunctionDeclaration(); - exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); - } - else { - var specifiers = []; - var source = null; - var isExportFromIdentifier = false; - this.expect('{'); - while (!this.match('}')) { - isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default'); - specifiers.push(this.parseExportSpecifier()); - if (!this.match('}')) { - this.expect(','); - } - } - this.expect('}'); - if (this.matchContextualKeyword('from')) { - this.nextToken(); - source = this.parseModuleSpecifier(); - this.consumeSemicolon(); - } - else if (isExportFromIdentifier) { - var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; - this.throwError(message, this.lookahead.value); - } - else { - this.consumeSemicolon(); - } - exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); - } - return exportDeclaration; - }; - return Parser; - }()); - exports$1.Parser = Parser; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - function assert(condition, message) { - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - exports$1.assert = assert; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var ErrorHandler = (function () { - function ErrorHandler() { - this.errors = []; - this.tolerant = false; - } - ErrorHandler.prototype.recordError = function (error) { - this.errors.push(error); - }; - ErrorHandler.prototype.tolerate = function (error) { - if (this.tolerant) { - this.recordError(error); - } - else { - throw error; - } - }; - ErrorHandler.prototype.constructError = function (msg, column) { - var error = new Error(msg); - try { - throw error; - } - catch (base) { - if (Object.create && Object.defineProperty) { - error = Object.create(base); - Object.defineProperty(error, 'column', { value: column }); - } - } - return error; - }; - ErrorHandler.prototype.createError = function (index, line, col, description) { - var msg = 'Line ' + line + ': ' + description; - var error = this.constructError(msg, col); - error.index = index; - error.lineNumber = line; - error.description = description; - return error; - }; - ErrorHandler.prototype.throwError = function (index, line, col, description) { - throw this.createError(index, line, col, description); - }; - ErrorHandler.prototype.tolerateError = function (index, line, col, description) { - var error = this.createError(index, line, col, description); - if (this.tolerant) { - this.recordError(error); - } - else { - throw error; - } - }; - return ErrorHandler; - }()); - exports$1.ErrorHandler = ErrorHandler; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.Messages = { - BadGetterArity: 'Getter must not have any formal parameters', - BadSetterArity: 'Setter must have exactly one formal parameter', - BadSetterRestParameter: 'Setter function argument must not be a rest parameter', - ConstructorIsAsync: 'Class constructor may not be an async method', - ConstructorSpecialMethod: 'Class constructor may not be an accessor', - DeclarationMissingInitializer: 'Missing initializer in %0 declaration', - DefaultRestParameter: 'Unexpected token =', - DuplicateBinding: 'Duplicate binding %0', - DuplicateConstructor: 'A class may only have one constructor', - DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', - ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer', - GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts', - IllegalBreak: 'Illegal break statement', - IllegalContinue: 'Illegal continue statement', - IllegalExportDeclaration: 'Unexpected token', - IllegalImportDeclaration: 'Unexpected token', - IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list', - IllegalReturn: 'Illegal return statement', - InvalidEscapedReservedWord: 'Keyword must not contain escaped characters', - InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', - InvalidModuleSpecifier: 'Unexpected token', - InvalidRegExp: 'Invalid regular expression', - LetInLexicalBinding: 'let is disallowed as a lexically bound name', - MissingFromClause: 'Unexpected token', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NewlineAfterThrow: 'Illegal newline after throw', - NoAsAfterImportNamespace: 'Unexpected token', - NoCatchOrFinally: 'Missing catch or finally after try', - ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', - Redeclaration: '%0 \'%1\' has already been declared', - StaticPrototype: 'Classes may not have static property named prototype', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', - UnexpectedEOS: 'Unexpected end of input', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedNumber: 'Unexpected number', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedString: 'Unexpected string', - UnexpectedTemplate: 'Unexpected quasi %0', - UnexpectedToken: 'Unexpected token %0', - UnexpectedTokenIllegal: 'Unexpected token ILLEGAL', - UnknownLabel: 'Undefined label \'%0\'', - UnterminatedRegExp: 'Invalid regular expression: missing /' - }; - }, - function(module, exports$1, __webpack_require__) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var assert_1 = __webpack_require__(9); - var character_1 = __webpack_require__(4); - var messages_1 = __webpack_require__(11); - function hexValue(ch) { - return '0123456789abcdef'.indexOf(ch.toLowerCase()); - } - function octalValue(ch) { - return '01234567'.indexOf(ch); - } - var Scanner = (function () { - function Scanner(code, handler) { - this.source = code; - this.errorHandler = handler; - this.trackComment = false; - this.isModule = false; - this.length = code.length; - this.index = 0; - this.lineNumber = (code.length > 0) ? 1 : 0; - this.lineStart = 0; - this.curlyStack = []; - } - Scanner.prototype.saveState = function () { - return { - index: this.index, - lineNumber: this.lineNumber, - lineStart: this.lineStart - }; - }; - Scanner.prototype.restoreState = function (state) { - this.index = state.index; - this.lineNumber = state.lineNumber; - this.lineStart = state.lineStart; - }; - Scanner.prototype.eof = function () { - return this.index >= this.length; - }; - Scanner.prototype.throwUnexpectedToken = function (message) { - if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } - return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); - }; - Scanner.prototype.tolerateUnexpectedToken = function (message) { - if (message === void 0) { message = messages_1.Messages.UnexpectedTokenIllegal; } - this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); - }; - Scanner.prototype.skipSingleLineComment = function (offset) { - var comments = []; - var start, loc; - if (this.trackComment) { - comments = []; - start = this.index - offset; - loc = { - start: { - line: this.lineNumber, - column: this.index - this.lineStart - offset - }, - end: {} - }; - } - while (!this.eof()) { - var ch = this.source.charCodeAt(this.index); - ++this.index; - if (character_1.Character.isLineTerminator(ch)) { - if (this.trackComment) { - loc.end = { - line: this.lineNumber, - column: this.index - this.lineStart - 1 - }; - var entry = { - multiLine: false, - slice: [start + offset, this.index - 1], - range: [start, this.index - 1], - loc: loc - }; - comments.push(entry); - } - if (ch === 13 && this.source.charCodeAt(this.index) === 10) { - ++this.index; - } - ++this.lineNumber; - this.lineStart = this.index; - return comments; - } - } - if (this.trackComment) { - loc.end = { - line: this.lineNumber, - column: this.index - this.lineStart - }; - var entry = { - multiLine: false, - slice: [start + offset, this.index], - range: [start, this.index], - loc: loc - }; - comments.push(entry); - } - return comments; - }; - Scanner.prototype.skipMultiLineComment = function () { - var comments = []; - var start, loc; - if (this.trackComment) { - comments = []; - start = this.index - 2; - loc = { - start: { - line: this.lineNumber, - column: this.index - this.lineStart - 2 - }, - end: {} - }; - } - while (!this.eof()) { - var ch = this.source.charCodeAt(this.index); - if (character_1.Character.isLineTerminator(ch)) { - if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) { - ++this.index; - } - ++this.lineNumber; - ++this.index; - this.lineStart = this.index; - } - else if (ch === 0x2A) { - if (this.source.charCodeAt(this.index + 1) === 0x2F) { - this.index += 2; - if (this.trackComment) { - loc.end = { - line: this.lineNumber, - column: this.index - this.lineStart - }; - var entry = { - multiLine: true, - slice: [start + 2, this.index - 2], - range: [start, this.index], - loc: loc - }; - comments.push(entry); - } - return comments; - } - ++this.index; - } - else { - ++this.index; - } - } - if (this.trackComment) { - loc.end = { - line: this.lineNumber, - column: this.index - this.lineStart - }; - var entry = { - multiLine: true, - slice: [start + 2, this.index], - range: [start, this.index], - loc: loc - }; - comments.push(entry); - } - this.tolerateUnexpectedToken(); - return comments; - }; - Scanner.prototype.scanComments = function () { - var comments; - if (this.trackComment) { - comments = []; - } - var start = (this.index === 0); - while (!this.eof()) { - var ch = this.source.charCodeAt(this.index); - if (character_1.Character.isWhiteSpace(ch)) { - ++this.index; - } - else if (character_1.Character.isLineTerminator(ch)) { - ++this.index; - if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) { - ++this.index; - } - ++this.lineNumber; - this.lineStart = this.index; - start = true; - } - else if (ch === 0x2F) { - ch = this.source.charCodeAt(this.index + 1); - if (ch === 0x2F) { - this.index += 2; - var comment = this.skipSingleLineComment(2); - if (this.trackComment) { - comments = comments.concat(comment); - } - start = true; - } - else if (ch === 0x2A) { - this.index += 2; - var comment = this.skipMultiLineComment(); - if (this.trackComment) { - comments = comments.concat(comment); - } - } - else { - break; - } - } - else if (start && ch === 0x2D) { - if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) { - this.index += 3; - var comment = this.skipSingleLineComment(3); - if (this.trackComment) { - comments = comments.concat(comment); - } - } - else { - break; - } - } - else if (ch === 0x3C && !this.isModule) { - if (this.source.slice(this.index + 1, this.index + 4) === '!--') { - this.index += 4; - var comment = this.skipSingleLineComment(4); - if (this.trackComment) { - comments = comments.concat(comment); - } - } - else { - break; - } - } - else { - break; - } - } - return comments; - }; - Scanner.prototype.isFutureReservedWord = function (id) { - switch (id) { - case 'enum': - case 'export': - case 'import': - case 'super': - return true; - default: - return false; - } - }; - Scanner.prototype.isStrictModeReservedWord = function (id) { - switch (id) { - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - default: - return false; - } - }; - Scanner.prototype.isRestrictedWord = function (id) { - return id === 'eval' || id === 'arguments'; - }; - Scanner.prototype.isKeyword = function (id) { - switch (id.length) { - case 2: - return (id === 'if') || (id === 'in') || (id === 'do'); - case 3: - return (id === 'var') || (id === 'for') || (id === 'new') || - (id === 'try') || (id === 'let'); - case 4: - return (id === 'this') || (id === 'else') || (id === 'case') || - (id === 'void') || (id === 'with') || (id === 'enum'); - case 5: - return (id === 'while') || (id === 'break') || (id === 'catch') || - (id === 'throw') || (id === 'const') || (id === 'yield') || - (id === 'class') || (id === 'super'); - case 6: - return (id === 'return') || (id === 'typeof') || (id === 'delete') || - (id === 'switch') || (id === 'export') || (id === 'import'); - case 7: - return (id === 'default') || (id === 'finally') || (id === 'extends'); - case 8: - return (id === 'function') || (id === 'continue') || (id === 'debugger'); - case 10: - return (id === 'instanceof'); - default: - return false; - } - }; - Scanner.prototype.codePointAt = function (i) { - var cp = this.source.charCodeAt(i); - if (cp >= 0xD800 && cp <= 0xDBFF) { - var second = this.source.charCodeAt(i + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - var first = cp; - cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return cp; - }; - Scanner.prototype.scanHexEscape = function (prefix) { - var len = (prefix === 'u') ? 4 : 2; - var code = 0; - for (var i = 0; i < len; ++i) { - if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) { - code = code * 16 + hexValue(this.source[this.index++]); - } - else { - return null; - } - } - return String.fromCharCode(code); - }; - Scanner.prototype.scanUnicodeCodePointEscape = function () { - var ch = this.source[this.index]; - var code = 0; - if (ch === '}') { - this.throwUnexpectedToken(); - } - while (!this.eof()) { - ch = this.source[this.index++]; - if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) { - break; - } - code = code * 16 + hexValue(ch); - } - if (code > 0x10FFFF || ch !== '}') { - this.throwUnexpectedToken(); - } - return character_1.Character.fromCodePoint(code); - }; - Scanner.prototype.getIdentifier = function () { - var start = this.index++; - while (!this.eof()) { - var ch = this.source.charCodeAt(this.index); - if (ch === 0x5C) { - this.index = start; - return this.getComplexIdentifier(); - } - else if (ch >= 0xD800 && ch < 0xDFFF) { - this.index = start; - return this.getComplexIdentifier(); - } - if (character_1.Character.isIdentifierPart(ch)) { - ++this.index; - } - else { - break; - } - } - return this.source.slice(start, this.index); - }; - Scanner.prototype.getComplexIdentifier = function () { - var cp = this.codePointAt(this.index); - var id = character_1.Character.fromCodePoint(cp); - this.index += id.length; - var ch; - if (cp === 0x5C) { - if (this.source.charCodeAt(this.index) !== 0x75) { - this.throwUnexpectedToken(); - } - ++this.index; - if (this.source[this.index] === '{') { - ++this.index; - ch = this.scanUnicodeCodePointEscape(); - } - else { - ch = this.scanHexEscape('u'); - if (ch === null || ch === '\\' || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) { - this.throwUnexpectedToken(); - } - } - id = ch; - } - while (!this.eof()) { - cp = this.codePointAt(this.index); - if (!character_1.Character.isIdentifierPart(cp)) { - break; - } - ch = character_1.Character.fromCodePoint(cp); - id += ch; - this.index += ch.length; - if (cp === 0x5C) { - id = id.substr(0, id.length - 1); - if (this.source.charCodeAt(this.index) !== 0x75) { - this.throwUnexpectedToken(); - } - ++this.index; - if (this.source[this.index] === '{') { - ++this.index; - ch = this.scanUnicodeCodePointEscape(); - } - else { - ch = this.scanHexEscape('u'); - if (ch === null || ch === '\\' || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) { - this.throwUnexpectedToken(); - } - } - id += ch; - } - } - return id; - }; - Scanner.prototype.octalToDecimal = function (ch) { - var octal = (ch !== '0'); - var code = octalValue(ch); - if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { - octal = true; - code = code * 8 + octalValue(this.source[this.index++]); - if ('0123'.indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { - code = code * 8 + octalValue(this.source[this.index++]); - } - } - return { - code: code, - octal: octal - }; - }; - Scanner.prototype.scanIdentifier = function () { - var type; - var start = this.index; - var id = (this.source.charCodeAt(start) === 0x5C) ? this.getComplexIdentifier() : this.getIdentifier(); - if (id.length === 1) { - type = 3 ; - } - else if (this.isKeyword(id)) { - type = 4 ; - } - else if (id === 'null') { - type = 5 ; - } - else if (id === 'true' || id === 'false') { - type = 1 ; - } - else { - type = 3 ; - } - if (type !== 3 && (start + id.length !== this.index)) { - var restore = this.index; - this.index = start; - this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord); - this.index = restore; - } - return { - type: type, - value: id, - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.scanPunctuator = function () { - var start = this.index; - var str = this.source[this.index]; - switch (str) { - case '(': - case '{': - if (str === '{') { - this.curlyStack.push('{'); - } - ++this.index; - break; - case '.': - ++this.index; - if (this.source[this.index] === '.' && this.source[this.index + 1] === '.') { - this.index += 2; - str = '...'; - } - break; - case '}': - ++this.index; - this.curlyStack.pop(); - break; - case ')': - case ';': - case ',': - case '[': - case ']': - case ':': - case '?': - case '~': - ++this.index; - break; - default: - str = this.source.substr(this.index, 4); - if (str === '>>>=') { - this.index += 4; - } - else { - str = str.substr(0, 3); - if (str === '===' || str === '!==' || str === '>>>' || - str === '<<=' || str === '>>=' || str === '**=') { - this.index += 3; - } - else { - str = str.substr(0, 2); - if (str === '&&' || str === '||' || str === '==' || str === '!=' || - str === '+=' || str === '-=' || str === '*=' || str === '/=' || - str === '++' || str === '--' || str === '<<' || str === '>>' || - str === '&=' || str === '|=' || str === '^=' || str === '%=' || - str === '<=' || str === '>=' || str === '=>' || str === '**') { - this.index += 2; - } - else { - str = this.source[this.index]; - if ('<>=!+-*%&|^/'.indexOf(str) >= 0) { - ++this.index; - } - } - } - } - } - if (this.index === start) { - this.throwUnexpectedToken(); - } - return { - type: 7 , - value: str, - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.scanHexLiteral = function (start) { - var num = ''; - while (!this.eof()) { - if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) { - break; - } - num += this.source[this.index++]; - } - if (num.length === 0) { - this.throwUnexpectedToken(); - } - if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) { - this.throwUnexpectedToken(); - } - return { - type: 6 , - value: parseInt('0x' + num, 16), - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.scanBinaryLiteral = function (start) { - var num = ''; - var ch; - while (!this.eof()) { - ch = this.source[this.index]; - if (ch !== '0' && ch !== '1') { - break; - } - num += this.source[this.index++]; - } - if (num.length === 0) { - this.throwUnexpectedToken(); - } - if (!this.eof()) { - ch = this.source.charCodeAt(this.index); - if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) { - this.throwUnexpectedToken(); - } - } - return { - type: 6 , - value: parseInt(num, 2), - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.scanOctalLiteral = function (prefix, start) { - var num = ''; - var octal = false; - if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) { - octal = true; - num = '0' + this.source[this.index++]; - } - else { - ++this.index; - } - while (!this.eof()) { - if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { - break; - } - num += this.source[this.index++]; - } - if (!octal && num.length === 0) { - this.throwUnexpectedToken(); - } - if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { - this.throwUnexpectedToken(); - } - return { - type: 6 , - value: parseInt(num, 8), - octal: octal, - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.isImplicitOctalLiteral = function () { - for (var i = this.index + 1; i < this.length; ++i) { - var ch = this.source[i]; - if (ch === '8' || ch === '9') { - return false; - } - if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) { - return true; - } - } - return true; - }; - Scanner.prototype.scanNumericLiteral = function () { - var start = this.index; - var ch = this.source[start]; - assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), 'Numeric literal must start with a decimal digit or a decimal point'); - var num = ''; - if (ch !== '.') { - num = this.source[this.index++]; - ch = this.source[this.index]; - if (num === '0') { - if (ch === 'x' || ch === 'X') { - ++this.index; - return this.scanHexLiteral(start); - } - if (ch === 'b' || ch === 'B') { - ++this.index; - return this.scanBinaryLiteral(start); - } - if (ch === 'o' || ch === 'O') { - return this.scanOctalLiteral(ch, start); - } - if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) { - if (this.isImplicitOctalLiteral()) { - return this.scanOctalLiteral(ch, start); - } - } - } - while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { - num += this.source[this.index++]; - } - ch = this.source[this.index]; - } - if (ch === '.') { - num += this.source[this.index++]; - while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { - num += this.source[this.index++]; - } - ch = this.source[this.index]; - } - if (ch === 'e' || ch === 'E') { - num += this.source[this.index++]; - ch = this.source[this.index]; - if (ch === '+' || ch === '-') { - num += this.source[this.index++]; - } - if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { - while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { - num += this.source[this.index++]; - } - } - else { - this.throwUnexpectedToken(); - } - } - if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) { - this.throwUnexpectedToken(); - } - return { - type: 6 , - value: parseFloat(num), - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.scanStringLiteral = function () { - var start = this.index; - var quote = this.source[start]; - assert_1.assert((quote === '\'' || quote === '"'), 'String literal must starts with a quote'); - ++this.index; - var octal = false; - var str = ''; - while (!this.eof()) { - var ch = this.source[this.index++]; - if (ch === quote) { - quote = ''; - break; - } - else if (ch === '\\') { - ch = this.source[this.index++]; - if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'u': - if (this.source[this.index] === '{') { - ++this.index; - str += this.scanUnicodeCodePointEscape(); - } - else { - var unescaped_1 = this.scanHexEscape(ch); - if (unescaped_1 === null) { - this.throwUnexpectedToken(); - } - str += unescaped_1; - } - break; - case 'x': - var unescaped = this.scanHexEscape(ch); - if (unescaped === null) { - this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence); - } - str += unescaped; - break; - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - case '8': - case '9': - str += ch; - this.tolerateUnexpectedToken(); - break; - default: - if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) { - var octToDec = this.octalToDecimal(ch); - octal = octToDec.octal || octal; - str += String.fromCharCode(octToDec.code); - } - else { - str += ch; - } - break; - } - } - else { - ++this.lineNumber; - if (ch === '\r' && this.source[this.index] === '\n') { - ++this.index; - } - this.lineStart = this.index; - } - } - else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - break; - } - else { - str += ch; - } - } - if (quote !== '') { - this.index = start; - this.throwUnexpectedToken(); - } - return { - type: 8 , - value: str, - octal: octal, - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.scanTemplate = function () { - var cooked = ''; - var terminated = false; - var start = this.index; - var head = (this.source[start] === '`'); - var tail = false; - var rawOffset = 2; - ++this.index; - while (!this.eof()) { - var ch = this.source[this.index++]; - if (ch === '`') { - rawOffset = 1; - tail = true; - terminated = true; - break; - } - else if (ch === '$') { - if (this.source[this.index] === '{') { - this.curlyStack.push('${'); - ++this.index; - terminated = true; - break; - } - cooked += ch; - } - else if (ch === '\\') { - ch = this.source[this.index++]; - if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - switch (ch) { - case 'n': - cooked += '\n'; - break; - case 'r': - cooked += '\r'; - break; - case 't': - cooked += '\t'; - break; - case 'u': - if (this.source[this.index] === '{') { - ++this.index; - cooked += this.scanUnicodeCodePointEscape(); - } - else { - var restore = this.index; - var unescaped_2 = this.scanHexEscape(ch); - if (unescaped_2 !== null) { - cooked += unescaped_2; - } - else { - this.index = restore; - cooked += ch; - } - } - break; - case 'x': - var unescaped = this.scanHexEscape(ch); - if (unescaped === null) { - this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence); - } - cooked += unescaped; - break; - case 'b': - cooked += '\b'; - break; - case 'f': - cooked += '\f'; - break; - case 'v': - cooked += '\v'; - break; - default: - if (ch === '0') { - if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) { - this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral); - } - cooked += '\0'; - } - else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) { - this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral); - } - else { - cooked += ch; - } - break; - } - } - else { - ++this.lineNumber; - if (ch === '\r' && this.source[this.index] === '\n') { - ++this.index; - } - this.lineStart = this.index; - } - } - else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - ++this.lineNumber; - if (ch === '\r' && this.source[this.index] === '\n') { - ++this.index; - } - this.lineStart = this.index; - cooked += '\n'; - } - else { - cooked += ch; - } - } - if (!terminated) { - this.throwUnexpectedToken(); - } - if (!head) { - this.curlyStack.pop(); - } - return { - type: 10 , - value: this.source.slice(start + 1, this.index - rawOffset), - cooked: cooked, - head: head, - tail: tail, - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.testRegExp = function (pattern, flags) { - var astralSubstitute = '\uFFFF'; - var tmp = pattern; - var self = this; - if (flags.indexOf('u') >= 0) { - tmp = tmp - .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) { - var codePoint = parseInt($1 || $2, 16); - if (codePoint > 0x10FFFF) { - self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp); - } - if (codePoint <= 0xFFFF) { - return String.fromCharCode(codePoint); - } - return astralSubstitute; - }) - .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute); - } - try { - RegExp(tmp); - } - catch (e) { - this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp); - } - try { - return new RegExp(pattern, flags); - } - catch (exception) { - return null; - } - }; - Scanner.prototype.scanRegExpBody = function () { - var ch = this.source[this.index]; - assert_1.assert(ch === '/', 'Regular expression literal must start with a slash'); - var str = this.source[this.index++]; - var classMarker = false; - var terminated = false; - while (!this.eof()) { - ch = this.source[this.index++]; - str += ch; - if (ch === '\\') { - ch = this.source[this.index++]; - if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); - } - str += ch; - } - else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { - this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); - } - else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } - else { - if (ch === '/') { - terminated = true; - break; - } - else if (ch === '[') { - classMarker = true; - } - } - } - if (!terminated) { - this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); - } - return str.substr(1, str.length - 2); - }; - Scanner.prototype.scanRegExpFlags = function () { - var str = ''; - var flags = ''; - while (!this.eof()) { - var ch = this.source[this.index]; - if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) { - break; - } - ++this.index; - if (ch === '\\' && !this.eof()) { - ch = this.source[this.index]; - if (ch === 'u') { - ++this.index; - var restore = this.index; - var char = this.scanHexEscape('u'); - if (char !== null) { - flags += char; - for (str += '\\u'; restore < this.index; ++restore) { - str += this.source[restore]; - } - } - else { - this.index = restore; - flags += 'u'; - str += '\\u'; - } - this.tolerateUnexpectedToken(); - } - else { - str += '\\'; - this.tolerateUnexpectedToken(); - } - } - else { - flags += ch; - str += ch; - } - } - return flags; - }; - Scanner.prototype.scanRegExp = function () { - var start = this.index; - var pattern = this.scanRegExpBody(); - var flags = this.scanRegExpFlags(); - var value = this.testRegExp(pattern, flags); - return { - type: 9 , - value: '', - pattern: pattern, - flags: flags, - regex: value, - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: start, - end: this.index - }; - }; - Scanner.prototype.lex = function () { - if (this.eof()) { - return { - type: 2 , - value: '', - lineNumber: this.lineNumber, - lineStart: this.lineStart, - start: this.index, - end: this.index - }; - } - var cp = this.source.charCodeAt(this.index); - if (character_1.Character.isIdentifierStart(cp)) { - return this.scanIdentifier(); - } - if (cp === 0x28 || cp === 0x29 || cp === 0x3B) { - return this.scanPunctuator(); - } - if (cp === 0x27 || cp === 0x22) { - return this.scanStringLiteral(); - } - if (cp === 0x2E) { - if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) { - return this.scanNumericLiteral(); - } - return this.scanPunctuator(); - } - if (character_1.Character.isDecimalDigit(cp)) { - return this.scanNumericLiteral(); - } - if (cp === 0x60 || (cp === 0x7D && this.curlyStack[this.curlyStack.length - 1] === '${')) { - return this.scanTemplate(); - } - if (cp >= 0xD800 && cp < 0xDFFF) { - if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) { - return this.scanIdentifier(); - } - } - return this.scanPunctuator(); - }; - return Scanner; - }()); - exports$1.Scanner = Scanner; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.TokenName = {}; - exports$1.TokenName[1 ] = 'Boolean'; - exports$1.TokenName[2 ] = ''; - exports$1.TokenName[3 ] = 'Identifier'; - exports$1.TokenName[4 ] = 'Keyword'; - exports$1.TokenName[5 ] = 'Null'; - exports$1.TokenName[6 ] = 'Numeric'; - exports$1.TokenName[7 ] = 'Punctuator'; - exports$1.TokenName[8 ] = 'String'; - exports$1.TokenName[9 ] = 'RegularExpression'; - exports$1.TokenName[10 ] = 'Template'; - }, - function(module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.XHTMLEntities = { - quot: '\u0022', - amp: '\u0026', - apos: '\u0027', - gt: '\u003E', - nbsp: '\u00A0', - iexcl: '\u00A1', - cent: '\u00A2', - pound: '\u00A3', - curren: '\u00A4', - yen: '\u00A5', - brvbar: '\u00A6', - sect: '\u00A7', - uml: '\u00A8', - copy: '\u00A9', - ordf: '\u00AA', - laquo: '\u00AB', - not: '\u00AC', - shy: '\u00AD', - reg: '\u00AE', - macr: '\u00AF', - deg: '\u00B0', - plusmn: '\u00B1', - sup2: '\u00B2', - sup3: '\u00B3', - acute: '\u00B4', - micro: '\u00B5', - para: '\u00B6', - middot: '\u00B7', - cedil: '\u00B8', - sup1: '\u00B9', - ordm: '\u00BA', - raquo: '\u00BB', - frac14: '\u00BC', - frac12: '\u00BD', - frac34: '\u00BE', - iquest: '\u00BF', - Agrave: '\u00C0', - Aacute: '\u00C1', - Acirc: '\u00C2', - Atilde: '\u00C3', - Auml: '\u00C4', - Aring: '\u00C5', - AElig: '\u00C6', - Ccedil: '\u00C7', - Egrave: '\u00C8', - Eacute: '\u00C9', - Ecirc: '\u00CA', - Euml: '\u00CB', - Igrave: '\u00CC', - Iacute: '\u00CD', - Icirc: '\u00CE', - Iuml: '\u00CF', - ETH: '\u00D0', - Ntilde: '\u00D1', - Ograve: '\u00D2', - Oacute: '\u00D3', - Ocirc: '\u00D4', - Otilde: '\u00D5', - Ouml: '\u00D6', - times: '\u00D7', - Oslash: '\u00D8', - Ugrave: '\u00D9', - Uacute: '\u00DA', - Ucirc: '\u00DB', - Uuml: '\u00DC', - Yacute: '\u00DD', - THORN: '\u00DE', - szlig: '\u00DF', - agrave: '\u00E0', - aacute: '\u00E1', - acirc: '\u00E2', - atilde: '\u00E3', - auml: '\u00E4', - aring: '\u00E5', - aelig: '\u00E6', - ccedil: '\u00E7', - egrave: '\u00E8', - eacute: '\u00E9', - ecirc: '\u00EA', - euml: '\u00EB', - igrave: '\u00EC', - iacute: '\u00ED', - icirc: '\u00EE', - iuml: '\u00EF', - eth: '\u00F0', - ntilde: '\u00F1', - ograve: '\u00F2', - oacute: '\u00F3', - ocirc: '\u00F4', - otilde: '\u00F5', - ouml: '\u00F6', - divide: '\u00F7', - oslash: '\u00F8', - ugrave: '\u00F9', - uacute: '\u00FA', - ucirc: '\u00FB', - uuml: '\u00FC', - yacute: '\u00FD', - thorn: '\u00FE', - yuml: '\u00FF', - OElig: '\u0152', - oelig: '\u0153', - Scaron: '\u0160', - scaron: '\u0161', - Yuml: '\u0178', - fnof: '\u0192', - circ: '\u02C6', - tilde: '\u02DC', - Alpha: '\u0391', - Beta: '\u0392', - Gamma: '\u0393', - Delta: '\u0394', - Epsilon: '\u0395', - Zeta: '\u0396', - Eta: '\u0397', - Theta: '\u0398', - Iota: '\u0399', - Kappa: '\u039A', - Lambda: '\u039B', - Mu: '\u039C', - Nu: '\u039D', - Xi: '\u039E', - Omicron: '\u039F', - Pi: '\u03A0', - Rho: '\u03A1', - Sigma: '\u03A3', - Tau: '\u03A4', - Upsilon: '\u03A5', - Phi: '\u03A6', - Chi: '\u03A7', - Psi: '\u03A8', - Omega: '\u03A9', - alpha: '\u03B1', - beta: '\u03B2', - gamma: '\u03B3', - delta: '\u03B4', - epsilon: '\u03B5', - zeta: '\u03B6', - eta: '\u03B7', - theta: '\u03B8', - iota: '\u03B9', - kappa: '\u03BA', - lambda: '\u03BB', - mu: '\u03BC', - nu: '\u03BD', - xi: '\u03BE', - omicron: '\u03BF', - pi: '\u03C0', - rho: '\u03C1', - sigmaf: '\u03C2', - sigma: '\u03C3', - tau: '\u03C4', - upsilon: '\u03C5', - phi: '\u03C6', - chi: '\u03C7', - psi: '\u03C8', - omega: '\u03C9', - thetasym: '\u03D1', - upsih: '\u03D2', - piv: '\u03D6', - ensp: '\u2002', - emsp: '\u2003', - thinsp: '\u2009', - zwnj: '\u200C', - zwj: '\u200D', - lrm: '\u200E', - rlm: '\u200F', - ndash: '\u2013', - mdash: '\u2014', - lsquo: '\u2018', - rsquo: '\u2019', - sbquo: '\u201A', - ldquo: '\u201C', - rdquo: '\u201D', - bdquo: '\u201E', - dagger: '\u2020', - Dagger: '\u2021', - bull: '\u2022', - hellip: '\u2026', - permil: '\u2030', - prime: '\u2032', - Prime: '\u2033', - lsaquo: '\u2039', - rsaquo: '\u203A', - oline: '\u203E', - frasl: '\u2044', - euro: '\u20AC', - image: '\u2111', - weierp: '\u2118', - real: '\u211C', - trade: '\u2122', - alefsym: '\u2135', - larr: '\u2190', - uarr: '\u2191', - rarr: '\u2192', - darr: '\u2193', - harr: '\u2194', - crarr: '\u21B5', - lArr: '\u21D0', - uArr: '\u21D1', - rArr: '\u21D2', - dArr: '\u21D3', - hArr: '\u21D4', - forall: '\u2200', - part: '\u2202', - exist: '\u2203', - empty: '\u2205', - nabla: '\u2207', - isin: '\u2208', - notin: '\u2209', - ni: '\u220B', - prod: '\u220F', - sum: '\u2211', - minus: '\u2212', - lowast: '\u2217', - radic: '\u221A', - prop: '\u221D', - infin: '\u221E', - ang: '\u2220', - and: '\u2227', - or: '\u2228', - cap: '\u2229', - cup: '\u222A', - int: '\u222B', - there4: '\u2234', - sim: '\u223C', - cong: '\u2245', - asymp: '\u2248', - ne: '\u2260', - equiv: '\u2261', - le: '\u2264', - ge: '\u2265', - sub: '\u2282', - sup: '\u2283', - nsub: '\u2284', - sube: '\u2286', - supe: '\u2287', - oplus: '\u2295', - otimes: '\u2297', - perp: '\u22A5', - sdot: '\u22C5', - lceil: '\u2308', - rceil: '\u2309', - lfloor: '\u230A', - rfloor: '\u230B', - loz: '\u25CA', - spades: '\u2660', - clubs: '\u2663', - hearts: '\u2665', - diams: '\u2666', - lang: '\u27E8', - rang: '\u27E9' - }; - }, - function(module, exports$1, __webpack_require__) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var error_handler_1 = __webpack_require__(10); - var scanner_1 = __webpack_require__(12); - var token_1 = __webpack_require__(13); - var Reader = (function () { - function Reader() { - this.values = []; - this.curly = this.paren = -1; - } - Reader.prototype.beforeFunctionExpression = function (t) { - return ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', - 'return', 'case', 'delete', 'throw', 'void', - '=', '+=', '-=', '*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', - '&=', '|=', '^=', ',', - '+', '-', '*', '**', '/', '%', '++', '--', '<<', '>>', '>>>', '&', - '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', - '<=', '<', '>', '!=', '!=='].indexOf(t) >= 0; - }; - Reader.prototype.isRegexStart = function () { - var previous = this.values[this.values.length - 1]; - var regex = (previous !== null); - switch (previous) { - case 'this': - case ']': - regex = false; - break; - case ')': - var keyword = this.values[this.paren - 1]; - regex = (keyword === 'if' || keyword === 'while' || keyword === 'for' || keyword === 'with'); - break; - case '}': - regex = false; - if (this.values[this.curly - 3] === 'function') { - var check = this.values[this.curly - 4]; - regex = check ? !this.beforeFunctionExpression(check) : false; - } - else if (this.values[this.curly - 4] === 'function') { - var check = this.values[this.curly - 5]; - regex = check ? !this.beforeFunctionExpression(check) : true; - } - break; - } - return regex; - }; - Reader.prototype.push = function (token) { - if (token.type === 7 || token.type === 4 ) { - if (token.value === '{') { - this.curly = this.values.length; - } - else if (token.value === '(') { - this.paren = this.values.length; - } - this.values.push(token.value); - } - else { - this.values.push(null); - } - }; - return Reader; - }()); - var Tokenizer = (function () { - function Tokenizer(code, config) { - this.errorHandler = new error_handler_1.ErrorHandler(); - this.errorHandler.tolerant = config ? (typeof config.tolerant === 'boolean' && config.tolerant) : false; - this.scanner = new scanner_1.Scanner(code, this.errorHandler); - this.scanner.trackComment = config ? (typeof config.comment === 'boolean' && config.comment) : false; - this.trackRange = config ? (typeof config.range === 'boolean' && config.range) : false; - this.trackLoc = config ? (typeof config.loc === 'boolean' && config.loc) : false; - this.buffer = []; - this.reader = new Reader(); - } - Tokenizer.prototype.errors = function () { - return this.errorHandler.errors; - }; - Tokenizer.prototype.getNextToken = function () { - if (this.buffer.length === 0) { - var comments = this.scanner.scanComments(); - if (this.scanner.trackComment) { - for (var i = 0; i < comments.length; ++i) { - var e = comments[i]; - var value = this.scanner.source.slice(e.slice[0], e.slice[1]); - var comment = { - type: e.multiLine ? 'BlockComment' : 'LineComment', - value: value - }; - if (this.trackRange) { - comment.range = e.range; - } - if (this.trackLoc) { - comment.loc = e.loc; - } - this.buffer.push(comment); - } - } - if (!this.scanner.eof()) { - var loc = void 0; - if (this.trackLoc) { - loc = { - start: { - line: this.scanner.lineNumber, - column: this.scanner.index - this.scanner.lineStart - }, - end: {} - }; - } - var startRegex = (this.scanner.source[this.scanner.index] === '/') && this.reader.isRegexStart(); - var token = startRegex ? this.scanner.scanRegExp() : this.scanner.lex(); - this.reader.push(token); - var entry = { - type: token_1.TokenName[token.type], - value: this.scanner.source.slice(token.start, token.end) - }; - if (this.trackRange) { - entry.range = [token.start, token.end]; - } - if (this.trackLoc) { - loc.end = { - line: this.scanner.lineNumber, - column: this.scanner.index - this.scanner.lineStart - }; - entry.loc = loc; - } - if (token.type === 9 ) { - var pattern = token.pattern; - var flags = token.flags; - entry.regex = { pattern: pattern, flags: flags }; - } - this.buffer.push(entry); - } - } - return this.buffer.shift(); - }; - return Tokenizer; - }()); - exports$1.Tokenizer = Tokenizer; - } - ]) - }); - } (esprima$2)); - return esprima$2.exports; -} - -var main$1 = {}; - -/****************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -var __assign$1 = function() { - __assign$1 = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign$1.apply(this, arguments); -}; -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} -function __esDecorate$1(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}function __runInitializers$1(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}function __setFunctionName$1(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - 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."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} -var __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} -function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} -function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - 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); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} -function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - 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; } -} -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - 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); - 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); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} -function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; -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); -}; -function __importStar(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; -} -function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} -function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - 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"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - 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"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} -function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -} -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; -function __disposeResources(env) { - function fail(e) { - 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 (r = env.stack.pop()) { - try { - 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(); -} -function __rewriteRelativeImportExtension(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 tslib_es6 = { - __extends, - __assign: __assign$1, - __rest, - __decorate, - __param, - __esDecorate: __esDecorate$1, - __runInitializers: __runInitializers$1, - __propKey, - __setFunctionName: __setFunctionName$1, - __metadata, - __awaiter, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; - -var tslib_es6$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - __addDisposableResource: __addDisposableResource, - get __assign () { return __assign$1; }, - __asyncDelegator: __asyncDelegator, - __asyncGenerator: __asyncGenerator, - __asyncValues: __asyncValues, - __await: __await, - __awaiter: __awaiter, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldIn: __classPrivateFieldIn, - __classPrivateFieldSet: __classPrivateFieldSet, - __createBinding: __createBinding, - __decorate: __decorate, - __disposeResources: __disposeResources, - __esDecorate: __esDecorate$1, - __exportStar: __exportStar, - __extends: __extends, - __generator: __generator, - __importDefault: __importDefault, - __importStar: __importStar, - __makeTemplateObject: __makeTemplateObject, - __metadata: __metadata, - __param: __param, - __propKey: __propKey, - __read: __read, - __rest: __rest, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, - __runInitializers: __runInitializers$1, - __setFunctionName: __setFunctionName$1, - __spread: __spread, - __spreadArray: __spreadArray, - __spreadArrays: __spreadArrays, - __values: __values, - default: tslib_es6 -}); - -var require$$0 = /*@__PURE__*/getAugmentedNamespace(tslib_es6$1); - -var fork = {exports: {}}; - -var types$5 = {}; - -var hasRequiredTypes$1; - -function requireTypes$1 () { - if (hasRequiredTypes$1) return types$5; - hasRequiredTypes$1 = 1; - Object.defineProperty(types$5, "__esModule", { value: true }); - types$5.Def = void 0; - var tslib_1 = require$$0; - var Op = Object.prototype; - var objToStr = Op.toString; - var hasOwn = Op.hasOwnProperty; - var BaseType = (function () { - function BaseType() { - } - BaseType.prototype.assert = function (value, deep) { - if (!this.check(value, deep)) { - var str = shallowStringify(value); - throw new Error(str + " does not match type " + this); - } - return true; - }; - BaseType.prototype.arrayOf = function () { - var elemType = this; - return new ArrayType(elemType); - }; - return BaseType; - }()); - var ArrayType = (function (_super) { - tslib_1.__extends(ArrayType, _super); - function ArrayType(elemType) { - var _this = _super.call(this) || this; - _this.elemType = elemType; - _this.kind = "ArrayType"; - return _this; - } - ArrayType.prototype.toString = function () { - return "[" + this.elemType + "]"; - }; - ArrayType.prototype.check = function (value, deep) { - var _this = this; - return Array.isArray(value) && value.every(function (elem) { return _this.elemType.check(elem, deep); }); - }; - return ArrayType; - }(BaseType)); - var IdentityType = (function (_super) { - tslib_1.__extends(IdentityType, _super); - function IdentityType(value) { - var _this = _super.call(this) || this; - _this.value = value; - _this.kind = "IdentityType"; - return _this; - } - IdentityType.prototype.toString = function () { - return String(this.value); - }; - IdentityType.prototype.check = function (value, deep) { - var result = value === this.value; - if (!result && typeof deep === "function") { - deep(this, value); - } - return result; - }; - return IdentityType; - }(BaseType)); - var ObjectType = (function (_super) { - tslib_1.__extends(ObjectType, _super); - function ObjectType(fields) { - var _this = _super.call(this) || this; - _this.fields = fields; - _this.kind = "ObjectType"; - return _this; - } - ObjectType.prototype.toString = function () { - return "{ " + this.fields.join(", ") + " }"; - }; - ObjectType.prototype.check = function (value, deep) { - return (objToStr.call(value) === objToStr.call({}) && - this.fields.every(function (field) { - return field.type.check(value[field.name], deep); - })); - }; - return ObjectType; - }(BaseType)); - var OrType = (function (_super) { - tslib_1.__extends(OrType, _super); - function OrType(types) { - var _this = _super.call(this) || this; - _this.types = types; - _this.kind = "OrType"; - return _this; - } - OrType.prototype.toString = function () { - return this.types.join(" | "); - }; - OrType.prototype.check = function (value, deep) { - return this.types.some(function (type) { - return type.check(value, deep); - }); - }; - return OrType; - }(BaseType)); - var PredicateType = (function (_super) { - tslib_1.__extends(PredicateType, _super); - function PredicateType(name, predicate) { - var _this = _super.call(this) || this; - _this.name = name; - _this.predicate = predicate; - _this.kind = "PredicateType"; - return _this; - } - PredicateType.prototype.toString = function () { - return this.name; - }; - PredicateType.prototype.check = function (value, deep) { - var result = this.predicate(value, deep); - if (!result && typeof deep === "function") { - deep(this, value); - } - return result; - }; - return PredicateType; - }(BaseType)); - var Def = (function () { - function Def(type, typeName) { - this.type = type; - this.typeName = typeName; - this.baseNames = []; - this.ownFields = Object.create(null); - this.allSupertypes = Object.create(null); - this.supertypeList = []; - this.allFields = Object.create(null); - this.fieldNames = []; - this.finalized = false; - this.buildable = false; - this.buildParams = []; - } - Def.prototype.isSupertypeOf = function (that) { - if (that instanceof Def) { - if (this.finalized !== true || - that.finalized !== true) { - throw new Error(""); - } - return hasOwn.call(that.allSupertypes, this.typeName); - } - else { - throw new Error(that + " is not a Def"); - } - }; - Def.prototype.checkAllFields = function (value, deep) { - var allFields = this.allFields; - if (this.finalized !== true) { - throw new Error("" + this.typeName); - } - function checkFieldByName(name) { - var field = allFields[name]; - var type = field.type; - var child = field.getValue(value); - return type.check(child, deep); - } - return value !== null && - typeof value === "object" && - Object.keys(allFields).every(checkFieldByName); - }; - Def.prototype.bases = function () { - var supertypeNames = []; - for (var _i = 0; _i < arguments.length; _i++) { - supertypeNames[_i] = arguments[_i]; - } - var bases = this.baseNames; - if (this.finalized) { - if (supertypeNames.length !== bases.length) { - throw new Error(""); - } - for (var i = 0; i < supertypeNames.length; i++) { - if (supertypeNames[i] !== bases[i]) { - throw new Error(""); - } - } - return this; - } - supertypeNames.forEach(function (baseName) { - if (bases.indexOf(baseName) < 0) { - bases.push(baseName); - } - }); - return this; - }; - return Def; - }()); - types$5.Def = Def; - var Field = (function () { - function Field(name, type, defaultFn, hidden) { - this.name = name; - this.type = type; - this.defaultFn = defaultFn; - this.hidden = !!hidden; - } - Field.prototype.toString = function () { - return JSON.stringify(this.name) + ": " + this.type; - }; - Field.prototype.getValue = function (obj) { - var value = obj[this.name]; - if (typeof value !== "undefined") { - return value; - } - if (typeof this.defaultFn === "function") { - value = this.defaultFn.call(obj); - } - return value; - }; - return Field; - }()); - function shallowStringify(value) { - if (Array.isArray(value)) { - return "[" + value.map(shallowStringify).join(", ") + "]"; - } - if (value && typeof value === "object") { - return "{ " + Object.keys(value).map(function (key) { - return key + ": " + value[key]; - }).join(", ") + " }"; - } - return JSON.stringify(value); - } - function typesPlugin(_fork) { - var Type = { - or: function () { - var types = []; - for (var _i = 0; _i < arguments.length; _i++) { - types[_i] = arguments[_i]; - } - return new OrType(types.map(function (type) { return Type.from(type); })); - }, - from: function (value, name) { - if (value instanceof ArrayType || - value instanceof IdentityType || - value instanceof ObjectType || - value instanceof OrType || - value instanceof PredicateType) { - return value; - } - if (value instanceof Def) { - return value.type; - } - if (isArray.check(value)) { - if (value.length !== 1) { - throw new Error("only one element type is permitted for typed arrays"); - } - return new ArrayType(Type.from(value[0])); - } - if (isObject.check(value)) { - return new ObjectType(Object.keys(value).map(function (name) { - return new Field(name, Type.from(value[name], name)); - })); - } - if (typeof value === "function") { - var bicfIndex = builtInCtorFns.indexOf(value); - if (bicfIndex >= 0) { - return builtInCtorTypes[bicfIndex]; - } - if (typeof name !== "string") { - throw new Error("missing name"); - } - return new PredicateType(name, value); - } - return new IdentityType(value); - }, - def: function (typeName) { - return hasOwn.call(defCache, typeName) - ? defCache[typeName] - : defCache[typeName] = new DefImpl(typeName); - }, - hasDef: function (typeName) { - return hasOwn.call(defCache, typeName); - } - }; - var builtInCtorFns = []; - var builtInCtorTypes = []; - function defBuiltInType(name, example) { - var objStr = objToStr.call(example); - var type = new PredicateType(name, function (value) { return objToStr.call(value) === objStr; }); - if (example && typeof example.constructor === "function") { - builtInCtorFns.push(example.constructor); - builtInCtorTypes.push(type); - } - return type; - } - var isString = defBuiltInType("string", "truthy"); - var isFunction = defBuiltInType("function", function () { }); - var isArray = defBuiltInType("array", []); - var isObject = defBuiltInType("object", {}); - var isRegExp = defBuiltInType("RegExp", /./); - var isDate = defBuiltInType("Date", new Date()); - var isNumber = defBuiltInType("number", 3); - var isBoolean = defBuiltInType("boolean", true); - var isNull = defBuiltInType("null", null); - var isUndefined = defBuiltInType("undefined", undefined); - var builtInTypes = { - string: isString, - function: isFunction, - array: isArray, - object: isObject, - RegExp: isRegExp, - Date: isDate, - number: isNumber, - boolean: isBoolean, - null: isNull, - undefined: isUndefined, - }; - var defCache = Object.create(null); - function defFromValue(value) { - if (value && typeof value === "object") { - var type = value.type; - if (typeof type === "string" && - hasOwn.call(defCache, type)) { - var d = defCache[type]; - if (d.finalized) { - return d; - } - } - } - return null; - } - var DefImpl = (function (_super) { - tslib_1.__extends(DefImpl, _super); - function DefImpl(typeName) { - var _this = _super.call(this, new PredicateType(typeName, function (value, deep) { return _this.check(value, deep); }), typeName) || this; - return _this; - } - DefImpl.prototype.check = function (value, deep) { - if (this.finalized !== true) { - throw new Error("prematurely checking unfinalized type " + this.typeName); - } - if (value === null || typeof value !== "object") { - return false; - } - var vDef = defFromValue(value); - if (!vDef) { - if (this.typeName === "SourceLocation" || - this.typeName === "Position") { - return this.checkAllFields(value, deep); - } - return false; - } - if (deep && vDef === this) { - return this.checkAllFields(value, deep); - } - if (!this.isSupertypeOf(vDef)) { - return false; - } - if (!deep) { - return true; - } - return vDef.checkAllFields(value, deep) - && this.checkAllFields(value, false); - }; - DefImpl.prototype.build = function () { - var _this = this; - var buildParams = []; - for (var _i = 0; _i < arguments.length; _i++) { - buildParams[_i] = arguments[_i]; - } - this.buildParams = buildParams; - if (this.buildable) { - return this; - } - this.field("type", String, function () { return _this.typeName; }); - this.buildable = true; - var addParam = function (built, param, arg, isArgAvailable) { - if (hasOwn.call(built, param)) - return; - var all = _this.allFields; - if (!hasOwn.call(all, param)) { - throw new Error("" + param); - } - var field = all[param]; - var type = field.type; - var value; - if (isArgAvailable) { - value = arg; - } - else if (field.defaultFn) { - value = field.defaultFn.call(built); - } - else { - var message = "no value or default function given for field " + - JSON.stringify(param) + " of " + _this.typeName + "(" + - _this.buildParams.map(function (name) { - return all[name]; - }).join(", ") + ")"; - throw new Error(message); - } - if (!type.check(value)) { - throw new Error(shallowStringify(value) + - " does not match field " + field + - " of type " + _this.typeName); - } - built[param] = value; - }; - var builder = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var argc = args.length; - if (!_this.finalized) { - throw new Error("attempting to instantiate unfinalized type " + - _this.typeName); - } - var built = Object.create(nodePrototype); - _this.buildParams.forEach(function (param, i) { - if (i < argc) { - addParam(built, param, args[i], true); - } - else { - addParam(built, param, null, false); - } - }); - Object.keys(_this.allFields).forEach(function (param) { - addParam(built, param, null, false); - }); - if (built.type !== _this.typeName) { - throw new Error(""); - } - return built; - }; - builder.from = function (obj) { - if (!_this.finalized) { - throw new Error("attempting to instantiate unfinalized type " + - _this.typeName); - } - var built = Object.create(nodePrototype); - Object.keys(_this.allFields).forEach(function (param) { - if (hasOwn.call(obj, param)) { - addParam(built, param, obj[param], true); - } - else { - addParam(built, param, null, false); - } - }); - if (built.type !== _this.typeName) { - throw new Error(""); - } - return built; - }; - Object.defineProperty(builders, getBuilderName(this.typeName), { - enumerable: true, - value: builder - }); - return this; - }; - DefImpl.prototype.field = function (name, type, defaultFn, hidden) { - if (this.finalized) { - console.error("Ignoring attempt to redefine field " + - JSON.stringify(name) + " of finalized type " + - JSON.stringify(this.typeName)); - return this; - } - this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden); - return this; - }; - DefImpl.prototype.finalize = function () { - var _this = this; - if (!this.finalized) { - var allFields = this.allFields; - var allSupertypes = this.allSupertypes; - this.baseNames.forEach(function (name) { - var def = defCache[name]; - if (def instanceof Def) { - def.finalize(); - extend(allFields, def.allFields); - extend(allSupertypes, def.allSupertypes); - } - else { - var message = "unknown supertype name " + - JSON.stringify(name) + - " for subtype " + - JSON.stringify(_this.typeName); - throw new Error(message); - } - }); - extend(allFields, this.ownFields); - allSupertypes[this.typeName] = this; - this.fieldNames.length = 0; - for (var fieldName in allFields) { - if (hasOwn.call(allFields, fieldName) && - !allFields[fieldName].hidden) { - this.fieldNames.push(fieldName); - } - } - Object.defineProperty(namedTypes, this.typeName, { - enumerable: true, - value: this.type - }); - this.finalized = true; - populateSupertypeList(this.typeName, this.supertypeList); - if (this.buildable && - this.supertypeList.lastIndexOf("Expression") >= 0) { - wrapExpressionBuilderWithStatement(this.typeName); - } - } - }; - return DefImpl; - }(Def)); - function getSupertypeNames(typeName) { - if (!hasOwn.call(defCache, typeName)) { - throw new Error(""); - } - var d = defCache[typeName]; - if (d.finalized !== true) { - throw new Error(""); - } - return d.supertypeList.slice(1); - } - function computeSupertypeLookupTable(candidates) { - var table = {}; - var typeNames = Object.keys(defCache); - var typeNameCount = typeNames.length; - for (var i = 0; i < typeNameCount; ++i) { - var typeName = typeNames[i]; - var d = defCache[typeName]; - if (d.finalized !== true) { - throw new Error("" + typeName); - } - for (var j = 0; j < d.supertypeList.length; ++j) { - var superTypeName = d.supertypeList[j]; - if (hasOwn.call(candidates, superTypeName)) { - table[typeName] = superTypeName; - break; - } - } - } - return table; - } - var builders = Object.create(null); - var nodePrototype = {}; - function defineMethod(name, func) { - var old = nodePrototype[name]; - if (isUndefined.check(func)) { - delete nodePrototype[name]; - } - else { - isFunction.assert(func); - Object.defineProperty(nodePrototype, name, { - enumerable: true, - configurable: true, - value: func - }); - } - return old; - } - function getBuilderName(typeName) { - return typeName.replace(/^[A-Z]+/, function (upperCasePrefix) { - var len = upperCasePrefix.length; - switch (len) { - case 0: return ""; - case 1: return upperCasePrefix.toLowerCase(); - default: - return upperCasePrefix.slice(0, len - 1).toLowerCase() + - upperCasePrefix.charAt(len - 1); - } - }); - } - function getStatementBuilderName(typeName) { - typeName = getBuilderName(typeName); - return typeName.replace(/(Expression)?$/, "Statement"); - } - var namedTypes = {}; - function getFieldNames(object) { - var d = defFromValue(object); - if (d) { - return d.fieldNames.slice(0); - } - if ("type" in object) { - throw new Error("did not recognize object of type " + - JSON.stringify(object.type)); - } - return Object.keys(object); - } - function getFieldValue(object, fieldName) { - var d = defFromValue(object); - if (d) { - var field = d.allFields[fieldName]; - if (field) { - return field.getValue(object); - } - } - return object && object[fieldName]; - } - function eachField(object, callback, context) { - getFieldNames(object).forEach(function (name) { - callback.call(this, name, getFieldValue(object, name)); - }, context); - } - function someField(object, callback, context) { - return getFieldNames(object).some(function (name) { - return callback.call(this, name, getFieldValue(object, name)); - }, context); - } - function wrapExpressionBuilderWithStatement(typeName) { - var wrapperName = getStatementBuilderName(typeName); - if (builders[wrapperName]) - return; - var wrapped = builders[getBuilderName(typeName)]; - if (!wrapped) - return; - var builder = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return builders.expressionStatement(wrapped.apply(builders, args)); - }; - builder.from = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return builders.expressionStatement(wrapped.from.apply(builders, args)); - }; - builders[wrapperName] = builder; - } - function populateSupertypeList(typeName, list) { - list.length = 0; - list.push(typeName); - var lastSeen = Object.create(null); - for (var pos = 0; pos < list.length; ++pos) { - typeName = list[pos]; - var d = defCache[typeName]; - if (d.finalized !== true) { - throw new Error(""); - } - if (hasOwn.call(lastSeen, typeName)) { - delete list[lastSeen[typeName]]; - } - lastSeen[typeName] = pos; - list.push.apply(list, d.baseNames); - } - for (var to = 0, from = to, len = list.length; from < len; ++from) { - if (hasOwn.call(list, from)) { - list[to++] = list[from]; - } - } - list.length = to; - } - function extend(into, from) { - Object.keys(from).forEach(function (name) { - into[name] = from[name]; - }); - return into; - } - function finalize() { - Object.keys(defCache).forEach(function (name) { - defCache[name].finalize(); - }); - } - return { - Type: Type, - builtInTypes: builtInTypes, - getSupertypeNames: getSupertypeNames, - computeSupertypeLookupTable: computeSupertypeLookupTable, - builders: builders, - defineMethod: defineMethod, - getBuilderName: getBuilderName, - getStatementBuilderName: getStatementBuilderName, - namedTypes: namedTypes, - getFieldNames: getFieldNames, - getFieldValue: getFieldValue, - eachField: eachField, - someField: someField, - finalize: finalize, - }; - } - types$5.default = typesPlugin; - return types$5; -} - -var pathVisitor = {exports: {}}; - -var nodePath = {exports: {}}; - -var path = {exports: {}}; - -var hasRequiredPath; - -function requirePath () { - if (hasRequiredPath) return path.exports; - hasRequiredPath = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - function pathPlugin(fork) { - var types = fork.use(types_1.default); - var isArray = types.builtInTypes.array; - var isNumber = types.builtInTypes.number; - var Path = function Path(value, parentPath, name) { - if (!(this instanceof Path)) { - throw new Error("Path constructor cannot be invoked without 'new'"); - } - if (parentPath) { - if (!(parentPath instanceof Path)) { - throw new Error(""); - } - } - else { - parentPath = null; - name = null; - } - this.value = value; - this.parentPath = parentPath; - this.name = name; - this.__childCache = null; - }; - var Pp = Path.prototype; - function getChildCache(path) { - return path.__childCache || (path.__childCache = Object.create(null)); - } - function getChildPath(path, name) { - var cache = getChildCache(path); - var actualChildValue = path.getValueProperty(name); - var childPath = cache[name]; - if (!hasOwn.call(cache, name) || - childPath.value !== actualChildValue) { - childPath = cache[name] = new path.constructor(actualChildValue, path, name); - } - return childPath; - } - Pp.getValueProperty = function getValueProperty(name) { - return this.value[name]; - }; - Pp.get = function get() { - var names = []; - for (var _i = 0; _i < arguments.length; _i++) { - names[_i] = arguments[_i]; - } - var path = this; - var count = names.length; - for (var i = 0; i < count; ++i) { - path = getChildPath(path, names[i]); - } - return path; - }; - Pp.each = function each(callback, context) { - var childPaths = []; - var len = this.value.length; - var i = 0; - for (var i = 0; i < len; ++i) { - if (hasOwn.call(this.value, i)) { - childPaths[i] = this.get(i); - } - } - context = context || this; - for (i = 0; i < len; ++i) { - if (hasOwn.call(childPaths, i)) { - callback.call(context, childPaths[i]); - } - } - }; - Pp.map = function map(callback, context) { - var result = []; - this.each(function (childPath) { - result.push(callback.call(this, childPath)); - }, context); - return result; - }; - Pp.filter = function filter(callback, context) { - var result = []; - this.each(function (childPath) { - if (callback.call(this, childPath)) { - result.push(childPath); - } - }, context); - return result; - }; - function emptyMoves() { } - function getMoves(path, offset, start, end) { - isArray.assert(path.value); - if (offset === 0) { - return emptyMoves; - } - var length = path.value.length; - if (length < 1) { - return emptyMoves; - } - var argc = arguments.length; - if (argc === 2) { - start = 0; - end = length; - } - else if (argc === 3) { - start = Math.max(start, 0); - end = length; - } - else { - start = Math.max(start, 0); - end = Math.min(end, length); - } - isNumber.assert(start); - isNumber.assert(end); - var moves = Object.create(null); - var cache = getChildCache(path); - for (var i = start; i < end; ++i) { - if (hasOwn.call(path.value, i)) { - var childPath = path.get(i); - if (childPath.name !== i) { - throw new Error(""); - } - var newIndex = i + offset; - childPath.name = newIndex; - moves[newIndex] = childPath; - delete cache[i]; - } - } - delete cache.length; - return function () { - for (var newIndex in moves) { - var childPath = moves[newIndex]; - if (childPath.name !== +newIndex) { - throw new Error(""); - } - cache[newIndex] = childPath; - path.value[newIndex] = childPath.value; - } - }; - } - Pp.shift = function shift() { - var move = getMoves(this, -1); - var result = this.value.shift(); - move(); - return result; - }; - Pp.unshift = function unshift() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var move = getMoves(this, args.length); - var result = this.value.unshift.apply(this.value, args); - move(); - return result; - }; - Pp.push = function push() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - isArray.assert(this.value); - delete getChildCache(this).length; - return this.value.push.apply(this.value, args); - }; - Pp.pop = function pop() { - isArray.assert(this.value); - var cache = getChildCache(this); - delete cache[this.value.length - 1]; - delete cache.length; - return this.value.pop(); - }; - Pp.insertAt = function insertAt(index) { - var argc = arguments.length; - var move = getMoves(this, argc - 1, index); - if (move === emptyMoves && argc <= 1) { - return this; - } - index = Math.max(index, 0); - for (var i = 1; i < argc; ++i) { - this.value[index + i - 1] = arguments[i]; - } - move(); - return this; - }; - Pp.insertBefore = function insertBefore() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var pp = this.parentPath; - var argc = args.length; - var insertAtArgs = [this.name]; - for (var i = 0; i < argc; ++i) { - insertAtArgs.push(args[i]); - } - return pp.insertAt.apply(pp, insertAtArgs); - }; - Pp.insertAfter = function insertAfter() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var pp = this.parentPath; - var argc = args.length; - var insertAtArgs = [this.name + 1]; - for (var i = 0; i < argc; ++i) { - insertAtArgs.push(args[i]); - } - return pp.insertAt.apply(pp, insertAtArgs); - }; - function repairRelationshipWithParent(path) { - if (!(path instanceof Path)) { - throw new Error(""); - } - var pp = path.parentPath; - if (!pp) { - return path; - } - var parentValue = pp.value; - var parentCache = getChildCache(pp); - if (parentValue[path.name] === path.value) { - parentCache[path.name] = path; - } - else if (isArray.check(parentValue)) { - var i = parentValue.indexOf(path.value); - if (i >= 0) { - parentCache[path.name = i] = path; - } - } - else { - parentValue[path.name] = path.value; - parentCache[path.name] = path; - } - if (parentValue[path.name] !== path.value) { - throw new Error(""); - } - if (path.parentPath.get(path.name) !== path) { - throw new Error(""); - } - return path; - } - Pp.replace = function replace(replacement) { - var results = []; - var parentValue = this.parentPath.value; - var parentCache = getChildCache(this.parentPath); - var count = arguments.length; - repairRelationshipWithParent(this); - if (isArray.check(parentValue)) { - var originalLength = parentValue.length; - var move = getMoves(this.parentPath, count - 1, this.name + 1); - var spliceArgs = [this.name, 1]; - for (var i = 0; i < count; ++i) { - spliceArgs.push(arguments[i]); - } - var splicedOut = parentValue.splice.apply(parentValue, spliceArgs); - if (splicedOut[0] !== this.value) { - throw new Error(""); - } - if (parentValue.length !== (originalLength - 1 + count)) { - throw new Error(""); - } - move(); - if (count === 0) { - delete this.value; - delete parentCache[this.name]; - this.__childCache = null; - } - else { - if (parentValue[this.name] !== replacement) { - throw new Error(""); - } - if (this.value !== replacement) { - this.value = replacement; - this.__childCache = null; - } - for (i = 0; i < count; ++i) { - results.push(this.parentPath.get(this.name + i)); - } - if (results[0] !== this) { - throw new Error(""); - } - } - } - else if (count === 1) { - if (this.value !== replacement) { - this.__childCache = null; - } - this.value = parentValue[this.name] = replacement; - results.push(this); - } - else if (count === 0) { - delete parentValue[this.name]; - delete this.value; - this.__childCache = null; - } - else { - throw new Error("Could not replace path"); - } - return results; - }; - return Path; - } - exports$1.default = pathPlugin; - module.exports = exports$1["default"]; - } (path, path.exports)); - return path.exports; -} - -var scope = {exports: {}}; - -var hasRequiredScope; - -function requireScope () { - if (hasRequiredScope) return scope.exports; - hasRequiredScope = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var hasOwn = Object.prototype.hasOwnProperty; - function scopePlugin(fork) { - var types = fork.use(types_1.default); - var Type = types.Type; - var namedTypes = types.namedTypes; - var Node = namedTypes.Node; - var Expression = namedTypes.Expression; - var isArray = types.builtInTypes.array; - var b = types.builders; - var Scope = function Scope(path, parentScope) { - if (!(this instanceof Scope)) { - throw new Error("Scope constructor cannot be invoked without 'new'"); - } - ScopeType.assert(path.value); - var depth; - if (parentScope) { - if (!(parentScope instanceof Scope)) { - throw new Error(""); - } - depth = parentScope.depth + 1; - } - else { - parentScope = null; - depth = 0; - } - Object.defineProperties(this, { - path: { value: path }, - node: { value: path.value }, - isGlobal: { value: !parentScope, enumerable: true }, - depth: { value: depth }, - parent: { value: parentScope }, - bindings: { value: {} }, - types: { value: {} }, - }); - }; - var scopeTypes = [ - namedTypes.Program, - namedTypes.Function, - namedTypes.CatchClause - ]; - var ScopeType = Type.or.apply(Type, scopeTypes); - Scope.isEstablishedBy = function (node) { - return ScopeType.check(node); - }; - var Sp = Scope.prototype; - Sp.didScan = false; - Sp.declares = function (name) { - this.scan(); - return hasOwn.call(this.bindings, name); - }; - Sp.declaresType = function (name) { - this.scan(); - return hasOwn.call(this.types, name); - }; - Sp.declareTemporary = function (prefix) { - if (prefix) { - if (!/^[a-z$_]/i.test(prefix)) { - throw new Error(""); - } - } - else { - prefix = "t$"; - } - prefix += this.depth.toString(36) + "$"; - this.scan(); - var index = 0; - while (this.declares(prefix + index)) { - ++index; - } - var name = prefix + index; - return this.bindings[name] = types.builders.identifier(name); - }; - Sp.injectTemporary = function (identifier, init) { - identifier || (identifier = this.declareTemporary()); - var bodyPath = this.path.get("body"); - if (namedTypes.BlockStatement.check(bodyPath.value)) { - bodyPath = bodyPath.get("body"); - } - bodyPath.unshift(b.variableDeclaration("var", [b.variableDeclarator(identifier, init || null)])); - return identifier; - }; - Sp.scan = function (force) { - if (force || !this.didScan) { - for (var name in this.bindings) { - delete this.bindings[name]; - } - scanScope(this.path, this.bindings, this.types); - this.didScan = true; - } - }; - Sp.getBindings = function () { - this.scan(); - return this.bindings; - }; - Sp.getTypes = function () { - this.scan(); - return this.types; - }; - function scanScope(path, bindings, scopeTypes) { - var node = path.value; - ScopeType.assert(node); - if (namedTypes.CatchClause.check(node)) { - var param = path.get("param"); - if (param.value) { - addPattern(param, bindings); - } - } - else { - recursiveScanScope(path, bindings, scopeTypes); - } - } - function recursiveScanScope(path, bindings, scopeTypes) { - var node = path.value; - if (path.parent && - namedTypes.FunctionExpression.check(path.parent.node) && - path.parent.node.id) { - addPattern(path.parent.get("id"), bindings); - } - if (!node) ; - else if (isArray.check(node)) { - path.each(function (childPath) { - recursiveScanChild(childPath, bindings, scopeTypes); - }); - } - else if (namedTypes.Function.check(node)) { - path.get("params").each(function (paramPath) { - addPattern(paramPath, bindings); - }); - recursiveScanChild(path.get("body"), bindings, scopeTypes); - } - else if ((namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) || - (namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node)) || - (namedTypes.TSTypeAliasDeclaration && namedTypes.TSTypeAliasDeclaration.check(node)) || - (namedTypes.TSInterfaceDeclaration && namedTypes.TSInterfaceDeclaration.check(node))) { - addTypePattern(path.get("id"), scopeTypes); - } - else if (namedTypes.VariableDeclarator.check(node)) { - addPattern(path.get("id"), bindings); - recursiveScanChild(path.get("init"), bindings, scopeTypes); - } - else if (node.type === "ImportSpecifier" || - node.type === "ImportNamespaceSpecifier" || - node.type === "ImportDefaultSpecifier") { - addPattern( - path.get(node.local ? "local" : - node.name ? "name" : "id"), bindings); - } - else if (Node.check(node) && !Expression.check(node)) { - types.eachField(node, function (name, child) { - var childPath = path.get(name); - if (!pathHasValue(childPath, child)) { - throw new Error(""); - } - recursiveScanChild(childPath, bindings, scopeTypes); - }); - } - } - function pathHasValue(path, value) { - if (path.value === value) { - return true; - } - if (Array.isArray(path.value) && - path.value.length === 0 && - Array.isArray(value) && - value.length === 0) { - return true; - } - return false; - } - function recursiveScanChild(path, bindings, scopeTypes) { - var node = path.value; - if (!node || Expression.check(node)) ; - else if (namedTypes.FunctionDeclaration.check(node) && - node.id !== null) { - addPattern(path.get("id"), bindings); - } - else if (namedTypes.ClassDeclaration && - namedTypes.ClassDeclaration.check(node)) { - addPattern(path.get("id"), bindings); - } - else if (ScopeType.check(node)) { - if (namedTypes.CatchClause.check(node) && - namedTypes.Identifier.check(node.param)) { - var catchParamName = node.param.name; - var hadBinding = hasOwn.call(bindings, catchParamName); - recursiveScanScope(path.get("body"), bindings, scopeTypes); - if (!hadBinding) { - delete bindings[catchParamName]; - } - } - } - else { - recursiveScanScope(path, bindings, scopeTypes); - } - } - function addPattern(patternPath, bindings) { - var pattern = patternPath.value; - namedTypes.Pattern.assert(pattern); - if (namedTypes.Identifier.check(pattern)) { - if (hasOwn.call(bindings, pattern.name)) { - bindings[pattern.name].push(patternPath); - } - else { - bindings[pattern.name] = [patternPath]; - } - } - else if (namedTypes.AssignmentPattern && - namedTypes.AssignmentPattern.check(pattern)) { - addPattern(patternPath.get('left'), bindings); - } - else if (namedTypes.ObjectPattern && - namedTypes.ObjectPattern.check(pattern)) { - patternPath.get('properties').each(function (propertyPath) { - var property = propertyPath.value; - if (namedTypes.Pattern.check(property)) { - addPattern(propertyPath, bindings); - } - else if (namedTypes.Property.check(property)) { - addPattern(propertyPath.get('value'), bindings); - } - else if (namedTypes.SpreadProperty && - namedTypes.SpreadProperty.check(property)) { - addPattern(propertyPath.get('argument'), bindings); - } - }); - } - else if (namedTypes.ArrayPattern && - namedTypes.ArrayPattern.check(pattern)) { - patternPath.get('elements').each(function (elementPath) { - var element = elementPath.value; - if (namedTypes.Pattern.check(element)) { - addPattern(elementPath, bindings); - } - else if (namedTypes.SpreadElement && - namedTypes.SpreadElement.check(element)) { - addPattern(elementPath.get("argument"), bindings); - } - }); - } - else if (namedTypes.PropertyPattern && - namedTypes.PropertyPattern.check(pattern)) { - addPattern(patternPath.get('pattern'), bindings); - } - else if ((namedTypes.SpreadElementPattern && - namedTypes.SpreadElementPattern.check(pattern)) || - (namedTypes.SpreadPropertyPattern && - namedTypes.SpreadPropertyPattern.check(pattern))) { - addPattern(patternPath.get('argument'), bindings); - } - } - function addTypePattern(patternPath, types) { - var pattern = patternPath.value; - namedTypes.Pattern.assert(pattern); - if (namedTypes.Identifier.check(pattern)) { - if (hasOwn.call(types, pattern.name)) { - types[pattern.name].push(patternPath); - } - else { - types[pattern.name] = [patternPath]; - } - } - } - Sp.lookup = function (name) { - for (var scope = this; scope; scope = scope.parent) - if (scope.declares(name)) - break; - return scope; - }; - Sp.lookupType = function (name) { - for (var scope = this; scope; scope = scope.parent) - if (scope.declaresType(name)) - break; - return scope; - }; - Sp.getGlobalScope = function () { - var scope = this; - while (!scope.isGlobal) - scope = scope.parent; - return scope; - }; - return Scope; - } - exports$1.default = scopePlugin; - module.exports = exports$1["default"]; - } (scope, scope.exports)); - return scope.exports; -} - -var hasRequiredNodePath; - -function requireNodePath () { - if (hasRequiredNodePath) return nodePath.exports; - hasRequiredNodePath = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var path_1 = tslib_1.__importDefault(requirePath()); - var scope_1 = tslib_1.__importDefault(requireScope()); - function nodePathPlugin(fork) { - var types = fork.use(types_1.default); - var n = types.namedTypes; - var b = types.builders; - var isNumber = types.builtInTypes.number; - var isArray = types.builtInTypes.array; - var Path = fork.use(path_1.default); - var Scope = fork.use(scope_1.default); - var NodePath = function NodePath(value, parentPath, name) { - if (!(this instanceof NodePath)) { - throw new Error("NodePath constructor cannot be invoked without 'new'"); - } - Path.call(this, value, parentPath, name); - }; - var NPp = NodePath.prototype = Object.create(Path.prototype, { - constructor: { - value: NodePath, - enumerable: false, - writable: true, - configurable: true - } - }); - Object.defineProperties(NPp, { - node: { - get: function () { - Object.defineProperty(this, "node", { - configurable: true, - value: this._computeNode() - }); - return this.node; - } - }, - parent: { - get: function () { - Object.defineProperty(this, "parent", { - configurable: true, - value: this._computeParent() - }); - return this.parent; - } - }, - scope: { - get: function () { - Object.defineProperty(this, "scope", { - configurable: true, - value: this._computeScope() - }); - return this.scope; - } - } - }); - NPp.replace = function () { - delete this.node; - delete this.parent; - delete this.scope; - return Path.prototype.replace.apply(this, arguments); - }; - NPp.prune = function () { - var remainingNodePath = this.parent; - this.replace(); - return cleanUpNodesAfterPrune(remainingNodePath); - }; - NPp._computeNode = function () { - var value = this.value; - if (n.Node.check(value)) { - return value; - } - var pp = this.parentPath; - return pp && pp.node || null; - }; - NPp._computeParent = function () { - var value = this.value; - var pp = this.parentPath; - if (!n.Node.check(value)) { - while (pp && !n.Node.check(pp.value)) { - pp = pp.parentPath; - } - if (pp) { - pp = pp.parentPath; - } - } - while (pp && !n.Node.check(pp.value)) { - pp = pp.parentPath; - } - return pp || null; - }; - NPp._computeScope = function () { - var value = this.value; - var pp = this.parentPath; - var scope = pp && pp.scope; - if (n.Node.check(value) && - Scope.isEstablishedBy(value)) { - scope = new Scope(this, scope); - } - return scope || null; - }; - NPp.getValueProperty = function (name) { - return types.getFieldValue(this.value, name); - }; - NPp.needsParens = function (assumeExpressionContext) { - var pp = this.parentPath; - if (!pp) { - return false; - } - var node = this.value; - if (!n.Expression.check(node)) { - return false; - } - if (node.type === "Identifier") { - return false; - } - while (!n.Node.check(pp.value)) { - pp = pp.parentPath; - if (!pp) { - return false; - } - } - var parent = pp.value; - switch (node.type) { - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - return parent.type === "MemberExpression" - && this.name === "object" - && parent.object === node; - case "BinaryExpression": - case "LogicalExpression": - switch (parent.type) { - case "CallExpression": - return this.name === "callee" - && parent.callee === node; - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - return true; - case "MemberExpression": - return this.name === "object" - && parent.object === node; - case "BinaryExpression": - case "LogicalExpression": { - var n_1 = node; - var po = parent.operator; - var pp_1 = PRECEDENCE[po]; - var no = n_1.operator; - var np = PRECEDENCE[no]; - if (pp_1 > np) { - return true; - } - if (pp_1 === np && this.name === "right") { - if (parent.right !== n_1) { - throw new Error("Nodes must be equal"); - } - return true; - } - } - default: - return false; - } - case "SequenceExpression": - switch (parent.type) { - case "ForStatement": - return false; - case "ExpressionStatement": - return this.name !== "expression"; - default: - return true; - } - case "YieldExpression": - switch (parent.type) { - case "BinaryExpression": - case "LogicalExpression": - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - case "CallExpression": - case "MemberExpression": - case "NewExpression": - case "ConditionalExpression": - case "YieldExpression": - return true; - default: - return false; - } - case "Literal": - return parent.type === "MemberExpression" - && isNumber.check(node.value) - && this.name === "object" - && parent.object === node; - case "AssignmentExpression": - case "ConditionalExpression": - switch (parent.type) { - case "UnaryExpression": - case "SpreadElement": - case "SpreadProperty": - case "BinaryExpression": - case "LogicalExpression": - return true; - case "CallExpression": - return this.name === "callee" - && parent.callee === node; - case "ConditionalExpression": - return this.name === "test" - && parent.test === node; - case "MemberExpression": - return this.name === "object" - && parent.object === node; - default: - return false; - } - default: - if (parent.type === "NewExpression" && - this.name === "callee" && - parent.callee === node) { - return containsCallExpression(node); - } - } - if (assumeExpressionContext !== true && - !this.canBeFirstInStatement() && - this.firstInStatement()) - return true; - return false; - }; - function isBinary(node) { - return n.BinaryExpression.check(node) - || n.LogicalExpression.check(node); - } - var PRECEDENCE = {}; - [["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"] - ].forEach(function (tier, i) { - tier.forEach(function (op) { - PRECEDENCE[op] = i; - }); - }); - function containsCallExpression(node) { - if (n.CallExpression.check(node)) { - return true; - } - if (isArray.check(node)) { - return node.some(containsCallExpression); - } - if (n.Node.check(node)) { - return types.someField(node, function (_name, child) { - return containsCallExpression(child); - }); - } - return false; - } - NPp.canBeFirstInStatement = function () { - var node = this.node; - return !n.FunctionExpression.check(node) - && !n.ObjectExpression.check(node); - }; - NPp.firstInStatement = function () { - return firstInStatement(this); - }; - function firstInStatement(path) { - for (var node, parent; path.parent; path = path.parent) { - node = path.node; - parent = path.parent.node; - if (n.BlockStatement.check(parent) && - path.parent.name === "body" && - path.name === 0) { - if (parent.body[0] !== node) { - throw new Error("Nodes must be equal"); - } - return true; - } - if (n.ExpressionStatement.check(parent) && - path.name === "expression") { - if (parent.expression !== node) { - throw new Error("Nodes must be equal"); - } - return true; - } - if (n.SequenceExpression.check(parent) && - path.parent.name === "expressions" && - path.name === 0) { - if (parent.expressions[0] !== node) { - throw new Error("Nodes must be equal"); - } - continue; - } - if (n.CallExpression.check(parent) && - path.name === "callee") { - if (parent.callee !== node) { - throw new Error("Nodes must be equal"); - } - continue; - } - if (n.MemberExpression.check(parent) && - path.name === "object") { - if (parent.object !== node) { - throw new Error("Nodes must be equal"); - } - continue; - } - if (n.ConditionalExpression.check(parent) && - path.name === "test") { - if (parent.test !== node) { - throw new Error("Nodes must be equal"); - } - continue; - } - if (isBinary(parent) && - path.name === "left") { - if (parent.left !== node) { - throw new Error("Nodes must be equal"); - } - continue; - } - if (n.UnaryExpression.check(parent) && - !parent.prefix && - path.name === "argument") { - if (parent.argument !== node) { - throw new Error("Nodes must be equal"); - } - continue; - } - return false; - } - return true; - } - function cleanUpNodesAfterPrune(remainingNodePath) { - if (n.VariableDeclaration.check(remainingNodePath.node)) { - var declarations = remainingNodePath.get('declarations').value; - if (!declarations || declarations.length === 0) { - return remainingNodePath.prune(); - } - } - else if (n.ExpressionStatement.check(remainingNodePath.node)) { - if (!remainingNodePath.get('expression').value) { - return remainingNodePath.prune(); - } - } - else if (n.IfStatement.check(remainingNodePath.node)) { - cleanUpIfStatementAfterPrune(remainingNodePath); - } - return remainingNodePath; - } - function cleanUpIfStatementAfterPrune(ifStatement) { - var testExpression = ifStatement.get('test').value; - var alternate = ifStatement.get('alternate').value; - var consequent = ifStatement.get('consequent').value; - if (!consequent && !alternate) { - var testExpressionStatement = b.expressionStatement(testExpression); - ifStatement.replace(testExpressionStatement); - } - else if (!consequent && alternate) { - var negatedTestExpression = b.unaryExpression('!', testExpression, true); - if (n.UnaryExpression.check(testExpression) && testExpression.operator === '!') { - negatedTestExpression = testExpression.argument; - } - ifStatement.get("test").replace(negatedTestExpression); - ifStatement.get("consequent").replace(alternate); - ifStatement.get("alternate").replace(); - } - } - return NodePath; - } - exports$1.default = nodePathPlugin; - module.exports = exports$1["default"]; - } (nodePath, nodePath.exports)); - return nodePath.exports; -} - -var hasRequiredPathVisitor; - -function requirePathVisitor () { - if (hasRequiredPathVisitor) return pathVisitor.exports; - hasRequiredPathVisitor = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var node_path_1 = tslib_1.__importDefault(requireNodePath()); - var hasOwn = Object.prototype.hasOwnProperty; - function pathVisitorPlugin(fork) { - var types = fork.use(types_1.default); - var NodePath = fork.use(node_path_1.default); - var isArray = types.builtInTypes.array; - var isObject = types.builtInTypes.object; - var isFunction = types.builtInTypes.function; - var undefined$1; - var PathVisitor = function PathVisitor() { - if (!(this instanceof PathVisitor)) { - throw new Error("PathVisitor constructor cannot be invoked without 'new'"); - } - this._reusableContextStack = []; - this._methodNameTable = computeMethodNameTable(this); - this._shouldVisitComments = - hasOwn.call(this._methodNameTable, "Block") || - hasOwn.call(this._methodNameTable, "Line"); - this.Context = makeContextConstructor(this); - this._visiting = false; - this._changeReported = false; - }; - function computeMethodNameTable(visitor) { - var typeNames = Object.create(null); - for (var methodName in visitor) { - if (/^visit[A-Z]/.test(methodName)) { - typeNames[methodName.slice("visit".length)] = true; - } - } - var supertypeTable = types.computeSupertypeLookupTable(typeNames); - var methodNameTable = Object.create(null); - var typeNameKeys = Object.keys(supertypeTable); - var typeNameCount = typeNameKeys.length; - for (var i = 0; i < typeNameCount; ++i) { - var typeName = typeNameKeys[i]; - methodName = "visit" + supertypeTable[typeName]; - if (isFunction.check(visitor[methodName])) { - methodNameTable[typeName] = methodName; - } - } - return methodNameTable; - } - PathVisitor.fromMethodsObject = function fromMethodsObject(methods) { - if (methods instanceof PathVisitor) { - return methods; - } - if (!isObject.check(methods)) { - return new PathVisitor; - } - var Visitor = function Visitor() { - if (!(this instanceof Visitor)) { - throw new Error("Visitor constructor cannot be invoked without 'new'"); - } - PathVisitor.call(this); - }; - var Vp = Visitor.prototype = Object.create(PVp); - Vp.constructor = Visitor; - extend(Vp, methods); - extend(Visitor, PathVisitor); - isFunction.assert(Visitor.fromMethodsObject); - isFunction.assert(Visitor.visit); - return new Visitor; - }; - function extend(target, source) { - for (var property in source) { - if (hasOwn.call(source, property)) { - target[property] = source[property]; - } - } - return target; - } - PathVisitor.visit = function visit(node, methods) { - return PathVisitor.fromMethodsObject(methods).visit(node); - }; - var PVp = PathVisitor.prototype; - PVp.visit = function () { - if (this._visiting) { - throw new Error("Recursively calling visitor.visit(path) resets visitor state. " + - "Try this.visit(path) or this.traverse(path) instead."); - } - this._visiting = true; - this._changeReported = false; - this._abortRequested = false; - var argc = arguments.length; - var args = new Array(argc); - for (var i = 0; i < argc; ++i) { - args[i] = arguments[i]; - } - if (!(args[0] instanceof NodePath)) { - args[0] = new NodePath({ root: args[0] }).get("root"); - } - this.reset.apply(this, args); - var didNotThrow; - try { - var root = this.visitWithoutReset(args[0]); - didNotThrow = true; - } - finally { - this._visiting = false; - if (!didNotThrow && this._abortRequested) { - return args[0].value; - } - } - return root; - }; - PVp.AbortRequest = function AbortRequest() { }; - PVp.abort = function () { - var visitor = this; - visitor._abortRequested = true; - var request = new visitor.AbortRequest(); - request.cancel = function () { - visitor._abortRequested = false; - }; - throw request; - }; - PVp.reset = function (_path ) { - }; - PVp.visitWithoutReset = function (path) { - if (this instanceof this.Context) { - return this.visitor.visitWithoutReset(path); - } - if (!(path instanceof NodePath)) { - throw new Error(""); - } - var value = path.value; - var methodName = value && - typeof value === "object" && - typeof value.type === "string" && - this._methodNameTable[value.type]; - if (methodName) { - var context = this.acquireContext(path); - try { - return context.invokeVisitorMethod(methodName); - } - finally { - this.releaseContext(context); - } - } - else { - return visitChildren(path, this); - } - }; - function visitChildren(path, visitor) { - if (!(path instanceof NodePath)) { - throw new Error(""); - } - if (!(visitor instanceof PathVisitor)) { - throw new Error(""); - } - var value = path.value; - if (isArray.check(value)) { - path.each(visitor.visitWithoutReset, visitor); - } - else if (!isObject.check(value)) ; - else { - var childNames = types.getFieldNames(value); - if (visitor._shouldVisitComments && - value.comments && - childNames.indexOf("comments") < 0) { - childNames.push("comments"); - } - var childCount = childNames.length; - var childPaths = []; - for (var i = 0; i < childCount; ++i) { - var childName = childNames[i]; - if (!hasOwn.call(value, childName)) { - value[childName] = types.getFieldValue(value, childName); - } - childPaths.push(path.get(childName)); - } - for (var i = 0; i < childCount; ++i) { - visitor.visitWithoutReset(childPaths[i]); - } - } - return path.value; - } - PVp.acquireContext = function (path) { - if (this._reusableContextStack.length === 0) { - return new this.Context(path); - } - return this._reusableContextStack.pop().reset(path); - }; - PVp.releaseContext = function (context) { - if (!(context instanceof this.Context)) { - throw new Error(""); - } - this._reusableContextStack.push(context); - context.currentPath = null; - }; - PVp.reportChanged = function () { - this._changeReported = true; - }; - PVp.wasChangeReported = function () { - return this._changeReported; - }; - function makeContextConstructor(visitor) { - function Context(path) { - if (!(this instanceof Context)) { - throw new Error(""); - } - if (!(this instanceof PathVisitor)) { - throw new Error(""); - } - if (!(path instanceof NodePath)) { - throw new Error(""); - } - Object.defineProperty(this, "visitor", { - value: visitor, - writable: false, - enumerable: true, - configurable: false - }); - this.currentPath = path; - this.needToCallTraverse = true; - Object.seal(this); - } - if (!(visitor instanceof PathVisitor)) { - throw new Error(""); - } - var Cp = Context.prototype = Object.create(visitor); - Cp.constructor = Context; - extend(Cp, sharedContextProtoMethods); - return Context; - } - var sharedContextProtoMethods = Object.create(null); - sharedContextProtoMethods.reset = - function reset(path) { - if (!(this instanceof this.Context)) { - throw new Error(""); - } - if (!(path instanceof NodePath)) { - throw new Error(""); - } - this.currentPath = path; - this.needToCallTraverse = true; - return this; - }; - sharedContextProtoMethods.invokeVisitorMethod = - function invokeVisitorMethod(methodName) { - if (!(this instanceof this.Context)) { - throw new Error(""); - } - if (!(this.currentPath instanceof NodePath)) { - throw new Error(""); - } - var result = this.visitor[methodName].call(this, this.currentPath); - if (result === false) { - this.needToCallTraverse = false; - } - else if (result !== undefined$1) { - this.currentPath = this.currentPath.replace(result)[0]; - if (this.needToCallTraverse) { - this.traverse(this.currentPath); - } - } - if (this.needToCallTraverse !== false) { - throw new Error("Must either call this.traverse or return false in " + methodName); - } - var path = this.currentPath; - return path && path.value; - }; - sharedContextProtoMethods.traverse = - function traverse(path, newVisitor) { - if (!(this instanceof this.Context)) { - throw new Error(""); - } - if (!(path instanceof NodePath)) { - throw new Error(""); - } - if (!(this.currentPath instanceof NodePath)) { - throw new Error(""); - } - this.needToCallTraverse = false; - return visitChildren(path, PathVisitor.fromMethodsObject(newVisitor || this.visitor)); - }; - sharedContextProtoMethods.visit = - function visit(path, newVisitor) { - if (!(this instanceof this.Context)) { - throw new Error(""); - } - if (!(path instanceof NodePath)) { - throw new Error(""); - } - if (!(this.currentPath instanceof NodePath)) { - throw new Error(""); - } - this.needToCallTraverse = false; - return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path); - }; - sharedContextProtoMethods.reportChanged = function reportChanged() { - this.visitor.reportChanged(); - }; - sharedContextProtoMethods.abort = function abort() { - this.needToCallTraverse = false; - this.visitor.abort(); - }; - return PathVisitor; - } - exports$1.default = pathVisitorPlugin; - module.exports = exports$1["default"]; - } (pathVisitor, pathVisitor.exports)); - return pathVisitor.exports; -} - -var equiv = {exports: {}}; - -var hasRequiredEquiv; - -function requireEquiv () { - if (hasRequiredEquiv) return equiv.exports; - hasRequiredEquiv = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - function default_1(fork) { - var types = fork.use(types_1.default); - var getFieldNames = types.getFieldNames; - var getFieldValue = types.getFieldValue; - var isArray = types.builtInTypes.array; - var isObject = types.builtInTypes.object; - var isDate = types.builtInTypes.Date; - var isRegExp = types.builtInTypes.RegExp; - var hasOwn = Object.prototype.hasOwnProperty; - function astNodesAreEquivalent(a, b, problemPath) { - if (isArray.check(problemPath)) { - problemPath.length = 0; - } - else { - problemPath = null; - } - return areEquivalent(a, b, problemPath); - } - astNodesAreEquivalent.assert = function (a, b) { - var problemPath = []; - if (!astNodesAreEquivalent(a, b, problemPath)) { - if (problemPath.length === 0) { - if (a !== b) { - throw new Error("Nodes must be equal"); - } - } - else { - throw new Error("Nodes differ in the following path: " + - problemPath.map(subscriptForProperty).join("")); - } - } - }; - function subscriptForProperty(property) { - if (/[_$a-z][_$a-z0-9]*/i.test(property)) { - return "." + property; - } - return "[" + JSON.stringify(property) + "]"; - } - function areEquivalent(a, b, problemPath) { - if (a === b) { - return true; - } - if (isArray.check(a)) { - return arraysAreEquivalent(a, b, problemPath); - } - if (isObject.check(a)) { - return objectsAreEquivalent(a, b, problemPath); - } - if (isDate.check(a)) { - return isDate.check(b) && (+a === +b); - } - if (isRegExp.check(a)) { - return isRegExp.check(b) && (a.source === b.source && - a.global === b.global && - a.multiline === b.multiline && - a.ignoreCase === b.ignoreCase); - } - return a == b; - } - function arraysAreEquivalent(a, b, problemPath) { - isArray.assert(a); - var aLength = a.length; - if (!isArray.check(b) || b.length !== aLength) { - if (problemPath) { - problemPath.push("length"); - } - return false; - } - for (var i = 0; i < aLength; ++i) { - if (problemPath) { - problemPath.push(i); - } - if (i in a !== i in b) { - return false; - } - if (!areEquivalent(a[i], b[i], problemPath)) { - return false; - } - if (problemPath) { - var problemPathTail = problemPath.pop(); - if (problemPathTail !== i) { - throw new Error("" + problemPathTail); - } - } - } - return true; - } - function objectsAreEquivalent(a, b, problemPath) { - isObject.assert(a); - if (!isObject.check(b)) { - return false; - } - if (a.type !== b.type) { - if (problemPath) { - problemPath.push("type"); - } - return false; - } - var aNames = getFieldNames(a); - var aNameCount = aNames.length; - var bNames = getFieldNames(b); - var bNameCount = bNames.length; - if (aNameCount === bNameCount) { - for (var i = 0; i < aNameCount; ++i) { - var name = aNames[i]; - var aChild = getFieldValue(a, name); - var bChild = getFieldValue(b, name); - if (problemPath) { - problemPath.push(name); - } - if (!areEquivalent(aChild, bChild, problemPath)) { - return false; - } - if (problemPath) { - var problemPathTail = problemPath.pop(); - if (problemPathTail !== name) { - throw new Error("" + problemPathTail); - } - } - } - return true; - } - if (!problemPath) { - return false; - } - var seenNames = Object.create(null); - for (i = 0; i < aNameCount; ++i) { - seenNames[aNames[i]] = true; - } - for (i = 0; i < bNameCount; ++i) { - name = bNames[i]; - if (!hasOwn.call(seenNames, name)) { - problemPath.push(name); - return false; - } - delete seenNames[name]; - } - for (name in seenNames) { - problemPath.push(name); - break; - } - return false; - } - return astNodesAreEquivalent; - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (equiv, equiv.exports)); - return equiv.exports; -} - -var hasRequiredFork; - -function requireFork () { - if (hasRequiredFork) return fork.exports; - hasRequiredFork = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var path_visitor_1 = tslib_1.__importDefault(requirePathVisitor()); - var equiv_1 = tslib_1.__importDefault(requireEquiv()); - var path_1 = tslib_1.__importDefault(requirePath()); - var node_path_1 = tslib_1.__importDefault(requireNodePath()); - function default_1(defs) { - var fork = createFork(); - var types = fork.use(types_1.default); - defs.forEach(fork.use); - types.finalize(); - var PathVisitor = fork.use(path_visitor_1.default); - return { - Type: types.Type, - builtInTypes: types.builtInTypes, - namedTypes: types.namedTypes, - builders: types.builders, - defineMethod: types.defineMethod, - getFieldNames: types.getFieldNames, - getFieldValue: types.getFieldValue, - eachField: types.eachField, - someField: types.someField, - getSupertypeNames: types.getSupertypeNames, - getBuilderName: types.getBuilderName, - astNodesAreEquivalent: fork.use(equiv_1.default), - finalize: types.finalize, - Path: fork.use(path_1.default), - NodePath: fork.use(node_path_1.default), - PathVisitor: PathVisitor, - use: fork.use, - visit: PathVisitor.visit, - }; - } - exports$1.default = default_1; - function createFork() { - var used = []; - var usedResult = []; - function use(plugin) { - var idx = used.indexOf(plugin); - if (idx === -1) { - idx = used.length; - used.push(plugin); - usedResult[idx] = plugin(fork); - } - return usedResult[idx]; - } - var fork = { use: use }; - return fork; - } - module.exports = exports$1["default"]; - } (fork, fork.exports)); - return fork.exports; -} - -var core$1 = {exports: {}}; - -var shared = {exports: {}}; - -var hasRequiredShared; - -function requireShared () { - if (hasRequiredShared) return shared.exports; - hasRequiredShared = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - function default_1(fork) { - var types = fork.use(types_1.default); - var Type = types.Type; - var builtin = types.builtInTypes; - var isNumber = builtin.number; - function geq(than) { - return Type.from(function (value) { return isNumber.check(value) && value >= than; }, isNumber + " >= " + than); - } - var defaults = { - "null": function () { return null; }, - "emptyArray": function () { return []; }, - "false": function () { return false; }, - "true": function () { return true; }, - "undefined": function () { }, - "use strict": function () { return "use strict"; } - }; - var naiveIsPrimitive = Type.or(builtin.string, builtin.number, builtin.boolean, builtin.null, builtin.undefined); - var isPrimitive = Type.from(function (value) { - if (value === null) - return true; - var type = typeof value; - if (type === "object" || - type === "function") { - return false; - } - return true; - }, naiveIsPrimitive.toString()); - return { - geq: geq, - defaults: defaults, - isPrimitive: isPrimitive, - }; - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (shared, shared.exports)); - return shared.exports; -} - -var hasRequiredCore; - -function requireCore () { - if (hasRequiredCore) return core$1.exports; - hasRequiredCore = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - var types = fork.use(types_1.default); - var Type = types.Type; - var def = Type.def; - var or = Type.or; - var shared = fork.use(shared_1.default); - var defaults = shared.defaults; - var geq = shared.geq; - def("Printable") - .field("loc", or(def("SourceLocation"), null), defaults["null"], true); - def("Node") - .bases("Printable") - .field("type", String) - .field("comments", or([def("Comment")], null), defaults["null"], true); - def("SourceLocation") - .field("start", def("Position")) - .field("end", def("Position")) - .field("source", or(String, null), defaults["null"]); - def("Position") - .field("line", geq(1)) - .field("column", geq(0)); - def("File") - .bases("Node") - .build("program", "name") - .field("program", def("Program")) - .field("name", or(String, null), defaults["null"]); - def("Program") - .bases("Node") - .build("body") - .field("body", [def("Statement")]); - def("Function") - .bases("Node") - .field("id", or(def("Identifier"), null), defaults["null"]) - .field("params", [def("Pattern")]) - .field("body", def("BlockStatement")) - .field("generator", Boolean, defaults["false"]) - .field("async", Boolean, defaults["false"]); - def("Statement").bases("Node"); - def("EmptyStatement").bases("Statement").build(); - def("BlockStatement") - .bases("Statement") - .build("body") - .field("body", [def("Statement")]); - def("ExpressionStatement") - .bases("Statement") - .build("expression") - .field("expression", def("Expression")); - def("IfStatement") - .bases("Statement") - .build("test", "consequent", "alternate") - .field("test", def("Expression")) - .field("consequent", def("Statement")) - .field("alternate", or(def("Statement"), null), defaults["null"]); - def("LabeledStatement") - .bases("Statement") - .build("label", "body") - .field("label", def("Identifier")) - .field("body", def("Statement")); - def("BreakStatement") - .bases("Statement") - .build("label") - .field("label", or(def("Identifier"), null), defaults["null"]); - def("ContinueStatement") - .bases("Statement") - .build("label") - .field("label", or(def("Identifier"), null), defaults["null"]); - def("WithStatement") - .bases("Statement") - .build("object", "body") - .field("object", def("Expression")) - .field("body", def("Statement")); - def("SwitchStatement") - .bases("Statement") - .build("discriminant", "cases", "lexical") - .field("discriminant", def("Expression")) - .field("cases", [def("SwitchCase")]) - .field("lexical", Boolean, defaults["false"]); - def("ReturnStatement") - .bases("Statement") - .build("argument") - .field("argument", or(def("Expression"), null)); - def("ThrowStatement") - .bases("Statement") - .build("argument") - .field("argument", def("Expression")); - def("TryStatement") - .bases("Statement") - .build("block", "handler", "finalizer") - .field("block", def("BlockStatement")) - .field("handler", or(def("CatchClause"), null), function () { - return this.handlers && this.handlers[0] || null; - }) - .field("handlers", [def("CatchClause")], function () { - return this.handler ? [this.handler] : []; - }, true) - .field("guardedHandlers", [def("CatchClause")], defaults.emptyArray) - .field("finalizer", or(def("BlockStatement"), null), defaults["null"]); - def("CatchClause") - .bases("Node") - .build("param", "guard", "body") - .field("param", or(def("Pattern"), null), defaults["null"]) - .field("guard", or(def("Expression"), null), defaults["null"]) - .field("body", def("BlockStatement")); - def("WhileStatement") - .bases("Statement") - .build("test", "body") - .field("test", def("Expression")) - .field("body", def("Statement")); - def("DoWhileStatement") - .bases("Statement") - .build("body", "test") - .field("body", def("Statement")) - .field("test", def("Expression")); - def("ForStatement") - .bases("Statement") - .build("init", "test", "update", "body") - .field("init", or(def("VariableDeclaration"), def("Expression"), null)) - .field("test", or(def("Expression"), null)) - .field("update", or(def("Expression"), null)) - .field("body", def("Statement")); - def("ForInStatement") - .bases("Statement") - .build("left", "right", "body") - .field("left", or(def("VariableDeclaration"), def("Expression"))) - .field("right", def("Expression")) - .field("body", def("Statement")); - def("DebuggerStatement").bases("Statement").build(); - def("Declaration").bases("Statement"); - def("FunctionDeclaration") - .bases("Function", "Declaration") - .build("id", "params", "body") - .field("id", def("Identifier")); - def("FunctionExpression") - .bases("Function", "Expression") - .build("id", "params", "body"); - def("VariableDeclaration") - .bases("Declaration") - .build("kind", "declarations") - .field("kind", or("var", "let", "const")) - .field("declarations", [def("VariableDeclarator")]); - def("VariableDeclarator") - .bases("Node") - .build("id", "init") - .field("id", def("Pattern")) - .field("init", or(def("Expression"), null), defaults["null"]); - def("Expression").bases("Node"); - def("ThisExpression").bases("Expression").build(); - def("ArrayExpression") - .bases("Expression") - .build("elements") - .field("elements", [or(def("Expression"), null)]); - def("ObjectExpression") - .bases("Expression") - .build("properties") - .field("properties", [def("Property")]); - def("Property") - .bases("Node") - .build("kind", "key", "value") - .field("kind", or("init", "get", "set")) - .field("key", or(def("Literal"), def("Identifier"))) - .field("value", def("Expression")); - def("SequenceExpression") - .bases("Expression") - .build("expressions") - .field("expressions", [def("Expression")]); - var UnaryOperator = or("-", "+", "!", "~", "typeof", "void", "delete"); - def("UnaryExpression") - .bases("Expression") - .build("operator", "argument", "prefix") - .field("operator", UnaryOperator) - .field("argument", def("Expression")) - .field("prefix", Boolean, defaults["true"]); - var BinaryOperator = or("==", "!=", "===", "!==", "<", "<=", ">", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", "&", - "|", "^", "in", "instanceof"); - def("BinaryExpression") - .bases("Expression") - .build("operator", "left", "right") - .field("operator", BinaryOperator) - .field("left", def("Expression")) - .field("right", def("Expression")); - var AssignmentOperator = or("=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&="); - def("AssignmentExpression") - .bases("Expression") - .build("operator", "left", "right") - .field("operator", AssignmentOperator) - .field("left", or(def("Pattern"), def("MemberExpression"))) - .field("right", def("Expression")); - var UpdateOperator = or("++", "--"); - def("UpdateExpression") - .bases("Expression") - .build("operator", "argument", "prefix") - .field("operator", UpdateOperator) - .field("argument", def("Expression")) - .field("prefix", Boolean); - var LogicalOperator = or("||", "&&"); - def("LogicalExpression") - .bases("Expression") - .build("operator", "left", "right") - .field("operator", LogicalOperator) - .field("left", def("Expression")) - .field("right", def("Expression")); - def("ConditionalExpression") - .bases("Expression") - .build("test", "consequent", "alternate") - .field("test", def("Expression")) - .field("consequent", def("Expression")) - .field("alternate", def("Expression")); - def("NewExpression") - .bases("Expression") - .build("callee", "arguments") - .field("callee", def("Expression")) - .field("arguments", [def("Expression")]); - def("CallExpression") - .bases("Expression") - .build("callee", "arguments") - .field("callee", def("Expression")) - .field("arguments", [def("Expression")]); - def("MemberExpression") - .bases("Expression") - .build("object", "property", "computed") - .field("object", def("Expression")) - .field("property", or(def("Identifier"), def("Expression"))) - .field("computed", Boolean, function () { - var type = this.property.type; - if (type === 'Literal' || - type === 'MemberExpression' || - type === 'BinaryExpression') { - return true; - } - return false; - }); - def("Pattern").bases("Node"); - def("SwitchCase") - .bases("Node") - .build("test", "consequent") - .field("test", or(def("Expression"), null)) - .field("consequent", [def("Statement")]); - def("Identifier") - .bases("Expression", "Pattern") - .build("name") - .field("name", String) - .field("optional", Boolean, defaults["false"]); - def("Literal") - .bases("Expression") - .build("value") - .field("value", or(String, Boolean, null, Number, RegExp)) - .field("regex", or({ - pattern: String, - flags: String - }, null), function () { - if (this.value instanceof RegExp) { - var flags = ""; - if (this.value.ignoreCase) - flags += "i"; - if (this.value.multiline) - flags += "m"; - if (this.value.global) - flags += "g"; - return { - pattern: this.value.source, - flags: flags - }; - } - return null; - }); - def("Comment") - .bases("Printable") - .field("value", String) - .field("leading", Boolean, defaults["true"]) - .field("trailing", Boolean, defaults["false"]); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (core$1, core$1.exports)); - return core$1.exports; -} - -var es6 = {exports: {}}; - -var hasRequiredEs6; - -function requireEs6 () { - if (hasRequiredEs6) return es6.exports; - hasRequiredEs6 = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var core_1 = tslib_1.__importDefault(requireCore()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - fork.use(core_1.default); - var types = fork.use(types_1.default); - var def = types.Type.def; - var or = types.Type.or; - var defaults = fork.use(shared_1.default).defaults; - def("Function") - .field("generator", Boolean, defaults["false"]) - .field("expression", Boolean, defaults["false"]) - .field("defaults", [or(def("Expression"), null)], defaults.emptyArray) - .field("rest", or(def("Identifier"), null), defaults["null"]); - def("RestElement") - .bases("Pattern") - .build("argument") - .field("argument", def("Pattern")) - .field("typeAnnotation", - or(def("TypeAnnotation"), def("TSTypeAnnotation"), null), defaults["null"]); - def("SpreadElementPattern") - .bases("Pattern") - .build("argument") - .field("argument", def("Pattern")); - def("FunctionDeclaration") - .build("id", "params", "body", "generator", "expression"); - def("FunctionExpression") - .build("id", "params", "body", "generator", "expression"); - def("ArrowFunctionExpression") - .bases("Function", "Expression") - .build("params", "body", "expression") - .field("id", null, defaults["null"]) - .field("body", or(def("BlockStatement"), def("Expression"))) - .field("generator", false, defaults["false"]); - def("ForOfStatement") - .bases("Statement") - .build("left", "right", "body") - .field("left", or(def("VariableDeclaration"), def("Pattern"))) - .field("right", def("Expression")) - .field("body", def("Statement")); - def("YieldExpression") - .bases("Expression") - .build("argument", "delegate") - .field("argument", or(def("Expression"), null)) - .field("delegate", Boolean, defaults["false"]); - def("GeneratorExpression") - .bases("Expression") - .build("body", "blocks", "filter") - .field("body", def("Expression")) - .field("blocks", [def("ComprehensionBlock")]) - .field("filter", or(def("Expression"), null)); - def("ComprehensionExpression") - .bases("Expression") - .build("body", "blocks", "filter") - .field("body", def("Expression")) - .field("blocks", [def("ComprehensionBlock")]) - .field("filter", or(def("Expression"), null)); - def("ComprehensionBlock") - .bases("Node") - .build("left", "right", "each") - .field("left", def("Pattern")) - .field("right", def("Expression")) - .field("each", Boolean); - def("Property") - .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) - .field("value", or(def("Expression"), def("Pattern"))) - .field("method", Boolean, defaults["false"]) - .field("shorthand", Boolean, defaults["false"]) - .field("computed", Boolean, defaults["false"]); - def("ObjectProperty") - .field("shorthand", Boolean, defaults["false"]); - def("PropertyPattern") - .bases("Pattern") - .build("key", "pattern") - .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) - .field("pattern", def("Pattern")) - .field("computed", Boolean, defaults["false"]); - def("ObjectPattern") - .bases("Pattern") - .build("properties") - .field("properties", [or(def("PropertyPattern"), def("Property"))]); - def("ArrayPattern") - .bases("Pattern") - .build("elements") - .field("elements", [or(def("Pattern"), null)]); - def("MethodDefinition") - .bases("Declaration") - .build("kind", "key", "value", "static") - .field("kind", or("constructor", "method", "get", "set")) - .field("key", def("Expression")) - .field("value", def("Function")) - .field("computed", Boolean, defaults["false"]) - .field("static", Boolean, defaults["false"]); - def("SpreadElement") - .bases("Node") - .build("argument") - .field("argument", def("Expression")); - def("ArrayExpression") - .field("elements", [or(def("Expression"), def("SpreadElement"), def("RestElement"), null)]); - def("NewExpression") - .field("arguments", [or(def("Expression"), def("SpreadElement"))]); - def("CallExpression") - .field("arguments", [or(def("Expression"), def("SpreadElement"))]); - def("AssignmentPattern") - .bases("Pattern") - .build("left", "right") - .field("left", def("Pattern")) - .field("right", def("Expression")); - var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty")); - def("ClassProperty") - .bases("Declaration") - .build("key") - .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) - .field("computed", Boolean, defaults["false"]); - def("ClassPropertyDefinition") - .bases("Declaration") - .build("definition") - .field("definition", ClassBodyElement); - def("ClassBody") - .bases("Declaration") - .build("body") - .field("body", [ClassBodyElement]); - def("ClassDeclaration") - .bases("Declaration") - .build("id", "body", "superClass") - .field("id", or(def("Identifier"), null)) - .field("body", def("ClassBody")) - .field("superClass", or(def("Expression"), null), defaults["null"]); - def("ClassExpression") - .bases("Expression") - .build("id", "body", "superClass") - .field("id", or(def("Identifier"), null), defaults["null"]) - .field("body", def("ClassBody")) - .field("superClass", or(def("Expression"), null), defaults["null"]); - def("Specifier").bases("Node"); - def("ModuleSpecifier") - .bases("Specifier") - .field("local", or(def("Identifier"), null), defaults["null"]) - .field("id", or(def("Identifier"), null), defaults["null"]) - .field("name", or(def("Identifier"), null), defaults["null"]); - def("ImportSpecifier") - .bases("ModuleSpecifier") - .build("id", "name"); - def("ImportNamespaceSpecifier") - .bases("ModuleSpecifier") - .build("id"); - def("ImportDefaultSpecifier") - .bases("ModuleSpecifier") - .build("id"); - def("ImportDeclaration") - .bases("Declaration") - .build("specifiers", "source", "importKind") - .field("specifiers", [or(def("ImportSpecifier"), def("ImportNamespaceSpecifier"), def("ImportDefaultSpecifier"))], defaults.emptyArray) - .field("source", def("Literal")) - .field("importKind", or("value", "type"), function () { - return "value"; - }); - def("TaggedTemplateExpression") - .bases("Expression") - .build("tag", "quasi") - .field("tag", def("Expression")) - .field("quasi", def("TemplateLiteral")); - def("TemplateLiteral") - .bases("Expression") - .build("quasis", "expressions") - .field("quasis", [def("TemplateElement")]) - .field("expressions", [def("Expression")]); - def("TemplateElement") - .bases("Node") - .build("value", "tail") - .field("value", { "cooked": String, "raw": String }) - .field("tail", Boolean); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (es6, es6.exports)); - return es6.exports; -} - -var es7 = {exports: {}}; - -var hasRequiredEs7; - -function requireEs7 () { - if (hasRequiredEs7) return es7.exports; - hasRequiredEs7 = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var es6_1 = tslib_1.__importDefault(requireEs6()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - fork.use(es6_1.default); - var types = fork.use(types_1.default); - var def = types.Type.def; - var or = types.Type.or; - var defaults = fork.use(shared_1.default).defaults; - def("Function") - .field("async", Boolean, defaults["false"]); - def("SpreadProperty") - .bases("Node") - .build("argument") - .field("argument", def("Expression")); - def("ObjectExpression") - .field("properties", [or(def("Property"), def("SpreadProperty"), def("SpreadElement"))]); - def("SpreadPropertyPattern") - .bases("Pattern") - .build("argument") - .field("argument", def("Pattern")); - def("ObjectPattern") - .field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"))]); - def("AwaitExpression") - .bases("Expression") - .build("argument", "all") - .field("argument", or(def("Expression"), null)) - .field("all", Boolean, defaults["false"]); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (es7, es7.exports)); - return es7.exports; -} - -var es2020 = {exports: {}}; - -var hasRequiredEs2020; - -function requireEs2020 () { - if (hasRequiredEs2020) return es2020.exports; - hasRequiredEs2020 = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var es7_1 = tslib_1.__importDefault(requireEs7()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - function default_1(fork) { - fork.use(es7_1.default); - var types = fork.use(types_1.default); - var def = types.Type.def; - def("ImportExpression") - .bases("Expression") - .build("source") - .field("source", def("Expression")); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (es2020, es2020.exports)); - return es2020.exports; -} - -var jsx = {exports: {}}; - -var hasRequiredJsx; - -function requireJsx () { - if (hasRequiredJsx) return jsx.exports; - hasRequiredJsx = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var es7_1 = tslib_1.__importDefault(requireEs7()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - fork.use(es7_1.default); - var types = fork.use(types_1.default); - var def = types.Type.def; - var or = types.Type.or; - var defaults = fork.use(shared_1.default).defaults; - def("JSXAttribute") - .bases("Node") - .build("name", "value") - .field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))) - .field("value", or(def("Literal"), - def("JSXExpressionContainer"), - null - ), defaults["null"]); - def("JSXIdentifier") - .bases("Identifier") - .build("name") - .field("name", String); - def("JSXNamespacedName") - .bases("Node") - .build("namespace", "name") - .field("namespace", def("JSXIdentifier")) - .field("name", def("JSXIdentifier")); - def("JSXMemberExpression") - .bases("MemberExpression") - .build("object", "property") - .field("object", or(def("JSXIdentifier"), def("JSXMemberExpression"))) - .field("property", def("JSXIdentifier")) - .field("computed", Boolean, defaults.false); - var JSXElementName = or(def("JSXIdentifier"), def("JSXNamespacedName"), def("JSXMemberExpression")); - def("JSXSpreadAttribute") - .bases("Node") - .build("argument") - .field("argument", def("Expression")); - var JSXAttributes = [or(def("JSXAttribute"), def("JSXSpreadAttribute"))]; - def("JSXExpressionContainer") - .bases("Expression") - .build("expression") - .field("expression", def("Expression")); - def("JSXElement") - .bases("Expression") - .build("openingElement", "closingElement", "children") - .field("openingElement", def("JSXOpeningElement")) - .field("closingElement", or(def("JSXClosingElement"), null), defaults["null"]) - .field("children", [or(def("JSXElement"), def("JSXExpressionContainer"), def("JSXFragment"), def("JSXText"), def("Literal") - )], defaults.emptyArray) - .field("name", JSXElementName, function () { - return this.openingElement.name; - }, true) - .field("selfClosing", Boolean, function () { - return this.openingElement.selfClosing; - }, true) - .field("attributes", JSXAttributes, function () { - return this.openingElement.attributes; - }, true); - def("JSXOpeningElement") - .bases("Node") - .build("name", "attributes", "selfClosing") - .field("name", JSXElementName) - .field("attributes", JSXAttributes, defaults.emptyArray) - .field("selfClosing", Boolean, defaults["false"]); - def("JSXClosingElement") - .bases("Node") - .build("name") - .field("name", JSXElementName); - def("JSXFragment") - .bases("Expression") - .build("openingElement", "closingElement", "children") - .field("openingElement", def("JSXOpeningFragment")) - .field("closingElement", def("JSXClosingFragment")) - .field("children", [or(def("JSXElement"), def("JSXExpressionContainer"), def("JSXFragment"), def("JSXText"), def("Literal") - )], defaults.emptyArray); - def("JSXOpeningFragment") - .bases("Node") - .build(); - def("JSXClosingFragment") - .bases("Node") - .build(); - def("JSXText") - .bases("Literal") - .build("value") - .field("value", String); - def("JSXEmptyExpression").bases("Expression").build(); - def("JSXSpreadChild") - .bases("Expression") - .build("expression") - .field("expression", def("Expression")); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (jsx, jsx.exports)); - return jsx.exports; -} - -var flow = {exports: {}}; - -var typeAnnotations = {exports: {}}; - -var hasRequiredTypeAnnotations; - -function requireTypeAnnotations () { - if (hasRequiredTypeAnnotations) return typeAnnotations.exports; - hasRequiredTypeAnnotations = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - var types = fork.use(types_1.default); - var def = types.Type.def; - var or = types.Type.or; - var defaults = fork.use(shared_1.default).defaults; - var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null); - var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null); - def("Identifier") - .field("typeAnnotation", TypeAnnotation, defaults["null"]); - def("ObjectPattern") - .field("typeAnnotation", TypeAnnotation, defaults["null"]); - def("Function") - .field("returnType", TypeAnnotation, defaults["null"]) - .field("typeParameters", TypeParamDecl, defaults["null"]); - def("ClassProperty") - .build("key", "value", "typeAnnotation", "static") - .field("value", or(def("Expression"), null)) - .field("static", Boolean, defaults["false"]) - .field("typeAnnotation", TypeAnnotation, defaults["null"]); - ["ClassDeclaration", - "ClassExpression", - ].forEach(function (typeName) { - def(typeName) - .field("typeParameters", TypeParamDecl, defaults["null"]) - .field("superTypeParameters", or(def("TypeParameterInstantiation"), def("TSTypeParameterInstantiation"), null), defaults["null"]) - .field("implements", or([def("ClassImplements")], [def("TSExpressionWithTypeArguments")]), defaults.emptyArray); - }); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (typeAnnotations, typeAnnotations.exports)); - return typeAnnotations.exports; -} - -var hasRequiredFlow; - -function requireFlow () { - if (hasRequiredFlow) return flow.exports; - hasRequiredFlow = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var es7_1 = tslib_1.__importDefault(requireEs7()); - var type_annotations_1 = tslib_1.__importDefault(requireTypeAnnotations()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - fork.use(es7_1.default); - fork.use(type_annotations_1.default); - var types = fork.use(types_1.default); - var def = types.Type.def; - var or = types.Type.or; - var defaults = fork.use(shared_1.default).defaults; - def("Flow").bases("Node"); - def("FlowType").bases("Flow"); - def("AnyTypeAnnotation") - .bases("FlowType") - .build(); - def("EmptyTypeAnnotation") - .bases("FlowType") - .build(); - def("MixedTypeAnnotation") - .bases("FlowType") - .build(); - def("VoidTypeAnnotation") - .bases("FlowType") - .build(); - def("NumberTypeAnnotation") - .bases("FlowType") - .build(); - def("NumberLiteralTypeAnnotation") - .bases("FlowType") - .build("value", "raw") - .field("value", Number) - .field("raw", String); - def("NumericLiteralTypeAnnotation") - .bases("FlowType") - .build("value", "raw") - .field("value", Number) - .field("raw", String); - def("StringTypeAnnotation") - .bases("FlowType") - .build(); - def("StringLiteralTypeAnnotation") - .bases("FlowType") - .build("value", "raw") - .field("value", String) - .field("raw", String); - def("BooleanTypeAnnotation") - .bases("FlowType") - .build(); - def("BooleanLiteralTypeAnnotation") - .bases("FlowType") - .build("value", "raw") - .field("value", Boolean) - .field("raw", String); - def("TypeAnnotation") - .bases("Node") - .build("typeAnnotation") - .field("typeAnnotation", def("FlowType")); - def("NullableTypeAnnotation") - .bases("FlowType") - .build("typeAnnotation") - .field("typeAnnotation", def("FlowType")); - def("NullLiteralTypeAnnotation") - .bases("FlowType") - .build(); - def("NullTypeAnnotation") - .bases("FlowType") - .build(); - def("ThisTypeAnnotation") - .bases("FlowType") - .build(); - def("ExistsTypeAnnotation") - .bases("FlowType") - .build(); - def("ExistentialTypeParam") - .bases("FlowType") - .build(); - def("FunctionTypeAnnotation") - .bases("FlowType") - .build("params", "returnType", "rest", "typeParameters") - .field("params", [def("FunctionTypeParam")]) - .field("returnType", def("FlowType")) - .field("rest", or(def("FunctionTypeParam"), null)) - .field("typeParameters", or(def("TypeParameterDeclaration"), null)); - def("FunctionTypeParam") - .bases("Node") - .build("name", "typeAnnotation", "optional") - .field("name", def("Identifier")) - .field("typeAnnotation", def("FlowType")) - .field("optional", Boolean); - def("ArrayTypeAnnotation") - .bases("FlowType") - .build("elementType") - .field("elementType", def("FlowType")); - def("ObjectTypeAnnotation") - .bases("FlowType") - .build("properties", "indexers", "callProperties") - .field("properties", [ - or(def("ObjectTypeProperty"), def("ObjectTypeSpreadProperty")) - ]) - .field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray) - .field("callProperties", [def("ObjectTypeCallProperty")], defaults.emptyArray) - .field("inexact", or(Boolean, void 0), defaults["undefined"]) - .field("exact", Boolean, defaults["false"]) - .field("internalSlots", [def("ObjectTypeInternalSlot")], defaults.emptyArray); - def("Variance") - .bases("Node") - .build("kind") - .field("kind", or("plus", "minus")); - var LegacyVariance = or(def("Variance"), "plus", "minus", null); - def("ObjectTypeProperty") - .bases("Node") - .build("key", "value", "optional") - .field("key", or(def("Literal"), def("Identifier"))) - .field("value", def("FlowType")) - .field("optional", Boolean) - .field("variance", LegacyVariance, defaults["null"]); - def("ObjectTypeIndexer") - .bases("Node") - .build("id", "key", "value") - .field("id", def("Identifier")) - .field("key", def("FlowType")) - .field("value", def("FlowType")) - .field("variance", LegacyVariance, defaults["null"]); - def("ObjectTypeCallProperty") - .bases("Node") - .build("value") - .field("value", def("FunctionTypeAnnotation")) - .field("static", Boolean, defaults["false"]); - def("QualifiedTypeIdentifier") - .bases("Node") - .build("qualification", "id") - .field("qualification", or(def("Identifier"), def("QualifiedTypeIdentifier"))) - .field("id", def("Identifier")); - def("GenericTypeAnnotation") - .bases("FlowType") - .build("id", "typeParameters") - .field("id", or(def("Identifier"), def("QualifiedTypeIdentifier"))) - .field("typeParameters", or(def("TypeParameterInstantiation"), null)); - def("MemberTypeAnnotation") - .bases("FlowType") - .build("object", "property") - .field("object", def("Identifier")) - .field("property", or(def("MemberTypeAnnotation"), def("GenericTypeAnnotation"))); - def("UnionTypeAnnotation") - .bases("FlowType") - .build("types") - .field("types", [def("FlowType")]); - def("IntersectionTypeAnnotation") - .bases("FlowType") - .build("types") - .field("types", [def("FlowType")]); - def("TypeofTypeAnnotation") - .bases("FlowType") - .build("argument") - .field("argument", def("FlowType")); - def("ObjectTypeSpreadProperty") - .bases("Node") - .build("argument") - .field("argument", def("FlowType")); - def("ObjectTypeInternalSlot") - .bases("Node") - .build("id", "value", "optional", "static", "method") - .field("id", def("Identifier")) - .field("value", def("FlowType")) - .field("optional", Boolean) - .field("static", Boolean) - .field("method", Boolean); - def("TypeParameterDeclaration") - .bases("Node") - .build("params") - .field("params", [def("TypeParameter")]); - def("TypeParameterInstantiation") - .bases("Node") - .build("params") - .field("params", [def("FlowType")]); - def("TypeParameter") - .bases("FlowType") - .build("name", "variance", "bound") - .field("name", String) - .field("variance", LegacyVariance, defaults["null"]) - .field("bound", or(def("TypeAnnotation"), null), defaults["null"]); - def("ClassProperty") - .field("variance", LegacyVariance, defaults["null"]); - def("ClassImplements") - .bases("Node") - .build("id") - .field("id", def("Identifier")) - .field("superClass", or(def("Expression"), null), defaults["null"]) - .field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]); - def("InterfaceTypeAnnotation") - .bases("FlowType") - .build("body", "extends") - .field("body", def("ObjectTypeAnnotation")) - .field("extends", or([def("InterfaceExtends")], null), defaults["null"]); - def("InterfaceDeclaration") - .bases("Declaration") - .build("id", "body", "extends") - .field("id", def("Identifier")) - .field("typeParameters", or(def("TypeParameterDeclaration"), null), defaults["null"]) - .field("body", def("ObjectTypeAnnotation")) - .field("extends", [def("InterfaceExtends")]); - def("DeclareInterface") - .bases("InterfaceDeclaration") - .build("id", "body", "extends"); - def("InterfaceExtends") - .bases("Node") - .build("id") - .field("id", def("Identifier")) - .field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]); - def("TypeAlias") - .bases("Declaration") - .build("id", "typeParameters", "right") - .field("id", def("Identifier")) - .field("typeParameters", or(def("TypeParameterDeclaration"), null)) - .field("right", def("FlowType")); - def("OpaqueType") - .bases("Declaration") - .build("id", "typeParameters", "impltype", "supertype") - .field("id", def("Identifier")) - .field("typeParameters", or(def("TypeParameterDeclaration"), null)) - .field("impltype", def("FlowType")) - .field("supertype", def("FlowType")); - def("DeclareTypeAlias") - .bases("TypeAlias") - .build("id", "typeParameters", "right"); - def("DeclareOpaqueType") - .bases("TypeAlias") - .build("id", "typeParameters", "supertype"); - def("TypeCastExpression") - .bases("Expression") - .build("expression", "typeAnnotation") - .field("expression", def("Expression")) - .field("typeAnnotation", def("TypeAnnotation")); - def("TupleTypeAnnotation") - .bases("FlowType") - .build("types") - .field("types", [def("FlowType")]); - def("DeclareVariable") - .bases("Statement") - .build("id") - .field("id", def("Identifier")); - def("DeclareFunction") - .bases("Statement") - .build("id") - .field("id", def("Identifier")); - def("DeclareClass") - .bases("InterfaceDeclaration") - .build("id"); - def("DeclareModule") - .bases("Statement") - .build("id", "body") - .field("id", or(def("Identifier"), def("Literal"))) - .field("body", def("BlockStatement")); - def("DeclareModuleExports") - .bases("Statement") - .build("typeAnnotation") - .field("typeAnnotation", def("TypeAnnotation")); - def("DeclareExportDeclaration") - .bases("Declaration") - .build("default", "declaration", "specifiers", "source") - .field("default", Boolean) - .field("declaration", or(def("DeclareVariable"), def("DeclareFunction"), def("DeclareClass"), def("FlowType"), - null)) - .field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray) - .field("source", or(def("Literal"), null), defaults["null"]); - def("DeclareExportAllDeclaration") - .bases("Declaration") - .build("source") - .field("source", or(def("Literal"), null), defaults["null"]); - def("FlowPredicate").bases("Flow"); - def("InferredPredicate") - .bases("FlowPredicate") - .build(); - def("DeclaredPredicate") - .bases("FlowPredicate") - .build("value") - .field("value", def("Expression")); - def("CallExpression") - .field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]); - def("NewExpression") - .field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (flow, flow.exports)); - return flow.exports; -} - -var esprima = {exports: {}}; - -var hasRequiredEsprima; - -function requireEsprima () { - if (hasRequiredEsprima) return esprima.exports; - hasRequiredEsprima = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var es7_1 = tslib_1.__importDefault(requireEs7()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - fork.use(es7_1.default); - var types = fork.use(types_1.default); - var defaults = fork.use(shared_1.default).defaults; - var def = types.Type.def; - var or = types.Type.or; - def("VariableDeclaration") - .field("declarations", [or(def("VariableDeclarator"), def("Identifier") - )]); - def("Property") - .field("value", or(def("Expression"), def("Pattern") - )); - def("ArrayPattern") - .field("elements", [or(def("Pattern"), def("SpreadElement"), null)]); - def("ObjectPattern") - .field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty") - )]); - def("ExportSpecifier") - .bases("ModuleSpecifier") - .build("id", "name"); - def("ExportBatchSpecifier") - .bases("Specifier") - .build(); - def("ExportDeclaration") - .bases("Declaration") - .build("default", "declaration", "specifiers", "source") - .field("default", Boolean) - .field("declaration", or(def("Declaration"), def("Expression"), - null)) - .field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray) - .field("source", or(def("Literal"), null), defaults["null"]); - def("Block") - .bases("Comment") - .build("value", "leading", "trailing"); - def("Line") - .bases("Comment") - .build("value", "leading", "trailing"); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (esprima, esprima.exports)); - return esprima.exports; -} - -var babel = {exports: {}}; - -var babelCore = {exports: {}}; - -var hasRequiredBabelCore; - -function requireBabelCore () { - if (hasRequiredBabelCore) return babelCore.exports; - hasRequiredBabelCore = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - var es7_1 = tslib_1.__importDefault(requireEs7()); - function default_1(fork) { - fork.use(es7_1.default); - var types = fork.use(types_1.default); - var defaults = fork.use(shared_1.default).defaults; - var def = types.Type.def; - var or = types.Type.or; - def("Noop") - .bases("Statement") - .build(); - def("DoExpression") - .bases("Expression") - .build("body") - .field("body", [def("Statement")]); - def("Super") - .bases("Expression") - .build(); - def("BindExpression") - .bases("Expression") - .build("object", "callee") - .field("object", or(def("Expression"), null)) - .field("callee", def("Expression")); - def("Decorator") - .bases("Node") - .build("expression") - .field("expression", def("Expression")); - def("Property") - .field("decorators", or([def("Decorator")], null), defaults["null"]); - def("MethodDefinition") - .field("decorators", or([def("Decorator")], null), defaults["null"]); - def("MetaProperty") - .bases("Expression") - .build("meta", "property") - .field("meta", def("Identifier")) - .field("property", def("Identifier")); - def("ParenthesizedExpression") - .bases("Expression") - .build("expression") - .field("expression", def("Expression")); - def("ImportSpecifier") - .bases("ModuleSpecifier") - .build("imported", "local") - .field("imported", def("Identifier")); - def("ImportDefaultSpecifier") - .bases("ModuleSpecifier") - .build("local"); - def("ImportNamespaceSpecifier") - .bases("ModuleSpecifier") - .build("local"); - def("ExportDefaultDeclaration") - .bases("Declaration") - .build("declaration") - .field("declaration", or(def("Declaration"), def("Expression"))); - def("ExportNamedDeclaration") - .bases("Declaration") - .build("declaration", "specifiers", "source") - .field("declaration", or(def("Declaration"), null)) - .field("specifiers", [def("ExportSpecifier")], defaults.emptyArray) - .field("source", or(def("Literal"), null), defaults["null"]); - def("ExportSpecifier") - .bases("ModuleSpecifier") - .build("local", "exported") - .field("exported", def("Identifier")); - def("ExportNamespaceSpecifier") - .bases("Specifier") - .build("exported") - .field("exported", def("Identifier")); - def("ExportDefaultSpecifier") - .bases("Specifier") - .build("exported") - .field("exported", def("Identifier")); - def("ExportAllDeclaration") - .bases("Declaration") - .build("exported", "source") - .field("exported", or(def("Identifier"), null)) - .field("source", def("Literal")); - def("CommentBlock") - .bases("Comment") - .build("value", "leading", "trailing"); - def("CommentLine") - .bases("Comment") - .build("value", "leading", "trailing"); - def("Directive") - .bases("Node") - .build("value") - .field("value", def("DirectiveLiteral")); - def("DirectiveLiteral") - .bases("Node", "Expression") - .build("value") - .field("value", String, defaults["use strict"]); - def("InterpreterDirective") - .bases("Node") - .build("value") - .field("value", String); - def("BlockStatement") - .bases("Statement") - .build("body") - .field("body", [def("Statement")]) - .field("directives", [def("Directive")], defaults.emptyArray); - def("Program") - .bases("Node") - .build("body") - .field("body", [def("Statement")]) - .field("directives", [def("Directive")], defaults.emptyArray) - .field("interpreter", or(def("InterpreterDirective"), null), defaults["null"]); - def("StringLiteral") - .bases("Literal") - .build("value") - .field("value", String); - def("NumericLiteral") - .bases("Literal") - .build("value") - .field("value", Number) - .field("raw", or(String, null), defaults["null"]) - .field("extra", { - rawValue: Number, - raw: String - }, function getDefault() { - return { - rawValue: this.value, - raw: this.value + "" - }; - }); - def("BigIntLiteral") - .bases("Literal") - .build("value") - .field("value", or(String, Number)) - .field("extra", { - rawValue: String, - raw: String - }, function getDefault() { - return { - rawValue: String(this.value), - raw: this.value + "n" - }; - }); - def("NullLiteral") - .bases("Literal") - .build() - .field("value", null, defaults["null"]); - def("BooleanLiteral") - .bases("Literal") - .build("value") - .field("value", Boolean); - def("RegExpLiteral") - .bases("Literal") - .build("pattern", "flags") - .field("pattern", String) - .field("flags", String) - .field("value", RegExp, function () { - return new RegExp(this.pattern, this.flags); - }); - var ObjectExpressionProperty = or(def("Property"), def("ObjectMethod"), def("ObjectProperty"), def("SpreadProperty"), def("SpreadElement")); - def("ObjectExpression") - .bases("Expression") - .build("properties") - .field("properties", [ObjectExpressionProperty]); - def("ObjectMethod") - .bases("Node", "Function") - .build("kind", "key", "params", "body", "computed") - .field("kind", or("method", "get", "set")) - .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) - .field("params", [def("Pattern")]) - .field("body", def("BlockStatement")) - .field("computed", Boolean, defaults["false"]) - .field("generator", Boolean, defaults["false"]) - .field("async", Boolean, defaults["false"]) - .field("accessibility", - or(def("Literal"), null), defaults["null"]) - .field("decorators", or([def("Decorator")], null), defaults["null"]); - def("ObjectProperty") - .bases("Node") - .build("key", "value") - .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) - .field("value", or(def("Expression"), def("Pattern"))) - .field("accessibility", - or(def("Literal"), null), defaults["null"]) - .field("computed", Boolean, defaults["false"]); - var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod")); - def("ClassBody") - .bases("Declaration") - .build("body") - .field("body", [ClassBodyElement]); - def("ClassMethod") - .bases("Declaration", "Function") - .build("kind", "key", "params", "body", "computed", "static") - .field("key", or(def("Literal"), def("Identifier"), def("Expression"))); - def("ClassPrivateMethod") - .bases("Declaration", "Function") - .build("key", "params", "body", "kind", "computed", "static") - .field("key", def("PrivateName")); - ["ClassMethod", - "ClassPrivateMethod", - ].forEach(function (typeName) { - def(typeName) - .field("kind", or("get", "set", "method", "constructor"), function () { return "method"; }) - .field("body", def("BlockStatement")) - .field("computed", Boolean, defaults["false"]) - .field("static", or(Boolean, null), defaults["null"]) - .field("abstract", or(Boolean, null), defaults["null"]) - .field("access", or("public", "private", "protected", null), defaults["null"]) - .field("accessibility", or("public", "private", "protected", null), defaults["null"]) - .field("decorators", or([def("Decorator")], null), defaults["null"]) - .field("optional", or(Boolean, null), defaults["null"]); - }); - def("ClassPrivateProperty") - .bases("ClassProperty") - .build("key", "value") - .field("key", def("PrivateName")) - .field("value", or(def("Expression"), null), defaults["null"]); - def("PrivateName") - .bases("Expression", "Pattern") - .build("id") - .field("id", def("Identifier")); - var ObjectPatternProperty = or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty"), - def("ObjectProperty"), - def("RestProperty") - ); - def("ObjectPattern") - .bases("Pattern") - .build("properties") - .field("properties", [ObjectPatternProperty]) - .field("decorators", or([def("Decorator")], null), defaults["null"]); - def("SpreadProperty") - .bases("Node") - .build("argument") - .field("argument", def("Expression")); - def("RestProperty") - .bases("Node") - .build("argument") - .field("argument", def("Expression")); - def("ForAwaitStatement") - .bases("Statement") - .build("left", "right", "body") - .field("left", or(def("VariableDeclaration"), def("Expression"))) - .field("right", def("Expression")) - .field("body", def("Statement")); - def("Import") - .bases("Expression") - .build(); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (babelCore, babelCore.exports)); - return babelCore.exports; -} - -var hasRequiredBabel; - -function requireBabel () { - if (hasRequiredBabel) return babel.exports; - hasRequiredBabel = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var babel_core_1 = tslib_1.__importDefault(requireBabelCore()); - var flow_1 = tslib_1.__importDefault(requireFlow()); - function default_1(fork) { - fork.use(babel_core_1.default); - fork.use(flow_1.default); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (babel, babel.exports)); - return babel.exports; -} - -var typescript = {exports: {}}; - -var hasRequiredTypescript; - -function requireTypescript () { - if (hasRequiredTypescript) return typescript.exports; - hasRequiredTypescript = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var babel_core_1 = tslib_1.__importDefault(requireBabelCore()); - var type_annotations_1 = tslib_1.__importDefault(requireTypeAnnotations()); - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - function default_1(fork) { - fork.use(babel_core_1.default); - fork.use(type_annotations_1.default); - var types = fork.use(types_1.default); - var n = types.namedTypes; - var def = types.Type.def; - var or = types.Type.or; - var defaults = fork.use(shared_1.default).defaults; - var StringLiteral = types.Type.from(function (value, deep) { - if (n.StringLiteral && - n.StringLiteral.check(value, deep)) { - return true; - } - if (n.Literal && - n.Literal.check(value, deep) && - typeof value.value === "string") { - return true; - } - return false; - }, "StringLiteral"); - def("TSType") - .bases("Node"); - var TSEntityName = or(def("Identifier"), def("TSQualifiedName")); - def("TSTypeReference") - .bases("TSType", "TSHasOptionalTypeParameterInstantiation") - .build("typeName", "typeParameters") - .field("typeName", TSEntityName); - def("TSHasOptionalTypeParameterInstantiation") - .field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]); - def("TSHasOptionalTypeParameters") - .field("typeParameters", or(def("TSTypeParameterDeclaration"), null, void 0), defaults["null"]); - def("TSHasOptionalTypeAnnotation") - .field("typeAnnotation", or(def("TSTypeAnnotation"), null), defaults["null"]); - def("TSQualifiedName") - .bases("Node") - .build("left", "right") - .field("left", TSEntityName) - .field("right", TSEntityName); - def("TSAsExpression") - .bases("Expression", "Pattern") - .build("expression", "typeAnnotation") - .field("expression", def("Expression")) - .field("typeAnnotation", def("TSType")) - .field("extra", or({ parenthesized: Boolean }, null), defaults["null"]); - def("TSNonNullExpression") - .bases("Expression", "Pattern") - .build("expression") - .field("expression", def("Expression")); - [ - "TSAnyKeyword", - "TSBigIntKeyword", - "TSBooleanKeyword", - "TSNeverKeyword", - "TSNullKeyword", - "TSNumberKeyword", - "TSObjectKeyword", - "TSStringKeyword", - "TSSymbolKeyword", - "TSUndefinedKeyword", - "TSUnknownKeyword", - "TSVoidKeyword", - "TSThisType", - ].forEach(function (keywordType) { - def(keywordType) - .bases("TSType") - .build(); - }); - def("TSArrayType") - .bases("TSType") - .build("elementType") - .field("elementType", def("TSType")); - def("TSLiteralType") - .bases("TSType") - .build("literal") - .field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral"), def("TemplateLiteral"), def("UnaryExpression"))); - ["TSUnionType", - "TSIntersectionType", - ].forEach(function (typeName) { - def(typeName) - .bases("TSType") - .build("types") - .field("types", [def("TSType")]); - }); - def("TSConditionalType") - .bases("TSType") - .build("checkType", "extendsType", "trueType", "falseType") - .field("checkType", def("TSType")) - .field("extendsType", def("TSType")) - .field("trueType", def("TSType")) - .field("falseType", def("TSType")); - def("TSInferType") - .bases("TSType") - .build("typeParameter") - .field("typeParameter", def("TSTypeParameter")); - def("TSParenthesizedType") - .bases("TSType") - .build("typeAnnotation") - .field("typeAnnotation", def("TSType")); - var ParametersType = [or(def("Identifier"), def("RestElement"), def("ArrayPattern"), def("ObjectPattern"))]; - ["TSFunctionType", - "TSConstructorType", - ].forEach(function (typeName) { - def(typeName) - .bases("TSType", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation") - .build("parameters") - .field("parameters", ParametersType); - }); - def("TSDeclareFunction") - .bases("Declaration", "TSHasOptionalTypeParameters") - .build("id", "params", "returnType") - .field("declare", Boolean, defaults["false"]) - .field("async", Boolean, defaults["false"]) - .field("generator", Boolean, defaults["false"]) - .field("id", or(def("Identifier"), null), defaults["null"]) - .field("params", [def("Pattern")]) - .field("returnType", or(def("TSTypeAnnotation"), def("Noop"), - null), defaults["null"]); - def("TSDeclareMethod") - .bases("Declaration", "TSHasOptionalTypeParameters") - .build("key", "params", "returnType") - .field("async", Boolean, defaults["false"]) - .field("generator", Boolean, defaults["false"]) - .field("params", [def("Pattern")]) - .field("abstract", Boolean, defaults["false"]) - .field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"]) - .field("static", Boolean, defaults["false"]) - .field("computed", Boolean, defaults["false"]) - .field("optional", Boolean, defaults["false"]) - .field("key", or(def("Identifier"), def("StringLiteral"), def("NumericLiteral"), - def("Expression"))) - .field("kind", or("get", "set", "method", "constructor"), function getDefault() { return "method"; }) - .field("access", - or("public", "private", "protected", void 0), defaults["undefined"]) - .field("decorators", or([def("Decorator")], null), defaults["null"]) - .field("returnType", or(def("TSTypeAnnotation"), def("Noop"), - null), defaults["null"]); - def("TSMappedType") - .bases("TSType") - .build("typeParameter", "typeAnnotation") - .field("readonly", or(Boolean, "+", "-"), defaults["false"]) - .field("typeParameter", def("TSTypeParameter")) - .field("optional", or(Boolean, "+", "-"), defaults["false"]) - .field("typeAnnotation", or(def("TSType"), null), defaults["null"]); - def("TSTupleType") - .bases("TSType") - .build("elementTypes") - .field("elementTypes", [or(def("TSType"), def("TSNamedTupleMember"))]); - def("TSNamedTupleMember") - .bases("TSType") - .build("label", "elementType", "optional") - .field("label", def("Identifier")) - .field("optional", Boolean, defaults["false"]) - .field("elementType", def("TSType")); - def("TSRestType") - .bases("TSType") - .build("typeAnnotation") - .field("typeAnnotation", def("TSType")); - def("TSOptionalType") - .bases("TSType") - .build("typeAnnotation") - .field("typeAnnotation", def("TSType")); - def("TSIndexedAccessType") - .bases("TSType") - .build("objectType", "indexType") - .field("objectType", def("TSType")) - .field("indexType", def("TSType")); - def("TSTypeOperator") - .bases("TSType") - .build("operator") - .field("operator", String) - .field("typeAnnotation", def("TSType")); - def("TSTypeAnnotation") - .bases("Node") - .build("typeAnnotation") - .field("typeAnnotation", or(def("TSType"), def("TSTypeAnnotation"))); - def("TSIndexSignature") - .bases("Declaration", "TSHasOptionalTypeAnnotation") - .build("parameters", "typeAnnotation") - .field("parameters", [def("Identifier")]) - .field("readonly", Boolean, defaults["false"]); - def("TSPropertySignature") - .bases("Declaration", "TSHasOptionalTypeAnnotation") - .build("key", "typeAnnotation", "optional") - .field("key", def("Expression")) - .field("computed", Boolean, defaults["false"]) - .field("readonly", Boolean, defaults["false"]) - .field("optional", Boolean, defaults["false"]) - .field("initializer", or(def("Expression"), null), defaults["null"]); - def("TSMethodSignature") - .bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation") - .build("key", "parameters", "typeAnnotation") - .field("key", def("Expression")) - .field("computed", Boolean, defaults["false"]) - .field("optional", Boolean, defaults["false"]) - .field("parameters", ParametersType); - def("TSTypePredicate") - .bases("TSTypeAnnotation", "TSType") - .build("parameterName", "typeAnnotation", "asserts") - .field("parameterName", or(def("Identifier"), def("TSThisType"))) - .field("typeAnnotation", or(def("TSTypeAnnotation"), null), defaults["null"]) - .field("asserts", Boolean, defaults["false"]); - ["TSCallSignatureDeclaration", - "TSConstructSignatureDeclaration", - ].forEach(function (typeName) { - def(typeName) - .bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation") - .build("parameters", "typeAnnotation") - .field("parameters", ParametersType); - }); - def("TSEnumMember") - .bases("Node") - .build("id", "initializer") - .field("id", or(def("Identifier"), StringLiteral)) - .field("initializer", or(def("Expression"), null), defaults["null"]); - def("TSTypeQuery") - .bases("TSType") - .build("exprName") - .field("exprName", or(TSEntityName, def("TSImportType"))); - var TSTypeMember = or(def("TSCallSignatureDeclaration"), def("TSConstructSignatureDeclaration"), def("TSIndexSignature"), def("TSMethodSignature"), def("TSPropertySignature")); - def("TSTypeLiteral") - .bases("TSType") - .build("members") - .field("members", [TSTypeMember]); - def("TSTypeParameter") - .bases("Identifier") - .build("name", "constraint", "default") - .field("name", String) - .field("constraint", or(def("TSType"), void 0), defaults["undefined"]) - .field("default", or(def("TSType"), void 0), defaults["undefined"]); - def("TSTypeAssertion") - .bases("Expression", "Pattern") - .build("typeAnnotation", "expression") - .field("typeAnnotation", def("TSType")) - .field("expression", def("Expression")) - .field("extra", or({ parenthesized: Boolean }, null), defaults["null"]); - def("TSTypeParameterDeclaration") - .bases("Declaration") - .build("params") - .field("params", [def("TSTypeParameter")]); - def("TSTypeParameterInstantiation") - .bases("Node") - .build("params") - .field("params", [def("TSType")]); - def("TSEnumDeclaration") - .bases("Declaration") - .build("id", "members") - .field("id", def("Identifier")) - .field("const", Boolean, defaults["false"]) - .field("declare", Boolean, defaults["false"]) - .field("members", [def("TSEnumMember")]) - .field("initializer", or(def("Expression"), null), defaults["null"]); - def("TSTypeAliasDeclaration") - .bases("Declaration", "TSHasOptionalTypeParameters") - .build("id", "typeAnnotation") - .field("id", def("Identifier")) - .field("declare", Boolean, defaults["false"]) - .field("typeAnnotation", def("TSType")); - def("TSModuleBlock") - .bases("Node") - .build("body") - .field("body", [def("Statement")]); - def("TSModuleDeclaration") - .bases("Declaration") - .build("id", "body") - .field("id", or(StringLiteral, TSEntityName)) - .field("declare", Boolean, defaults["false"]) - .field("global", Boolean, defaults["false"]) - .field("body", or(def("TSModuleBlock"), def("TSModuleDeclaration"), null), defaults["null"]); - def("TSImportType") - .bases("TSType", "TSHasOptionalTypeParameterInstantiation") - .build("argument", "qualifier", "typeParameters") - .field("argument", StringLiteral) - .field("qualifier", or(TSEntityName, void 0), defaults["undefined"]); - def("TSImportEqualsDeclaration") - .bases("Declaration") - .build("id", "moduleReference") - .field("id", def("Identifier")) - .field("isExport", Boolean, defaults["false"]) - .field("moduleReference", or(TSEntityName, def("TSExternalModuleReference"))); - def("TSExternalModuleReference") - .bases("Declaration") - .build("expression") - .field("expression", StringLiteral); - def("TSExportAssignment") - .bases("Statement") - .build("expression") - .field("expression", def("Expression")); - def("TSNamespaceExportDeclaration") - .bases("Declaration") - .build("id") - .field("id", def("Identifier")); - def("TSInterfaceBody") - .bases("Node") - .build("body") - .field("body", [TSTypeMember]); - def("TSExpressionWithTypeArguments") - .bases("TSType", "TSHasOptionalTypeParameterInstantiation") - .build("expression", "typeParameters") - .field("expression", TSEntityName); - def("TSInterfaceDeclaration") - .bases("Declaration", "TSHasOptionalTypeParameters") - .build("id", "body") - .field("id", TSEntityName) - .field("declare", Boolean, defaults["false"]) - .field("extends", or([def("TSExpressionWithTypeArguments")], null), defaults["null"]) - .field("body", def("TSInterfaceBody")); - def("TSParameterProperty") - .bases("Pattern") - .build("parameter") - .field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"]) - .field("readonly", Boolean, defaults["false"]) - .field("parameter", or(def("Identifier"), def("AssignmentPattern"))); - def("ClassProperty") - .field("access", - or("public", "private", "protected", void 0), defaults["undefined"]); - def("ClassBody") - .field("body", [or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"), - def("TSDeclareMethod"), TSTypeMember)]); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (typescript, typescript.exports)); - return typescript.exports; -} - -var esProposals = {exports: {}}; - -var hasRequiredEsProposals; - -function requireEsProposals () { - if (hasRequiredEsProposals) return esProposals.exports; - hasRequiredEsProposals = 1; - (function (module, exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - var tslib_1 = require$$0; - var types_1 = tslib_1.__importDefault(requireTypes$1()); - var shared_1 = tslib_1.__importDefault(requireShared()); - var core_1 = tslib_1.__importDefault(requireCore()); - function default_1(fork) { - fork.use(core_1.default); - var types = fork.use(types_1.default); - var Type = types.Type; - var def = types.Type.def; - var or = Type.or; - var shared = fork.use(shared_1.default); - var defaults = shared.defaults; - def("OptionalMemberExpression") - .bases("MemberExpression") - .build("object", "property", "computed", "optional") - .field("optional", Boolean, defaults["true"]); - def("OptionalCallExpression") - .bases("CallExpression") - .build("callee", "arguments", "optional") - .field("optional", Boolean, defaults["true"]); - var LogicalOperator = or("||", "&&", "??"); - def("LogicalExpression") - .field("operator", LogicalOperator); - } - exports$1.default = default_1; - module.exports = exports$1["default"]; - } (esProposals, esProposals.exports)); - return esProposals.exports; -} - -var namedTypes = {}; - -var hasRequiredNamedTypes; - -function requireNamedTypes () { - if (hasRequiredNamedTypes) return namedTypes; - hasRequiredNamedTypes = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.namedTypes = void 0; - (function (namedTypes) { - })(exports$1.namedTypes || (exports$1.namedTypes = {})); - } (namedTypes)); - return namedTypes; -} - -var hasRequiredMain; - -function requireMain () { - if (hasRequiredMain) return main$1; - hasRequiredMain = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.visit = exports$1.use = exports$1.Type = exports$1.someField = exports$1.PathVisitor = exports$1.Path = exports$1.NodePath = exports$1.namedTypes = exports$1.getSupertypeNames = exports$1.getFieldValue = exports$1.getFieldNames = exports$1.getBuilderName = exports$1.finalize = exports$1.eachField = exports$1.defineMethod = exports$1.builtInTypes = exports$1.builders = exports$1.astNodesAreEquivalent = void 0; - var tslib_1 = require$$0; - var fork_1 = tslib_1.__importDefault(requireFork()); - var core_1 = tslib_1.__importDefault(requireCore()); - var es6_1 = tslib_1.__importDefault(requireEs6()); - var es7_1 = tslib_1.__importDefault(requireEs7()); - var es2020_1 = tslib_1.__importDefault(requireEs2020()); - var jsx_1 = tslib_1.__importDefault(requireJsx()); - var flow_1 = tslib_1.__importDefault(requireFlow()); - var esprima_1 = tslib_1.__importDefault(requireEsprima()); - var babel_1 = tslib_1.__importDefault(requireBabel()); - var typescript_1 = tslib_1.__importDefault(requireTypescript()); - var es_proposals_1 = tslib_1.__importDefault(requireEsProposals()); - var namedTypes_1 = requireNamedTypes(); - Object.defineProperty(exports$1, "namedTypes", { enumerable: true, get: function () { return namedTypes_1.namedTypes; } }); - var _a = fork_1.default([ - core_1.default, - es6_1.default, - es7_1.default, - es2020_1.default, - jsx_1.default, - flow_1.default, - esprima_1.default, - babel_1.default, - typescript_1.default, - es_proposals_1.default, - ]), astNodesAreEquivalent = _a.astNodesAreEquivalent, builders = _a.builders, builtInTypes = _a.builtInTypes, defineMethod = _a.defineMethod, eachField = _a.eachField, finalize = _a.finalize, getBuilderName = _a.getBuilderName, getFieldNames = _a.getFieldNames, getFieldValue = _a.getFieldValue, getSupertypeNames = _a.getSupertypeNames, n = _a.namedTypes, NodePath = _a.NodePath, Path = _a.Path, PathVisitor = _a.PathVisitor, someField = _a.someField, Type = _a.Type, use = _a.use, visit = _a.visit; - exports$1.astNodesAreEquivalent = astNodesAreEquivalent; - exports$1.builders = builders; - exports$1.builtInTypes = builtInTypes; - exports$1.defineMethod = defineMethod; - exports$1.eachField = eachField; - exports$1.finalize = finalize; - exports$1.getBuilderName = getBuilderName; - exports$1.getFieldNames = getFieldNames; - exports$1.getFieldValue = getFieldValue; - exports$1.getSupertypeNames = getSupertypeNames; - exports$1.NodePath = NodePath; - exports$1.Path = Path; - exports$1.PathVisitor = PathVisitor; - exports$1.someField = someField; - exports$1.Type = Type; - exports$1.use = use; - exports$1.visit = visit; - Object.assign(namedTypes_1.namedTypes, n); - } (main$1)); - return main$1; -} - -var hasRequiredDegenerator; - -function requireDegenerator () { - if (hasRequiredDegenerator) return degenerator; - hasRequiredDegenerator = 1; - Object.defineProperty(degenerator, "__esModule", { value: true }); - degenerator.degenerator = void 0; - const util_1 = require$$0$2; - const escodegen_1 = requireEscodegen(); - const esprima_1 = requireEsprima$1(); - const ast_types_1 = requireMain(); - function degenerator$1(code, _names) { - if (!Array.isArray(_names)) { - throw new TypeError('an array of async function "names" is required'); - } - const names = _names.slice(0); - const ast = (0, esprima_1.parseScript)(code); - let lastNamesLength = 0; - do { - lastNamesLength = names.length; - (0, ast_types_1.visit)(ast, { - visitVariableDeclaration(path) { - if (path.node.declarations) { - for (let i = 0; i < path.node.declarations.length; i++) { - const declaration = path.node.declarations[i]; - if (ast_types_1.namedTypes.VariableDeclarator.check(declaration) && - ast_types_1.namedTypes.Identifier.check(declaration.init) && - ast_types_1.namedTypes.Identifier.check(declaration.id) && - checkName(declaration.init.name, names) && - !checkName(declaration.id.name, names)) { - names.push(declaration.id.name); - } - } - } - return false; - }, - visitAssignmentExpression(path) { - if (ast_types_1.namedTypes.Identifier.check(path.node.left) && - ast_types_1.namedTypes.Identifier.check(path.node.right) && - checkName(path.node.right.name, names) && - !checkName(path.node.left.name, names)) { - names.push(path.node.left.name); - } - return false; - }, - visitFunction(path) { - if (path.node.id) { - let shouldDegenerate = false; - (0, ast_types_1.visit)(path.node, { - visitCallExpression(path) { - if (checkNames(path.node, names)) { - shouldDegenerate = true; - } - return false; - }, - }); - if (!shouldDegenerate) { - return false; - } - path.node.async = true; - if (!checkName(path.node.id.name, names)) { - names.push(path.node.id.name); - } - } - this.traverse(path); - }, - }); - } while (lastNamesLength !== names.length); - (0, ast_types_1.visit)(ast, { - visitCallExpression(path) { - if (checkNames(path.node, names)) { - const delegate = false; - const { name, parent: { node: pNode }, } = path; - const expr = ast_types_1.builders.awaitExpression(path.node, delegate); - if (ast_types_1.namedTypes.CallExpression.check(pNode)) { - pNode.arguments[name] = expr; - } - else { - pNode[name] = expr; - } - } - this.traverse(path); - }, - }); - return (0, escodegen_1.generate)(ast); - } - degenerator.degenerator = degenerator$1; - function checkNames({ callee }, names) { - let name; - if (ast_types_1.namedTypes.Identifier.check(callee)) { - name = callee.name; - } - else if (ast_types_1.namedTypes.MemberExpression.check(callee)) { - if (ast_types_1.namedTypes.Identifier.check(callee.object) && - ast_types_1.namedTypes.Identifier.check(callee.property)) { - name = `${callee.object.name}.${callee.property.name}`; - } - else { - return false; - } - } - else if (ast_types_1.namedTypes.FunctionExpression.check(callee)) { - if (callee.id) { - name = callee.id.name; - } - else { - return false; - } - } - else { - throw new Error(`Don't know how to get name for: ${callee.type}`); - } - return checkName(name, names); - } - function checkName(name, names) { - for (let i = 0; i < names.length; i++) { - const n = names[i]; - if (util_1.types.isRegExp(n)) { - if (n.test(name)) { - return true; - } - } - else if (name === n) { - return true; - } - } - return false; - } - return degenerator; -} - -var compile = {}; - -var hasRequiredCompile; - -function requireCompile () { - if (hasRequiredCompile) return compile; - hasRequiredCompile = 1; - Object.defineProperty(compile, "__esModule", { value: true }); - compile.compile = void 0; - const util_1 = require$$0$2; - const degenerator_1 = requireDegenerator(); - function compile$1(qjs, code, returnName, options = {}) { - const compiled = (0, degenerator_1.degenerator)(code, options.names ?? []); - const vm = qjs.newContext(); - if (options.sandbox) { - for (const [name, value] of Object.entries(options.sandbox)) { - if (typeof value !== 'function') { - throw new Error(`Expected a "function" for sandbox property \`${name}\`, but got "${typeof value}"`); - } - const fnHandle = vm.newFunction(name, (...args) => { - const result = value(...args.map((arg) => quickJSHandleToHost(vm, arg))); - vm.runtime.executePendingJobs(); - return hostToQuickJSHandle(vm, result); - }); - fnHandle.consume((handle) => vm.setProp(vm.global, name, handle)); - } - } - const fnResult = vm.evalCode(`${compiled};${returnName}`, options.filename); - const fn = vm.unwrapResult(fnResult); - const t = vm.typeof(fn); - if (t !== 'function') { - throw new Error(`Expected a "function" named \`${returnName}\` to be defined, but got "${t}"`); - } - const r = async function (...args) { - let promiseHandle; - let resolvedHandle; - try { - const result = vm.callFunction(fn, vm.undefined, ...args.map((arg) => hostToQuickJSHandle(vm, arg))); - promiseHandle = vm.unwrapResult(result); - const resolvedResultP = vm.resolvePromise(promiseHandle); - vm.runtime.executePendingJobs(); - const resolvedResult = await resolvedResultP; - resolvedHandle = vm.unwrapResult(resolvedResult); - return quickJSHandleToHost(vm, resolvedHandle); - } - catch (err) { - if (err && typeof err === 'object' && 'cause' in err && err.cause) { - if (typeof err.cause === 'object' && - 'stack' in err.cause && - 'name' in err.cause && - 'message' in err.cause && - typeof err.cause.stack === 'string' && - typeof err.cause.name === 'string' && - typeof err.cause.message === 'string') { - err.cause.stack = `${err.cause.name}: ${err.cause.message}\n${err.cause.stack}`; - } - throw err.cause; - } - throw err; - } - finally { - promiseHandle?.dispose(); - resolvedHandle?.dispose(); - } - }; - Object.defineProperty(r, 'toString', { - value: () => compiled, - enumerable: false, - }); - return r; - } - compile.compile = compile$1; - function quickJSHandleToHost(vm, val) { - return vm.dump(val); - } - function hostToQuickJSHandle(vm, val) { - if (typeof val === 'undefined') { - return vm.undefined; - } - else if (val === null) { - return vm.null; - } - else if (typeof val === 'string') { - return vm.newString(val); - } - else if (typeof val === 'number') { - return vm.newNumber(val); - } - else if (typeof val === 'bigint') { - return vm.newBigInt(val); - } - else if (typeof val === 'boolean') { - return val ? vm.true : vm.false; - } - else if (util_1.types.isPromise(val)) { - const promise = vm.newPromise(); - promise.settled.then(vm.runtime.executePendingJobs); - val.then((r) => { - promise.resolve(hostToQuickJSHandle(vm, r)); - }, (err) => { - promise.reject(hostToQuickJSHandle(vm, err)); - }); - return promise.handle; - } - else if (util_1.types.isNativeError(val)) { - return vm.newError(val); - } - throw new Error(`Unsupported value: ${val}`); - } - return compile; -} - -var hasRequiredDist$4; - -function requireDist$4 () { - if (hasRequiredDist$4) return dist$1; - hasRequiredDist$4 = 1; - (function (exports$1) { - var __createBinding = (dist$1 && dist$1.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __exportStar = (dist$1 && dist$1.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - __exportStar(requireDegenerator(), exports$1); - __exportStar(requireCompile(), exports$1); - } (dist$1)); - return dist$1; -} - -var dateRange = {}; - -var hasRequiredDateRange; - -function requireDateRange () { - if (hasRequiredDateRange) return dateRange; - hasRequiredDateRange = 1; - Object.defineProperty(dateRange, "__esModule", { value: true }); - function dateRange$1() { - return false; - } - dateRange.default = dateRange$1; - return dateRange; -} - -var dnsDomainIs = {}; - -var hasRequiredDnsDomainIs; - -function requireDnsDomainIs () { - if (hasRequiredDnsDomainIs) return dnsDomainIs; - hasRequiredDnsDomainIs = 1; - Object.defineProperty(dnsDomainIs, "__esModule", { value: true }); - function dnsDomainIs$1(host, domain) { - host = String(host); - domain = String(domain); - return host.substr(domain.length * -1) === domain; - } - dnsDomainIs.default = dnsDomainIs$1; - return dnsDomainIs; -} - -var dnsDomainLevels = {}; - -var hasRequiredDnsDomainLevels; - -function requireDnsDomainLevels () { - if (hasRequiredDnsDomainLevels) return dnsDomainLevels; - hasRequiredDnsDomainLevels = 1; - Object.defineProperty(dnsDomainLevels, "__esModule", { value: true }); - function dnsDomainLevels$1(host) { - const match = String(host).match(/\./g); - let levels = 0; - if (match) { - levels = match.length; - } - return levels; - } - dnsDomainLevels.default = dnsDomainLevels$1; - return dnsDomainLevels; -} - -var dnsResolve = {}; - -var util = {}; - -var hasRequiredUtil; - -function requireUtil () { - if (hasRequiredUtil) return util; - hasRequiredUtil = 1; - Object.defineProperty(util, "__esModule", { value: true }); - util.isGMT = util.dnsLookup = void 0; - const dns_1 = require$$3$3; - function dnsLookup(host, opts) { - return new Promise((resolve, reject) => { - (0, dns_1.lookup)(host, opts, (err, res) => { - if (err) { - reject(err); - } - else { - resolve(res); - } - }); - }); - } - util.dnsLookup = dnsLookup; - function isGMT(v) { - return v === 'GMT'; - } - util.isGMT = isGMT; - return util; -} - -var hasRequiredDnsResolve; - -function requireDnsResolve () { - if (hasRequiredDnsResolve) return dnsResolve; - hasRequiredDnsResolve = 1; - Object.defineProperty(dnsResolve, "__esModule", { value: true }); - const util_1 = requireUtil(); - async function dnsResolve$1(host) { - const family = 4; - try { - const r = await (0, util_1.dnsLookup)(host, { family }); - if (typeof r === 'string') { - return r; - } - } - catch (err) { - } - return null; - } - dnsResolve.default = dnsResolve$1; - return dnsResolve; -} - -var isInNet = {}; - -var netmask = {}; - -var hasRequiredNetmask; - -function requireNetmask () { - if (hasRequiredNetmask) return netmask; - hasRequiredNetmask = 1; - (function() { - var Netmask, atob, chr, chr0, chrA, chra, ip2long, long2ip; - long2ip = function(long) { - var a, b, c, d; - a = (long & (0xff << 24)) >>> 24; - b = (long & (0xff << 16)) >>> 16; - c = (long & (0xff << 8)) >>> 8; - d = long & 0xff; - return [a, b, c, d].join('.'); - }; - ip2long = function(ip) { - var b, c, i, j, n, ref; - b = []; - for (i = j = 0; j <= 3; i = ++j) { - if (ip.length === 0) { - break; - } - if (i > 0) { - if (ip[0] !== '.') { - throw new Error('Invalid IP'); - } - ip = ip.substring(1); - } - ref = atob(ip), n = ref[0], c = ref[1]; - ip = ip.substring(c); - b.push(n); - } - if (ip.length !== 0) { - throw new Error('Invalid IP'); - } - switch (b.length) { - case 1: - if (b[0] > 0xFFFFFFFF) { - throw new Error('Invalid IP'); - } - return b[0] >>> 0; - case 2: - if (b[0] > 0xFF || b[1] > 0xFFFFFF) { - throw new Error('Invalid IP'); - } - return (b[0] << 24 | b[1]) >>> 0; - case 3: - if (b[0] > 0xFF || b[1] > 0xFF || b[2] > 0xFFFF) { - throw new Error('Invalid IP'); - } - return (b[0] << 24 | b[1] << 16 | b[2]) >>> 0; - case 4: - if (b[0] > 0xFF || b[1] > 0xFF || b[2] > 0xFF || b[3] > 0xFF) { - throw new Error('Invalid IP'); - } - return (b[0] << 24 | b[1] << 16 | b[2] << 8 | b[3]) >>> 0; - default: - throw new Error('Invalid IP'); - } - }; - chr = function(b) { - return b.charCodeAt(0); - }; - chr0 = chr('0'); - chra = chr('a'); - chrA = chr('A'); - atob = function(s) { - var base, dmax, i, n, start; - n = 0; - base = 10; - dmax = '9'; - i = 0; - if (s.length > 1 && s[i] === '0') { - if (s[i + 1] === 'x' || s[i + 1] === 'X') { - i += 2; - base = 16; - } else if ('0' <= s[i + 1] && s[i + 1] <= '9') { - i++; - base = 8; - dmax = '7'; - } - } - start = i; - while (i < s.length) { - if ('0' <= s[i] && s[i] <= dmax) { - n = (n * base + (chr(s[i]) - chr0)) >>> 0; - } else if (base === 16) { - if ('a' <= s[i] && s[i] <= 'f') { - n = (n * base + (10 + chr(s[i]) - chra)) >>> 0; - } else if ('A' <= s[i] && s[i] <= 'F') { - n = (n * base + (10 + chr(s[i]) - chrA)) >>> 0; - } else { - break; - } - } else { - break; - } - if (n > 0xFFFFFFFF) { - throw new Error('too large'); - } - i++; - } - if (i === start) { - throw new Error('empty octet'); - } - return [n, i]; - }; - Netmask = (function() { - function Netmask(net, mask) { - var i, j, ref; - if (typeof net !== 'string') { - throw new Error("Missing `net' parameter"); - } - if (!mask) { - ref = net.split('/', 2), net = ref[0], mask = ref[1]; - } - if (!mask) { - mask = 32; - } - if (typeof mask === 'string' && mask.indexOf('.') > -1) { - try { - this.maskLong = ip2long(mask); - } catch (error1) { - throw new Error("Invalid mask: " + mask); - } - for (i = j = 32; j >= 0; i = --j) { - if (this.maskLong === (0xffffffff << (32 - i)) >>> 0) { - this.bitmask = i; - break; - } - } - } else if (mask || mask === 0) { - this.bitmask = parseInt(mask, 10); - this.maskLong = 0; - if (this.bitmask > 0) { - this.maskLong = (0xffffffff << (32 - this.bitmask)) >>> 0; - } - } else { - throw new Error("Invalid mask: empty"); - } - try { - this.netLong = (ip2long(net) & this.maskLong) >>> 0; - } catch (error1) { - throw new Error("Invalid net address: " + net); - } - if (!(this.bitmask <= 32)) { - throw new Error("Invalid mask for ip4: " + mask); - } - this.size = Math.pow(2, 32 - this.bitmask); - this.base = long2ip(this.netLong); - this.mask = long2ip(this.maskLong); - this.hostmask = long2ip(~this.maskLong); - this.first = this.bitmask <= 30 ? long2ip(this.netLong + 1) : this.base; - this.last = this.bitmask <= 30 ? long2ip(this.netLong + this.size - 2) : long2ip(this.netLong + this.size - 1); - this.broadcast = this.bitmask <= 30 ? long2ip(this.netLong + this.size - 1) : void 0; - } - Netmask.prototype.contains = function(ip) { - if (typeof ip === 'string' && (ip.indexOf('/') > 0 || ip.split('.').length !== 4)) { - ip = new Netmask(ip); - } - if (ip instanceof Netmask) { - return this.contains(ip.base) && this.contains(ip.broadcast || ip.last); - } else { - return (ip2long(ip) & this.maskLong) >>> 0 === (this.netLong & this.maskLong) >>> 0; - } - }; - Netmask.prototype.next = function(count) { - if (count == null) { - count = 1; - } - return new Netmask(long2ip(this.netLong + (this.size * count)), this.mask); - }; - Netmask.prototype.forEach = function(fn) { - var index, lastLong, long; - long = ip2long(this.first); - lastLong = ip2long(this.last); - index = 0; - while (long <= lastLong) { - fn(long2ip(long), long, index); - index++; - long++; - } - }; - Netmask.prototype.toString = function() { - return this.base + "/" + this.bitmask; - }; - return Netmask; - })(); - netmask.ip2long = ip2long; - netmask.long2ip = long2ip; - netmask.Netmask = Netmask; - }).call(netmask); - return netmask; -} - -var hasRequiredIsInNet; - -function requireIsInNet () { - if (hasRequiredIsInNet) return isInNet; - hasRequiredIsInNet = 1; - Object.defineProperty(isInNet, "__esModule", { value: true }); - const netmask_1 = requireNetmask(); - const util_1 = requireUtil(); - async function isInNet$1(host, pattern, mask) { - const family = 4; - try { - const ip = await (0, util_1.dnsLookup)(host, { family }); - if (typeof ip === 'string') { - const netmask = new netmask_1.Netmask(pattern, mask); - return netmask.contains(ip); - } - } - catch (err) { - } - return false; - } - isInNet.default = isInNet$1; - return isInNet; -} - -var isPlainHostName = {}; - -var hasRequiredIsPlainHostName; - -function requireIsPlainHostName () { - if (hasRequiredIsPlainHostName) return isPlainHostName; - hasRequiredIsPlainHostName = 1; - Object.defineProperty(isPlainHostName, "__esModule", { value: true }); - function isPlainHostName$1(host) { - return !/\./.test(host); - } - isPlainHostName.default = isPlainHostName$1; - return isPlainHostName; -} - -var isResolvable = {}; - -var hasRequiredIsResolvable; - -function requireIsResolvable () { - if (hasRequiredIsResolvable) return isResolvable; - hasRequiredIsResolvable = 1; - Object.defineProperty(isResolvable, "__esModule", { value: true }); - const util_1 = requireUtil(); - async function isResolvable$1(host) { - const family = 4; - try { - if (await (0, util_1.dnsLookup)(host, { family })) { - return true; - } - } - catch (err) { - } - return false; - } - isResolvable.default = isResolvable$1; - return isResolvable; -} - -var localHostOrDomainIs = {}; - -var hasRequiredLocalHostOrDomainIs; - -function requireLocalHostOrDomainIs () { - if (hasRequiredLocalHostOrDomainIs) return localHostOrDomainIs; - hasRequiredLocalHostOrDomainIs = 1; - Object.defineProperty(localHostOrDomainIs, "__esModule", { value: true }); - function localHostOrDomainIs$1(host, hostdom) { - const parts = host.split('.'); - const domparts = hostdom.split('.'); - let matches = true; - for (let i = 0; i < parts.length; i++) { - if (parts[i] !== domparts[i]) { - matches = false; - break; - } - } - return matches; - } - localHostOrDomainIs.default = localHostOrDomainIs$1; - return localHostOrDomainIs; -} - -var myIpAddress = {}; - -var ip = {}; - -var hasRequiredIp; - -function requireIp () { - if (hasRequiredIp) return ip; - hasRequiredIp = 1; - (function (exports$1) { - var __importDefault = (ip && ip.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.ip = void 0; - const os_1 = __importDefault(require$$0$1); - exports$1.ip = { - address() { - const interfaces = os_1.default.networkInterfaces(); - const family = normalizeFamily(); - const all = Object.values(interfaces).map((addrs = []) => { - const addresses = addrs.filter((details) => { - const detailsFamily = normalizeFamily(details.family); - if (detailsFamily !== family || exports$1.ip.isLoopback(details.address)) { - return false; - } - return true; - }); - return addresses.length ? addresses[0].address : undefined; - }).filter(Boolean); - return !all.length ? exports$1.ip.loopback(family) : all[0]; - }, - isLoopback(addr) { - return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/ - .test(addr) - || /^fe80::1$/.test(addr) - || /^::1$/.test(addr) - || /^::$/.test(addr); - }, - loopback(family) { - family = normalizeFamily(family); - if (family !== 'ipv4' && family !== 'ipv6') { - throw new Error('family must be ipv4 or ipv6'); - } - return family === 'ipv4' ? '127.0.0.1' : 'fe80::1'; - } - }; - function normalizeFamily(family) { - if (family === 4) { - return 'ipv4'; - } - if (family === 6) { - return 'ipv6'; - } - return family ? family.toLowerCase() : 'ipv4'; - } - } (ip)); - return ip; -} - -var hasRequiredMyIpAddress; - -function requireMyIpAddress () { - if (hasRequiredMyIpAddress) return myIpAddress; - hasRequiredMyIpAddress = 1; - var __importDefault = (myIpAddress && myIpAddress.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(myIpAddress, "__esModule", { value: true }); - const ip_1 = requireIp(); - const net_1 = __importDefault(require$$0$7); - async function myIpAddress$1() { - return new Promise((resolve, reject) => { - const socket = net_1.default.connect({ host: '8.8.8.8', port: 53 }); - const onError = () => { - resolve(ip_1.ip.address()); - }; - socket.once('error', onError); - socket.once('connect', () => { - socket.removeListener('error', onError); - const addr = socket.address(); - socket.destroy(); - if (typeof addr === 'string') { - resolve(addr); - } - else if (addr.address) { - resolve(addr.address); - } - else { - reject(new Error('Expected a `string`')); - } - }); - }); - } - myIpAddress.default = myIpAddress$1; - return myIpAddress; -} - -var shExpMatch = {}; - -var hasRequiredShExpMatch; - -function requireShExpMatch () { - if (hasRequiredShExpMatch) return shExpMatch; - hasRequiredShExpMatch = 1; - Object.defineProperty(shExpMatch, "__esModule", { value: true }); - function shExpMatch$1(str, shexp) { - const re = toRegExp(shexp); - return re.test(str); - } - shExpMatch.default = shExpMatch$1; - function toRegExp(str) { - str = String(str) - .replace(/\./g, '\\.') - .replace(/\?/g, '.') - .replace(/\*/g, '.*'); - return new RegExp(`^${str}$`); - } - return shExpMatch; -} - -var timeRange = {}; - -var hasRequiredTimeRange; - -function requireTimeRange () { - if (hasRequiredTimeRange) return timeRange; - hasRequiredTimeRange = 1; - Object.defineProperty(timeRange, "__esModule", { value: true }); - function timeRange$1() { - const args = Array.prototype.slice.call(arguments); - const lastArg = args.pop(); - const useGMTzone = lastArg === 'GMT'; - const currentDate = new Date(); - if (!useGMTzone) { - args.push(lastArg); - } - let result = false; - const noOfArgs = args.length; - const numericArgs = args.map((n) => parseInt(n, 10)); - if (noOfArgs === 1) { - result = getCurrentHour(useGMTzone, currentDate) === numericArgs[0]; - } - else if (noOfArgs === 2) { - const currentHour = getCurrentHour(useGMTzone, currentDate); - result = numericArgs[0] <= currentHour && currentHour < numericArgs[1]; - } - else if (noOfArgs === 4) { - result = valueInRange(secondsElapsedToday(numericArgs[0], numericArgs[1], 0), secondsElapsedToday(getCurrentHour(useGMTzone, currentDate), getCurrentMinute(useGMTzone, currentDate), 0), secondsElapsedToday(numericArgs[2], numericArgs[3], 59)); - } - else if (noOfArgs === 6) { - result = valueInRange(secondsElapsedToday(numericArgs[0], numericArgs[1], numericArgs[2]), secondsElapsedToday(getCurrentHour(useGMTzone, currentDate), getCurrentMinute(useGMTzone, currentDate), getCurrentSecond(useGMTzone, currentDate)), secondsElapsedToday(numericArgs[3], numericArgs[4], numericArgs[5])); - } - return result; - } - timeRange.default = timeRange$1; - function secondsElapsedToday(hh, mm, ss) { - return hh * 3600 + mm * 60 + ss; - } - function getCurrentHour(gmt, currentDate) { - return gmt ? currentDate.getUTCHours() : currentDate.getHours(); - } - function getCurrentMinute(gmt, currentDate) { - return gmt ? currentDate.getUTCMinutes() : currentDate.getMinutes(); - } - function getCurrentSecond(gmt, currentDate) { - return gmt ? currentDate.getUTCSeconds() : currentDate.getSeconds(); - } - function valueInRange(start, value, finish) { - return start <= value && value <= finish; - } - return timeRange; -} - -var weekdayRange = {}; - -var hasRequiredWeekdayRange; - -function requireWeekdayRange () { - if (hasRequiredWeekdayRange) return weekdayRange; - hasRequiredWeekdayRange = 1; - Object.defineProperty(weekdayRange, "__esModule", { value: true }); - const util_1 = requireUtil(); - const weekdays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']; - function weekdayRange$1(wd1, wd2, gmt) { - let useGMTzone = false; - let wd1Index = -1; - let wd2Index = -1; - let wd2IsGmt = false; - if ((0, util_1.isGMT)(gmt)) { - useGMTzone = true; - } - else if ((0, util_1.isGMT)(wd2)) { - useGMTzone = true; - wd2IsGmt = true; - } - wd1Index = weekdays.indexOf(wd1); - if (!wd2IsGmt && isWeekday(wd2)) { - wd2Index = weekdays.indexOf(wd2); - } - const todaysDay = getTodaysDay(useGMTzone); - let result; - if (wd2Index < 0) { - result = todaysDay === wd1Index; - } - else if (wd1Index <= wd2Index) { - result = valueInRange(wd1Index, todaysDay, wd2Index); - } - else { - result = - valueInRange(wd1Index, todaysDay, 6) || - valueInRange(0, todaysDay, wd2Index); - } - return result; - } - weekdayRange.default = weekdayRange$1; - function getTodaysDay(gmt) { - return gmt ? new Date().getUTCDay() : new Date().getDay(); - } - function valueInRange(start, value, finish) { - return start <= value && value <= finish; - } - function isWeekday(v) { - if (!v) - return false; - return weekdays.includes(v); - } - return weekdayRange; -} - -var hasRequiredDist$3; - -function requireDist$3 () { - if (hasRequiredDist$3) return dist$2; - hasRequiredDist$3 = 1; - (function (exports$1) { - var __importDefault = (dist$2 && dist$2.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.sandbox = exports$1.createPacResolver = void 0; - const degenerator_1 = requireDist$4(); - const dateRange_1 = __importDefault(requireDateRange()); - const dnsDomainIs_1 = __importDefault(requireDnsDomainIs()); - const dnsDomainLevels_1 = __importDefault(requireDnsDomainLevels()); - const dnsResolve_1 = __importDefault(requireDnsResolve()); - const isInNet_1 = __importDefault(requireIsInNet()); - const isPlainHostName_1 = __importDefault(requireIsPlainHostName()); - const isResolvable_1 = __importDefault(requireIsResolvable()); - const localHostOrDomainIs_1 = __importDefault(requireLocalHostOrDomainIs()); - const myIpAddress_1 = __importDefault(requireMyIpAddress()); - const shExpMatch_1 = __importDefault(requireShExpMatch()); - const timeRange_1 = __importDefault(requireTimeRange()); - const weekdayRange_1 = __importDefault(requireWeekdayRange()); - function createPacResolver(qjs, _str, _opts = {}) { - const str = Buffer.isBuffer(_str) ? _str.toString('utf8') : _str; - const context = { - ...exports$1.sandbox, - ..._opts.sandbox, - }; - const names = Object.keys(context).filter((k) => isAsyncFunction(context[k])); - const opts = { - filename: 'proxy.pac', - names, - ..._opts, - sandbox: context, - }; - const resolver = (0, degenerator_1.compile)(qjs, str, 'FindProxyForURL', opts); - function FindProxyForURL(url, _host) { - const urlObj = typeof url === 'string' ? new URL(url) : url; - const host = _host || urlObj.hostname; - if (!host) { - throw new TypeError('Could not determine `host`'); - } - return resolver(urlObj.href, host); - } - Object.defineProperty(FindProxyForURL, 'toString', { - value: () => resolver.toString(), - enumerable: false, - }); - return FindProxyForURL; - } - exports$1.createPacResolver = createPacResolver; - exports$1.sandbox = Object.freeze({ - alert: (message = '') => console.log('%s', message), - dateRange: dateRange_1.default, - dnsDomainIs: dnsDomainIs_1.default, - dnsDomainLevels: dnsDomainLevels_1.default, - dnsResolve: dnsResolve_1.default, - isInNet: isInNet_1.default, - isPlainHostName: isPlainHostName_1.default, - isResolvable: isResolvable_1.default, - localHostOrDomainIs: localHostOrDomainIs_1.default, - myIpAddress: myIpAddress_1.default, - shExpMatch: shExpMatch_1.default, - timeRange: timeRange_1.default, - weekdayRange: weekdayRange_1.default, - }); - function isAsyncFunction(v) { - if (typeof v !== 'function') - return false; - if (v.constructor.name === 'AsyncFunction') - return true; - if (String(v).indexOf('__awaiter(') !== -1) - return true; - return Boolean(v.async); - } - } (dist$2)); - return dist$2; -} - -var dist = {}; - -var variants = {}; - -var esmHelpers = {}; - -var hasRequiredEsmHelpers; - -function requireEsmHelpers () { - if (hasRequiredEsmHelpers) return esmHelpers; - hasRequiredEsmHelpers = 1; - Object.defineProperty(esmHelpers, "__esModule", { value: true }); - esmHelpers.unwrapJavascript = esmHelpers.unwrapTypescript = void 0; - function fakeUnwrapDefault(mod) { - return mod.default; - } - function actualUnwrapDefault(mod) { - const maybeUnwrap = mod.default; - return maybeUnwrap ?? mod; - } - esmHelpers.unwrapTypescript = actualUnwrapDefault; - esmHelpers.unwrapJavascript = fakeUnwrapDefault; - return esmHelpers; -} - -var module$1 = {}; - -var debug = {}; - -var hasRequiredDebug; - -function requireDebug () { - if (hasRequiredDebug) return debug; - hasRequiredDebug = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.debugLog = exports$1.QTS_DEBUG = void 0; - exports$1.QTS_DEBUG = Boolean(typeof process === "object" && process.env.QTS_DEBUG); - exports$1.debugLog = exports$1.QTS_DEBUG ? console.log.bind(console) : () => { }; - } (debug)); - return debug; -} - -var errors = {}; - -var hasRequiredErrors; - -function requireErrors () { - if (hasRequiredErrors) return errors; - hasRequiredErrors = 1; - Object.defineProperty(errors, "__esModule", { value: true }); - errors.QuickJSMemoryLeakDetected = errors.QuickJSAsyncifySuspended = errors.QuickJSAsyncifyError = errors.QuickJSNotImplemented = errors.QuickJSUseAfterFree = errors.QuickJSWrongOwner = errors.QuickJSUnwrapError = void 0; - class QuickJSUnwrapError extends Error { - constructor(cause, context) { - super(String(cause)); - this.cause = cause; - this.context = context; - this.name = "QuickJSUnwrapError"; - } - } - errors.QuickJSUnwrapError = QuickJSUnwrapError; - class QuickJSWrongOwner extends Error { - constructor() { - super(...arguments); - this.name = "QuickJSWrongOwner"; - } - } - errors.QuickJSWrongOwner = QuickJSWrongOwner; - class QuickJSUseAfterFree extends Error { - constructor() { - super(...arguments); - this.name = "QuickJSUseAfterFree"; - } - } - errors.QuickJSUseAfterFree = QuickJSUseAfterFree; - class QuickJSNotImplemented extends Error { - constructor() { - super(...arguments); - this.name = "QuickJSNotImplemented"; - } - } - errors.QuickJSNotImplemented = QuickJSNotImplemented; - class QuickJSAsyncifyError extends Error { - constructor() { - super(...arguments); - this.name = "QuickJSAsyncifyError"; - } - } - errors.QuickJSAsyncifyError = QuickJSAsyncifyError; - class QuickJSAsyncifySuspended extends Error { - constructor() { - super(...arguments); - this.name = "QuickJSAsyncifySuspended"; - } - } - errors.QuickJSAsyncifySuspended = QuickJSAsyncifySuspended; - class QuickJSMemoryLeakDetected extends Error { - constructor() { - super(...arguments); - this.name = "QuickJSMemoryLeakDetected"; - } - } - errors.QuickJSMemoryLeakDetected = QuickJSMemoryLeakDetected; - return errors; -} - -var lifetime = {}; - -var asyncifyHelpers = {}; - -var hasRequiredAsyncifyHelpers; - -function requireAsyncifyHelpers () { - if (hasRequiredAsyncifyHelpers) return asyncifyHelpers; - hasRequiredAsyncifyHelpers = 1; - Object.defineProperty(asyncifyHelpers, "__esModule", { value: true }); - asyncifyHelpers.awaitEachYieldedPromise = asyncifyHelpers.maybeAsync = asyncifyHelpers.maybeAsyncFn = void 0; - function* awaitYield(value) { - return (yield value); - } - function awaitYieldOf(generator) { - return awaitYield(awaitEachYieldedPromise(generator)); - } - const AwaitYield = awaitYield; - AwaitYield.of = awaitYieldOf; - function maybeAsyncFn(that, fn) { - return (...args) => { - const generator = fn.call(that, AwaitYield, ...args); - return awaitEachYieldedPromise(generator); - }; - } - asyncifyHelpers.maybeAsyncFn = maybeAsyncFn; - function maybeAsync(that, startGenerator) { - const generator = startGenerator.call(that, AwaitYield); - return awaitEachYieldedPromise(generator); - } - asyncifyHelpers.maybeAsync = maybeAsync; - function awaitEachYieldedPromise(gen) { - function handleNextStep(step) { - if (step.done) { - return step.value; - } - if (step.value instanceof Promise) { - return step.value.then((value) => handleNextStep(gen.next(value)), (error) => handleNextStep(gen.throw(error))); - } - return handleNextStep(gen.next(step.value)); - } - return handleNextStep(gen.next()); - } - asyncifyHelpers.awaitEachYieldedPromise = awaitEachYieldedPromise; - return asyncifyHelpers; -} - -var hasRequiredLifetime; - -function requireLifetime () { - if (hasRequiredLifetime) return lifetime; - hasRequiredLifetime = 1; - Object.defineProperty(lifetime, "__esModule", { value: true }); - lifetime.Scope = lifetime.WeakLifetime = lifetime.StaticLifetime = lifetime.Lifetime = void 0; - const asyncify_helpers_1 = /*@__PURE__*/ requireAsyncifyHelpers(); - const debug_1 = /*@__PURE__*/ requireDebug(); - const errors_1 = /*@__PURE__*/ requireErrors(); - class Lifetime { - constructor(_value, copier, disposer, _owner) { - this._value = _value; - this.copier = copier; - this.disposer = disposer; - this._owner = _owner; - this._alive = true; - this._constructorStack = debug_1.QTS_DEBUG ? new Error("Lifetime constructed").stack : undefined; - } - get alive() { - return this._alive; - } - get value() { - this.assertAlive(); - return this._value; - } - get owner() { - return this._owner; - } - get dupable() { - return !!this.copier; - } - dup() { - this.assertAlive(); - if (!this.copier) { - throw new Error("Non-dupable lifetime"); - } - return new Lifetime(this.copier(this._value), this.copier, this.disposer, this._owner); - } - consume(map) { - this.assertAlive(); - const result = map(this); - this.dispose(); - return result; - } - dispose() { - this.assertAlive(); - if (this.disposer) { - this.disposer(this._value); - } - this._alive = false; - } - assertAlive() { - if (!this.alive) { - if (this._constructorStack) { - throw new errors_1.QuickJSUseAfterFree(`Lifetime not alive\n${this._constructorStack}\nLifetime used`); - } - throw new errors_1.QuickJSUseAfterFree("Lifetime not alive"); - } - } - } - lifetime.Lifetime = Lifetime; - class StaticLifetime extends Lifetime { - constructor(value, owner) { - super(value, undefined, undefined, owner); - } - get dupable() { - return true; - } - dup() { - return this; - } - dispose() { } - } - lifetime.StaticLifetime = StaticLifetime; - class WeakLifetime extends Lifetime { - constructor(value, copier, disposer, owner) { - super(value, copier, disposer, owner); - } - dispose() { - this._alive = false; - } - } - lifetime.WeakLifetime = WeakLifetime; - function scopeFinally(scope, blockError) { - let disposeError; - try { - scope.dispose(); - } - catch (error) { - disposeError = error; - } - if (blockError && disposeError) { - Object.assign(blockError, { - message: `${blockError.message}\n Then, failed to dispose scope: ${disposeError.message}`, - disposeError, - }); - throw blockError; - } - if (blockError || disposeError) { - throw blockError || disposeError; - } - } - class Scope { - constructor() { - this._disposables = new Lifetime(new Set()); - } - static withScope(block) { - const scope = new Scope(); - let blockError; - try { - return block(scope); - } - catch (error) { - blockError = error; - throw error; - } - finally { - scopeFinally(scope, blockError); - } - } - static withScopeMaybeAsync(_this, block) { - return (0, asyncify_helpers_1.maybeAsync)(undefined, function* (awaited) { - const scope = new Scope(); - let blockError; - try { - return yield* awaited.of(block.call(_this, awaited, scope)); - } - catch (error) { - blockError = error; - throw error; - } - finally { - scopeFinally(scope, blockError); - } - }); - } - static async withScopeAsync(block) { - const scope = new Scope(); - let blockError; - try { - return await block(scope); - } - catch (error) { - blockError = error; - throw error; - } - finally { - scopeFinally(scope, blockError); - } - } - manage(lifetime) { - this._disposables.value.add(lifetime); - return lifetime; - } - get alive() { - return this._disposables.alive; - } - dispose() { - const lifetimes = Array.from(this._disposables.value.values()).reverse(); - for (const lifetime of lifetimes) { - if (lifetime.alive) { - lifetime.dispose(); - } - } - this._disposables.dispose(); - } - } - lifetime.Scope = Scope; - return lifetime; -} - -var runtime = {}; - -var context = {}; - -var deferredPromise = {}; - -var hasRequiredDeferredPromise; - -function requireDeferredPromise () { - if (hasRequiredDeferredPromise) return deferredPromise; - hasRequiredDeferredPromise = 1; - Object.defineProperty(deferredPromise, "__esModule", { value: true }); - deferredPromise.QuickJSDeferredPromise = void 0; - class QuickJSDeferredPromise { - constructor(args) { - this.resolve = (value) => { - if (!this.resolveHandle.alive) { - return; - } - this.context - .unwrapResult(this.context.callFunction(this.resolveHandle, this.context.undefined, value || this.context.undefined)) - .dispose(); - this.disposeResolvers(); - this.onSettled(); - }; - this.reject = (value) => { - if (!this.rejectHandle.alive) { - return; - } - this.context - .unwrapResult(this.context.callFunction(this.rejectHandle, this.context.undefined, value || this.context.undefined)) - .dispose(); - this.disposeResolvers(); - this.onSettled(); - }; - this.dispose = () => { - if (this.handle.alive) { - this.handle.dispose(); - } - this.disposeResolvers(); - }; - this.context = args.context; - this.owner = args.context.runtime; - this.handle = args.promiseHandle; - this.settled = new Promise((resolve) => { - this.onSettled = resolve; - }); - this.resolveHandle = args.resolveHandle; - this.rejectHandle = args.rejectHandle; - } - get alive() { - return this.handle.alive || this.resolveHandle.alive || this.rejectHandle.alive; - } - disposeResolvers() { - if (this.resolveHandle.alive) { - this.resolveHandle.dispose(); - } - if (this.rejectHandle.alive) { - this.rejectHandle.dispose(); - } - } - } - deferredPromise.QuickJSDeferredPromise = QuickJSDeferredPromise; - return deferredPromise; -} - -var memory = {}; - -var hasRequiredMemory; - -function requireMemory () { - if (hasRequiredMemory) return memory; - hasRequiredMemory = 1; - Object.defineProperty(memory, "__esModule", { value: true }); - memory.ModuleMemory = void 0; - const lifetime_1 = /*@__PURE__*/ requireLifetime(); - class ModuleMemory { - constructor(module) { - this.module = module; - } - toPointerArray(handleArray) { - const typedArray = new Int32Array(handleArray.map((handle) => handle.value)); - const numBytes = typedArray.length * typedArray.BYTES_PER_ELEMENT; - const ptr = this.module._malloc(numBytes); - var heapBytes = new Uint8Array(this.module.HEAPU8.buffer, ptr, numBytes); - heapBytes.set(new Uint8Array(typedArray.buffer)); - return new lifetime_1.Lifetime(ptr, undefined, (ptr) => this.module._free(ptr)); - } - newMutablePointerArray(length) { - const zeros = new Int32Array(new Array(length).fill(0)); - const numBytes = zeros.length * zeros.BYTES_PER_ELEMENT; - const ptr = this.module._malloc(numBytes); - const typedArray = new Int32Array(this.module.HEAPU8.buffer, ptr, length); - typedArray.set(zeros); - return new lifetime_1.Lifetime({ typedArray, ptr }, undefined, (value) => this.module._free(value.ptr)); - } - newHeapCharPointer(string) { - const numBytes = this.module.lengthBytesUTF8(string) + 1; - const ptr = this.module._malloc(numBytes); - this.module.stringToUTF8(string, ptr, numBytes); - return new lifetime_1.Lifetime(ptr, undefined, (value) => this.module._free(value)); - } - consumeHeapCharPointer(ptr) { - const str = this.module.UTF8ToString(ptr); - this.module._free(ptr); - return str; - } - } - memory.ModuleMemory = ModuleMemory; - return memory; -} - -var types$4 = {}; - -var typesFfi = {}; - -var hasRequiredTypesFfi; - -function requireTypesFfi () { - if (hasRequiredTypesFfi) return typesFfi; - hasRequiredTypesFfi = 1; - Object.defineProperty(typesFfi, "__esModule", { value: true }); - typesFfi.EvalFlags = typesFfi.assertSync = void 0; - function assertSync(fn) { - return function mustBeSync(...args) { - const result = fn(...args); - if (result && typeof result === "object" && result instanceof Promise) { - throw new Error("Function unexpectedly returned a Promise"); - } - return result; - }; - } - typesFfi.assertSync = assertSync; - typesFfi.EvalFlags = { - JS_EVAL_TYPE_GLOBAL: 0 << 0, - JS_EVAL_TYPE_MODULE: 1 << 0, - JS_EVAL_TYPE_DIRECT: 2 << 0, - JS_EVAL_TYPE_INDIRECT: 3 << 0, - JS_EVAL_TYPE_MASK: 3 << 0, - JS_EVAL_FLAG_STRICT: 1 << 3, - JS_EVAL_FLAG_STRIP: 1 << 4, - JS_EVAL_FLAG_COMPILE_ONLY: 1 << 5, - JS_EVAL_FLAG_BACKTRACE_BARRIER: 1 << 6, - }; - return typesFfi; -} - -var hasRequiredTypes; - -function requireTypes () { - if (hasRequiredTypes) return types$4; - hasRequiredTypes = 1; - Object.defineProperty(types$4, "__esModule", { value: true }); - types$4.concat = types$4.evalOptionsToFlags = types$4.DefaultIntrinsics = void 0; - const types_ffi_1 = /*@__PURE__*/ requireTypesFfi(); - types$4.DefaultIntrinsics = Symbol("DefaultIntrinsics"); - function evalOptionsToFlags(evalOptions) { - if (typeof evalOptions === "number") { - return evalOptions; - } - if (evalOptions === undefined) { - return 0; - } - const { type, strict, strip, compileOnly, backtraceBarrier } = evalOptions; - let flags = 0; - if (type === "global") - flags |= types_ffi_1.EvalFlags.JS_EVAL_TYPE_GLOBAL; - if (type === "module") - flags |= types_ffi_1.EvalFlags.JS_EVAL_TYPE_MODULE; - if (strict) - flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_STRICT; - if (strip) - flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_STRIP; - if (compileOnly) - flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_COMPILE_ONLY; - if (backtraceBarrier) - flags |= types_ffi_1.EvalFlags.JS_EVAL_FLAG_BACKTRACE_BARRIER; - return flags; - } - types$4.evalOptionsToFlags = evalOptionsToFlags; - function concat(...values) { - let result = []; - for (const value of values) { - if (value !== undefined) { - result = result.concat(value); - } - } - return result; - } - types$4.concat = concat; - return types$4; -} - -var hasRequiredContext; - -function requireContext () { - if (hasRequiredContext) return context; - hasRequiredContext = 1; - Object.defineProperty(context, "__esModule", { value: true }); - context.QuickJSContext = void 0; - const debug_1 = /*@__PURE__*/ requireDebug(); - const deferred_promise_1 = /*@__PURE__*/ requireDeferredPromise(); - const errors_1 = /*@__PURE__*/ requireErrors(); - const lifetime_1 = /*@__PURE__*/ requireLifetime(); - const memory_1 = /*@__PURE__*/ requireMemory(); - const types_1 = /*@__PURE__*/ requireTypes(); - class ContextMemory extends memory_1.ModuleMemory { - constructor(args) { - super(args.module); - this.scope = new lifetime_1.Scope(); - this.copyJSValue = (ptr) => { - return this.ffi.QTS_DupValuePointer(this.ctx.value, ptr); - }; - this.freeJSValue = (ptr) => { - this.ffi.QTS_FreeValuePointer(this.ctx.value, ptr); - }; - args.ownedLifetimes?.forEach((lifetime) => this.scope.manage(lifetime)); - this.owner = args.owner; - this.module = args.module; - this.ffi = args.ffi; - this.rt = args.rt; - this.ctx = this.scope.manage(args.ctx); - } - get alive() { - return this.scope.alive; - } - dispose() { - return this.scope.dispose(); - } - manage(lifetime) { - return this.scope.manage(lifetime); - } - consumeJSCharPointer(ptr) { - const str = this.module.UTF8ToString(ptr); - this.ffi.QTS_FreeCString(this.ctx.value, ptr); - return str; - } - heapValueHandle(ptr) { - return new lifetime_1.Lifetime(ptr, this.copyJSValue, this.freeJSValue, this.owner); - } - } - class QuickJSContext { - constructor(args) { - this._undefined = undefined; - this._null = undefined; - this._false = undefined; - this._true = undefined; - this._global = undefined; - this._BigInt = undefined; - this.fnNextId = -32768; - this.fnMaps = new Map(); - this.cToHostCallbacks = { - callFunction: (ctx, this_ptr, argc, argv, fn_id) => { - if (ctx !== this.ctx.value) { - throw new Error("QuickJSContext instance received C -> JS call with mismatched ctx"); - } - const fn = this.getFunction(fn_id); - if (!fn) { - throw new Error(`QuickJSContext had no callback with id ${fn_id}`); - } - return lifetime_1.Scope.withScopeMaybeAsync(this, function* (awaited, scope) { - const thisHandle = scope.manage(new lifetime_1.WeakLifetime(this_ptr, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime)); - const argHandles = new Array(argc); - for (let i = 0; i < argc; i++) { - const ptr = this.ffi.QTS_ArgvGetJSValueConstPointer(argv, i); - argHandles[i] = scope.manage(new lifetime_1.WeakLifetime(ptr, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime)); - } - try { - const result = yield* awaited(fn.apply(thisHandle, argHandles)); - if (result) { - if ("error" in result && result.error) { - (0, debug_1.debugLog)("throw error", result.error); - throw result.error; - } - const handle = scope.manage(result instanceof lifetime_1.Lifetime ? result : result.value); - return this.ffi.QTS_DupValuePointer(this.ctx.value, handle.value); - } - return 0; - } - catch (error) { - return this.errorToHandle(error).consume((errorHandle) => this.ffi.QTS_Throw(this.ctx.value, errorHandle.value)); - } - }); - }, - }; - this.runtime = args.runtime; - this.module = args.module; - this.ffi = args.ffi; - this.rt = args.rt; - this.ctx = args.ctx; - this.memory = new ContextMemory({ - ...args, - owner: this.runtime, - }); - args.callbacks.setContextCallbacks(this.ctx.value, this.cToHostCallbacks); - this.dump = this.dump.bind(this); - this.getString = this.getString.bind(this); - this.getNumber = this.getNumber.bind(this); - this.resolvePromise = this.resolvePromise.bind(this); - } - get alive() { - return this.memory.alive; - } - dispose() { - this.memory.dispose(); - } - get undefined() { - if (this._undefined) { - return this._undefined; - } - const ptr = this.ffi.QTS_GetUndefined(); - return (this._undefined = new lifetime_1.StaticLifetime(ptr)); - } - get null() { - if (this._null) { - return this._null; - } - const ptr = this.ffi.QTS_GetNull(); - return (this._null = new lifetime_1.StaticLifetime(ptr)); - } - get true() { - if (this._true) { - return this._true; - } - const ptr = this.ffi.QTS_GetTrue(); - return (this._true = new lifetime_1.StaticLifetime(ptr)); - } - get false() { - if (this._false) { - return this._false; - } - const ptr = this.ffi.QTS_GetFalse(); - return (this._false = new lifetime_1.StaticLifetime(ptr)); - } - get global() { - if (this._global) { - return this._global; - } - const ptr = this.ffi.QTS_GetGlobalObject(this.ctx.value); - this.memory.manage(this.memory.heapValueHandle(ptr)); - this._global = new lifetime_1.StaticLifetime(ptr, this.runtime); - return this._global; - } - newNumber(num) { - return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value, num)); - } - newString(str) { - const ptr = this.memory - .newHeapCharPointer(str) - .consume((charHandle) => this.ffi.QTS_NewString(this.ctx.value, charHandle.value)); - return this.memory.heapValueHandle(ptr); - } - newUniqueSymbol(description) { - const key = (typeof description === "symbol" ? description.description : description) ?? ""; - const ptr = this.memory - .newHeapCharPointer(key) - .consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 0)); - return this.memory.heapValueHandle(ptr); - } - newSymbolFor(key) { - const description = (typeof key === "symbol" ? key.description : key) ?? ""; - const ptr = this.memory - .newHeapCharPointer(description) - .consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 1)); - return this.memory.heapValueHandle(ptr); - } - newBigInt(num) { - if (!this._BigInt) { - const bigIntHandle = this.getProp(this.global, "BigInt"); - this.memory.manage(bigIntHandle); - this._BigInt = new lifetime_1.StaticLifetime(bigIntHandle.value, this.runtime); - } - const bigIntHandle = this._BigInt; - const asString = String(num); - return this.newString(asString).consume((handle) => this.unwrapResult(this.callFunction(bigIntHandle, this.undefined, handle))); - } - newObject(prototype) { - if (prototype) { - this.runtime.assertOwned(prototype); - } - const ptr = prototype - ? this.ffi.QTS_NewObjectProto(this.ctx.value, prototype.value) - : this.ffi.QTS_NewObject(this.ctx.value); - return this.memory.heapValueHandle(ptr); - } - newArray() { - const ptr = this.ffi.QTS_NewArray(this.ctx.value); - return this.memory.heapValueHandle(ptr); - } - newPromise(value) { - const deferredPromise = lifetime_1.Scope.withScope((scope) => { - const mutablePointerArray = scope.manage(this.memory.newMutablePointerArray(2)); - const promisePtr = this.ffi.QTS_NewPromiseCapability(this.ctx.value, mutablePointerArray.value.ptr); - const promiseHandle = this.memory.heapValueHandle(promisePtr); - const [resolveHandle, rejectHandle] = Array.from(mutablePointerArray.value.typedArray).map((jsvaluePtr) => this.memory.heapValueHandle(jsvaluePtr)); - return new deferred_promise_1.QuickJSDeferredPromise({ - context: this, - promiseHandle, - resolveHandle, - rejectHandle, - }); - }); - if (value && typeof value === "function") { - value = new Promise(value); - } - if (value) { - Promise.resolve(value).then(deferredPromise.resolve, (error) => error instanceof lifetime_1.Lifetime - ? deferredPromise.reject(error) - : this.newError(error).consume(deferredPromise.reject)); - } - return deferredPromise; - } - newFunction(name, fn) { - const fnId = ++this.fnNextId; - this.setFunction(fnId, fn); - return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value, fnId, name)); - } - newError(error) { - const errorHandle = this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value)); - if (error && typeof error === "object") { - if (error.name !== undefined) { - this.newString(error.name).consume((handle) => this.setProp(errorHandle, "name", handle)); - } - if (error.message !== undefined) { - this.newString(error.message).consume((handle) => this.setProp(errorHandle, "message", handle)); - } - } - else if (typeof error === "string") { - this.newString(error).consume((handle) => this.setProp(errorHandle, "message", handle)); - } - else if (error !== undefined) { - this.newString(String(error)).consume((handle) => this.setProp(errorHandle, "message", handle)); - } - return errorHandle; - } - typeof(handle) { - this.runtime.assertOwned(handle); - return this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value, handle.value)); - } - getNumber(handle) { - this.runtime.assertOwned(handle); - return this.ffi.QTS_GetFloat64(this.ctx.value, handle.value); - } - getString(handle) { - this.runtime.assertOwned(handle); - return this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value, handle.value)); - } - getSymbol(handle) { - this.runtime.assertOwned(handle); - const key = this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value, handle.value)); - const isGlobal = this.ffi.QTS_IsGlobalSymbol(this.ctx.value, handle.value); - return isGlobal ? Symbol.for(key) : Symbol(key); - } - getBigInt(handle) { - this.runtime.assertOwned(handle); - const asString = this.getString(handle); - return BigInt(asString); - } - resolvePromise(promiseLikeHandle) { - this.runtime.assertOwned(promiseLikeHandle); - const vmResolveResult = lifetime_1.Scope.withScope((scope) => { - const vmPromise = scope.manage(this.getProp(this.global, "Promise")); - const vmPromiseResolve = scope.manage(this.getProp(vmPromise, "resolve")); - return this.callFunction(vmPromiseResolve, vmPromise, promiseLikeHandle); - }); - if (vmResolveResult.error) { - return Promise.resolve(vmResolveResult); - } - return new Promise((resolve) => { - lifetime_1.Scope.withScope((scope) => { - const resolveHandle = scope.manage(this.newFunction("resolve", (value) => { - resolve({ value: value && value.dup() }); - })); - const rejectHandle = scope.manage(this.newFunction("reject", (error) => { - resolve({ error: error && error.dup() }); - })); - const promiseHandle = scope.manage(vmResolveResult.value); - const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then")); - this.unwrapResult(this.callFunction(promiseThenHandle, promiseHandle, resolveHandle, rejectHandle)).dispose(); - }); - }); - } - getProp(handle, key) { - this.runtime.assertOwned(handle); - const ptr = this.borrowPropertyKey(key).consume((quickJSKey) => this.ffi.QTS_GetProp(this.ctx.value, handle.value, quickJSKey.value)); - const result = this.memory.heapValueHandle(ptr); - return result; - } - setProp(handle, key, value) { - this.runtime.assertOwned(handle); - this.borrowPropertyKey(key).consume((quickJSKey) => this.ffi.QTS_SetProp(this.ctx.value, handle.value, quickJSKey.value, value.value)); - } - defineProp(handle, key, descriptor) { - this.runtime.assertOwned(handle); - lifetime_1.Scope.withScope((scope) => { - const quickJSKey = scope.manage(this.borrowPropertyKey(key)); - const value = descriptor.value || this.undefined; - const configurable = Boolean(descriptor.configurable); - const enumerable = Boolean(descriptor.enumerable); - const hasValue = Boolean(descriptor.value); - const get = descriptor.get - ? scope.manage(this.newFunction(descriptor.get.name, descriptor.get)) - : this.undefined; - const set = descriptor.set - ? scope.manage(this.newFunction(descriptor.set.name, descriptor.set)) - : this.undefined; - this.ffi.QTS_DefineProp(this.ctx.value, handle.value, quickJSKey.value, value.value, get.value, set.value, configurable, enumerable, hasValue); - }); - } - callFunction(func, thisVal, ...args) { - this.runtime.assertOwned(func); - const resultPtr = this.memory - .toPointerArray(args) - .consume((argsArrayPtr) => this.ffi.QTS_Call(this.ctx.value, func.value, thisVal.value, args.length, argsArrayPtr.value)); - const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr); - if (errorPtr) { - this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr); - return { error: this.memory.heapValueHandle(errorPtr) }; - } - return { value: this.memory.heapValueHandle(resultPtr) }; - } - evalCode(code, filename = "eval.js", - options) { - const detectModule = (options === undefined ? 1 : 0); - const flags = (0, types_1.evalOptionsToFlags)(options); - const resultPtr = this.memory - .newHeapCharPointer(code) - .consume((charHandle) => this.ffi.QTS_Eval(this.ctx.value, charHandle.value, filename, detectModule, flags)); - const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr); - if (errorPtr) { - this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr); - return { error: this.memory.heapValueHandle(errorPtr) }; - } - return { value: this.memory.heapValueHandle(resultPtr) }; - } - throw(error) { - return this.errorToHandle(error).consume((handle) => this.ffi.QTS_Throw(this.ctx.value, handle.value)); - } - borrowPropertyKey(key) { - if (typeof key === "number") { - return this.newNumber(key); - } - if (typeof key === "string") { - return this.newString(key); - } - return new lifetime_1.StaticLifetime(key.value, this.runtime); - } - getMemory(rt) { - if (rt === this.rt.value) { - return this.memory; - } - else { - throw new Error("Private API. Cannot get memory from a different runtime"); - } - } - dump(handle) { - this.runtime.assertOwned(handle); - const type = this.typeof(handle); - if (type === "string") { - return this.getString(handle); - } - else if (type === "number") { - return this.getNumber(handle); - } - else if (type === "bigint") { - return this.getBigInt(handle); - } - else if (type === "undefined") { - return undefined; - } - else if (type === "symbol") { - return this.getSymbol(handle); - } - const str = this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value, handle.value)); - try { - return JSON.parse(str); - } - catch (err) { - return str; - } - } - unwrapResult(result) { - if (result.error) { - const context = "context" in result.error ? result.error.context : this; - const cause = result.error.consume((error) => this.dump(error)); - if (cause && typeof cause === "object" && typeof cause.message === "string") { - const { message, name, stack } = cause; - const exception = new errors_1.QuickJSUnwrapError(""); - const hostStack = exception.stack; - if (typeof name === "string") { - exception.name = cause.name; - } - if (typeof stack === "string") { - exception.stack = `${name}: ${message}\n${cause.stack}Host: ${hostStack}`; - } - Object.assign(exception, { cause, context, message }); - throw exception; - } - throw new errors_1.QuickJSUnwrapError(cause, context); - } - return result.value; - } - getFunction(fn_id) { - const map_id = fn_id >> 8; - const fnMap = this.fnMaps.get(map_id); - if (!fnMap) { - return undefined; - } - return fnMap.get(fn_id); - } - setFunction(fn_id, handle) { - const map_id = fn_id >> 8; - let fnMap = this.fnMaps.get(map_id); - if (!fnMap) { - fnMap = new Map(); - this.fnMaps.set(map_id, fnMap); - } - return fnMap.set(fn_id, handle); - } - errorToHandle(error) { - if (error instanceof lifetime_1.Lifetime) { - return error; - } - return this.newError(error); - } - } - context.QuickJSContext = QuickJSContext; - return context; -} - -var hasRequiredRuntime; - -function requireRuntime () { - if (hasRequiredRuntime) return runtime; - hasRequiredRuntime = 1; - Object.defineProperty(runtime, "__esModule", { value: true }); - runtime.QuickJSRuntime = void 0; - const asyncify_helpers_1 = /*@__PURE__*/ requireAsyncifyHelpers(); - const context_1 = /*@__PURE__*/ requireContext(); - const debug_1 = /*@__PURE__*/ requireDebug(); - const errors_1 = /*@__PURE__*/ requireErrors(); - const lifetime_1 = /*@__PURE__*/ requireLifetime(); - const memory_1 = /*@__PURE__*/ requireMemory(); - const types_1 = /*@__PURE__*/ requireTypes(); - class QuickJSRuntime { - constructor(args) { - this.scope = new lifetime_1.Scope(); - this.contextMap = new Map(); - this.cToHostCallbacks = { - shouldInterrupt: (rt) => { - if (rt !== this.rt.value) { - throw new Error("QuickJSContext instance received C -> JS interrupt with mismatched rt"); - } - const fn = this.interruptHandler; - if (!fn) { - throw new Error("QuickJSContext had no interrupt handler"); - } - return fn(this) ? 1 : 0; - }, - loadModuleSource: (0, asyncify_helpers_1.maybeAsyncFn)(this, function* (awaited, rt, ctx, moduleName) { - const moduleLoader = this.moduleLoader; - if (!moduleLoader) { - throw new Error("Runtime has no module loader"); - } - if (rt !== this.rt.value) { - throw new Error("Runtime pointer mismatch"); - } - const context = this.contextMap.get(ctx) ?? - this.newContext({ - contextPointer: ctx, - }); - try { - const result = yield* awaited(moduleLoader(moduleName, context)); - if (typeof result === "object" && "error" in result && result.error) { - (0, debug_1.debugLog)("cToHostLoadModule: loader returned error", result.error); - throw result.error; - } - const moduleSource = typeof result === "string" ? result : "value" in result ? result.value : result; - return this.memory.newHeapCharPointer(moduleSource).value; - } - catch (error) { - (0, debug_1.debugLog)("cToHostLoadModule: caught error", error); - context.throw(error); - return 0; - } - }), - normalizeModule: (0, asyncify_helpers_1.maybeAsyncFn)(this, function* (awaited, rt, ctx, baseModuleName, moduleNameRequest) { - const moduleNormalizer = this.moduleNormalizer; - if (!moduleNormalizer) { - throw new Error("Runtime has no module normalizer"); - } - if (rt !== this.rt.value) { - throw new Error("Runtime pointer mismatch"); - } - const context = this.contextMap.get(ctx) ?? - this.newContext({ - contextPointer: ctx, - }); - try { - const result = yield* awaited(moduleNormalizer(baseModuleName, moduleNameRequest, context)); - if (typeof result === "object" && "error" in result && result.error) { - (0, debug_1.debugLog)("cToHostNormalizeModule: normalizer returned error", result.error); - throw result.error; - } - const name = typeof result === "string" ? result : result.value; - return context.getMemory(this.rt.value).newHeapCharPointer(name).value; - } - catch (error) { - (0, debug_1.debugLog)("normalizeModule: caught error", error); - context.throw(error); - return 0; - } - }), - }; - args.ownedLifetimes?.forEach((lifetime) => this.scope.manage(lifetime)); - this.module = args.module; - this.memory = new memory_1.ModuleMemory(this.module); - this.ffi = args.ffi; - this.rt = args.rt; - this.callbacks = args.callbacks; - this.scope.manage(this.rt); - this.callbacks.setRuntimeCallbacks(this.rt.value, this.cToHostCallbacks); - this.executePendingJobs = this.executePendingJobs.bind(this); - } - get alive() { - return this.scope.alive; - } - dispose() { - return this.scope.dispose(); - } - newContext(options = {}) { - if (options.intrinsics && options.intrinsics !== types_1.DefaultIntrinsics) { - throw new Error("TODO: Custom intrinsics are not supported yet"); - } - const ctx = new lifetime_1.Lifetime(options.contextPointer || this.ffi.QTS_NewContext(this.rt.value), undefined, (ctx_ptr) => { - this.contextMap.delete(ctx_ptr); - this.callbacks.deleteContext(ctx_ptr); - this.ffi.QTS_FreeContext(ctx_ptr); - }); - const context = new context_1.QuickJSContext({ - module: this.module, - ctx, - ffi: this.ffi, - rt: this.rt, - ownedLifetimes: options.ownedLifetimes, - runtime: this, - callbacks: this.callbacks, - }); - this.contextMap.set(ctx.value, context); - return context; - } - setModuleLoader(moduleLoader, moduleNormalizer) { - this.moduleLoader = moduleLoader; - this.moduleNormalizer = moduleNormalizer; - this.ffi.QTS_RuntimeEnableModuleLoader(this.rt.value, this.moduleNormalizer ? 1 : 0); - } - removeModuleLoader() { - this.moduleLoader = undefined; - this.ffi.QTS_RuntimeDisableModuleLoader(this.rt.value); - } - hasPendingJob() { - return Boolean(this.ffi.QTS_IsJobPending(this.rt.value)); - } - setInterruptHandler(cb) { - const prevInterruptHandler = this.interruptHandler; - this.interruptHandler = cb; - if (!prevInterruptHandler) { - this.ffi.QTS_RuntimeEnableInterruptHandler(this.rt.value); - } - } - removeInterruptHandler() { - if (this.interruptHandler) { - this.ffi.QTS_RuntimeDisableInterruptHandler(this.rt.value); - this.interruptHandler = undefined; - } - } - executePendingJobs(maxJobsToExecute = -1) { - const ctxPtrOut = this.memory.newMutablePointerArray(1); - const valuePtr = this.ffi.QTS_ExecutePendingJob(this.rt.value, maxJobsToExecute ?? -1, ctxPtrOut.value.ptr); - const ctxPtr = ctxPtrOut.value.typedArray[0]; - ctxPtrOut.dispose(); - if (ctxPtr === 0) { - this.ffi.QTS_FreeValuePointerRuntime(this.rt.value, valuePtr); - return { value: 0 }; - } - const context = this.contextMap.get(ctxPtr) ?? - this.newContext({ - contextPointer: ctxPtr, - }); - const resultValue = context.getMemory(this.rt.value).heapValueHandle(valuePtr); - const typeOfRet = context.typeof(resultValue); - if (typeOfRet === "number") { - const executedJobs = context.getNumber(resultValue); - resultValue.dispose(); - return { value: executedJobs }; - } - else { - const error = Object.assign(resultValue, { context }); - return { - error, - }; - } - } - setMemoryLimit(limitBytes) { - if (limitBytes < 0 && limitBytes !== -1) { - throw new Error("Cannot set memory limit to negative number. To unset, pass -1"); - } - this.ffi.QTS_RuntimeSetMemoryLimit(this.rt.value, limitBytes); - } - computeMemoryUsage() { - const serviceContextMemory = this.getSystemContext().getMemory(this.rt.value); - return serviceContextMemory.heapValueHandle(this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value, serviceContextMemory.ctx.value)); - } - dumpMemoryUsage() { - return this.memory.consumeHeapCharPointer(this.ffi.QTS_RuntimeDumpMemoryUsage(this.rt.value)); - } - setMaxStackSize(stackSize) { - if (stackSize < 0) { - throw new Error("Cannot set memory limit to negative number. To unset, pass 0."); - } - this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value, stackSize); - } - assertOwned(handle) { - if (handle.owner && handle.owner.rt !== this.rt) { - throw new errors_1.QuickJSWrongOwner(`Handle is not owned by this runtime: ${handle.owner.rt.value} != ${this.rt.value}`); - } - } - getSystemContext() { - if (!this.context) { - this.context = this.scope.manage(this.newContext()); - } - return this.context; - } - } - runtime.QuickJSRuntime = QuickJSRuntime; - return runtime; -} - -var hasRequiredModule; - -function requireModule () { - if (hasRequiredModule) return module$1; - hasRequiredModule = 1; - Object.defineProperty(module$1, "__esModule", { value: true }); - module$1.QuickJSWASMModule = module$1.applyModuleEvalRuntimeOptions = module$1.applyBaseRuntimeOptions = module$1.QuickJSModuleCallbacks = void 0; - const debug_1 = /*@__PURE__*/ requireDebug(); - const errors_1 = /*@__PURE__*/ requireErrors(); - const lifetime_1 = /*@__PURE__*/ requireLifetime(); - const runtime_1 = /*@__PURE__*/ requireRuntime(); - const types_1 = /*@__PURE__*/ requireTypes(); - class QuickJSEmscriptenModuleCallbacks { - constructor(args) { - this.callFunction = args.callFunction; - this.shouldInterrupt = args.shouldInterrupt; - this.loadModuleSource = args.loadModuleSource; - this.normalizeModule = args.normalizeModule; - } - } - class QuickJSModuleCallbacks { - constructor(module) { - this.contextCallbacks = new Map(); - this.runtimeCallbacks = new Map(); - this.suspendedCount = 0; - this.cToHostCallbacks = new QuickJSEmscriptenModuleCallbacks({ - callFunction: (asyncify, ctx, this_ptr, argc, argv, fn_id) => this.handleAsyncify(asyncify, () => { - try { - const vm = this.contextCallbacks.get(ctx); - if (!vm) { - throw new Error(`QuickJSContext(ctx = ${ctx}) not found for C function call "${fn_id}"`); - } - return vm.callFunction(ctx, this_ptr, argc, argv, fn_id); - } - catch (error) { - console.error("[C to host error: returning null]", error); - return 0; - } - }), - shouldInterrupt: (asyncify, rt) => this.handleAsyncify(asyncify, () => { - try { - const vm = this.runtimeCallbacks.get(rt); - if (!vm) { - throw new Error(`QuickJSRuntime(rt = ${rt}) not found for C interrupt`); - } - return vm.shouldInterrupt(rt); - } - catch (error) { - console.error("[C to host interrupt: returning error]", error); - return 1; - } - }), - loadModuleSource: (asyncify, rt, ctx, moduleName) => this.handleAsyncify(asyncify, () => { - try { - const runtimeCallbacks = this.runtimeCallbacks.get(rt); - if (!runtimeCallbacks) { - throw new Error(`QuickJSRuntime(rt = ${rt}) not found for C module loader`); - } - const loadModule = runtimeCallbacks.loadModuleSource; - if (!loadModule) { - throw new Error(`QuickJSRuntime(rt = ${rt}) does not support module loading`); - } - return loadModule(rt, ctx, moduleName); - } - catch (error) { - console.error("[C to host module loader error: returning null]", error); - return 0; - } - }), - normalizeModule: (asyncify, rt, ctx, moduleBaseName, moduleName) => this.handleAsyncify(asyncify, () => { - try { - const runtimeCallbacks = this.runtimeCallbacks.get(rt); - if (!runtimeCallbacks) { - throw new Error(`QuickJSRuntime(rt = ${rt}) not found for C module loader`); - } - const normalizeModule = runtimeCallbacks.normalizeModule; - if (!normalizeModule) { - throw new Error(`QuickJSRuntime(rt = ${rt}) does not support module loading`); - } - return normalizeModule(rt, ctx, moduleBaseName, moduleName); - } - catch (error) { - console.error("[C to host module loader error: returning null]", error); - return 0; - } - }), - }); - this.module = module; - this.module.callbacks = this.cToHostCallbacks; - } - setRuntimeCallbacks(rt, callbacks) { - this.runtimeCallbacks.set(rt, callbacks); - } - deleteRuntime(rt) { - this.runtimeCallbacks.delete(rt); - } - setContextCallbacks(ctx, callbacks) { - this.contextCallbacks.set(ctx, callbacks); - } - deleteContext(ctx) { - this.contextCallbacks.delete(ctx); - } - handleAsyncify(asyncify, fn) { - if (asyncify) { - return asyncify.handleSleep((done) => { - try { - const result = fn(); - if (!(result instanceof Promise)) { - (0, debug_1.debugLog)("asyncify.handleSleep: not suspending:", result); - done(result); - return; - } - if (this.suspended) { - throw new errors_1.QuickJSAsyncifyError(`Already suspended at: ${this.suspended.stack}\nAttempted to suspend at:`); - } - else { - this.suspended = new errors_1.QuickJSAsyncifySuspended(`(${this.suspendedCount++})`); - (0, debug_1.debugLog)("asyncify.handleSleep: suspending:", this.suspended); - } - result.then((resolvedResult) => { - this.suspended = undefined; - (0, debug_1.debugLog)("asyncify.handleSleep: resolved:", resolvedResult); - done(resolvedResult); - }, (error) => { - (0, debug_1.debugLog)("asyncify.handleSleep: rejected:", error); - console.error("QuickJS: cannot handle error in suspended function", error); - this.suspended = undefined; - }); - } - catch (error) { - (0, debug_1.debugLog)("asyncify.handleSleep: error:", error); - this.suspended = undefined; - throw error; - } - }); - } - const value = fn(); - if (value instanceof Promise) { - throw new Error("Promise return value not supported in non-asyncify context."); - } - return value; - } - } - module$1.QuickJSModuleCallbacks = QuickJSModuleCallbacks; - function applyBaseRuntimeOptions(runtime, options) { - if (options.interruptHandler) { - runtime.setInterruptHandler(options.interruptHandler); - } - if (options.maxStackSizeBytes !== undefined) { - runtime.setMaxStackSize(options.maxStackSizeBytes); - } - if (options.memoryLimitBytes !== undefined) { - runtime.setMemoryLimit(options.memoryLimitBytes); - } - } - module$1.applyBaseRuntimeOptions = applyBaseRuntimeOptions; - function applyModuleEvalRuntimeOptions(runtime, options) { - if (options.moduleLoader) { - runtime.setModuleLoader(options.moduleLoader); - } - if (options.shouldInterrupt) { - runtime.setInterruptHandler(options.shouldInterrupt); - } - if (options.memoryLimitBytes !== undefined) { - runtime.setMemoryLimit(options.memoryLimitBytes); - } - if (options.maxStackSizeBytes !== undefined) { - runtime.setMaxStackSize(options.maxStackSizeBytes); - } - } - module$1.applyModuleEvalRuntimeOptions = applyModuleEvalRuntimeOptions; - class QuickJSWASMModule { - constructor(module, ffi) { - this.module = module; - this.ffi = ffi; - this.callbacks = new QuickJSModuleCallbacks(module); - } - newRuntime(options = {}) { - const rt = new lifetime_1.Lifetime(this.ffi.QTS_NewRuntime(), undefined, (rt_ptr) => { - this.callbacks.deleteRuntime(rt_ptr); - this.ffi.QTS_FreeRuntime(rt_ptr); - }); - const runtime = new runtime_1.QuickJSRuntime({ - module: this.module, - callbacks: this.callbacks, - ffi: this.ffi, - rt, - }); - applyBaseRuntimeOptions(runtime, options); - if (options.moduleLoader) { - runtime.setModuleLoader(options.moduleLoader); - } - return runtime; - } - newContext(options = {}) { - const runtime = this.newRuntime(); - const context = runtime.newContext({ - ...options, - ownedLifetimes: (0, types_1.concat)(runtime, options.ownedLifetimes), - }); - runtime.context = context; - return context; - } - evalCode(code, options = {}) { - return lifetime_1.Scope.withScope((scope) => { - const vm = scope.manage(this.newContext()); - applyModuleEvalRuntimeOptions(vm.runtime, options); - const result = vm.evalCode(code, "eval.js"); - if (options.memoryLimitBytes !== undefined) { - vm.runtime.setMemoryLimit(-1); - } - if (result.error) { - const error = vm.dump(scope.manage(result.error)); - throw error; - } - const value = vm.dump(scope.manage(result.value)); - return value; - }); - } - getFFI() { - return this.ffi; - } - } - module$1.QuickJSWASMModule = QuickJSWASMModule; - return module$1; -} - -var moduleAsyncify = {}; - -var runtimeAsyncify = {}; - -var contextAsyncify = {}; - -var hasRequiredContextAsyncify; - -function requireContextAsyncify () { - if (hasRequiredContextAsyncify) return contextAsyncify; - hasRequiredContextAsyncify = 1; - Object.defineProperty(contextAsyncify, "__esModule", { value: true }); - contextAsyncify.QuickJSAsyncContext = void 0; - const context_1 = /*@__PURE__*/ requireContext(); - const debug_1 = /*@__PURE__*/ requireDebug(); - const types_1 = /*@__PURE__*/ requireTypes(); - class QuickJSAsyncContext extends context_1.QuickJSContext { - async evalCodeAsync(code, filename = "eval.js", - options) { - const detectModule = (options === undefined ? 1 : 0); - const flags = (0, types_1.evalOptionsToFlags)(options); - let resultPtr = 0; - try { - resultPtr = await this.memory - .newHeapCharPointer(code) - .consume((charHandle) => this.ffi.QTS_Eval_MaybeAsync(this.ctx.value, charHandle.value, filename, detectModule, flags)); - } - catch (error) { - (0, debug_1.debugLog)("QTS_Eval_MaybeAsync threw", error); - throw error; - } - const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr); - if (errorPtr) { - this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr); - return { error: this.memory.heapValueHandle(errorPtr) }; - } - return { value: this.memory.heapValueHandle(resultPtr) }; - } - newAsyncifiedFunction(name, fn) { - return this.newFunction(name, fn); - } - } - contextAsyncify.QuickJSAsyncContext = QuickJSAsyncContext; - return contextAsyncify; -} - -var hasRequiredRuntimeAsyncify; - -function requireRuntimeAsyncify () { - if (hasRequiredRuntimeAsyncify) return runtimeAsyncify; - hasRequiredRuntimeAsyncify = 1; - Object.defineProperty(runtimeAsyncify, "__esModule", { value: true }); - runtimeAsyncify.QuickJSAsyncRuntime = void 0; - const _1 = /*@__PURE__*/ requireDist$2(); - const context_asyncify_1 = /*@__PURE__*/ requireContextAsyncify(); - const runtime_1 = /*@__PURE__*/ requireRuntime(); - const types_1 = /*@__PURE__*/ requireTypes(); - class QuickJSAsyncRuntime extends runtime_1.QuickJSRuntime { - constructor(args) { - super(args); - } - newContext(options = {}) { - if (options.intrinsics && options.intrinsics !== types_1.DefaultIntrinsics) { - throw new Error("TODO: Custom intrinsics are not supported yet"); - } - const ctx = new _1.Lifetime(this.ffi.QTS_NewContext(this.rt.value), undefined, (ctx_ptr) => { - this.contextMap.delete(ctx_ptr); - this.callbacks.deleteContext(ctx_ptr); - this.ffi.QTS_FreeContext(ctx_ptr); - }); - const context = new context_asyncify_1.QuickJSAsyncContext({ - module: this.module, - ctx, - ffi: this.ffi, - rt: this.rt, - ownedLifetimes: [], - runtime: this, - callbacks: this.callbacks, - }); - this.contextMap.set(ctx.value, context); - return context; - } - setModuleLoader(moduleLoader, moduleNormalizer) { - super.setModuleLoader(moduleLoader, moduleNormalizer); - } - setMaxStackSize(stackSize) { - return super.setMaxStackSize(stackSize); - } - } - runtimeAsyncify.QuickJSAsyncRuntime = QuickJSAsyncRuntime; - return runtimeAsyncify; -} - -var hasRequiredModuleAsyncify; - -function requireModuleAsyncify () { - if (hasRequiredModuleAsyncify) return moduleAsyncify; - hasRequiredModuleAsyncify = 1; - Object.defineProperty(moduleAsyncify, "__esModule", { value: true }); - moduleAsyncify.QuickJSAsyncWASMModule = void 0; - const errors_1 = /*@__PURE__*/ requireErrors(); - const lifetime_1 = /*@__PURE__*/ requireLifetime(); - const module_1 = /*@__PURE__*/ requireModule(); - const runtime_asyncify_1 = /*@__PURE__*/ requireRuntimeAsyncify(); - class QuickJSAsyncWASMModule extends module_1.QuickJSWASMModule { - constructor(module, ffi) { - super(module, ffi); - this.ffi = ffi; - this.module = module; - } - newRuntime(options = {}) { - const rt = new lifetime_1.Lifetime(this.ffi.QTS_NewRuntime(), undefined, (rt_ptr) => { - this.callbacks.deleteRuntime(rt_ptr); - this.ffi.QTS_FreeRuntime(rt_ptr); - }); - const runtime = new runtime_asyncify_1.QuickJSAsyncRuntime({ - module: this.module, - ffi: this.ffi, - rt, - callbacks: this.callbacks, - }); - (0, module_1.applyBaseRuntimeOptions)(runtime, options); - if (options.moduleLoader) { - runtime.setModuleLoader(options.moduleLoader); - } - return runtime; - } - newContext(options = {}) { - const runtime = this.newRuntime(); - const lifetimes = options.ownedLifetimes ? options.ownedLifetimes.concat([runtime]) : [runtime]; - const context = runtime.newContext({ ...options, ownedLifetimes: lifetimes }); - runtime.context = context; - return context; - } - evalCode() { - throw new errors_1.QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead"); - } - evalCodeAsync(code, options) { - return lifetime_1.Scope.withScopeAsync(async (scope) => { - const vm = scope.manage(this.newContext()); - (0, module_1.applyModuleEvalRuntimeOptions)(vm.runtime, options); - const result = await vm.evalCodeAsync(code, "eval.js"); - if (options.memoryLimitBytes !== undefined) { - vm.runtime.setMemoryLimit(-1); - } - if (result.error) { - const error = vm.dump(scope.manage(result.error)); - throw error; - } - const value = vm.dump(scope.manage(result.value)); - return value; - }); - } - } - moduleAsyncify.QuickJSAsyncWASMModule = QuickJSAsyncWASMModule; - return moduleAsyncify; -} - -var ffi_WASM_RELEASE_SYNC = {}; - -var hasRequiredFfi_WASM_RELEASE_SYNC; - -function requireFfi_WASM_RELEASE_SYNC () { - if (hasRequiredFfi_WASM_RELEASE_SYNC) return ffi_WASM_RELEASE_SYNC; - hasRequiredFfi_WASM_RELEASE_SYNC = 1; - Object.defineProperty(ffi_WASM_RELEASE_SYNC, "__esModule", { value: true }); - ffi_WASM_RELEASE_SYNC.QuickJSFFI = void 0; - class QuickJSFFI { - constructor(module) { - this.module = module; - this.DEBUG = false; - this.QTS_Throw = this.module.cwrap("QTS_Throw", "number", ["number", "number"]); - this.QTS_NewError = this.module.cwrap("QTS_NewError", "number", ["number"]); - this.QTS_RuntimeSetMemoryLimit = this.module.cwrap("QTS_RuntimeSetMemoryLimit", null, ["number", "number"]); - this.QTS_RuntimeComputeMemoryUsage = this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]); - this.QTS_RuntimeDumpMemoryUsage = this.module.cwrap("QTS_RuntimeDumpMemoryUsage", "number", ["number"]); - this.QTS_RecoverableLeakCheck = this.module.cwrap("QTS_RecoverableLeakCheck", "number", []); - this.QTS_BuildIsSanitizeLeak = this.module.cwrap("QTS_BuildIsSanitizeLeak", "number", []); - this.QTS_RuntimeSetMaxStackSize = this.module.cwrap("QTS_RuntimeSetMaxStackSize", null, ["number", "number"]); - this.QTS_GetUndefined = this.module.cwrap("QTS_GetUndefined", "number", []); - this.QTS_GetNull = this.module.cwrap("QTS_GetNull", "number", []); - this.QTS_GetFalse = this.module.cwrap("QTS_GetFalse", "number", []); - this.QTS_GetTrue = this.module.cwrap("QTS_GetTrue", "number", []); - this.QTS_NewRuntime = this.module.cwrap("QTS_NewRuntime", "number", []); - this.QTS_FreeRuntime = this.module.cwrap("QTS_FreeRuntime", null, ["number"]); - this.QTS_NewContext = this.module.cwrap("QTS_NewContext", "number", ["number"]); - this.QTS_FreeContext = this.module.cwrap("QTS_FreeContext", null, ["number"]); - this.QTS_FreeValuePointer = this.module.cwrap("QTS_FreeValuePointer", null, ["number", "number"]); - this.QTS_FreeValuePointerRuntime = this.module.cwrap("QTS_FreeValuePointerRuntime", null, ["number", "number"]); - this.QTS_FreeVoidPointer = this.module.cwrap("QTS_FreeVoidPointer", null, ["number", "number"]); - this.QTS_FreeCString = this.module.cwrap("QTS_FreeCString", null, ["number", "number"]); - this.QTS_DupValuePointer = this.module.cwrap("QTS_DupValuePointer", "number", ["number", "number"]); - this.QTS_NewObject = this.module.cwrap("QTS_NewObject", "number", ["number"]); - this.QTS_NewObjectProto = this.module.cwrap("QTS_NewObjectProto", "number", ["number", "number"]); - this.QTS_NewArray = this.module.cwrap("QTS_NewArray", "number", ["number"]); - this.QTS_NewFloat64 = this.module.cwrap("QTS_NewFloat64", "number", ["number", "number"]); - this.QTS_GetFloat64 = this.module.cwrap("QTS_GetFloat64", "number", ["number", "number"]); - this.QTS_NewString = this.module.cwrap("QTS_NewString", "number", ["number", "number"]); - this.QTS_GetString = this.module.cwrap("QTS_GetString", "number", ["number", "number"]); - this.QTS_NewSymbol = this.module.cwrap("QTS_NewSymbol", "number", ["number", "number", "number"]); - this.QTS_GetSymbolDescriptionOrKey = this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]); - this.QTS_IsGlobalSymbol = this.module.cwrap("QTS_IsGlobalSymbol", "number", ["number", "number"]); - this.QTS_IsJobPending = this.module.cwrap("QTS_IsJobPending", "number", ["number"]); - this.QTS_ExecutePendingJob = this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]); - this.QTS_GetProp = this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]); - this.QTS_SetProp = this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]); - this.QTS_DefineProp = this.module.cwrap("QTS_DefineProp", null, ["number", "number", "number", "number", "number", "number", "boolean", "boolean", "boolean"]); - this.QTS_Call = this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]); - this.QTS_ResolveException = this.module.cwrap("QTS_ResolveException", "number", ["number", "number"]); - this.QTS_Dump = this.module.cwrap("QTS_Dump", "number", ["number", "number"]); - this.QTS_Eval = this.module.cwrap("QTS_Eval", "number", ["number", "number", "string", "number", "number"]); - this.QTS_Typeof = this.module.cwrap("QTS_Typeof", "number", ["number", "number"]); - this.QTS_GetGlobalObject = this.module.cwrap("QTS_GetGlobalObject", "number", ["number"]); - this.QTS_NewPromiseCapability = this.module.cwrap("QTS_NewPromiseCapability", "number", ["number", "number"]); - this.QTS_TestStringArg = this.module.cwrap("QTS_TestStringArg", null, ["string"]); - this.QTS_BuildIsDebug = this.module.cwrap("QTS_BuildIsDebug", "number", []); - this.QTS_BuildIsAsyncify = this.module.cwrap("QTS_BuildIsAsyncify", "number", []); - this.QTS_NewFunction = this.module.cwrap("QTS_NewFunction", "number", ["number", "number", "string"]); - this.QTS_ArgvGetJSValueConstPointer = this.module.cwrap("QTS_ArgvGetJSValueConstPointer", "number", ["number", "number"]); - this.QTS_RuntimeEnableInterruptHandler = this.module.cwrap("QTS_RuntimeEnableInterruptHandler", null, ["number"]); - this.QTS_RuntimeDisableInterruptHandler = this.module.cwrap("QTS_RuntimeDisableInterruptHandler", null, ["number"]); - this.QTS_RuntimeEnableModuleLoader = this.module.cwrap("QTS_RuntimeEnableModuleLoader", null, ["number", "number"]); - this.QTS_RuntimeDisableModuleLoader = this.module.cwrap("QTS_RuntimeDisableModuleLoader", null, ["number"]); - } - } - ffi_WASM_RELEASE_SYNC.QuickJSFFI = QuickJSFFI; - return ffi_WASM_RELEASE_SYNC; -} - -var emscriptenModule_WASM_RELEASE_SYNC = {exports: {}}; - -var hasRequiredEmscriptenModule_WASM_RELEASE_SYNC; - -function requireEmscriptenModule_WASM_RELEASE_SYNC () { - if (hasRequiredEmscriptenModule_WASM_RELEASE_SYNC) return emscriptenModule_WASM_RELEASE_SYNC.exports; - hasRequiredEmscriptenModule_WASM_RELEASE_SYNC = 1; - (function (module, exports$1) { - var QuickJSRaw = (() => { - var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; - if (typeof __filename !== 'undefined') - _scriptDir = _scriptDir || __filename; - return (function (QuickJSRaw = {}) { - var a; - a || (a = typeof QuickJSRaw !== 'undefined' ? QuickJSRaw : {}); - var m, n; - a.ready = new Promise(function (b, c) { m = b; n = c; }); - var p = Object.assign({}, a), t = "./this.program", u = "object" == typeof window, v = "function" == typeof importScripts, w = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, x = "", y, z, A; - if (w) { - var fs = require$$0$3, B = require$$0$4; - x = v ? B.dirname(x) + "/" : __dirname + "/"; - y = (b, c) => { var d = C(b); if (d) - return c ? d : d.toString(); b = b.startsWith("file://") ? new URL(b) : B.normalize(b); return fs.readFileSync(b, c ? void 0 : "utf8"); }; - A = b => { b = y(b, true); b.buffer || (b = new Uint8Array(b)); return b; }; - z = (b, c, d) => { var e = C(b); e && c(e); b = b.startsWith("file://") ? new URL(b) : B.normalize(b); fs.readFile(b, function (f, g) { f ? d(f) : c(g.buffer); }); }; - !a.thisProgram && 1 < process.argv.length && (t = process.argv[1].replace(/\\/g, "/")); - process.argv.slice(2); - a.inspect = function () { return "[Emscripten Module object]"; }; - } - else if (u || v) - v ? x = self.location.href : "undefined" != typeof document && document.currentScript && (x = document.currentScript.src), _scriptDir && (x = _scriptDir), 0 !== x.indexOf("blob:") ? x = x.substr(0, x.replace(/[?#].*/, "").lastIndexOf("/") + 1) : x = "", y = b => { - try { - var c = new XMLHttpRequest; - c.open("GET", b, !1); - c.send(null); - return c.responseText; - } - catch (f) { - if (b = C(b)) { - c = []; - for (var d = 0; d < b.length; d++) { - var e = b[d]; - 255 < e && (e &= 255); - c.push(String.fromCharCode(e)); - } - return c.join(""); - } - throw f; - } - }, v && (A = b => { try { - var c = new XMLHttpRequest; - c.open("GET", b, !1); - c.responseType = "arraybuffer"; - c.send(null); - return new Uint8Array(c.response); - } - catch (d) { - if (b = C(b)) - return b; - throw d; - } }), z = (b, c, d) => { var e = new XMLHttpRequest; e.open("GET", b, true); e.responseType = "arraybuffer"; e.onload = () => { if (200 == e.status || 0 == e.status && e.response) - c(e.response); - else { - var f = C(b); - f ? c(f.buffer) : d(); - } }; e.onerror = d; e.send(null); }; - var aa = a.print || console.log.bind(console), D = a.printErr || console.warn.bind(console); - Object.assign(a, p); - p = null; - a.thisProgram && (t = a.thisProgram); - var E; - a.wasmBinary && (E = a.wasmBinary); - a.noExitRuntime || true; - "object" != typeof WebAssembly && F("no native wasm support detected"); - var G, H = false, I, J, K, L; - function M() { var b = G.buffer; a.HEAP8 = I = new Int8Array(b); a.HEAP16 = new Int16Array(b); a.HEAP32 = K = new Int32Array(b); a.HEAPU8 = J = new Uint8Array(b); a.HEAPU16 = new Uint16Array(b); a.HEAPU32 = L = new Uint32Array(b); a.HEAPF32 = new Float32Array(b); a.HEAPF64 = new Float64Array(b); } - var ba = [], ca = [], da = []; - function ea() { var b = a.preRun.shift(); ba.unshift(b); } - var N = 0, P = null; - function F(b) { if (a.onAbort) - a.onAbort(b); b = "Aborted(" + b + ")"; D(b); H = true; b = new WebAssembly.RuntimeError(b + ". Build with -sASSERTIONS for more info."); n(b); throw b; } - var Q = "data:application/octet-stream;base64,", R; - R = "data:application/octet-stream;base64,AGFzbQEAAAAB9QZxYAJ/fwBgA39/fwF/YAR/fn9/AX5gAn9/AX9gAX8Bf2AFf35/f38BfmADf39/AGAEf39/fwF/YAJ/fgF+YAF/AGAFf39/f38Bf2ABfAF8YAJ/fgBgAn9/AX5gAn9+AX9gA39/fgF/YAN/fn8BfmADf35/AGAGf35/f39/AX5gBn9/f39/fwF/YAR/f39/AGADf35/AX9gBn9+fn9/fwF+YAR/f35/AX9gA39+fgF+YAN/f38BfmAFf39/fn4Bf2AEf39/fgF/YAR/f35+AX9gBX9+fn5+AGABfwF+YAN/fn4Bf2AEf39/fwF+YAd/f39/f39/AX9gBX9/f39/AX5gAnx8AXxgAAF/YAV/f39/fwBgBX9+f35/AX9gBX9+fn9/AX5gAX4Bf2AEf35+fwBgB39+f35+fn8Bf2AIf39/f39/f38Bf2AFf35+fn8Bf2AGf35/fn5/AX9gBH9+f34BfmAEf35/fwBgBH9+f34AYAZ/f39/f38BfmAEf35+fwF/YAl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QkgAy0ABUECRhsgAy4BBhCCASEECyAAIAEgBkKAgICAMCAFIAQgB0GAOnIQbRogACAFEA8gACAEEA8MBgsgAykDCCIEQoCAgIAIfEL/////D1gEQCAEQv////8PgyEEDAULQoCAgIDAfiAEub0iBEKAgICAwIGA/P8AfSAEQv///////////wCDQoCAgICAgID4/wBWGyEEDAQLQoCAgIDAfiADKQMIIgRCgICAgMCBgPz/AH0gBEL///////////8Ag0KAgICAgICA+P8AVhshBAwDCyAAIAEgBkECIAMgBxCVAxoMAwsQAQALIAM1AgghBAsgACABIAYgBCAHEBkaCyAAIAYQEyAKQQFqIQoMAQsLIAlB4ABqJAALMgEBfwJAIAFCIIinQXVJDQAgAaciAiACKAIAIgJBAWs2AgAgAkEBSg0AIAAgARCWBAsLCwAgAEGAMUEAEBULogICAn4BfwJAAkACQAJAAkACQAJAAkACQAJAAkBBByABQiCIpyIEIARBB2tBbkkbQQtqDhMEAgMIBgAAAAAAAQUHAAAAAAEFAAsgAEGVMEEAEBVCgICAgOAADwsgBEF1SQ0IIAGnIgAgACgCAEEBajYCAAwICyAAQSEQdiECDAYLIABBIhB2IQIMBQsgAEEkEHYhAgwECyAAQQQQdiECDAMLIAAgAEEFEHYiAkEwIAGnKQIEQv////8Hg0EAEBkaDAILIABBBhB2IQIMAQsgAEEHEHYhAgtCgICAgOAAIQMgAkKAgICAcINCgICAgOAAUgR+IARBdU8EQCABpyIEIAQoAgBBAWo2AgALIAAgAiABENsBIAIFQoCAgIDgAAsPCyABC9kBAgJ/AX5BfyECAkACQAJAAkACQAJAAkACQCABQiCIpyIDQQtqDhIHBwcFAgUFBQUFBAABAQEFBQYFCyABp0EARw8LIAGnDwsgAacpAgQhBCAAIAEQDyAEQv////8Hg0IAUg8LAAsgAacsAAUhAiAAIAEQDyACQQBODwsgA0EHa0FtTQRAIAFCgICAgMCBgPz/AHxC////////////AINCAX1CgICAgICAgPj/AFQPCyAAIAEQD0EBIQILIAIPCyABpygCDCECIAAgARAPIAJB/////wd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IARCMIinQf//AXEhBwJAAkAgAkIwiKdB//8BcSIJQf//AWtBgoB+TwRAIAdB//8Ba0GBgH5LDQELIAFQIAJC////////////AIMiC0KAgICAgIDA//8AVCALQoCAgICAgMD//wBRG0UEQCACQoCAgICAgCCEIQoMAgsgA1AgBEL///////////8AgyICQoCAgICAgMD//wBUIAJCgICAgICAwP//AFEbRQRAIARCgICAgICAIIQhCiADIQEMAgsgASALQoCAgICAgMD//wCFhFAEQCACIAOEUARAQoCAgICAgOD//wAhCkIAIQEMAwsgCkKAgICAgIDA//8AhCEKQgAhAQwCCyADIAJCgICAgICAwP//AIWEUARAIAEgC4QhAkIAIQEgAlAEQEKAgICAgIDg//8AIQoMAwsgCkKAgICAgIDA//8AhCEKDAILIAEgC4RQBEBCACEBDAILIAIgA4RQBEBCACEBDAILIAtC////////P1gEQCAFQdAAaiABIA0gASANIA1QIgYbeSAGQQZ0rXynIgZBD2sQZ0EQIAZrIQYgBSkDWCINQiCIIQ4gBSkDUCEBCyACQv///////z9WDQAgBUFAayADIAwgAyAMIAxQIggbeSAIQQZ0rXynIghBD2sQZyAGIAhrQRBqIQYgBSkDSCEMIAUpA0AhAwsgA0IPhiILQoCA/v8PgyICIAFCIIgiBH4iECALQiCIIhMgAUL/////D4MiAX58Ig9CIIYiESABIAJ+fCILIBFUrSACIA1C/////w+DIg1+IhUgBCATfnwiESAMQg+GIhIgA0IxiIRC/////w+DIgMgAX58IhQgDyAQVK1CIIYgD0IgiIR8Ig8gAiAOQoCABIQiDH4iFiANIBN+fCIOIBJCIIhCgICAgAiEIgIgAX58IhAgAyAEfnwiEkIghnwiF3whASAHIAlqIAZqQf//AGshBgJAIAIgBH4iGCAMIBN+fCIEIBhUrSAEIAQgAyANfnwiBFatfCACIAx+fCAEIAQgESAVVK0gESAUVq18fCIEVq18IAMgDH4iAyACIA1+fCICIANUrUIghiACQiCIhHwgBCACQiCGfCICIARUrXwgAiACIBAgElatIA4gFlStIA4gEFatfHxCIIYgEkIgiIR8I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E2AgAgACABNgLoAiAAIARBAWo2AuACIAAgAjYC5AILCxAAIAAgACgCKCkDCEEBEEkLGQAgAEEAEEEaIABCgICAgPD/////ADcCBAuDAgIDfwF+QoCAgIDgACEEIAAoAhQEfkKAgICA4AAFIAAoAgQhASAAKAIIIgJFBEAgACgCACgCECICQRBqIAEgAigCBBEAACAAQQA2AgQgACgCAEEvEC0PCyAAKAIMIAJKBEAgACgCACgCECIDQRBqIAEgAiAAKAIQIgF0IAFrQRFqIAMoAggRAQAiAUUEQCAAKAIEIQELIAAgATYCBAsgASAAKAIQIgIEfyACBSABIAAoAghqQQA6ABAgACgCEAtBH3StIAEpAgRC/////3eDhCIENwIEIAEgBEKAgICAeIMgADUCCEL/////B4OENwIEIABBADYCBCABrUKAgICAkH+ECwsUAQF+IAAgARAoIQIgACABEA8gAgtLAQJ/IAFCgICAgHBaBH8gAaciAy8BBiICQQ1GBEBBAQ8LIAJBMEYEQCADKAIgLQAQDwsgACgCECgCRCACQRhsaigCEEEARwVBAAsLDAAgAEGAAmogARAdCywBAX8jAEEQayIDJAAgAyACNgIMIABB3ABqQYABIAEgAhDLAhogA0EQaiQAC2kBAn8CfyAAKAIIIgIgACgCDE4EQEF/IAAgAkEBaiABELcCDQEaIAAoAgghAgsgACACQQFqNgIIIAAoAgRBEGohAwJAIAAoAhAEQCADIAJBAXRqIAE7AQAMAQsgAiADaiABOgAAC0EACws1ACAAIAJBMCACQQAQFCICQoCAgIBwg0KAgICA4ABRBEAgAUIANwMAQX8PCyAAIAEgAhCjAQsNACAAIAEgAkEAEIoDCx8BAX8gACgCJCIBIAEoAgBBAWo2AgAgACABQQIQ7wULaQEDfwJAIAAiAUEDcQRAA0AgAS0AAEUNAiABQQFqIgFBA3ENAAsLA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsDQCACIgFBAWohAiABLQAADQALCyABIABrCx8AIAAgASAAIAIQqgEiAiADQYCAARDQARogACACEBMLTwEBfwJ/QQAgACg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ICAgHCEIAMQsAE3AwgMAwsgACgCECgCRCACLwEGQRhsaigCFCIFRQ0AIAUoAgAiBUUNACAAIAEgAq1CgICAgHCEIAMgBREXACEECyAEDwtBfw8LQQELoQQBAn8CQAJAIAFCgICAgHBUIAJC/////w9Wcg0AIAKnIgQgAaciAygCKE8NAAJAAkACQAJAAkACQAJAAkACQAJAAkAgAy8BBkECaw4eAAsLCwsLAAsLCwsLCwsLCwsLCwIBAgMEBQYHCAkKCwsgAygCJCAEQQN0aikDACIBQiCIp0F1SQ0LIAGnIgAgACgCAEEBajYCACABDwsgAygCJCAEajAAAEL/////D4MPCyADKAIkIARqMQAADwsgAygCJCAEQQF0ajIBAEL/////D4MPCyADKAIkIARBAXRqMwEADwsgAygCJCAEQQJ0ajUCAA8LIAMoAiQgBEECdGooAgAiAEEATgRAIACtDwtCgICAgMB+IAC4vSIBQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbDwsgACADKAIkIARBA3RqKQMAEIcCDwsgACADKAIkIARBA3RqKQMAEPsDDwtCgICAgMB+IAMoAiQgBEECdGoqAgC7vSIBQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbDwtCgICAgMB+IAMoAiQgBEEDdGopAwAiAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGw8LIAAgAhAxIQMgACACEA8gA0UEQEKAgICA4AAPCyAAIAEgAyABQQAQFCEBIAAgAxATCyABCyoBAX8jAEEQayIEJAAgBCADNgIMIAAgASACIAMQywIhACAEQRBqJAAgAAuMAQECfyABKAJ8IgRBgIAETgRAIABBjTpBABBGQX8PC0F/IQMgACABQfQAakEQIAFB+ABqIARBAWoQeAR/QX8FIAEgASgCfCIDQQFqNgJ8IAEoAnQgA0EEdGoiA0IANwIAIANCADcCCCADIAAgAhAYNgIAIAMgAygCDEGA////B3I2AgwgASgCfEEBawsLDQAgACABIAJBARDOAgurAgEEfwJAIAIgA08NACADIAJrIQUgAUEQaiEEIAEtA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AEBVBfwsLQwEDfwJAIAJFDQADQCAALQAAIgQgAS0AACIFRgRAIAFBAWohASAAQQFqIQAgAkEBayICDQEMAgsLIAQgBWshAwsgAwsNACAAIAEgARA/EJMCC20BAX8jAEGAAmsiBSQAIARBgMAEcSACIANMckUEQCAFIAFB/wFxIAIgA2siA0GAAiADQYACSSIBGxArGiABRQRAA0AgACAFQYACEFsgA0GAAmsiA0H/AUsNAAsLIAAgBSADEFsLIAVBgAJqJAALDAAgAEGAAmogARARC74BAgF+AX8CQAJAIAFCgICAgHCDQoCAgIAwUQRAIAAoAiggAkEDdGopAwAiA0IgiKdBdEsNAQwCCyAAIAFBOyABQQAQFCIDQoCAgIBwg0KAgICA4ABRBEAgAw8LIANC/////29WDQEgACADEA8gACABEIADIgRFBEBCgICAgOAADwsgBCgCKCACQQN0aikDACIDQiCIp0F1SQ0BCyADpyIEIAQoAgBBAWo2AgALIAAgAyACEEkhASAAIAMQDyABC3UBAX4gACABIAR+IAIgA358IANCIIgiAiABQiCIIgR+fCADQv////8PgyIDIAFC/////w+DIgF+IgVCIIggAyAEfnwiA0IgiHwgASACfiADQv////8Pg3wiAUIgiHw3AwggACAFQv////8PgyABQiCGhDcDAAtQAQF+AkAgA0HAAHEEQCABIANBQGqthiECQgAhAQwBCyADRQ0AIAIgA60iBIYgAUHAACADa62IhCECIAEgBIYhAQsgACABNwMAIAAgAjcDCAtVAQN/IAEgAkEFdSIESwRAIAAgBEECdGooAgAhAwsgAkEfcSICBH8gASAEQQFqIgRLBH8gACAEQQJ0aigCAAVBAAtBAXQgAkEfc3QgAyACdnIFIAMLC2QAAkACQCABQQBIDQAgACgCrAIgAUwNACAAKAKkAiABQRRsaiIAIAAoAgAgAmoiADYCACAAQQBIDQEgAA8LQYUpQa78AEHIqAFBlNUAEAAAC0GmjgFBrvwAQcuoAUGU1QAQAAALYAAgACABIAJCgICAgAh8Qv////8PWAR+IAJC/////w+DBUKAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////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gACgCECgCjAEiAUUNASABLQAoQQFxRQ0BCyADQQA2AgwgAEEEIAJBABCSBEF/IQQLIANBEGokACAEC8YJAgR/BX4jAEHwAGsiBiQAIARC////////////AIMhCQJAAkAgAVAiBSACQv///////////wCDIgpCgICAgICAwP//AH1CgICAgICAwICAf1QgClAbRQRAIANCAFIgCUKAgICAgIDA//8AfSILQoCAgICAgMCAgH9WIAtCgICAgICAwICAf1EbDQELIAUgCkKAgICAgIDA//8AVCAKQoCAgICAgMD//wBRG0UEQCACQoCAgICAgCCEIQQgASEDDAILIANQIAlCgICAgICAwP//AFQgCUKAgICAgIDA//8AURtFBEAgBEKAgICAgIAghCEEDAILIAEgCkKAgICAgIDA//8AhYRQBEBCgICAgICA4P//ACACIAEgA4UgAiAEhUKAgICAgICAgIB/hYRQIgUbIQRCACABIAUbIQMMAgsgAyAJQoCAgICAgMD//wCFhFANASABIAqEUARAIAMgCYRCAFINAiABIAODIQMgAiAEgyEEDAILIAMgCYRQRQ0AIAEhAyACIQQMAQsgAyABIAEgA1QgCSAKViAJIApRGyIIGyEKIAQgAiAIGyILQv///////z+DIQkgAiAEIAgbIgJCMIinQf//AXEhByALQjCIp0H//wFxIgVFBEAgBkHgAGogCiAJIAogCSAJUCIFG3kgBUEGdK18pyIFQQ9rEGcgBikDaCEJIAYpA2AhCkEQIAVrIQULIAEgAyAIGyEDIAJC////////P4MhBCAHRQRAIAZB0ABqIAMgBCADIAQgBFAiBxt5IAdBBnStfKciB0EPaxBnQRAgB2shByAGKQNYIQQgBikDUCEDCyAEQgOGIANCPYiEQoCAgICAgIAEhCEBIAlCA4YgCkI9iIQhBCACIAuFIQ0CfiADQgOGIgIgBSAHRg0AGiAFIAdrIgdB/wBLBEBCACEBQgEMAQsgBkFAayACIAFBgAEgB2sQZyAGQTBqIAIgASAHEI4CIAYpAzghASAGKQMwIAYpA0AgBikDSIRCAFKthAshCSAEQoCAgICAgIAEhCEMIApCA4YhCgJAIA1CAFMEQEIAIQNCACEEIAkgC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ghBAwBCwsgACgCACAFIAEQhQMLIQEgAkEQaiAFRwRAIAAoAgAoAhAiA0EQaiAFIAMoAgQRAAALIAIgBzYCBCABRQ0EIABCADcCJCAAQYN/NgIQIAAgATYCIAsgACACKAIENgI4QQAMBQsgAUECaiEBA0AgAiABNgIEA0ACQAJAIAEtAAAiAwRAIANBCmsOBAYBAQYBCyABIAAoAjxPDQUMAQsgA8BBAE4NACABQQYgAkEEahBYIgNBfnFBqMAARgRAIAIoAgQhAQwFCyACKAIEIQEgA0F/Rw0BCwsgAUEBaiEBDAALAAsLIAAgAUEAEBYLIAZBqn82AgALQX8LIQEgAkGQAWokACABCyEAIAAgASACQgBC/////////w9CABB0IQEgACACEA8gAQsqAQF/IwBBEGsiAyQAIAMgAjYCDCAAIAEgAkHjAEEAEJkEGiADQRBqJAALTwAgACABIAJBAE4EfiACrQVCgICAgMB+IAK4vSIBQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbCyADQYCAARDXAQtZAQJ/IwBBEGsiAyQAQX8hBCAAIANBCGogAhDiA0UEQEEAIQQgASADKQMIIgJCgICAgICAgBBaBH4gAEGAIEEAEFBBfyEEQgAFIAILNwMACyADQRBqJAAgBAsRACAAIAEgASACIANBAhCKBAtTAQF/IAAoAhAiBEEQaiABIAIgBCgCCBEBACIBIAJFckUEQCAAEHwgAQ8LIAMEQCADIAEgACgCECgCDBEEACIAIAJrIgJBACAAIAJPGzYCAAsgAQvAAQAgAAJ/IAEoAggiAEH+////B04EQEEAIAJBAXENARpB/////wcgAEH+////B0cNARogASgCBEH/////B2oMAQtBACAAQQBMDQAaIABBH00EQEEAIAEoAhAgASgCDEECdGpBBGsoAgBBICAAa3YiAmsgAiABKAIEGwwBCyACQQFxRQRAQYCAgIB4Qf////8HIAEoAgQbDAELQQAgASgCECABKAIMIgIgAkEFdCAAaxBoIgJrIAIgASgCBBsLNgIACw0AIAAgASABED8QhQML+QECA34CfyMAQRBrIgUkAAJ+IAG9IgNC////////////AIMiAkKAgICAgICACH1C/////////+//AFgEQCACQjyGIQQgAkIEiEKAgICAgICAgDx8DAELIAJCgICAgICAgPj/AFoEQCADQjyGIQQgA0IEiEKAgICAgIDA//8AhAwBCyACUARAQgAMAQsgBSACQgAgA6dnQSBqIAJCIIinZyACQoCAgIAQVBsiBkExahBnIAUpAwAhBCAFKQMIQoCAgICAgMAAhUGM+AAgBmutQjCGhAshAiAAIAQ3AwAgACACIANCgICAgICAgICAf4OENwMIIAVBEGokAAu2AQEBfyMAQRBrIgMkAAJAAkAgAkEASARAIAEgAkH/////B3E2AgBBASECDAELIAAoAhAiACgCLCACTQ0BAn8CQCAAKAI4IAJBAnRqKAIAIgApAgRCgICAgICAgIBAg0KAgICAgICAgMAAUg0AIANBDGogABC9BUUNAEEBIAMoAgwiAEF/Rw0BGgtBACEAQQALIQIgASAANgIACyADQRBqJAAgAg8LQe/fAEGu/ABBvxhBryAQAAAL1QECAn8DfgJ/IAJFBEBCgICAgDAhBUEADAELIAAoAhAiAykDgAEhBSADQoCAgIAgNwOAAUF/CyEDAkAgACABQQYgAUEAEBQiB0KAgICAcIMiBkKAgICAIFEgBkKAgICAMFFyRQRAQX8hBCAGQoCAgIDgAFENASAAIAcgAUEAQQAQLyEBAn8gAyACDQAaQX8gAUKAgICAcINCgICAgOAAUQ0AGiADIAFC/////29WDQAaIAAQJEF/CyEEIAAgARAPDAELIAMhBAsgAgRAIAAgBRCKAQsgBAvFAQIBfgJ/IwBBEGsiBSQAQoCAgIDgACEEAkACQCAAIAEgAkEAQQAgBUEMahDHBSIBQoCAgIBwg0KAgICA4ABRDQAgBSgCDCIGQQJHBEAgAyAGNgIAIAEhBAwCCyAAIAFB6QAgAUEAEBQiAkKAgICAcINCgICAgOAAUQ0AIAMgACACECYiAzYCAEKAgICAMCEEIANFBEAgACABQcAAIAFBABAUIQQLIAAgARAPDAELIAAgARAPIANBADYCAAsgBUEQaiQAIAQLTQAgACABIAJBAE4EfiACrQVCgICAgMB+IAK4vSIBQoC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FQRBqEEZBfwwBCyADIAQ7AQBBfyAAIAFBDGpBBCABQRRqIAEoAhBBAWoQeA0AGiABIAEoAhAiAEEBajYCECABKAIMIABBAnRqIAI2AgBBAAshAyAFQTBqJAAgAwsTACAAIAEgAiADIARBAEEAEPgBCzkAIABB/wBNBEAgAEEDdkH8////AXFBoIECaigCACAAdkEBcQ8LIABBfnFBjMAARiAAENIEQQBHcgtmAQF/An9BACAAKAIIIgIgAU8NABpBfyAAKAIMDQAaIAAoAhQgACgCACACQQNsQQF2IgIgASABIAJJGyIBIAAoAhARAQAiAkUEQCAAQQE2AgxBfw8LIAAgATYCCCAAIAI2AgBBAAsLrAECAX8BfiAAKQIEIgSnQf////8HcSEDAkACQCAEQoCAgIAIg1BFBEAgAiADIAIgA0obIQMgAEEQaiEAA0AgAiADRg0CIAAgAkEBdGovAQAgAUYNAyACQQFqIQIMAAsACyABQf8BSw0AIAIgAyACIANKGyEDIABBEGohACABQf8BcSEBA0AgAiADRg0BIAAgAmotAAAgAUYNAiACQQFqIQIMAAsAC0F/IQILIAILpgEBAX8jAEEQayIDJAAgAyACNwMIAkAgACABQYYBIAFBABAUIgJCgICAgHCDQoCAgIDgAFENACAAIAIQOARAIAAgAiABQQEgA0EIahAvIgJC/////29WIAJCgICAgLB/g0KAgICAIFFyDQEgACACEA8gAEGK0wBBABAVQoCAgIDgACECDAELIAAgAhAPIAAgASADIANBCGoQ8QQhAgsgA0EQaiQAIAILowECA38BfiAAQRBqIQIgASgCACIEQQFqIQMCQCAAKQIEIgVCgICAgAiDUEUEQCACIARBAXRqLwEAIgBBgPgDcUGAsANHIAMgBadB/////wdxTnINASACIANBAXRqLwEAIgJBgPgDcUGAuANHDQEgAEEKdEGA+D9xIAJB/wdxckGAgARqIQAgBEECaiEDDAELIAIgBGotAAAhAAsgASADNgIAIAALUQEDfwJAA0AgAUKAgICAcFQNASABpyICLwEGIgRBMEYEQCACKAIgIgJFDQIgAi0AEQRAIAAQtgJBfw8LIAIpAwAhAQwB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AMgBBD9AyEFDAkLIAAgByACIANCgICAgDBCgICAgDAgBEGHzgByEIEEIQUMBgsgACAHIAJBBxB6IgJFDQYgAiADNwMADAILQQAhBQwACwALQQEhBQwECyAAIAMQDyAAIAQgAhDAAiEFDAMLIAAgACADEI0BIgEQD0F/IQUgAUKAgICAcINCgICAgOAAUQ0CIAAgBEGUIBBvIQUMAgsgACADEA8MAQsgACADEA9BfyEFCyAJQSBqJAAgBQsOACAAQQAgAUEQchDOAQthACAAIAEgAkKAgICACHxC/////w9YBH4gAkL/////D4MFQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsgAyAEQQdyEL0BC6sBAQh/IAAoAggiAyABKAIIIgJHBEBBf0EBIAIgA0obDwsgASgCDCIFIAAoAgwiBiAFIAUgBkgbIgJrIQggBiACayEJAn8DQEEAIAJBAWsiAkEASA0BGkEAIQNBACEEIAIgCWoiByAGSQRAIAAoAhAgB0ECdGooAgAhBAsgAiAIaiIHIAVJBEAgASgCECAHQQJ0aigCACEDCyADIARGDQALQX9BASADIARLGwsLigEBAn8gASgCECIDLQAQRQRAQQAPCwJAIAMoAgBBAUcEQCACBH8gAigCACADa0Ewa0EDdQVBAAshBCAAIAMQzgUiA0UEQEF/DwsgACgCECABKAIQEJECIAEgAzYCECACRQ0BIAIgAyAEQQN0akEwajYCAEEADwsgACgCECADEJAEIANBADoAEAtBAAt7AQF/QX8hBAJAIAAgARAlIgFCgICAgHCDQoCAgIDgAFENACAAIAGnIAIQ+QMhBCAAIAEQDyAEDQAgA0GAgAFxRQRAQQAhBCADQYCAAnFFDQEgACgCECgCjAEiAkUNASACLQAoQQFxRQ0BCyAAQawbQQAQFUF/IQQLIAQLNQAgACACQTAgAkEAEBQiAkKAgICAcINCgICAgOAAUQRAIAFBADYCAEF/DwsgACABIAIQmAELxAUBBH8jAEEgayIIJAACQAJAAkACQAJAIAFCgICAgHBUIAJC/////w9Wcg0AIAKnIQYCQAJAAkACQAJA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EtIAogCEEYayIKKQMANwMAIAcgLTcDACAKIAhBIGsiBykDADcDACABQiCIp0F1TwRAIAGnIgogCigCAEEBajYCAAsgByABNwMAIAhBCGohBwzXAQsgCEEQayIHKQMAIQEgByAIQRhrIgcpAwA3AwAgByABNwMADNABCyAIQRhrIgcpAwAhASAHIAhBEGsiBykDADcDACAIQQhrIgopAwAhLSAKIAE3AwAgByAtNwMADM8BCyAIQSBrIgcpAwAhASAHIAhBGGsiBykDADcDACAIQRBrIgopAwAhLSAKIAhBCGsiCikDADcDACAHIC03AwAgCiABNwMADM4BCyAIQShrIgcpAwAhASAHIAhBIGsiBykDADcDACAIQRhrIgopAwAhLSAKIAhBEGsiCikDADcDACAHIC03AwAgCiAIQQhrIgcpAwA3AwAgByABNwMADM0BCyAIQQhrIgcpAwAhASAHIAhBEGsiBykDADcDACAIQRhrIgopAwAhLSAKIAE3AwAgByAtNwMADMwBCyAIQRBrIgcpAwAhASAHIAhBGGsiBykDADcDACAIQSBrIgopAwAhLSAKIAE3AwAgByAtNwMADMsBCyAIQRBrIgcpAwAhASAHIAhBGGsiBykDADcDACAIQSBrIgopAwAhLSAKIAhBKGsiCikDADcDACAHIC03AwAgCiABNwMADMoBCyAIQQhrIgcpAwAhASAHIAhBEGsiBykDADcDACAHIAE3AwAMyQELIAhBIGsiBykDACEBIAcgCEEQayIHKQMANwMAIAhBCGsiCikDACEtIAogCEEYayIKKQMANwMAIAcgATcDACAKIC03AwAMyAELIBMoAjQgDSgAAEEDdGopAwAiAUIgiKdBdU8EQCABpyIHIAcoAgBBAWo2AgALIAggBiABIBQgEhCMBCIBNwMAIAhBCGohByAKQQVqIQ0gAUKAgICAcINCgICAgOAAUQ1/DM0BCyAJQe4BawwBCyAKQQNqIQ0gCi8AAQshCyASIA02AiAgBiAIIAtBA3RrIgxBCGspAwBCgICAgDBCgICAgDAgCyAMQQAQ2AEiAUKAgICAcINCgICAgOAAUQ3OAUF/IQcgCUEjRg3RAQNAIAcgC0cEQCAGIAw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0Sw0BDAILIAYgBikDwAEgCRBxIgdBAEgNgQEgB0UEQEKAgICAMCEuDAILIBkpAwAiLkIgiKdBdUkNASAupyELCyALIAsoAgBBAWo2AgALIAggLjcDACAIIAYgCRBcNwMIIAhBEGohBwx7CyAGIAlBzh0QjwEMfgsgDSANKAAAaiENIAghByAGEHtFDXkMfQsgDSANLgAAaiENIAghByAGEHtFDXgMfAsgDSANLAAAaiENIAghByAGEHtFDXcMewsgCkEFaiEJAn8gCEEIayIHKQMAIgFC/////z9YBEAgAacMAQsgBiABECYLBH8gDSgAACAJakEEawUgCQshDSAGEHtFDXYMKAsgCkEFaiEJAn8gCEEIayIHKQMAIgFC/////z9YBEAgAacMAQsgBiABECYLBH8gCQUgDSgAACAJakEEawshDSAGEHtFDXUMJwsgCkECaiEJAn8gCEEIayIHKQMAIgFC/////z9YBEAgAacMAQsgBiABECYLBH8gDSwAACAJakEBawUgCQshDSAGEHtFDXQMJgsgCkECaiEJAn8gCEEIayIHKQMAIgFC/////z9YBEAgAacMAQsgBiABECYLBH8gCQUgDSwAACAJakEBawshDSAGEHtFDXMMJQsgCCANIAooAAFqIBMoAhRrrUKAgICA0ACENwMAIApBBWohDSAIQQhqIQcMcgsgCigAASEHIAggCiATKAIUa0EFaq03AwAgByANaiENIAhBCGohBwxxCwJAIAhBCGsiBykDACIBQv////8PVg0AIAGnIgkgEygCGE8NACATKAIUIAlqIQ0McQsgBkH14QBBABBGDHQLIAhBCGsiDykDACItQiCIpyIHQQFqIglBBE1BAEEBIAl0QRlxG0UEQCAGIC0Q3AUhLQsCQCAGQRgQKSIJBEAgBkKAgICAIEEREEkiLkKAgICAcINCgICAgOAAUg0BIAYoAhAiB0EQaiAJIAcoAgQRAAALIC0hLgxlCyAJQQA2AhAgCSAtNwMAIAlBADYCCCAupyAJNgIgIAdBfnFBAkYNZSAtIgFCIIinIgdBdU8EQCAtpyILIAsoAgBBAWo2AgALA0AgBiABEIwCIgFCgICAgHCDIi9CgICAgCBSBEAgL0K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UEASA05IAlBAWohCQwACwALIAwgCa03AwAgBiABEA8gBiAtEA8gBiAHKQMAEA8MTAsgCkECaiENIAghByAGIAggCi0AASIJQX9zIgtBA3RBYHJqKQMAIAggC0EBdEFAckF4cWopAwAgCCAJQQV2QX9zQQN0aikDAEEAENQFRQ1LDE8LAkAgCEEIayIHKQMAIgFCIIinIgsgCEEQayIJKQMAIi1CIIinIgxyRQRAIAHEIC3EfCIBQoCAgIAIfEL/////D1YNASAJIAFC/////w+DNwMADEwLIAxBB2tBbUsgC0EHa0FtS3INACAJQoCAgIDAfiAtQoCAgIDAgYD8/wB8vyABQoCAgIDAgYD8/wB8v6C9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhs3AwAMSwsgBiAIENMFRQ1KDE4LIApBAmohDQJAIAhBCGsiCCkDACItIBEgCi0AAUEDdGoiBykDACIBhEL/////D1gEQCAtxCABxHwiLUKAgICACHxC/////w9WDQEgByAtQv////8PgzcDAAxFCyABQoCAgIBwg0KAgICAkH9SDQAgBiAtQQIQmgEiLUKAgICAcINCgICAgOAAUQ1OIAcpAwAiAUIgiKdBdU8EQCABpyIJIAkoAgBBAWo2AgALIAYgASAtEMQCIgFCgICAgHCDQoCAgIDgAFENTiAGIAcgARAgDEQLIAFCIIinQXVPBEAgAaciCSAJKAIAQQFqNgIACyAOIAE3AyAgDiAIKQMANwMoIAYgLBDTBQ1NIAYgByAOKQMgECAMQwsgCEEIayIHKQMAIgFCIIinIgwgCEEQayILKQMAIi1CIIinIg9yRQRAIC3EIAHEfSIBQoCAgIAIfEL/////D1YNBCALIAFC/////w+DNwMADEkLIA9BB2tBbUsgDEEHa0FtS3INAyALQoCAgIDAfiAtQoCAgIDAgYD8/wB8vyABQoCAgIDAgYD8/wB8v6G9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhs3AwAMSAsCfCAIQQhrIgcpAwAiLUIgiKciDCAIQRBrIgspAwAiLkIgiKciD3JFBEAgLc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yAJQbIBRw0EIAcrAxAgBysDCJkiNRCOAyI0RAAAAAAAAAAAY0UNAiA1IDSgITQMAgsgBysDECE1IAcrAwgiNr1CgICAgICAgPj/AINCgICAgICAgPj/AFEEQEQAAAAAAAD4fyE0IDWZRAAAAAAAAPA/YQ0CCyA1IDYQjwMhNAwBCyAHKwMQIAcrAwihITQLIAtCgICAgMB+IDS9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhs3AwAMBwsgBiAJIAsgASAuIBAoAqACERoARQ0GDAkLEAEACyAMRQ0FIAHEIC7EIgGBIi1CAFkNACAMQQBIBEAgLSABfSEtDAELIAEgLXwhLQsgLUKAgICACHxC/////w9WDQEgLSEBCyABQv////8PgwwBC0KAgICAwH4gLbm9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhsLIQEgCyABNwMAC0EADAMLIAZBAhCEAgwBCyAGIC4QDwsgC0KAgICAMDcDACAjQoCAgIAwNwMAQX8LIQkgB0EgaiQAIAkNSCAIQQhrIQcMRAsgCEEEaygCACIHRSAHQQdrQW5Jcg09IAghByAGIAhBjQEQ5gFFDUMMRwsCQAJ8IAhBCGsiBykDACIBQiCIpyIJRQRARAAAAAAAAACAIAGnIgpFDQEaRAAAAAAAAOBBIApBgICAgHhGDQEaIAdCACABfUL/////D4M3AwAMPwsgCUEHa0FtSw0BIAFCgICAgMD+/wN9vwshNCAHQoCAgIDAfiA0vSIBQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbNwMADD0LIAghByAGIAhBjAEQ5gFFDUIMRgsgCEEIayIHKQMAIgFC/////w9WIAFC/////w+DQv////8HUXJFBEAgByABQgF8Qv////8PgzcDAAw8CyAIIQcgBiAIQY8BEOYBRQ1BDEULIAhBCGsiBykDACIBQv////8PViABQv////8Pg0KAgICACFFyRQRAIAcgAUIBfUL/////D4M3AwAMOwsgCCEHIAYgCEGOARDmAUUNQAxECyAGIAhBCGsiBykDABBsIgFCgICAgHCDQoCAgIDgAFEEQCAHQoCAgIAwNwMADEQLIAcgATcDACABQiCIp0F1TwRAIAGnIgcgBygCAEEBajYCAAsgCCABNwMAIAYgCEEIaiIHIAlBAmsQ5gFFDT8MQwsgCkECaiENIBEgCi0AAUEDdGoiBykDACIBQv////8PViABQv////8Pg0L/////B1FyRQRAIAcgAUIBfEL/////D4M3AwAMOQsgAUIgiKdBdU8EQCABpyIJIAkoAgBBAWo2AgALIA4gATcDYCAGICZBjwEQ5gENQiAGIAcgDikDYBAgDDgLIApBAmohDSARIAotAAFBA3RqIgcpAwAiAUL/////D1YgAUL/////D4NCgICAgAhRckUEQCAHIAFCAX1C/////w+DNwMADDgLIAFCIIinQXVPBEAgAaciCSAJKAIAQQFqNgIACyAOIAE3A2AgBiAmQY4BEOYBDUEgBiAHIA4pA2AQIAw3CyAIQQhrIgcpAwAiAUL/////D1gEQCAHIAFC/////w+FNwMADDcLIAghByMAQRBrIgkkAAJ/AkACQAJAIAhBCGsiCykDACIBQoCAgIBwVA0AIAYgCUEIaiABQZUBEMIFIgxBAEgNASAMRQ0AIAYgARAPIAsgCSkDCDcDAAwCCwJAIAYgARBsIgFCgICAgHCDIi1CgICAgOAAUQ0AIAYoAhAiDCgCjAEiDwR/IA8tAChBBHFBAnYFQQALRSAtQoCAgIDgflJxRQRAIAYgC0GVASABIAwoApwCERsADQEMAwsgBiAJQQRqIAEQmAENACALIAk1AgRC/////w+FNwMADAILIAtCgICAgDA3AwALQX8MAQtBAAshCyAJQRBqJAAgC0UNPAxACwJAAkACQCAIQQhrIgcpAwAiASAIQRBrIgspAwAiLYRC/////w9WDQAgAachCSASLQAoQQRxRQ0BIAlBH0sNACAtIAGGQoCAgIAIfEKAgICAEFQNAgsgBiAIQaABEMMCRQ09DEELIAlBH3EhCQsgCyAtpyAJdK03AwAMOwsgCEEIayIHKQMAIgEgCEEQayIJKQMAIi2EQv////8PWARAIAkCfiAtpyABp3YiCEEATgRAIAitDAELQoCAgIDAfiAIuL0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yAAQSkQLA0NCyAAQewAIAEQHBogABCAARogAyAAQUBrIgQoAgAiBSgCsAI2AlAgBSADQdAAajYCsAIgA0L/////HzcCXCADQoCAgIBwNwJUIAUoArwBIQUgA0EANgJsIAMgBTYCaCADIAI2AmQgABDiAg0MIAQoAgAiBSAFKAKwAigCADYCsAIgABDzASAAEPMBIAQoAgAQ5gIEQCAAQQ4QECAAQQYQECAAQe0AIAIQHBogAEEOEBAgAEHrACAHEBwaCyABIQULIAAgBRAeIABB7QAgAhAcGiAAQS8QECAAIAIQHiAAKAIQQUZGBEAgABASDQwgAyAAQUBrKAIAIgIoArACNgJQIAIgA0HQAGo2ArACIANBfzYCZCADQv////8vNwJcIANCgICAgHA3AlQgAigCvAEhBEEAIQEgA0EANgJsIAMgBDYCaCACKAKkAUEATgRAIAAoAgAgAkHRABBPIgFBAEgNDSAAQdgAEBAgAEFAayICKAIAIgQgBC8BpAEQFyAAQdkAEBAgAigCACABQf//A3EQFyAAEMABCyAAEOICDQwgAEFAayIEKAIAIgIoAqQBQQBOBEAgAEHYABAQIAQoAgAgAUH//wNxEBcgAEHZABAQIAQoAgAiASABLwGkARAXIAQoAgAhAgsgAiACKAKwAigCADYCsAILIABB7gAQECAAIAcQHgwMCyAAIAJBABAWDAoLIABB6wAgAhAcGiAAEBINCQsgABC3AUUNCQwICyABIQQLIAAQEg0GIABBACAEQQAQzAMNBgsgACAAQUBrKAIAKAK8ASAGEJ8CCyAAQTsQLA0EIABBQGsiAigCABAyIQUgAigCABAyIQQgAigCABAyIQEgAigCABAyIQcgAyACKAIAIgIoArACNgIcIAIgA0EcajYCsAIgA0KAgICAcDcCLCADIAQ2AiggAyAHNgIkIAMgCTYCICACKAK8ASECIANBADYCOCADIAI2AjQgASECIAAoAhBBO0cEQCAAIAUQHiAAEJEBDQUgAEHpACAHEBwaIAUhAgsgAEE7ECwNBAJAIAAoAhBBKUYEQCADIAI2AihBACEFIAIhBAwBCyAAQesAIAEQHBogAEFAaygCACgChAIhBSAA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BAkACQAJAIABBDWsOBAIBAQIACyAAQTRGDQELIABBOEYhAQsgAQsfACAAIAEgACACEKoBIgIgAyAEEBkhBCAAIAIQEyAEC0QBAX9BfyEDIAAgACgCBCACahDGAQR/QX8FIAAoAgAgAWoiAyACaiADIAAoAgQgAWsQnAEgACAAKAIEIAJqNgIEQQALC44BAQF/IAAgBkEMEEkiBkKAgICAcINCgICAgOAAUgRAIAAgACgCAEEBajYCACAGpyIHIAU7ASogByAEOgApIAcgAzoAKCAHIAE2AiQgByAANgIgIAcgBy0ABUHvAXEgBEECa0EESUEEdHI6AAUgACAGIAAgAkHMngEgAhsQqgEiASADEJYDIAAgARATCyAGCykBAX9BfyEBAkAgAEEoECwNACAAEJEBDQBBf0EAIABBKRAsGyEBCyABC4IBAQN/IABBQGsiAygCACIBBEAgASgCvAEhAiAAQbUBEBAgAygCACACQf//A3EQFyABIAEoAswBIgMgAkEDdGooAgAiADYCvAEDQAJAIABBAEgEQEF/IQAMAQsgAyAAQQN0aiICKAIEIgBBAE4NACACKAIAIQAMAQsLIAEgADYCwAELC0cBAn8gACgCfCECAkADQCACQQBKBEAgACgCdCACQQFrIgJBBHRqIgMoAgAgAUcNASADKAIEDQEMAgsLIAAgARDgBCECCyACC7YBAQJ/AkAgAiABKAIEIgpGBEAgAyELDAELIAAgCiACIAMgBCAFIAYgByAIIAkQ9QEiBUEATg0AQX8PC0EAIQIgASgCwAIiA0EAIANBAEobIQMCQANAIAIgA0cEQAJAIAUgASgCyAIgAkEDdGoiCi8BAkcNACAKLQAAIgpBAXZBAXEgBEcNACALIApBAXFGDQMLIAJBAWohAgwBCwsgACABIAsgBCAFIAYgByAIIAkQyQMhAgsgAgs1AQF/IAAoAgAiAQRAIAAoAhQgAUEAIAAoAhARAQAaCyAAQgA3AgAgAEIANwIQIABCADcCCAvEAQECfyMAQdAAayIFJAAgACgCACEGAkAgASADEK0FBEAgBSAGKAIQIAVBEGogAxCQATYCACAAQeSVASAFEBZBACEADAELQQAhACAGIAF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KAIAIgxGBEAgCCAHQQJ0aigCCAwBCyAKIAxLBEAgCEHUAGogDCAHELgFDAELIAtB3ABqIAogBxC4BQsiCkUEQCAJIAdBAnRBwMABajYCACAAQZL6ACAJEBUMAQsCQCAIKAIEBEACfiAFBEAgACACELkCDAELIAAgAiAGEJACCyICQoCAgIBwg0KAgICA4ABSDQEMAgsgAkIgiKdBdUkNACACpyIIIAgoAgBBAWo2AgALAkAgCygCBARAAn4gBQRAIAAgAxC5AgwBCyAAIAMgBhCQAgsiA0KAgICAcINCgICAgOAAUg0BIAAgAhAPDAILIANCIIinQXVJDQAgA6ciBSAFKAIAQQFqNgIACyAKIAooAgBBAWo2AgAgCSACIAMgBEF+cUGkAUYgB0ENRnEiBRs3AxggCSADIAIgBRs3AxAgACAKrUKAgICAcIRCgICAgDBBAiAJQRBqEC8hDSAAIAIQDyAAIAMQDyANQoCAgIBwgyICQoCAgIDgAFENAAJ+IAdBDEYEQCAAIA0QJiAEQaoBRketQoCAgIAQhAwBCyANIAdBDUcNABpCgICAgBAgAkKAgICAMFENABogACANECYgBEF9cUGkAUZHrUKAgICAEIQLIQMgACAPEA8gACAOEA8gASADNwMAQQEMAQsgACAPEA8gACAOEA8gAUKAgICAMDcDAEF/CyEHIAlBIGokACAHC2MCAX8BfiMAQRBrIgIkACAAAn4gAUUEQEIADAELIAIgAa1CACABZyIBQdEAahBnIAIpAwhCgICAgICAwACFQZ6AASABa61CMIZ8IQMgAikDAAs3AwAgACADNwMIIAJBEGokAAvHAQIBfgF/AkAgACgCECgCjAEiA0UgAUL/////////D3xC/v///////x9Wcg0AIAMoAihBBHFFDQAgAUKAgICACHxC/////w9YBEAgAUL/////D4MPC0KAgICAwH4gAbm9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhsPCyAAEJcBIgJCgICAgHCDQoCAgIDgAFIEQCACp0EEaiABELoCRQRAIAIPCyAAIAIQDyAAEHwLQoCAgIDgAAuTAQECfwJ/IAAoAgggAmoiB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EAgABDpAUKAgICA4AAMAQsgACABrSABKQMAQoCAgIAwIAEoAgggASgCIEEEENgBCyEDIAIkACADCwwAIABB+swAQQAQFQsLACAAQcMaQQAQFQvVAQEDfyMAQRBrIgUkAEF/IQMCQCAAKAIUDQACQAJAIAFBgICAgAROBEAgACgCAEHA2gBBABBGDAELIAEgACgCDEEDbEECbSIEIAEgBEobIQEgACgCECIEIAJBgAJIckUEQCAAIAEQ9QMhAwwDCyAAKAIAIAAoAgQgASAEdCAEa0ERaiAFQQxqEKgBIgINAQsgABCDAwwBCyAFKAIMIQMgACACNgIEIABB/////wMgAyAAKAIQdiABaiIAIABB/////wNOGzYCDEEAIQMLIAVBEGokACADCxEAIAAgASACIAMgBEEAELcFCyYBAX8gAUIgiKdBdU8EQCABpyICIAIoAgBBAWo2AgALIAAgARBsCycBAX8gAUIAUwRAIABCACABfRAwIQIgAEEBNgIEIAIPCyAAIAEQMAvsAQEBfwJAAkACQAJAAkACQAJAQQcgAkIgiKciAyADQQdrQW5JGyIDDggAAAAEBAQEAQMLIAAoAtgBIQAgAUIANwIMIAFCgICAgICAgICAfzcCBCABIAA2AgAgASACxBC6Ag0BDAQLIAAoAtgBIQAgAUIANwIMIAFCgICAgICAgICAfzcCBCABIAA2AgAgASACQoCAgIDAgYD8/wB8vxC6BUUNAwsgARAbQQAPCyADQQpqQQJJDQILIAAoAtgBIQAgAUIANwIMIAFCgICAgICAgICAfzcCBCABIAA2AgAgARA1CyABDwsgAqdBBGoL5AEBBH8jAEEQayICJAAgACACQQhqIAEQ5QEhAyAAIAEQDwJAIANFBEBCgICAgOAAIQEMAQsgAiADIAMQgQIiBGoiBTYCDAJAIAIoAgggBEYEQCAAQgAQhwIhAQwBCyAAIAUgAkEMakEAAn8gACgCECgCjAEiBARAQYUFIAQoAihBBHENARoLQYUBCxC4AiEBIAIgAigCDBCBAiACKAIMaiIENgIMIAFCgICAgHCDQoCAgIDgAFENACACKAIIIAQgA2tGDQAgACABEA9CgICAgMB+IQELIA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AAsCQCACQaABaw4CBQAECyADKAIEIAMoAgB1DAULIAMoAgAgAygCBHEMBAsgAygCACADKAIEcgwDCyADKAIAIAMoAgRzDAILEAEACyADKAIEIAMoAgB0C603AwAMAQsgAUKAgICAMDcDACAGQoCAgIAwNwMAQX8MAQtBAAshACADQRBqJAAgAAuGBQIHfwJ+AkAgAUKAgICAcINCgICAgJB/UgRAQoCAgIDgACEKIAAgARA3IgFCgICAgHCDQoCAgIDgAFENAQsCQCACQoCAgIBwg0KAgICAkH9RDQBCgICAgOAAIQogACACEDciAkKAgICAcINCgICAgOAAUg0AIAEhAgwBCwJAIAKnIgUpAgQiCkL/////B4NQDQAgAaciAykCBCELAkAgAygCAEEBRyAKIAuFQoCAgIAIg0IAUnINACADIAAoAhAoAgwRBAAgBSkCBCIKpyIEQf////8HcSIHIAMpAgQiC6ciBkH/////B3EiCGogBEEfdnQgBkEfdiIJQRFzakkNACAFQRBqIQYgA0EQaiEEIAkEQCAEIAhBAXRqIAYgB0EBdBAfGiADIAMpAgQiCiAFKQIEfEL/////B4MgCkKAgICAeIOENwIEDAILIAQgCGogBiAHEB8aIAMgAykCBCIKIAUpAgR8Qv////8HgyILIApCgICAgHiDhDcCBCAEIAunakEAOgAADAELAn4CQAJAIAunQf////8HcSAKp0H/////B3FqIgdBgICAgARPBEAgAEHA2gBBABBGDAELIAAgByAKIAuEpyIGQR92EOoBIggNAQtCgICAgOAADAELIAhBEGohBAJAIAZBAE4EQCAEIANBEGogAygCBEH/////B3EQHyIEIAMoAgRB/////wdxaiAFQRBqIAUoAgRB/////wdxEB8aIAQgB2pBADoAAAwBCyAEIAMgAygCBEH/////B3EQwwUgBCADKAIEQQF0aiAFIAUoAgRB/////wdxEMMFCyAIrUKAgICAkH+ECyEKIAAgARAPDAELIAEhCgsgACACEA8gCgtAACAAAn8CfyADBEAgASgCJCACQQN0akEEagwBC0EAIAEoAiAiA0UNARogAyABLwEoIAJqQQR0agsoAgALENkBCw0AIAAgASACQQIQzgILNQEB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FBEAgACADIAJBBHRqKAIAEBMgAkEBaiECDAELCyAAKAIQIgJBEGogAyACKAIEEQAAQQAhAgNAIAEoAoABIQMgAiABKAKIAU5FBEAgACADIAJBBHRqKAIAEBMgAkEBaiECDAELCyAAKAIQIgJBEGogAyACKAIEEQAAQQAhAgNAIAEoAvwBIQMgAiABKAL0AU5FBEAgACADIAJBBHRqKAIMEBMgAkEBaiECDAELCyAAKAIQIgJBEGogAyACKAIEEQAAQQAhAgNAIAEoAsgCIQMgAiABKALAAk5FBEAgACADIAJBA3RqKAIEEBMgAkEBaiECDAELCyAAKAIQIgJBEGogAyACKAIEEQAAIAEoAswBIgIgAUHQAWpHBEAgACgCECIDQRBqIAIgAygCBBEAAAsgACABKALsAhATIAFB9AJqEPYBIAAoAhAiAkEQaiABKAKMAyACKAIEEQAAIAEoAgQEQCABKAIYIgIgASgCHCIDNgIEIAMgAjYCACABQgA3AhgLIAAoAhAiAEEQaiABIAAoAgQRAAALggEBAn8gACABQRBqEM8FAkAgASgCICICBEAgASgCPCIDRQ0BA0AgAiADT0UEQCAAIAIpAwAQIyACQQhqIQIgASgCPCEDDAELCyAAQRBqIAEoAiAgACgCBBEAAAsgACABKQMYECMgACABKQMAECMPC0GEhAFBrvwAQYmUAUHC6wAQAAALaAEBfgJAAkAgABA0IgNCgICAgHCDQoCAgIDgAFEEQCABIQMMAQsgACADQcAAIAFBBxAZQQBIDQAgACADQekAIAJBAEetQoCAgIAQhEEHEBlBAE4NAQsgACADEA9CgICAgOAAIQMLIAMLjAEBAn8CQANAIAFCgICAgHBUDQECQAJAAkACQAJAAkAgAaciAi8BBiIDQQxrDgUFAQMHAQALIANBMEYNASADQTRrDgUABgYGAAYLIAIoAiAoAjAPCyACKAIgIgJFDQQgAi0AEUUNASAAELYCQQAPCyACKAIgIQILIAIpAwAhAQwBCwsgAigCICEACyAACyIAIAAgAkEBahApIgAEQCAAIAEgAhAfIAJqQQA6AAALIAALjQMCA34EfwJAIAEoAggiBkH+////B04EQEEBIQcgAkEBcQ0BQv///////////wAhAyAGQf7///8HRw0BIAE0AgRC////////////AHwhAwwBCyAGQQBMBEAMAQsgBkE/TQRAIAEoAhAiCSABKAIMIgJBAnRqQQRrKAIAIQhCACAGQSBNBH4gCEEgIAZrdq0FIAJBAk8EfiACQQJ0IAlqQQhrNQIABUIACyAIrUIghoRBwAAgBmutiAsiA30gAyABKAIEGyEDDAELIAJBAXFFBEAgASgCBEUEQEL///////////8AIQNBASEHDAILQoCAgICAgICAgH8hA0EBIQcgBkHAAEcNASABKAIQIAEoAgwiAUECdGoiAkEEazUCAEIghiEEIAFBAk8EfiACQQhrNQIABUIACyAEhEKAgICAgICAgIB/UiEHDAELQgAgASgCECIIIAEoAgwiAiACQQV0IAZrIgYQaK0gCCACIAZBIGoQaK1CIIaEIgN9IAMgASgCBBshAwsgACADNwMAIAcLMwEBfyAAKAIAKAIQIgFBEGogACgCBCABKAIEEQAAIABBADYCDCAAQgA3AgQgAEF/NgIUC0YAIAJBAEwEQCAAQS8QLQ8LIAAgAkEAEOoBIgBFBEBCgICAgOAADwsgAEEQaiABIAIQHyACakEAOgAAIACtQoCAgICQf4QLbwIBfwF+AkACQAJ/IAJFBEAgACgCECABQQAQswUMAQsgASwAAEE6a0F2Tw0BIAAoAhAgASACELMFCyIDDQELQQAhAyAAIAEgAhCTAiIEQoCAgIBwg0KAgICA4ABRDQAgACgCECAEpxD8AyEDCyADCxwAIAAgACgCECgCRCABQRhsaigCBEHL9gAQjwELSAECfwJAA0AgAUEKRg0BIAFBAnRB4oACai8BACAASg0BIAFBAXQhAiABQQFqIQEgAkEBdEHkgAJqLwEAIABMDQALQQEPC0EAC3QBBH9BAiECAkAgACgCCCIEQf////8HRg0AIAEoAggiBUH/////B0YNACAAKAIEIgMgASgCBEcEQCAEQYCAgIB4RgRAQQAhAiAFQYCAgIB4Rg0CC0EBIANBAXRrDwtBACAAIAEQ0wEiAGsgACADGyECCyACC4kBAQR+IAAQPiIEQoCAgIBwg0KAgICA4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QJ0aigCADYCCAwBCyACQQA2AgQLIARBAWohBAwBCwsgBiAIQQxBwQAgABC+AkEAIQQDQCAEIAlGDQMCQAJAAkAgBiAEQQxsaiICKAIEQQFrDgIAAQILIAIoAgghBSAAIAcgAigCAEEmEHoiAkUNBCAFIAUoAgBBAWo2AgAgAiAFNgIADAELIAAgCyACKAIAQQEgAigCCEEGEJUDQQBIDQMLIARBAWohBAwACwALIAAgBSABIAIoAgAQ8wMLIAAoAhAiAUEQaiAGIAEoAgQRAAAgACALEA8MAgsgACgCECIEQRBqIAYgBCgCBBEAACAAIAtB1wEgAEH+ABAtQQAQGRogByAHLQAFQf4BcToABSABIAs3A0ALIAtCIIinQXVPBEAgC6ciACAAKAIAQQFqNgIACyALIQwLIANBIGokACAMC4kEAgR+An8CQAJAIAG9IgRCAYYiA1ANACABvSECIAC9IgVCNIinQf8PcSIGQf8PRg0AIAJC////////////AINCgYCAgICAgPj/AFQNAQsgACABoiIAIACjDwsgAyAFQgGGIgJaBEAgAEQAAAAAAAAAAKIgACACIANRGw8LIARCNIinQf8PcSEHAn4gBkUEQEEAIQYgBUIMhiICQgBZBEADQCAGQQFrIQYgAkIBhiICQgBZDQALCyAFQQEgBmuthgwBCyAFQv////////8Hg0KAgICAgICACIQLIQICfiAHRQRAQQAhByAEQgyGIgNCAFkEQANAIAdBAWshByADQgGGIgNCAFkNAAsLIARBASAHa62GDAELIARC/////////weDQoCAgICAgIAIhAshBCAGIAdKBEADQAJAIAIgBH0iA0IAUw0AIAMiAkIAUg0AIABEAAAAAAAAAACiDwsgAkIBhiECIAZBAWsiBiAHSg0ACyAHIQYLAkAgAiAEfSIDQgBTDQAgAyICQgBSDQAgAEQAAAAAAAAAAKIPCwJAIAJC/////////wdWBEAgAiEDDAELA0AgBkEBayEGIAJCgICAgICAgARUIQcgAkIBhiIDIQIgBw0ACwsgBUKAgICAgICAgIB/gyADQoCAgICAgIAIfSAGrUI0hoQgA0EBIAZrrYggBkEAShuEvwvoDwMHfAh/An5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AAsAC0HY/QBB1PwAQdoRQezXABAAAAsgBQt1AgJ8AX4gAAJ+EAwiAUQAAAAAAECPQKMiAplEAAAAAAAA4ENjBEAgArAMAQtCgICAgICAgICAfwsiAzcDACAAAn8gASADQugHfrmhRAAAAAAAQI9AoiIBmUQAAAAAAADgQWMEQCABqgwBC0GAgICAeAs2AggLfQECfyMAQSBrIgYkAAJAIAAgAUcgACACR3FFBEAgACgCACEHIAZCADcCGCAGQoCAgICAgICAgH83AhAgBiAHNgIMIAZBDGoiByABIAIgAyAEIAURCgAhASAAIAcQoAYMAQsgACABIAIgAyAEIAURCgAhAQsgBkEgaiQAIAEL5goCC38DfiMAQRBrIg0kACAEIAVBAWsiBkECdGooAgAhBwJAAkACQCAFQQFGBEBBACEGIA1BADYCDAJAIANBAk0EQCAHrSERA0AgA0EATA0CIAEgA0EBayIDQQJ0IgBqIAAgAmo1AgAgBq1CIIaEIhIgEYAiEz4CACASIBEgE359pyEGDAALAAsgB0F/c61CIIZC/////w+EIAetgKchAANAIANBAWsiA0EASA0BIAEgA0ECdCIEaiANQQxqIAYgAiAEaigCACAHIAAQmAY2AgAgDSgCDCEGDAALAAsgAiAGNgIADAELAkACQAJAAkACQCADIAVrIgggBSAFIAhKG0EyTgRAIAgEQCAAKAIAQQAgCEEBaiIOIAggBSAISxsiCUEBaiIMQQJ0IAAoAgQRAQAiC0UgACgCAEEAIAxBA3QgACgCBBEBACIHRXINBSAFIAlLDQIgCSAFayEPQQAhBgNAIAogD0YEQANAIAUgBkYNBiAHIAYgD2pBAnRqIAQgBkECdGooAgA2AgAgBkEBaiEGDAALAAUgByAKQQJ0akEANgIAIApBAWohCgwBCwALAAtBzIwBQdT8AEGkC0GV6wAQAAALIAhBA08EQCAHQX9zrUIghkL/////D4QgB62ApyEJCwJAAkACQANAIAZBAEgNASAGQQJ0IQAgBiAIaiEDIAZBAWshBiACIANBAnRqKAIAIgMgACAEaigCACIARg0ACyABIAhBAnRqIAAgA00iADYCACAADQEMAgsgASA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pBCjoAACABQQE2AghBAAsL3AEBAn8gACgCACAAQUBrIgMoAgBBAEEAIAAoAgxBABDoAyICRQRAIAFBADYCAEF/DwsgAkEANgJwIAJBADYCYCACQoCAgIAQNwJIIAJCATcCMCACQYAMOwFsIAJCATcCWCACQgE3AlAgASACNgIAIAMgAjYCACAAQQkQECABIAEoAgAoApgCNgIMIABB6QBBfxAcIQEgAEG4ARAQIABBCBAaIAMoAgBBABAXIABBuAEQECAAQfMAEBogAygCAEEAEBcgAEEtEBAgACABEB4gAyADKAIAKAIENgIAQQAL3gQBCX8jAEEQayIGJAAgACAAKQOAARAjIABBEGohAyAAQaABaiEEIAAoAqQBIQEDQCABIARGRQRAIAEoAgQhBUEAIQIDQCACIAEoAhBORQRAIAAgASACQQN0aikDGBAjIAJBAWohAgwBCwsgAyABIAAoAgQRAAAgBSEBDAELCyAAIAQ2AqQBIAAgAEGgAWo2AqABIAAQogUgACgCVCAAQdAAakYEQEEAIQIDQAJAIAAoAkQhASACIAAoAkBODQAgASACQRhsaiIBKAIABEAgACABKAIEEOwBCyACQQFqIQIMAQsLIAMgASAAKAIEEQAAIAAoApACIgQEQEEAIQEDQEEAIQUgAUEFRkUEQANAQQAhAiAFQQJGRQRAA0AgAkEURwRAIAQgAUGgAWxqIAVB0ABsaiACQQJ0akGoDWoiBygCACIIBEAgBCgCACIJKAIAIAhBACAJKAIEEQEAGiAHQQA2AgALIAJBAWohAgwBCwsgBUEBaiEFDAELCyABQQFqIQEMAQsLIAAoAtgBIARBACAAKALcAREBABogAEEANgKQAgsgAEHgAWoQoQUgAEH4AWoQoQVBACECA0ACQCAAKAI4IQEgAiAAKAIsTg0AIAEgAkECdGooAgAiAUEBcUUEQCADIAEgACgCBBEAAAsgAkEBaiECDAELCyADIAEgACgCBBEAACADIAAoAjQgACgCBBEAACADIAAoAtQBIAAoAgQRAAAgBiADKQIINwMIIAYgAykCADcDACAGIAAgACgCBBEAACAGQRBqJAAPC0GNkQFBrvwAQb8PQaTlABAAAA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vkBQIGfgR/IwBBEGsiDCQAAn4CQAJAAkAgACABECUiBkKAgICAcFQNACAGpyILLwEGQQJHDQAgCy0ABUEJcUEJRw0AIAsoAhAtADNBCHFFDQAgCygCFCkDACIBQv////8PVg0AIAwgAcQiBzcDCCAHIAs1AihSDQAgByACrHwiBUL/////B1UNACALNQIgIAVTBEAgACALIAWnEKwFDQMLAn8gBEUgAkEATHJFBEAgCygCJCIEIAJBA3RqIAQgAadBA3QQnAFBAAwBCyABpwshDUEAIQQgAkEAIAJBAEobIQIDQCACIARHBEAgAyAEQQN0aikDACIBQiCIp0F1TwRAIAGnIg4gDigCAEEBajYCAAsgCygCJCAEIA1qQQN0aiABNwMAIARBAWohBAwBCwsgCyAFPgIoIAsoAhQgBUL/////D4M3AwAgBUKAgICACHwhAQwBCyAAIAxBCGogBhA8DQEgDCkDCCIBIAKsIgh8IgVCgICAgICAgBBZBEAgAEHQ2gBBABAVDAILAkAgBEUgAkEATHJFBEBCACEHIAAgBiAIQgAgAUF/EPQCDQMMAQsgASEHCyACQQAgAkEAShutIQlCACEBA0AgASAJUgRAIAMgAadBA3RqKQMAIghCIIinQXVPBEAgCKciAiACKAIAQQFqNgIACyABIAd8IQogAUIBfCEBIAAgBiAKIAgQhgFBAE4NAQwDCwsgACAGQTAgBUKAgICACHwiAUL/////D1gEfiAFQv////8PgwVCgICAgMB+IAW5vSIHQoCAgIDAgYD8/wB9IAdC////////////AINCgICAgICAgPj/AFYbCxBFQQBIDQELIAAgBhAPIAVC/////w+DIAFC/////w9YDQEaQoCAgIDAfiAFub0iAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwwBCyAAIAYQD0KAgICA4AALIQEgDEEQaiQAIAEL0gMCB38DfiMAQSBrIgQkACAEQQA2AgwgBEEANgIIAkACQCAEIAAoAhAoAnhJBEAgABDpAQwBCyAAIAEgAiABQQAQFCILQoCAgIBwg0KAgICA4ABRBEAgCyEBDAILAkACQCALQoCAgIBwVA0AIAAgCxDK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wQAgAkEAEBQiBkKAgICAcIMiB0KAgICAMFENAEHDwgAhBCAHQoCAgIDgAFENASAAIAYQOEUNAQsCQCAAIAJBwgAQcUUEQEKAgICAMCEFDAELIANBgCByIQMgACACQcIAIAJBABAUIgVCgICAgHCDIgJCgICAgDBRDQBBtMIAIQQgAkKAgICA4ABRDQEgACAFEDhFDQELIANBgDBxBEBBsekAIQQgA0GAxABxDQELIAEgBTcDGCABIAY3AxAgASAINwMIIAEgAzYCAEEADwsgACAEQQAQFQsgACAIEA8gACAGEA8gACAFEA8LQX8LwgEBAn8gAigCBEUEQCACKAIYIgMgAigCHCIENgIEIAQgAzYCACACQgA3AhgCQCABKAIABEAgAhCfBQwBCyAAIAIpAyAQIwsgACACKQMoECMgAiACKAIAQQFrIgM2AgACQCADRQRAIAIoAhAiAyACKAIUIgQ2AgQgBCADNgIAIAJCADcCECAAQRBqIAIgACgCBBEAAAwBCyACQoCAgIAwNwMoIAJCgICAgDA3AyAgAkEBNgIECyABIAEoAgxBAWs2AgwLC5UBAQN+IAG9IgJC////////////AIMhAyAAvSIEQv///////////wCDQoGAgICAgID4/wBaBEAgA0KBgICAgICA+P8AVA8LAn9BfyADQoCAgICAgID4/wBWIAAgAWNyDQAaQQEgACABZA0AGkEAIABEAAAAAAAAAABiDQAaIARCAFMEQCACQj+Hp0F/cw8LIAJCP4inCwswACABQoCAgIAQhEKAgICAcINCgICAgDBRBEAgACABEDcPCyAAIAFBOEEAQQAQrQILKQEBfyACQiCIp0F1TwRAIAKnIgMgAygCAEEBajYCAAsgACABIAIQxQULUgIBfwF+QoCAgIDgACEEIAAgASACEJMBIgMEfiADKAIgIgMoAgwoAiAtAAQEQCACRQRAQgAPCyAAEGtCgICAgOAADwsgAzUCEAVCgICAgOAACws4ACAAIAEgAhCTASIARQRAQoCAgIDgAA8LIAAoAiAoAgwiACAAKAIAQQFqNgIAIACtQoCAgIBwhAtRAgF+AX8gACAAKQOQAUEDEEkiAkKAgICAcINCgICAgOAAUgRAIAFCIIinQXVPBEAgAaciAyADKAIAQQFqNgIACyAAIAJBNCABQQMQGRoLIAILlQEBA38jAEEQayIEJAAgBCACNwMIIAEoAgAiBSABKAIEIgY2AgQgBiAFNgIAIAFCADcCACAAIAAgAUEgaiADQQN0aikDAEKAgICAMEEBIARBCGoQIRAPIAAgASkDEBAPIAAgASkDGBAPIAAgASkDIBAPIAAgASkDKBAPIAAoAhAiAEEQaiABIAAoAgQRAAAgBEEQaiQAC40BAQN/IwBBEGsiBCQAIAQgATcDCCADQQF0IQZBACEDA0ACQAJAIANBAkYNACAAQcwAQQEgAyAGakEBIARBCGoQzwEiAUKAgICAcINCgICAgOAAUg0BQX8hBSADQQFHDQAgACACKQMAEA8LIARBEGokACAFDwsgAiADQQN0aiABNwMAIANBAWohAwwACwALyAYCBn8CfiMAQTBrIgMkACABQQhqIQUgAUHIAGohBgJAAkACQAJAA0AgASgCTCICIAZGDQQCQAJAAn8CQAJAAkACQCABKAIEIgQOBgACAgULAQYLIAIoAghFDQIgACABEOADDAYLAkACQCACKAIIDgIIAAELIAFBBDYCBCADIAIpAxA3AyggACAAKQNQIAEgA0EoakEAEP4BIghCgICAgHCDQoCAgIDgAFENCiAAIAE1AgBCgICAgHCEIANBARCEBUUEQCADQoCAgIAwNwMYIANCgICAgDA3AxAgACAIIAMgA0EQahCvAhogACADKQMAEA8gACADKQMIEA8LIAAgCBAPDAoLIAAgAiACKQMQEN8DDAkLIAIpAxAiCEIgiKdBdU8EQCAIpyIHIAcoAgBBAWo2AgALIARBAUcgAigCCCIEQQJHckUEQCAAIAgQigFBAQwCCyABKAJEIgIgBK03AwAgAkEIayAINwMAIAEgAkEIajYCRAtBAAshAiABQQM2AgQgASACNgIUCyAAIAUQtAIiCUKAgICAcIMiCEKAgICA4ABRBEAgACgCECICKQOAASEIIAJCgICAgCA3A4ABIAAgARDgAyAAIAEoAkwgCBDfAyAAIAgQDwwCCyAJQv////8PWARAIAEoAkRBCGsiAikDACEIIAJCgICAgDA3AwACQA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ABpyICLwEGQSFHDQAgAikDICIBQoCAgIBwg0KAgICA4H5SDQAMAQsgAEGiLEEAEBVCgICAgOAADwsgAaciACAAKAIAQQFqNgIAIAELrgICAXwBfwJAA0ACQAJAAkACQAJAQQcgAkIgiKciBCAEQQdrQW5JG0EJag4RAgMDAwMDAwMDAAAAAAMDBAEDCyABIALENwMADAULIAJCgICAgMCBgPz/AHwiAkL///////////8Ag0KBgICAgICA+P8AWgRAIAFCADcDAAwFCyACvyIDRAAAAAAAAODDYwRAIAFCgICAgICAgICAfzcDAAwFCyADRAAAAAAAAOBDZARAIAFC////////////ADcDAAwFCyABAn4gA5lEAAAAAAAA4ENjBEAgA7AMAQtCgICAgICAgICAfws3AwAMBAsgASACp0EEakEAEIIDGiAAIAIQDwwDCyAAIAIQjQEiAkKAgICAcINCgICAgOAAUg0BCwsgAUIANwMAQX8PC0EAC7ECAQJ/IwBBIGsiBCQAAkACQAJAIAIoAgxFBEACQAJAAkACQCACKAIIQf7///8Haw4CAQACCyAAEDUMAgsgAigCBA0DCyAAIAIQRBoLQQAhAiABRQ0DIAFCABAwGgwDCyACKAIERQ0BCyAAEDVBASECIAFFDQEgAUIAEDAaDAELIAAgAiACKAIIQQFqQQJtQQEQkQYgAEEBENEBGiABIgNFBEAgACgCACEDIARCADcCGCAEQoCAgICAgICAgH83AhAgBCADNgIMIARBDGohAwsgAyAAIABB/////wNBARBDGiADIAMoAgRBAXM2AgQgAyADIAJB/////wNBARDLARpBICECIAMoAghB/////wdHBEAgAygCDEEAR0EEdCECCyABDQAgAxAbCyAEQSBqJAAgAgsMACAAIAEQiANBAEwLDQAgACABIAJBAhDjAwvRDAEIfyMAQYABayIFJAACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgASgCDARAIAIoAgwNAQsgAigCCEGAgICAeEYEQCAAQgEQMBoMCwsgASgCCEH/////B0YNCSAAQgEQMBoCQCABIAAQ0wEiAyAEQYCABHFFckUEQCACKAIIQf7///8HTg0LDAELIAMNAgsgASgCBEU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ANwJ4IAVCgICAgICAgICAfzcCcCAFIAk2AmwgBUHsAGogBUEwahBEGiAFIAUoAnQgAWs2AnRBACEBA0AgASAERg0CIAEEQCAFQewAaiAAEEQaCyABQQFqIQEgAEEAIAVB7ABqEJEFRQ0ACwwDCyACKAIIQf7///8Haw4CBgcFCyAAIAAoAgggB2o2AgggBUEwaiAAEEQaIAUgAigCEDYCfCAFIAIoAgw2AnggBSACKAIENgJwIAUgAigCCCAKazYCdCAFQewAaiECCyAFKAI4IgEgBUEwahCxAmsiBEEBRgRAIAVBMGoiBCACIAFBAWusQSBBARDUAiAFQQRqIARBABCpASAAQgEQMBogACAFKAIEIAMgCBDMASEGDAILIANB/////wNGBEAgBUHYAGogAkEAEKkBIAIoAgQNAyAFKAJYIgFB/////wFMBEAgACAFQTBqIAFB/////wNBARCiBCEGDAMLIAVBMGoQGyAAQQBB/////wMgCBCrBCEGDAgLIAIoAghBIE4EQCAGQQZGDQEgAigCBA0BIAAgAiAEQQFrrEEgQQEQ1AIgBUEEaiAAQQAQqQEgBSgCBCADSw0BCyAAIAVBMGogAyAIQcgAIAIQngQhBgwBCyAAIAVBMGogAyAIQckAIAIQngQhBgsgBUEwahAbIAAgDDYCBAwFC0HO0ABB1PwAQaElQfEhEAAACyABKAIEIAIQsQJFcSEDIAIoAgQgASgCCEGAgICAeEZGBEAgACADEIwBQQIhBiACKAIERQ0DDAQLIAAgAxCJAQwCCyACKAIEIANBAEpGBEAgAEEAEIkBDAILIABBABCMAQwBCyAAEDULQQAhBgsgBUGAAWokACAGC1MBAn8jAEEgayIEJAAgACgCACEFIARCADcCGCAEQoCAgICAgICAgH83AhAgBCAFNgIMIARBDGoiBSAAIAEgAiADEOQDIQAgBRAbIARBIGokACAAC4gCAgJ/AX4jAEEQayIEJAACQAJAIAFCgICAgHCDQoCAgIDgflINACABpyEDAkAgAkUNACAEQQhqIANBBGpBABCCAw0AIAQpAwgiBUKBgICAgICAcFMgBUL/////////D1VyDQAgACABEA8gBUKAgICACH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AJAAkAgBQRAIANBNGogBhBEDQEgA0E0akEAQREQzgFBIHENASADKAI8IgQgBUEBa0EAIARBAE4baiAFbSEFIARBgICAgHhGBEAgA0HIAGpBqJABEPsCDAULQQAhBCAFQQBKDQIgA0HIAGpBvZABEPsCQQAgBWshAgNAIAIgBEYNBSADQcgAakEwEBEgBEEBaiEEDAALAAsgAyAGKAIQNgIwIAMgBigCDCIFNgIsIANBADYCJCADIAQ2AiggBEEAIARBAEobIAJBARCNBUEBaiEIAkAgBQRAIAggAkEAEI0FIQVBECEEA0AgA0E0aiILIAJBACAEIAVqIglBAWoiB0HgDxD8AiALIAsgA0EgaiAHQeAPEENyIgdBIHENAyAHQRBxRQ0CIANBNGogAygCPEEBIAkQ4QMNAiAEQQJtIARqIQQMAAsACyADQTRqIANBIGoQRA0BDAMLIANBNGpBARDRAUEgcUUNAgsgA0E0ahAbDAQLIANByABqIANBNGogAiAFIAUQjAUMAQsgAygCTCEFIANByABqIANBNGogAiAIIAgQjAUgAygCTCIJIAVBAWoiAiACIAlJG0EBayEIIAMoAkghByAFIQQDQAJAIAkgBCICQQFqIgRNBEAgCCECDAELIAIgB2otAABBMEcNACAEIAdqLQAAQS5HDQELCyACIAVNDQAgBSAHaiACIAdqIAkgAmsQnAEgAyAFIAJrIAlqNgJMCyADQTRqEBsLIANByABqQQAQESADKAJUDQAgAygCSAwBC0EAIAMoAkgiAkUNABogCigCACACQQAgCigCBBEBABpBAAshBCAGIAw2AgQgACAGIANBDGoQXiAERQRAIAAQfAwBCyAAIAQQYiENIAAoAtgBIgAoAgAgBEEAIAAoAgQRAQAaCyADQeAAaiQAIA0Lw3UCEn8BfiMAQaAGayIDJAAgASgCyAEiBEEAIARBAEobIQYDQCACIAZGRQRAIAEoAswBIAJBA3RqQX82AgQgAkEBaiECDAELCyABKAI8BEAgASgCzAFBfjYCDAtBACECIAEoAnwiBkEAIAZBAEobIQYCfgJAAkADQCACIAZGBEACQEECIQJBAiAEIARBAkwbIQgDQAJAIAIg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AIiCzYC4AUgACgCECECIANCADcDiAYgA0IANwOABiADIAI2ApQGIANBOzYCkAYgASgC0AIiAgRAIAEgASgCACACQQR0EF8iAjYCzAIgAkUNDQsCQCABKALcAiICRQ0AIAEtAG5BAnENACABIAEoAgAgAkEDdBBfIgI2AtgCIAJFDQ0gAUEANgLoAiABIAEoAvACNgLkAgsgASgCtAFBAE4EQCADQYAGaiICQQwQESACQQQQESACQdkAIAEoArQBEF0LIAEoArABQQBOBEAgA0GABmoiAkEMEBEgAkECEBEgAkHZACABKAKwARBdCyABKAKsAUEATgRAIANBgAZqIgJBDBARIAJBAxARIAJB2QAgASgCrAEQXQsCQCABKAKoAUEASA0AIAEoAmAEQCADQYAGaiICQeEAEBEgAiABLwGoARAqDAELIANBgAZqIgJBCBARIAJB2QAgASgCqAEQXQsgASgCmAFBAE4EQEEAIQIgAS0AbkEBcUUEQCABKAI4QQBHIQILIANBgAZqIgRBDBARIAQgAhARIAEoApwBIgJBAE4EQCADQYAGakHaACACEF0LIANBgAZqQdkAIAEoApgBEF0LIAEoAqABQQBOBEAgA0GABmoiAkEMEBEgAkECEBEgAkHZACABKAKgARBdCyABKAKQAUEATgRAIANBgAZqIgJBDBARIAJBBRARIAJB2QAgASgCkAEQXQsgASgClAFBAE4EQCADQYAGaiICQQwQESACQQUQESACQdkAIAEoApQBEF0LQQAhAgJAA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAiALTgRAQQAhAiABKAKsAiIEQQAgBEEAShshBANAIAIgBEYNAiACQRRsIQYgAkEBaiECIAYgDWooAhBFDQALQdWDAUGu/ABB/foBQZQ4EAAACyACIAIgCWoiBi0AACIFQQJ0QYC4AWotAAAiB2ohBAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBUHYAGsOIBASGhESGhESGhoaGhoaGhoaBAQBAwIaGgwMBQUFBQUFAAsCQCAFQQFrDhUJCgoLGg0HGggIGhoaBhoaDxoaGg4ACyAFQSJr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0F/NgKYASADQqyBgICQzRo3A5ABIANB3AVqIAQgA0GQAWoQJ0UNAAJAIAMoAugFIgVBAEgEQCADKAKYBiEFDAELIAMgBTYCmAYLIAEgAygChAYgBRAzIANBgAZqQfMBEBEgAygC7AVBA3MhBQwYCyADQunUgYBwNwOAASADQdwFaiAEIANBgAFqECdFDREgBUEKRiEKDA0LAkAgBigAASIGQYCAgIB4ckGAgICAeEYNACADQoyBgIBwNwPgASADQdwFaiAEIANB4AFqECdFDQAgAygC6AUiAkEATgRAIAMgAjYCmAYLIANCjoCAgHA3A9ABIANB3AVqIAMoAuQFIANB0AFqECcEQCADKALoBSICQQBIDRcgAyACNgKYBgwXCyABIAMoAoQGIAMoApgGEDMgA0GABmpBACAGaxDFAwwWCyADQo6AgIBwNwPAASADQdwFaiAEIANBwAFqECcEQCADKALoBSICQQBIDRYgAyACNgKYBgwWCyADQunUgYBwNwOwASADQdwFaiAEIANBsAFqECcEQCAGQQBHIQoMDQsgASADKAKEBiADKAKYBhAzIANBgAZqIAYQxQMgBCECDBkLIAYoAAEiAkH/AUoNDyABIAMoAoQGIAMoApgGEDMgA0GABmoiBiAFQcMAa0H/AXEQESAGIAJB/wFxEBEgBCECDBgLIAYoAAEhAiADQo6AgIBwNwPwASADQdwFaiAEIANB8AFqECcEQCAAIAIQEyADKALoBSICQQBIDRQgAyACNgKYBgwUCyACQS9HDQ4gASADKAKEBiADKAKYBhAzIANBgAZqQcEBEBEgBCECDBcLIANCyYCAgHA3A6gCIANC2Lb5gnA3A6ACIANB3AVqIAQiAiADQaACahAnDRYgA0F/NgKYAiADQoGEkICQCTcDkAIgA0HcBWogAiADQZACahAnDRYgA0F/NgKIAiADQoaOqMiQCTcDgAIgA0HcBWogAiADQYACahAnDRYMDQsgA0KOgICAcDcD8AIgA0HcBWogBCADQfACahAnBEAgAygC6AUiAkEASA0SIAMgAjYCmAYMEgsgA0KogICAcDcD4AIgA0HcBWogBCADQeACahAnBEACQCADKALoBSICQQBIBEAgAygCmA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tIBEBBAyEIIAYoAgAiAkHpAGtBA08EQCACQe0BRw0CQQEhCAsCQCABKAKkAiAGKAIMQRRsaigCDCAGKAIIIgVrIgRBgH9IIAQgCEH/AGpKckUEQCAGQQE2AgQgAkHtAUYEQEHsASECIAZB7AE2AgAMAgsgBiACQYEBaiICNgIADAELIAJB6wBHIARBgIACakH//wNLcg0CIAZC7YGAgCA3AgBBAiEIQe0BIQILIAUgAygCgAZqQQFrIAI6AAAgBigCBCICIAMoAoAGIAVqaiIEIAQgCGogAygChAYgBSAIaiACamsQnAEgAyADKAKEBiAIazYChAZBACEEIAEoAqwCIgJBACACQQBKGyEHIAEoAqQCIQIDQCAEIAdGBEAgASgC1AIhCyAGIQcgCiEEA0ACQCALIARBAWoiBEwEQEEAIQIgASgC4AIiBEEAIARBAEobIQQDQCACIARGDQIgBSABKALYAiACQQN0aiIHKAIAIg1JBEAgByANIAhrNgIACyACQQFqIQIMAAsACyAHIgJBEGohByACKAIYIg0gBUwNASACIA0gCGs2AhgMAQsLIAlBAWohCQwDCyAFIAIoAgwiC0gEQCACIAsgCGs2AgwLIAJBFGohAiAEQQFqIQQMAAsACwJAIAlFDQAgASgCzAIhAkEAIQUDQCAFIAtODQEgASgCpAIgAigCDEEUbGooAgwgAigCCCIEayEGAkACQAJAAkAgAigCBEEBaw4EAAEDAgMLIAMoAoAGIARqIAY6AAAgASgC1AIhCwwCCyADKAKABiAEaiAGOwAADAELIAMoAoAGIARqIAY2AAALIAJBEGohAiAFQQFqIQUMAAsACyAAKAIQIgJBEGogASgCzAIgAigCBBEAACABQQA2AswCIAAoAhAiAkEQaiABKAKkAiACKAIEEQAAIAFBADYCpAICQCABLQBuQQJxDQAgASgC2AJFDQAgASgCACgCECECIAFCADcC9AIgAUIANwL8AiABIAI2AogDIAFBOzYChAMgAUH0AmohBSABKALwAiEHQQAhAkEAIQgDQCACIAEoAuACTg0BAkAgASgC2AIgAkEDdGoiBigCBCIEQQBIIAQgB0ZyDQAgBigCACIGIAhrI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BSIEQQFqDgUGAAEBBgELIAIoAgAiBARAIAEoAgAgBygCDEYEQCAHKAIIKAIMIAQoAgxGDQILIAFBADYCACACQQA2AgBBAyEEDAYLIAEgBygCDDYCACACIAcoAgg2AgALIAZBAWohBgwBCwtBACEEIAIoAgANAgtBASEEDAELIAEgAzYCACACIAY2AgBBACEECyAHQRBqJAAgBAvCAwEJfyABKAIIIgZBACAGQQBKGyEFAkACQANAIAQgBUYNASAEQQJ0IQcgBEEBaiEEIAcgASgCAGooAgAgAkcNAAtBACEFDAELQX8hBSAAIAFBBCABQQRqIAZBAWoQeA0AIAEgASgCCCIEQQFqNgIIIAEoAgAgBEECdGogAjYCACABQRBqIQkgAUEMaiEHQQAhBQNAAkAgAigCICAFTARAQQAhBUEAIQQDQCAEIAIoAixODQQgBEECdCEDIARBAWohBCAAIAEgAigCECADIAIoAihqKAIAQQN0aigCBEEBEK8FRQ0ACwwBCwJAIANBACACKAIcIAVBFGxqIgYoAhAiCkEWRhsNAEEAIQQgASgCFCIIQQAgCEEAShshCwJAAkADQCAEIAtGDQEgCiAHKAIAIARBDGxqIgwoAgBHBEAgBEEBaiEEDAELCyAEQQBODQELIAAgB0EMIAkgCEEBahB4DQIgASABKAIUIgRBAWo2AhQgASgCDCAEQQxsaiIEIAYoAhA2AgACQCADRQRAIAYoAghFDQELIARBADYCCAwCCyAEIAY2AggMAQsgDEEANgIICyAFQQFqIQUMAQsLQX8PCyAFC2gCAn8BfiAAQRBqIQIgACkCBCIEp0H/////B3EhAwJAIARCgICAgAiDUEUEQEEAIQADQCAAIANGDQIgAiAAQQF0ai8BACABQYcCbGohASAAQQFqIQAMAAsACyACIAMgARCyBSEBCyABCxIAIAAgASACIANBgIABENABGgssAQF/A0AgASADRkUEQCAAIANqLQAAIAJBhwJsaiECIANBAWohAwwBCwsgAgvOAQIDfwF+IAEgAkEBELIFIgNB/////wNxIQUgACgCNCAAKAIkQQFrIANxQQJ0aiEDA0AgAygCACIERQRAQQAPCwJAIAAoAjggBEECdGooAgAiAykCBCIGQiCIp0H/////A3EgBUcgBkKAgICAgICAgECDQoCAgICAgICAwABSciAGp0H/////B3EgAkcgBkKAgICACINCAFJycg0AIANBEGogASACEGENACAEQd4BTgRAIAMgAygCAEEBajYCAAsgBA8LIANBDGohAwwACwALfwEEfyABLQAAQdsARgRAIAFBAWoiAxA/QQFrIQIgACgCECgCOCEEQdABIQEDQCABQd4BRwRAAkAgBCABQQJ0aigCACIFKAIEQf////8HcSACRw0AIAVBEGogAyACEGENACAAIAEQGA8LIAFBAWohAQwBCwsQAQALIAAgARCqAQusAgMCfwJ+AXwjAEEgayICJABEAAAAAAAA+H8hBiAAKAIIQf////8HRwRAIAAoAgAhAyACQgA3AhggAkKAgICAgICAgIB/NwIQIAIgAzYCDCACQQxqIAAQRBoCfiACKAIUIgBB/f///wdMBEAgAkEMakE1QcgEEM4BGiACKAIUIQALQoCAgICAgID4/wAgAEH+////B0YNABogAEGAgICAeEYEQEIADAELIAIoAhwhAwJ+IAIoAhhBAkYEQCADKQIADAELIAM1AgBCIIYLIQQgAEGCeEwEQCAEQY54IABrrYghBEIADAELIARCC4hC/////////weDIQQgAEH+B2qtQjSGCyEFIAQgBYQgAjUCEEI/hoS/IQYgAkEMahAbCyABIAY5AwAgAkEgaiQACw4AIABCgICAgPB+EIAGC+4PAwt/A34BfCMAQUBqIhAkAEHfAEGAAiAEQSBxGyEJIARBgANxIQsCQAJAAkACfwJAAkACQAJAAkACQAJAAkACQCABLQAAIgZBK2sOAwEDAAMLQQEhDiABQQFqIQEMAQsgAUEBaiEBCyAEQYAIcUUNASABLQAAIQYLIAZB/wFxQTBHDQACQAJAAkAgAS0AASIHQfgARwRAIAdB7wBGDQIgB0HYAEcNAQsgA0FvcQ0FIAFBAmohB0EQIQMMCQsgAyAHQc8AR3INAQwFCyADRQ0EDAMLAkACQCAHQeIARwRAIANFIAdBwgBGcQ0BIAMgB0Ewa0H/AXFBCUtyDQQgBEEQcQ0CDAcLIAMNBAsgBEEEc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BEAgACABEA8MAwsgABB7RQ0ACyAAIAEQDwwECyADIgQgBUcNAQsLQQEhAwwBC0EAIQMLIAAgAhAPCyADC9IDAgJ+An8jAEEgayIEJAACQCABQv///////////wCDIgNCgICAgICAwIA8fSADQoCAgICAgMD/wwB9VARAIAFCBIYgAEI8iIQhAyAAQv//////////D4MiAEKBgICAgICAgAhaBEAgA0KBgICAgICAgMAAfCECDAILIANCgICAgICAgIBAfSECIABCgICAgICAgIAIUg0BIAIgA0IBg3whAgwBCyAAUCADQoCAgICAgMD//wBUIANCgICAgICAwP//AFEbRQRAIAFCBIYgAEI8iIRC/////////wODQoCAgICAgID8/wCEIQIMAQtCgICAgICAgPj/ACECIANC////////v//DAFYNAEIAIQIgA0IwiKciBUGR9wBJDQAgBEEQaiAAIAFC////////P4NCgICAgICAwACEIgIgBUGB9wBrEGcgBCAAIAJBgfgAIAVrEI4CIAQpAwhCBIYgBCkDACIAQjyIhCECIAQpAxAgBCkDGIRCAFKtIABC//////////8Pg4QiAEKBgICAgICAgAhaBEAgAkIBfCECDAELIABCgICAgICAgIAIUg0AIAJCAYMgAnwhAgsgBEEgaiQAIAIgAUKAgICAgICAgIB/g4S/Cw0AIAAgASACQQAQvAELugMCAX4DfyMAQRBrIgQkAAJAAkACQAJAAkADQAJAIAEhAwJAAkACQAJAAkACQAJAQQcgAUIgiKciBSAFQQdrQW5JG0ELag4TAAECCQcKCgoKCgYNBQULCgoNDQoLIAJBAUYNAiAAIAEQDyAAQdLHAEEAEBUMCwsgAkEBRg0BIAAgARAPIABB8MYAQQAQFQwKCyACQQFHDQELIAEhAwwJCyAAIAEQDyAAQZDHAEEAEBUMBwsgAUL/////D4MhAwwHC0KAgICA4AAhAyAAIAFBARCaASIBQoCAgIBwg0KAgICA4ABSDQEMBgsLIAAgBEEIaiABEOUBIQIgACABEA8gAkUNAyAEIAIgAhCBAiIFaiIGNgIMQgAhAwJAIAUgBCgCCEYNACAAIAYgBEEMakEAQQQQuAIiA0KAgICAcINCgIC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CAEH///8fcSEEDAELCyAFKAIUIAdBA3RqIQUCQCADQQFGDQAgBTUCBEIghkKAgICAwABRBEAgACACEA8gACAEKAIEENkBQX8PCyAELQADQQhxDQAgACACEA8gACABQc4dEI8BQX8PCyAAIAUgAhAgQQAPCyAAIAApA8ABIAEgAgJ/IAAoAhAoAowBIgMEQEGAgAYgAygCKEEBcQ0BGgtBgIACCxDQAQuKAQEBfwJAIAJCgICAgHCDQoCAgICQf1EgA0KAgICAcINCgICAgJB/UXFFBEAgAEGN9wBBABAVDAELIAAgAUESEGUiAUKAgICAcINCgICAgOAAUQ0AIAGnIgQgAz4CJCAEIAI+AiAgACABQdUAQgBBAhAZGiABDwsgACADEA8gACACEA9CgICAgOAACw0AIAAgAUHOlQEQ/wMLZwEBfwJAIAFBAE4EQCAAKAIQIgIoAiwgAU0NASACKAI4IAFBAnRqKAIAIgEgASgCAEEBajYCACAAIAFBBBCABA8LQfKRAUGu/ABBzhdBmdIAEAAAC0HZ3wBBrvwAQc8XQZnSABAAAAtEAQF/IABB+AFqIQIgAEH0AWohAAN/IAAgAigCACICRgRAQQAPCyABIAJBBGsoAgBGBH8gAkEIawUgAkEEaiECDAELCwtSAgJ/AX4CQCAAKAIQKAKMASIBRQ0AIAEpAwgiA0KAgICAcFQNACADpyIBLwEGEO4BRQ0AIAEoAiAiAS0AEkEEcUUNACAAIAEoAkAQGCECCyACC6oPAgV/D34jAEHQAmsiBSQAIARC////////P4MhCyACQv///////z+DIQogAiAEhUKAgICAgICAgIB/gyENIARCMIinQf//AXEhCAJAAkAgAkIwiKdB//8BcSIJQf//AWtBgoB+TwRAIAhB//8Ba0GBgH5LDQELIAFQIAJC////////////AIMiDEKAgICAgIDA//8AVCAMQoCAgICAgMD//wBRG0UEQCACQoCAgICAgCCEIQ0MAgsgA1AgBEL///////////8AgyICQoCAgICAgMD//wBUIAJCgICAgICAwP//AFEbRQRAIARCgICAgICAIIQhDSADIQEMAgsgASAMQoCAgICAgMD//wCFhFAEQCADIAJ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2AgASkDaEJ/Qv///////7///wAQLiABQUBrIAEpA1AgASkDWEJ/Qv///////7///wAQLiABKQNAIRMgASkDSAwBCyASQut1VwRAQaDUBEHEADYCACABQZABaiAGEHkgAUGAAWogASkDkAEgASkDmAFCAEKAgICAgIDAABAuIAFB8ABqIAEpA4ABIAEpA4gBQgBCgICAgICAwAAQLiABKQNwIRMgASkDeAwBCyAKBEAgCkEITARAIAFBkAZqIAdBAnRqIgAoAgAhCQNAIAlBCmwhCSAKQQFqIgpBCUcNAAsgACAJNgIACyAHQQFqIQcLAkAgCyASpyIISiALQQhKciAIQRFKcg0AIAhBCUYEQCABQcABaiAGEHkgAUGwAWogASgCkAYQhgIgAUGgAWogASkDwAEgASkDyAEgASkDsAEgASkDuAEQLiABKQOgASETIAEpA6gBDAILIAhBCEwEQCABQZACaiAGEHkgAUGAAmogASgCkAYQhgIgAUHwAWogASkDkAIgASkDmAIgASkDgAIgASkDiAIQLiABQeABakEAIAhrQQJ0QeDBBGooAgAQeSABQdABaiABKQPwASABKQP4ASABKQPgASABKQPoARDjBSABKQPQASETIAEpA9gBDAILIAhBEU5BACABKAKQBiIAIAhBfWxB0ABqdhsNACABQeACaiAGEHkgAUHQAmogABCGAiABQcACaiABKQPgAiABKQPoAiABKQPQAiABKQPYAhAuIAFBsAJqIAhBAnRBmMEEaigCABB5IAFBoAJqIAEpA8ACIAEpA8gCIAEpA7ACIAEpA7gCEC4gASkDoAIhEyABKQOoAgwBCwNAIAFBkAZqIAciAEEBayIHQQJ0aigCAEUNAAsCQCAIQQlvIgNFBEBBACEKQQAhBQwBC0EAIQogA0EJaiADIAhBAEgbIQQCQCAARQRAQQAhBUEAIQAMAQtBgJTr3ANBACAEa0ECdEHgwQRqKAIAIgttIQxBACENQQAhCUEAIQUDQCABQZAGaiAJQQJ0aiIDIA0gAygCACICIAtuIgdqIgM2AgAgBUEBakH/D3EgBSADRSAFIAlGcSIDGyEFIAhBCWsgCCADGyEIIAwgAiAHIAtsa2whDSAJQQF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goQIayACQX9zcUGAgYKEeHFFDQALCyAAIAI6AAAgAkH/AXFFDQADQCAAIAEtAAEiAjoAASAAQQFqIQAgAUEBaiEBIAINAAsLC/UBAgF/AX4jAEHQAGsiAyQAAkACfiABQQBIBEAgAyABQf////8HcTYCACADQRBqIgFBwABB3CIgAxBOGiAAIAEQYgwBCyAAKAIQIgAoAiwgAU0NAQJAAkAgACgCOCIAIAFBAnRqKAIAIgEpAgQiBEKAgICAgICAgECDQoCAgICAgICAwABRDQAgAkUNASAEp0GAgICAeEcNACAAKAK8ASEBCyABIAEoAgBBAWo2AgAgAa1CgICAgJB/hAwBCyABIAEoAgBBAWo2AgAgAa1CgICAgIB/hAshBCADQdAAaiQAIAQPC0Hv3wBBrvwAQZgYQYfiABAAAAvrAgECfyAAIAEoAgQQEwNAIAEoAhAhAyACIAEoAhRORQRAIAAgAyACQQN0aigCABATIAJBAWohAgwBCwsgACgCECICQRBqIAMgAigCBBEAAEEAIQIDQAJAIAEoAhwhAyACIAEoAiBODQAgAyACQRRsaiIDKAIIRQRAIAAoAhAgAygCBBDrAQsgACADKAIQEBMgACADKAIMEBMgAkEBaiECDAELCyAAKAIQIgJBEGogAyACKAIEEQAAIAAoAhAiAkEQaiABKAIoIAIoAgQRAABBACECA0AgASgCNCEDIAIgASgCOE5FBEAgACADIAJBDGxqKAIEEBMgAkEBaiECDAELCyAAKAIQIgJBEGogAyACKAIEEQAAIAAgASkDQBAPIAAgASkDSBAPIAAgASkDYBAPIAAgASkDaBAPIAEoAggiAiABKAIMIgM2AgQgAyACNgIAIAFCADcCCCAAKAIQIgBBEGogASAAKAIEEQAACzABAX8gACgCOCABQQJ0aigCACIBIAEoAgAiAkEBazYCACACQQFMBEAgACABEKIDCwvAAQIBfwJ+QX8hAwJAIABCAFIgAUL///////////8AgyIEQoCAgICAgMD//wBWIARCgICAgICAwP//AFEbDQAgAkL///////////8AgyIFQoCAgICAgMD//wBWIAVCgICAgICAwP//AFJxDQAgACAEIAWEhFAEQEE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IAMgAjYCGAsgC0EPTQRAIAQgCEEBcSAJckECcjYCBCAEIAlqIgMgAygCBEEBcjYCBAwBCyAEIAhBAXEgBXJBAnI2AgQgBCAFaiIDIAtBA3I2AgQgBCAJaiICIAIoAgRBAXI2AgQgAyALEPIFCyAEIQMLIAMLIgMEQCADQQhqDwsgARCxASIDRQ0AIAMgAEF8QXggAEEEaygCACIEQQNxGyAEQXhxaiIEIAEgASAESxsQHxogABCbASADIQ0LIA0LMQAgBEECcQRAQbSGAUGu/ABBvIcCQaM4EAAACyAAIAApA8ABIAEgAiADIARBfxDKBQuvAQIBfwF+IwBB0ABrIgQkACAEQQBB0AAQKyIEIAM2AgwgBCAANgIAIARBATYCCCAEQqCAgIAQNwMQIAQgATYCOCAEIAEgAmo2AjxCgICAgDAhBQJAAkAgBBCiAQ0AIAQQ0gMiBUKAgICAcINCgICAgOAAUQ0AIAQoAhBBrH9GDQEgBEGw8wBBABAWCyAAIAUQDyAEIARBEGoQ/wFCgICAgOAAIQULIARB0ABqJAAgBQtiAgN+AX8gACkDwAEiAkIgiKdBdU8EQCACpyIFIAUoAgBBAWo2AgALIAAgAkGD0wAQsgEhAyAAIAIQDyAAIAAgA0HdwAAQsgEiAiADQQEgARAhIQQgACACEA8gACADEA8gBAsMACAAIAEpAwAQswELygYCBH8DfiMAQYABayIFJAACQAJAAkAgAyAEQgBCABDtAUUNAAJ/IARC////////P4MhCgJ/IARCMIinQf//AXEiBkH//wFHBEBBBCAGDQEaQQJBAyADIAqEUBsMAgsgAyAKhFALCyEGIAJCMIinIghB//8BcSIHQf//AUYNACAGDQELIAVBEGogASACIAMgBBAuIAUgBSkDECICIAUpAxgiASACIAEQ4wUgBSkDCCECIAUpAwAhBAwBCyABIAJC////////////AIMiCiADIARC////////////AIMiCRDtAUEATARAIAEgCiADIAkQ7QEEQCABIQQMAgsgBUHwAGogASACQgBCABAuIAUpA3ghAiAFKQNwIQQMAQsgBEIwiKdB//8BcSEGIAcEfiABBSAFQeAAaiABIApCAEKAgICAgIDAu8AAEC4gBSkDaCIKQjCIp0H4AGshByAFKQNgCyEEIAZFBEAgBUHQAGogAyAJQgBCgICAgICAwLvAABAuIAUpA1giCUIwiKdB+ABrIQYgBSkDUCEDCyAJQv///////z+DQoCAgICAgMAAhCELIApC////////P4NCgICAgICAwACEIQogBiAHSARAA0ACfiAKIAt9IAMgBFatfSIJQgBZBEAgCSAEIAN9IgSEUARAIAVBIGogASACQgBCABAuIAUpAyghAiAFKQMgIQQMBQsgCUIBhiAEQj+IhAwBCyAKQgGGIARCP4iECyEKIARCAYYhBCAHQQFrIgcgBkoNAAsgBiEHCwJAIAogC30gAyAEVq19IglCAFMEQCAKIQkMAQsgCSAEIAN9IgSEQgBSDQAgBUEwaiABIAJCAEIAEC4gBSkDOCECIAUpAzAhBAwBCyAJQv///////z9YBEADQCAEQj+IIQEgB0EBayEHIARCAYYhBCABIAlCAYaEIglCgICAgICAwABUDQALCyAIQYCAAnEhBiAHQQBMBEAgBUFAayAEIAlC////////P4MgB0H4AGogBnKtQjCGhEIAQoCAgICAgMDDPxAuIAUpA0ghAiAFKQNAIQQMAQsgCUL///////8/gyAGIAdyrUIwhoQhAgsgACAENwMAIAAgAjcDCCAFQYABaiQAC4sDAgJ+A38jAEEgayICJABCgICAgOAAIQQCQCAAIAMpAwAiBRBgDQAgACABQTEQZSIBQoCAgIBwg0KAgICA4ABRDQAgAAJ+AkAgAEEgEF8iBkUNAEEAIQMgBkEANgIUIAZBADYCAANAIANBAkZFBEAgBiADQQN0aiIHIAdBBGoiCDYCCCAHIAg2AgQgA0EBaiEDDAELCyAGQoCAgIAwNwMYIAFCgICAgHBaBEAgAacgBjYCIAsgACACQRBqIAEQpAUNAAJAIAAgBUKAgICAMEECIAJBEGoQISIFQoCAgIBwg0KAgICA4ABRBEAgACgCECIDKQOAASEEIANCgICAgCA3A4ABIAIgBDcDCCAAIAIpAxhCgICAgDBBASACQQhqECEhBCAAIAIpAwgQDyAEQoCAgIBwg0KAgICA4AB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gACEEAkAgACABEN0CIgFCgICAgHCDQoCAgIDgAFEEQCABIQQMAQsgACACIAEQbg0AIAAgAkEMaiADKQMAELoBDQAgAisDACIFvSIBQoCAgICAgID4/wCDQoCAgICAgID4/wBRBEAgAEKAgICAwH4gAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGxA3IQQMAQsgAzUCBEIghkKAgICAMFEEQCAAIAVBCkEAQQQQjwIhBAwBCyACKAIMIgNB5QBPBEAgAEGKNEEAEFAMAQsgACAFQQogA0EBakEFEI8CIQQLIAJBEGokACAEC18AIwBBEGsiAiQAAn4gAykDACIBQiCIpyIDBEBCgICAgBAgA0ELakESSQ0BGgtCgICAgOAAIAAgAkEIaiABEEINABogAisDCBC9Aq1CgICAgBCECyEBIAJBEGokACABCyYAQoCAgIDgACAAIAMpAwAQzAUiAEEAR61CgICAgBCEIABBAEgbCy8BAX4CfiADKAIEIgIEQEKAgICAECIEIAJBC2pBEkkNARoLIAAgBCADIAMQvAQLCy8BAX4CfiADKAIEIgIEQEKAgICAECIEIAJBC2pBEkkNARoLIAAgBCADIAMQvQQLCwkAIAAgARC+BAssACAAIAEQvgQiAUKAgICAcINCgICAgOAAUgR+IABBA0ECIAGnGxAtBSABCwvMAgIBfwd+IwBBIGsiBCQAIAAgBEEIakEAED0aQoCAgIDgACEIQoCAgIAwIQUCQAJAAkAgACADKQMAECUiBkKAgICAcINCgICAgOAAUQ0AIAAgACAGQfAAIAZBABAUENwFIgVCgICAgHCDQoCAgIDgAFENACAAIAQgBRA8QQBIDQBCACEBIAQpAwAiB0IAIAdCAFUbIQkgB0IBfSEHIAKsIQoDQCABIAlRDQIgACAAIAUgARBzEDciC0KAgICAcINCgICAgOAAUQ0BIARBCGogCxB/GiABIAdZIQIgAUIBfCEBIAEgClkgAnINACAEQQhqIAMgAadBA3RqKQMAEIcBRQ0ACwsgACAGEA8gACAFEA8gBCgCCCgCECIAQRBqIAQoAgwgACgCBBEAAAwBCyAAIAYQDyAAIAU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OAAUQRAIAEPCyABpyIGKQIEIgenQf////8HcSECAkAgBEEBcUUNACAGQRBqIQMgB0KAgICACIMhCANAIAIgBUYEQCACIQUMAgsCfyAIUEUEQCADIAVBAXRqLwEADAELIAMgBWotAAALEIcDRQ0BIAVBAWohBQwACwALAkAgBEECcUUEQCACIQMMAQsgBkEQaiEEIAdCgICAgAiDIQcDQCACIgMgBUwNASADQQFrIQICfyAHUEUEQCAEIAJBAXRqLwEADAELIAIgBGotAAALEIcDDQALCyAAIAYgBSADEIQBIQcgACABEA8gBwvqAwIGfwN+IwBBIGsiBSQAQoCAgIDgACEMAkAgACABEFkiAUKAgICAcINCgICAgOAAUQ0AAkACQCAAIAVBBGogAykDABC6AQ0AIAUoAgQiByABpyIJKAIEQf////8HcSIITA0BQSAhCkKAgICAMCELAkAgAkECSA0AIAMpAwgiDUKAgICAcINCgICAgDBRDQAgACANECgiC0KAgICAcINCgICAgOAAUQ0BAkACQCALpyIGKQIEIg2nQf////8HcQ4CAAECCyAAIAsQDwwDCwJ/IA1CgICAgAiDUEUEQCAGLwEQDAELIAYtABALIQpBACEGCyAHQYCAgIAETgRAIABBwNoAQQAQRgwBCyAAIAVBCGogBxA9RQRAAkAgBARAIAVBCGogCUEAIAgQUQ0BCyAHIAhrIQMCQCAGBEADQCADQQBMDQIgAyADIAYoAgRB/////wdxIgIgAiADShsiAmshAyAFQQhqIAZBACACEFFFDQAMAwsACyAFQQhqIAogAxDBBA0BCyAERQRAIAVBCGogCUEAIAgQUQ0BCyAAIAsQDyAAIAEQDyAFQQhqEDYhDAwECyAFKAIIKAIQIgJBEGogBSgCDCACKAIEEQAACyAAIAsQDwsgACABEA8MAQsgASEMCyAFQSBqJAAgDAuBBgIFfgV/IwBB0ABrIgIkAAJAAkACQAJAIAFCgICAgBCEQoCAgIBwg0KAgICAMFEEQCAAQZUwQQAQFQwBCyADKQMIIQkgAykDACIFQoCAgIAQhEKAgICAcINCgICAgDBRDQIgBEUNASAAIAUQxARBAE4NAQtC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DDQACQCAFQQFHBEADQCADQQBMDQIgAkEIaiAEQQAgBRBRGiADQQFrIQMMAAsACyACQQhqAn8gBC0AB0GAAXEEQCAELwEQDAELIAQtABALIAMQwQQaCyAAIAEQDyACQQhqEDYhBwwCCyAAIAEQDwwBCyABIQcLIAJBIGokACAHC8EBAgJ/An4jAEEQayIEJABCgICAgOAAIQYCQCAAIAEQWSIBQoCAgIBwg0KAgICA4ABRBEAgASEGDAELAkAgACAEQQxqIAMpAwAgAaciBSgCBEH/////B3EiAiACEFcNACAEIAI2AgggAykDCCIHQoCAgIBwg0KAgICAMFIEQCAAIARBCGogByACIAIQVw0BIAQoAgghAgsgACAFIAQoAgwiAyACIAMgAiADShsQhAEhBgsgACABEA8LIARBEGokACAGC8ABAgN/An4jAEEQayICJABCgICAgOAAIQcCQCAAIAEQWSIBQoCAgIBwg0KAgICA4ABRBEAgASEHDAELAkAgACACQQxqIAMpAwAgAaciBigCBEH/////B3EiBCAEEFcNACACIAQgAigCDCIFayIENgIIIAAgBiAFIAMpAwgiCEKAgICAcINCgICAgDBSBH8gACACQQhqIAggBEEAEFcNASACKAIIBSAECyAFahCEASEHCyAAIAEQDwsgAkEQaiQAIAcL0wECAn8CfiMAQRBrIgIkAEKAgICA4AAhBgJAIAAgARBZIgFCgICAgHCDQoCAgIDgAFEEQCABIQYMAQsCQCAAIAJBDGogAykDACABpyIFKAIEQf////8HcUEAEFcNACACIAUoAgRB/////wdxIgQ2AgggAykDCCIHQoCAgIBwg0KAgICAMFIEQCAAIAJBCGogByAEQQAQVw0BIAIoAgghBAsgACAFIAIoAgwiAyAEIAMgBEgbIAMgBCADIARKGxCEASEGCyAAIAEQDwsgAkEQaiQAIAYLqAUCC34CfyMAQRBrIgIkAAJAIAFCgICAgBCEQoCAgIBwg0KAgICAMFEEQCAAQZUwQQAQFUKAgICA4AAhBwwBCyADKQMIIQYCQCADKQMAIgRCgICAgHCDIglCgICAgBCEQoCAgIAwUQ0AIAAgBEHWASAEQQAQFCIFQ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/IARB0wFHBEBCgICAgDAhAUEBDAELIABBp90AEGIiAUKAgICAcINCgICAgOAAUQ0BIAIgATcDGEECCyEDIAAgACkDSCADIAJBEGoQpwEhBSAAIAEQDyAFQoCAgIBwg0KAgICA4ABSDQELIAAgBxAPDAELIAAgBSAEQQEgAkEIahCtAiEGIAAgAikDCBAPCyACQTBqJAAgBguYAwIFfwN+IwBBEGsiBiQAAkAgACABEFkiCkKAgICAcINCgICAgOAAUQRAIAohAQwBCwJAIAAgAykDABDQAyIFBEBCgICAgOAAIQFCgICAgDAhCyAFQQBMDQEgAEH89QBBABAVDAELQoCAgIDgACEBIAAgAykDABAoIgtCgICAgHCDQoCAgIDgAFENACALpyIHKAIEIQggBiAKpyIJKAIEQf////8HcSIFQQAgBEECRhs2AgwCQCACQQJIDQAgAykDCCIMQoCAgIBwg0KAgICAMFENACAAIAZBDGogDCAFQQAQVw0BCyAFIAhB/////wdxIgVrIQICQAJAAkACQCAEDgIAAQILIAYoAgwhAwwCCyAGKAIMIgMgAkohBEKAgICAECEBIAMhAiAERQ0BDAILIAYoAgwgBWsiAyECC0KAgICAECEBIANBAEggAiADSHINAANAIAkgByADQQAgBRCzA0UEQEKBgICAECEBDAILIAIgA0chBCADQQFqIQMgBA0ACwsgACAKEA8gACALEA8LIAZBEGokACABC7ADAwd/AXwBfiMAQRBrIgUkAAJAIAAgARBZIgFCgICAgHCDQoCAgIDgAFENAAJAAkAgACADKQMAECgiDUKAgICAcINCgICAgOAAUQ0AIA2nIgkoAgRB/////wdxIQYgAaciCigCBEH/////B3EhBwJAIAQEQCAFIAcgBmsiCzYCDEF/IQhBACEEIAJBAkgNASAAIAUgAykDCBBCDQIgBSsDACIMvUL///////////8Ag0KAgICAgICA+P8AVg0BIAxEAAAAAAAAAABlBEAgBUEANgIMDAILIAwgC7djRQ0BIAUCfyAMmUQAAAAAAADgQWMEQCAMqgwBC0GAgICAeAs2AgwMAQsgBUEANgIMIAJBAk4EQCAAIAVBDGogAykDCCAHQQAQ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CADKQMAIgZCgICAgHCDQoCAgIAwUgRAIAIgAygCDCIFNgIMIAUgBqciBygCBEH/////B3FJDQEgACAGEA8gA0KAgICAMDcDAAsgBEEBNgIADAELIAcgAkEMahDJASEIIAMgAigCDDYCDCAEQQA2AgAgCEH//wNNBEAgACAIQf//A3EQnwMhAQwBCyAAIAcgBUEBdGpBEGpBAhDuAyEBCyACQRBqJAAgAQs3ACMAQRBrIgIkACAAIAJBDGogAykDABB3IQAgAigCDCEDIAJBEGokAEKAgICA4AAgA2etIAAbC04AIwBBEGsiAiQAQoCAgIDgACEBAkAgACACQQxqIAMpAwAQdw0AIAAgAkEIaiADKQMIEHcNACACKAIIIAIoAgxsrSEBCyACQRBqJAAgAQsGACAAtrsLfwAgACAAKQPQASIBQgyIIAGFIgFCGYYgAYUiAUIbiCABhSIBNwPQAUKAgICAwH4gAUKdurP7lJL9oiV+QgyIQoCAgICAgID4P4S/RAAAAAAAAPC/oL0iAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwujBAMDfAV/A34jAEEQayIIJAAgCEIANwMIAkACQCACQQBMDQBCgICAgOAAIQEgACAIQQhqIAMpAwAQQg0BQQEhCSAIKwMIIQQgAkEBRwRAA0AgAiAJRg0CIAAgCCADIAlBA3RqKQMAEEINAyAJQQFqIQkgCCsDACEFIwBBIGsiByQAIAS9Qv///////////wCDIg0gBb1C////////////AIMiDCAMIA1WGyIOvyEEAkAgDkI0iKciCkH/D0YNACANIAwgDCANVBsiDL8hBQJAIA5QDQAgDEI0iKciC0H/D0YNACALIAprQcEATgRAIAUgBKAhBAwCCwJ8IAtB/gtPBEAgBEQAAAAAAAAwFKIhBCAFRAAAAAAAADAUoiEFRAAAAAAAALBrDAELRAAAAAAAAPA/IApBvARLDQAaIAREAAAAAAAAsGuiIQQgBUQAAAAAAACwa6IhBUQAAAAAAAAwFAshBiAHQRhqIAdBEGogBRCKBiAHQQhqIAcgBBCKBiAGIAcrAwAgBysDEKAgBysDCKAgBysDGKCfoiEEDAELIAUhBAsgB0EgaiQADAALAAsgBJkhBAsgBL0iAQJ/IASZRAAAAAAAAOBBYwRAIASqDAELQYCAgIB4CyIAt71RBEAgAK0hAQwBC0KAgICAwH4gAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGyEBCyAIQRBqJAAgAQtOACAAIABEAAAAAAAA8L9EAAAAAAAA8D8gAEQAAAAAAAAAAGMbIAC9Qv///////////wCDQoCAgICAgID4/wBWGyAARAAAAAAAAAAAYRsLQwACfCABvUKAgICAgICA+P8Ag0KAgICAgICA+P8AUQRARAAAAAAAAPh/IACZRAAAAAAAAPA/YQ0BGgsgACABEI8DCwuDAQICfgF/IAC9IgFCNIinQf8PcSIDQf4HTQRAIAFCgICAgICAgICAf4MhAiADQf4HRyABQoCAgICAgIDwv39RckUEQCACQoCAgICAgID4P4S/DwsgAr8PCyADQbIITQR8IAFCP4cgAXxCAUGzCCADa62GIgFCAYh8QgAgAX2DvwUgAAsLggUDAnwFfwF+IwBBEGsiCSQAAn5CgICAgMD+//v/AEKAgICAwP7/eyAEGyACRQ0AGgJ8IAMpAwAiAUL/////D1gEQEEBIAIgAkEBTBshCiABpyEIQQEhBwNAIAcgCkcEQCAItyADIAdBA3RqKQMAIgFCgICAgBBaDQMaIAggAaciCyAIIAtKGyAIIAsgCCALSBsgBBshCCAHQQFqIQcMAQsLIAitDAILQoCAgIDgACAAIAlBCGogARBCDQEaQQEhByAJKwMICyEFIAcgAiACIAdIGyECA0AgAiAHRwRAQoCAgIDgACAAIAkgAyAHQQN0aikDABBCDQIaAkAgBb0iDEL///////////8Ag0KAgICAgICA+P8AVg0AIAkrAwAiBr0iAUL///////////8Ag0KAgICAgICA+P8AVgRAIAYhBQwBCyAFRAAAAAAAAAAAYSAGRAAAAAAAAAAAYXEhCiAEBEAgCgRAIAEgDIO/IQUMAgsgBSAFIAalIAa9Qv///////////wCDQoCAgICAgID4/wBWGyAGIAW9Qv///////////wCDQoCAgICAgID4/wBYGyEFDAELIAoEQCABIAyEvyEFDAELIAUgBSAGpCAGvUL///////////8Ag0KAgICAgICA+P8AVhsgBiAFvUL///////////8Ag0KAgICAgICA+P8AWBshBQsgB0EBaiEHDAELCyAFvSIBAn8gBZlEAAAAAAAA4EFjBEAgBaoMAQtBgICAgHgLIgC3vVEEQCAArQwBC0KAgICAwH4gAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwshASAJQRBqJAAgAQstAEKAgICA4AAgACADKQMAIAMpAwhBABCLAiIAQQBHrUKAgICAEIQgAEEASBsLoAEBA34gAykDACIFIQQgAkEETgRAIAMpAxghBAsgBUL/////b1gEQCAAECRCgICAgOAADwsgAykDECEBQoCAgIDgACEGAkAgACADKQMIEDEiAkUNACABQiCIp0F1TwRAIAGnIgMgAygCAEEBajYCAAsgACAFIAIgASAEQQAQhgQhAyAAIAIQEyADQQBIDQAgA0EAR61CgICAgBCEIQYLIAYLjwEAAkACQCADKQMAIgFC/////29YBEAgBARAIAAQJAwDCyABQiCIp0F1SQ0BIAGnIgAgACgCAEEBajYCACABDwsgACABELYDIgJBAEgNASAEBEAgAkEAR61CgICAgBCEDwsgAkUEQCAAQfjiAEEAEBUMAgsgAaciACAAKAIAQQFqNgIACyABDwtCgICAgOAACyoAIAMpAwAiAUL/////b1gEQCAAECRCgICAgOAADwsgACABQQNBABCqAgtPAAJAAkAgAykDACIBQv////9vWARAIARFBEBCgICAgBAPCyAAECQMAQsgACABEJkBIgBBAE4NAQtCgICAgOAADwsgAEEAR61CgICAgBCEC2MBAX4gAykDACIEQv////9vWARAIAAQJEKAgICA4AAPC0KAgICA4AAhAQJAIAAgAykDCBAxIgJFDQAgACAEIAIQcSEDIAAgAhATIANBAEgNACADQQBHrUKAgICAEIQhAQsgAQs2ACADKQMAIgFCIIinIgJBf0YgBEUgAkF+cUECR3FyRQRAIAAQJEKAgICA4AAPCyAAIAEQ6AELYwECfgJAAkAgAykDACIBQv////9vWARAIAAQJAwBCyADKQMIIQ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AwgiBL0iBUKAgICAgICA+P8Ag0KAgICAgICA+P8AUgRAIASdIgREAAAAAACwnUCgIAQgBEQAAAAAAABZQGMbIAQgBEQAAAAAAAAAAGYbIgS9IQULAn8gBJlEAAAAAAAA4EFjBEAgBKoMAQtBgICAgHgLIgO3vSAFUQRAIAOtDAELQoCAgIDAfiAFQoCAgIDAgYD8/wB9IAVC////////////AINCgICAgICAgPj/AFYbCzcDACAAIAFBASACQREQyAQhBQsgAkEQaiQAIAULiQECAX4BfCMAQRBrIgIkAEKAgICA4AAhBAJAIAAgAkEIaiABEJsCDQAgACACQQhqIAMpAwAQQg0AIAAgASACKwMIIgWdRAAAAAAAAAAAoEQAAAAAAAD4fyAFRAAA3MIIsj5DZRtEAAAAAAAA+H8gBUQAANzCCLI+w2YbEMkEIQQLIAJBEGokACAEC9cBAQF8IwBB0ABrIgIkAAJ+QoCAgIDgACAAIAEgAiAEQQ9xQQAQtwMiAEEASA0AGkKAgICAwH4gAEUNABogBEGAAnEEQCACIAIrAwBEAAAAAACwncCgOQMACyACIARBBHZBD3FBA3RqKwMAIgW9IgECfyAFmUQAAAAAAADgQWMEQCAFqgwBC0GAgICAeAsiBLe9UQRAIAStDAELQoCAgIDAfiABQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbCyEBIAJB0ABqJAAgAQuFAQEBfCMAQRBrIgIkAAJ+QoCAgIDgACAAIAJBCGogARCbAg0AGkKAgICAwH4gAisDCCIEvUL///////////8Ag0KAgICAgICA+P8AVg0AGgJ+IASdIgSZRAAAAAAAAOBDYwRAIASwDAELQoCAgICAgICAgH8LELgDrQshASACQRBqJAAgAQuGAQEBfgJAIAFC/////29YBEAgABAkDAELAkAgAykDACIEQoCAgIBwg0KAgICAkH9SDQAgACAEEDEiAkUNASAAIAIQE0ERIQMCQAJAAkAgAkHGAGsOBgIDAQMDAgALIAJBFkcNAgtBECEDCyAAIAEgAxCQAg8LIABBtitBABAVC0KAgICA4AALlgEBAXwjAEEQayICJAACfkKAgICA4AAgACACQQhqIAEQmwINABogAisDCCIEvSIBAn8gBJlEAAAAAAAA4EFjBEAgBKoMAQtBgICAgHgLIgC3vVEEQCAArQwBC0KAgICAwH4gAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwshASACQRBqJAAgAQvsAgIDfwF8IwBB0ABrIgQkACAEQRBqQQBBOBArGiAEQoCAgICAgID4PzcDIEKAgICAwH4hAQJAIAJFDQBBByACIAJBB04bIgJBACACQQBKGyECA0AgAiAFRwRAIAAgBEEIaiADIAVBA3QiBmopAwAQQgRAQoCAgIDgACEBDAMLIAQrAwgiB71CgICAgICAgPj/AINCgICAgICAgPj/AFENAiAEQRBqIAZqIAedOQMAAkAgBQ0AIAQrAxAiB0QAAAAAAAAAAGZFIAdEAAAAAAAAWUBjRXINACAEIAdEAAAAAACwnUCgOQMQCyAFQQFqIQUMAQsLIARBEGpBABDgAiIHvSIBAn8gB5lEAAAAAAAA4EFjBEAgB6oMAQtBgICAgHgLIgW3vVEEQCAFrSEBDAELQoCAgIDAfiABQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbIQELIARB0ABqJAAgAQtWABDQBCIBQoCAgIAIfEL/////D1gEQCABQv////8Pgw8LQoCAgIDAfiABub0iAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwsIAEKAgICAMAuqHQIGfwR+IwBB0ABrIgYkAAJAAkAgAEEQaiIDQYgCIAAoAgARAwAiAUUNACABQQVqQQBBgwIQKxogAUEFOgAEIAFBATYCACAAKAJQIgQgAUEIaiIFNgIEIAEgAEHQAGo2AgwgASAENgIIIAAgBTYCUCABIAMgACgCQEEDdCAAKAIAEQMAIgQ2AiggBEUEQCADIAEgACgCBBEAAAwBCyABIAA2AhAgACgCSCIDIAFBFGoiBTYCBCABIABByABqNgIYIAEgAzYCFCAAIAU2AkggAULxgICAgDk3AtwBIAEgAEHYAWo2AtgBIAAoAkAiAEEAIABBAEobIQADQCAA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wIQYCQAJAAkAgACADKQMAECgiB0KAgICAcINCgICAgOAAUQRAQoCAgIAwIQQMAQsgACABQdUAIAFBABAUIgRCgICAgHCDQoCAgIDgAFENACAAIARCABBSRQRAIAAgAUHVAEIAEEVBAEgNAQsgACABIAcQyAEiBUKAgICAcIMiCUKAgICA4ABRDQEgACABQdUAIAFBABAUIgZCgICAgHCDQoCAgIDgAFENAQJAIAAgBiAEEFIEQCAAIAQQDwwBCyAAIAFB1QAgBBBFQQBODQBCgICAgDAhBAwCCyAAIAcQDyAAIAYQD0L/////DyEIIAlCgICAgCBRDQIgACAFQdcAIAVBABAUIQEgACAFEA8gAQ8LQoCAgIAwIQULIAAgBRAPIAAgBxAPIAAgBhAPIAAgBBAPCyAIC80EAgZ+AX8jAEEgayICJAACQCABQv////9vWARAIAAQJEKAgICA4AAhBwwBC0KAgICA4AAhB0KAgICAMCEIAkAgACADKQMAECgiCUKAgICAcINCgICAgOAAUQRAQoCAgIAwIQRCgICAgDAhBUKAgICAMCEGDAELAkACQCAAIAEgACkDSBDjASIGQoCAgIBwg0KAgICA4ABRBEBCgICAgDAhBAwBCyAAIAAgAUHtACABQQAQFBA3IgRCgICAgHCDQoCAgIDgAFINAQtCgICAgDAhBQwBCyACIAQ3AxggAiABNwMQIAAgBkECIAJBEGoQpwEiBUKAgICAcINCgICAgOAAUQ0AIAAgAkEIaiAAIAFB1QAgAUEAEBQQowENACAAIAVB1QACfiACKQMIIgFCgICAgAh8Qv////8PWARAIAFC/////w+DDAELQoCAgIDAfiABub0iAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwsQRUEASA0AQoCAgIDgACEIIABBLhB2IgFCgICAgHCDQoCAgIDgAFENACAAQSAQKSIDRQRAIAEhCAwBCyADIAk3AwggAyAFNwMAIAMgBKciCkHnAEEAEMcBQX9zQR92NgIQIApB9QBBABDHASEKIANBADYCGCADIApBf3NBH3Y2AhQgAUKAgICAcFoEQCABpyADNgIgCyAAIAYQDyAAIAQQDyABIQcMAQsgACAJEA8gACAGEA8gACAEEA8gACAFEA8gACAIEA8LIAJBIGokACAHC74EAgd+An8jAEEQayICJAACQCABQv////9vWARAIAAQJEKAgICA4AAhBgwBC0KAgICA4AAhBkKAgICAMCEFAkAgAAJ+AkAgACADKQMAECgiB0KAgICAcINCgICAgOAAUQ0AIAAgACABQe4AIAFBABAUECYiA0EASA0AIANFBEAgACABIAcQyAEhBgwDCyAAIAAgAUHvACABQQAQFBAmIgtBAEgNACAAIAFB1QBCABBFQQBIDQBCgICAgOAAIAAQPiIIQoCAgIBwg0KAgICA4ABRDQEaIAenIQwCQANAIAAgBRAPIAAgASAHEMgBIgVCgICAgHCDIgRCgICAgCBRDQECQCAEQoCAgIDgAFENAAJ/IAAgACAFQgAQTRA3IgRCgICAgHCDIgpCgICAgJB/UgRAQQAgCkKAgICA4ABSDQEaDAILIASnKAIEQf////8HcUULIQMgACAIIAkgBBCGAUEASA0AIAlCAXwhCSADRQ0BIAAgAkEIaiAAIAFB1QAgAUEAEBQQowFBAEgNACAAIAFB1QACfiAMIAIpAwggCxDxAiIEQoCAgIAIfEL/////D1gEQCAEQv////8PgwwBC0KAgICAwH4gBLm9IgRCgICAgMCBgPz/AH0gBEL///////////8Ag0KAgICAgICA+P8AVhsLEEVBAE4NAQsLIAgMAgsgCacEQCAIIQYMAwsgACAIEA9CgICAgCAhBgwCC0KAgICAMAsQDwsgACAFEA8gACAHEA8LIAJBEGokACAGC40VAgp/DX4jAEGQAWsiBCQAAkAgAUL/////b1gEQCAAECRCgICAgOAAIRAMAQsgAykDCCEZIAAgBEE4akEAED0aIARBADYCMCAEQoCAgIDAADcDKCAEIAA2AgAgBCAEQQhqIgo2AgRCgICAgOAAIRBCgICAgDAhEQJAAkAgACADKQMAECgiFEKAgICAcINCgICAgOAAUQRAQoCAgIAwIRNCgICAgDAhAUKAgICAMCEPQoCAgIAwIRcMAQtCgICAgDAhFwJAIAAgGRA4IghFBEAgACAZECgiF0KAgICAcINCgICAgOA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AREGpBAEgNDgsgBCABNwNYIARCgICAgDA3A1AgACATEA8gACAAIBkgBCAEQdAAakEAEJ0DEDchEwwBC0KAgICAMCEVIA5CgICAgDBSBEAgACARECUiFUKAgICAcINCgICAgOAAUQ0NCyAEIBc3A3ggBCAVNwNwIAQgATcDaCAEIBQ3A1ggBCAPNwNQIAQgEkL/////D4M3A2AgACATEA8gACAEQdAAahDtBCETIAAgFRAPCyATQoCAgIBwg0KAgICA4ABRDQsgB6wgElcEQCAEQThqIgIgCSAHIBKnEFEaIAIgExCHARogD6cpAgRC/////weDIBJ8pyEHCyAFQQFqIQUMAQsLIARBOGoiAiAJIAcgCSgCBEH/////B3EQURogAhA2IRAMCgsgACAPEA9CgICAgDAhEwJAAn8CQCAAIAAgEkIAEE0QNyIPQoCAgIBwgyIOQoCAgICQf1IEQCAOQoCAgIDgAFINASAOIRAMAwsgD6coAgRB/////wdxDQAgACAEQdAAaiAAIAFB1QAgAUEAEBQQowFBAEgNAiAAIAFB1QACfiAJIAQpA1AgDRDxAiIOQoCAgIAIfEL/////D1gEQCAOQv////8PgwwBC0KAgICAwH4gDrm9Ig5CgICAgMCBgPz/AH0gDkL///////////8Ag0KAgICAgICA+P8AVhsLEEUiAkEATg0AIAJBHnZBAnEMAQtBAAtFDQELCwwCCwwGC0KAgICAMCETC0KAgICAMCEBDAQLIARB0ABqIAsgCCALKAIEQf////8HcRBRDQAgACASEA8gACgCECICQRBqIAMgAigCBBEAACAEQdAAahA2IRAMAQsgACASEA8gACgCECICQRBqIAMgAigCBBEAACAEKAJQKAIQIgJBEGogBCgCVCACKAIEEQAAC0KAgICAMCERC0KAgICAMCETQoCAgIAwIQFCgICAgDAhDwsgBCgCOCgCECICQRBqIAQoAjwgAigCBBEAAAsgBBDuBCAAIBcQDyAAIA8QDyAAIAEQDyAAIBMQDyAAIBEQDyAAIBQQDwsgBEGQAWokACAQC6IBACMAQSBrIgIkAAJ+AkAgAUL/////b1gEQCAAECQMAQsgACACQQhqIgNBABA9GiADQS8QOxoCQCADIAAgAUHsACABQQAQFBB/DQAgAkEIaiIDQS8QOxogAyAAIAFB7QAgAUEAEBQQfw0AIAJBCGoQNgwCCyACKAIIKAIQIgBBEGogAigCDCAAKAIEEQAAC0KAgICA4AALIQEgAkEgaiQAIAELTgECfkKAgICA4AAhBCAAIAEgAykDABDIASIBQoCAgIBwgyIFQoCAgIDgAFIEfiAAIAEQDyAFQoCAgIAgUq1CgICAgBCEBUKAgICA4AALC/gCAgN+AX8CQAJAIAAgARDwAiICRQ0AIAMpAwghBgJAAkACQCADKQMAIgRCgICAgHBUDQAgBKciAy8BBkESRw0AIAZCgICAgHCDQoCAgIAwUgRAIABBnvkAQQAQFUKAgICA4AAPCyADKAIgIgcgBygCAEEBajYCACADKAIkIgMgAygCAEEBajYCACAHrUKAgICAkH+EIQQgA61CgICAgJB/hCEFDAELQoCAgIAwIQUCfiAEQoCAgIBwg0KAgICAMFEEQCAAQS8QLQwBCyAAIAQQKAsiBEKAgICAcINCgICAgOAAUQ0BIAAgBCAGEJgEIgVCgICAgHCDQoCAgIDgAFENAQsgACACNQIAQoCAgICQf4QQDyAAIAI1AgRCgICAgJB/hBAPIAIgBT4CBCACIAQ+AgAgACABQdUAQgAQRUEASA0BIAFCIIinQXVJDQIgAaciACAAKAIAQQFqNgIADAILIAAgBBAPIAAgBRAPC0KAgICA4AAPCyABC2oBAX8gAUL/////b1gEQCAAECRCgICAgOAADwsCfiABpyIDLwEGQRJHBEBCgICAgDAgACABIAAoAigpA5ABEFINARogAEESEIYDQoCAgIDgAA8LIAMoAiQtABAgAnFBAEetQoCAgIAQhAsLvQQBCX8jAEEgayIHJAACQAJAAkACQAJAIAFC/////29YBEAgABAkDAELIAAgASAAKAIoKQOQARBSDQIgACABEPACIgINAQtCgICAgOAAIQEMAwsgAigCACIIKAIEIgJB/////wdxIgMNAQsgAEH+kwEQYiEBDAELIAAgB0EIaiADIAJBH3YQigMaIAhBEGohBiAIKAIEQf////8HcSEJQQAhAANAAkAC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AIgggAikDCCIGEMgBIgFCgICAgHCDIgdCgICAgOAAUg0BC0KAgICAMCEHDAELIAdCgICAgCBRBEAgAkEBNgIYQoCAgIAwIQFBAQwDCyACKAIQBEAgACAAIAFCABBNEDciB0KAgICAcIMiCUKAgICA4ABRDQECQCAJQoCAgICQf1INACAHpygCBEH/////B3ENACAAIANBCGogACAIQdUAIAhBABAUEKMBQQBIDQIgACAIQdUAAn4gBqcgAykDCCACKAIUEPECIgZCgICAgAh8Qv////8PWARAIAZC/////w+DDAELQoCAgIDAfiAGub0iBkKAgICAwIGA/P8AfSAGQv///////////wCDQoCAgICAgID4/wBWGwsQRUEASA0CCyAAIAcQDwwCCyACQQE2AhgMAQsgACABEA8gACAHEA9CgICAgOAAIQELQQALNgIAIANBEGokACABCw4AIAAQtQJCgICAgOAACwkAQoCAgIDAfgsWACAAIAMpAwAgAykDCCADKQMQEJQEC9EBAgN+An8jAEEQayIHJAACQCAAIAdBDGogAykDABDlASIIRQRAQoCAgIDgACEEDAELIAAgCCAHKAIMQdKIARD1BSEBIAAgCBBUAkAgAkECSCABQoCAgIBwg0KAgICA4ABRcg0AIAAgAykDCCIGEDhFDQBCgICAgOAAIQQCQCAAEDQiBUKAgICAcINCgICAgOAAUQRAIAEhBQwBCyAAIAVBLyABQQcQGUEASA0AIAAgBUEvIAYQ+QQhBAsgACAFEA8MAQsgASEECyAHQRBqJAAgBAsNACAAIAEgAkEwEP0FCwsAIAAgAUEwEP4FC7QDAgN/An4jAEHQAGsiBiQAQX8hBwJAIAAgBkHIAGogAUHCABCBASIIRQ0AIAYpA0giAUKAgICAcINCgICAgDBRBEAgCCkDACEBIANCIIinQXVPBEAgA6ciByAHKAIAQQFqNgIACyAAIAEgAiADIAQgBRCGBCEHDAELIAAgAhBcIglCgICAgHCDQoCAgIDgAFEEQCAAIAEQDwwBCyAIKQMAIQogBiAENwM4IAYgAzcDMCAGIAk3AyggBiAKNwMgIAAgASAIKQMIQQQgBkEgahAvIQEgACAJEA8gAUK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MIgBBAE4EQCAArQ8LQoCAgIDAfiAAuL0iAUKAgICAwIGA/P8AfSABQv///////////wCDQoCAgICAgID4/wBWGwtZAQF/IAAgASAEQSZqEEsiAkUEQEKAgICA4AAPCyACQQRqIQMgAigCCCEEA34gAyAERgR+QoCAgIAwBSAEQRBrIQUgBCgCBCEEIAAoAhAgAiAFEPwEDAELCwsVACAAIAMQDyAAIAQQDyAAELUCQX8LhgEAIAAgASAEQSZqEEsiAkUEQEKAgICA4AAPCyAAIAIgAykDACIBQgAgAUIgiKdBB2tBbk8bIAEgAUKAgICAwIGA/P8AfEL///////////8Ag1AbEPUCIgBFBEBCgICAgDAPCyAAKQMoIgFCIIinQXVPBEAgAaciACAAKAIAQQFqNgIACyABC3UAIAAgASAEQSZqEEsiAkUEQEKAgICA4AAPCyAAIAIgAykDACIBQgAgAUIgiKdBB2tBbk8bIAEgAUKAgICAwIGA/P8AfEL///////////8Ag1AbEPUCIgNFBEBCgICAgBAPCyAAKAIQIAIgAxD8BEKBgICAEAthACAAIAEgBEEmahBLIgJFBEBCgICAgOAADwsgACACIAMpAwAiAUIAIAFCIIinQQdrQW5PGyABIAFCgICAgMCBgPz/AHxC////////////AINQGxD1AkEAR61CgICAgBCEC7sFAgN+B38jAEEQayILJABCgICAgOAAIQcCQCAAIAEgBEEmahBLIgJFDQAgAigCAEUgAykDACIFQgAgBUIgiKdBB2tBbk8bIAUgBUKAgICAwIGA/P8AfEL///////////8Ag1AbIgVC/////29WckUEQCAAECQMAQtCgICAgDAhBiAEQQFxRQRAIAMpAwghBgsCQCAAIAIgBRD1AiIDBEAgACADKQMoEA8MAQsgAEEwECkiA0UNASADIAI2AgggA0IBNwMAAkAgAigCAARAIAMgBaciBCgCGDYCDCAEIAM2AhgMAQsgBUIgiKdBdUkNACAFpyIEIAQoAgBBAWo2AgALIAMgBTcDICACKAIQIgkgAigCFCIEQQFrIAUQ1wNxQQN0aiIIKAIAIgogA0EYaiIMNgIEIAMgCDYCHCADIAo2AhggCCA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y8BBkEVa0H//wNxQQxJrUKAgICAEIQFQoCAgIAQCwvqAwIEfgF/IwBBIGsiAiQAQoCAgIDgACEFAkAgACABIAQQSyIJRQ0AIAktAAQEQCAAEGsMAQsgACACQRhqIAMpAwBCACAJNAIAIgYgBhB0DQAgAiAGNwMQIAMpAwgiB0KAgICAcINCgICAgDBSBEAgACACQRBqIAdCACAGIAYQdA0BIAIpAxAhBgsgAikDGCEIIAAgAUKAgICAMBDjASIHQoCAgIBwgyIFQoCAgIDgAFEEQCAHIQUMAQsgBiAIfSIGQgAgBkIAVRshBgJAIAVCgICAgDBRBEAgAEKAgICAMCAGIAQQ3AMhBQwBCyACIAYiBUKAgICACFoEfkKAgICAwH4gBrm9IgVCgICAgMCBgPz/AH0gBUL///////////8Ag0KAgICAgICA+P8AVhsFIAULNwMIIAAgB0EBIAJBCGoQpwEhBSAAIAcQDyAAIAIpAwgQDwsgBUKAgICAcINCgICAgOAAUQ0AAkAgACAFIAQQSyIDRQ0AIAAgBSABEFIEQCAAQc/GAEEAEBUMAQsCQCADLQAEDQAgAzQCACAGUwRAIABBs9QAQQAQFQwCCyAJLQAEDQAgAygCCCAJKAIIIAinaiAGpxAfGgwCCyAAEGsLIAAgBRAPQoCAgIDgACEFCyACQSBqJAAgBQsOACAAELUCQoCAgIDgAAtdACAAIAEgAhBLIgBFBEBCgICAgOAADwsgACgCACIAQQBOBEAgAK0PC0KAgICAwH4gALi9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhsLOQEBfkKAgICAwH4gASkDACICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCzsBAX5CgICAgMB+IAEqAgC7vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCwwAIAAgASkDABD7AwsMACAAIAEpAwAQhwILSQEBfiABKAIAIgBBAE4EQCAArQ8LQoCAgIDAfiAAuL0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGws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sgAygCDCIHQf////8HRg0CIAYCfkIAIAdBAEwNABogAygCCA0DIAdBwABLDQMgAygCFCILIAMoAhAiA0ECdGpBBGsoAgAhBSAFQSAgB2t2rSAHQSBNDQAaQgAhDSADQQJPBH4gA0ECdCALakEIazUCAAVCAAsgBa1CIIaEQcAAIAdrrYgLNwMQQQALIQdEAAAAAAAAAAAhDEEACyEDQX8hBQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAJLwEGQRVrDgsBAAEDBAYHCwwJCg8LIANFDQ4gBikDECINQoABfEKAAloNDgwBCyADRQ0NIAYpAxAiDUL/AVYNDQsgCSgCJCEAIARBAUYEQCANp0H//wNxIQMgBigCHCEFA0AgAiAFRg0NIAMgACAFai0AAEYNDiAFIAhqIQUMAAsACyAAIAYoAhwiAmogDadB//8DcSAKIAJrEPsBIgJFDQwgAiAAayEFDAwLIANFDQsgBikDECINQoCAAnxCgIAEWg0LDAELIANFDQogBikDECINQv//A1YNCgsgCSgCJCEAIAYoAhwhBSANp0H//wNxIQMDQCACIAVGDQkgACAFQQF0ai8BACADRg0KIAUgCGohBQwACwALIANFDQggBikDECINQoCAgIAIfEKAgICAEFoNCAwBCyADRQ0HIAYpAxAiDUL/////D1YNBwsgDachACAJKAIkIQMgBigCHCEFA0AgAiAFRg0GIAMgBUECdGooAgAgAEYNByAFIAhqIQUMAAsACyAHRQ0FIAy9Qv///////////wCDQoGAgICAgID4/wBaBEAgBEF/Rw0HIAkoAiQhACAGKAIcIQUDQCACIAVGDQYgACAFQQJ0aigCAEH/////B3FBgICA/AdLDQcgBSAIaiEFDAALAAsgDCAMtiIOu2INBSAJKAIkIQAgBigCHCEFA0AgAiAFRg0FIAAgBUECdGoqAgAgDlsNBiAFIAhqIQUMAAsACyAHRQ0EIAkoAiQhACAMvUL///////////8Ag0KBgICAgICA+P8AWgRAIARBf0cNBiAGKAIcIQUDQCACIAVGDQUgACAFQQN0aikDAEL///////////8Ag0KAgICAgICA+P8AVg0GIAUgCGohBQ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vAQZB5aYBai0AAA4EAAECAwQLIAAoAiQiACACaiECA0AgACACQQFrIgJPDQUgAC0AACEDIAAgAi0AADoAACACIAM6AAAgAEEBaiEADAALAAsgACgCJCIAIAJBAXRqIQIDQCAAIAJBAmsiAk8NBCAALwEAIQMgACACLwEAOwEAIAIgAzsBACAAQQJqIQAMAAsACyAAKAIkIgAgAkECdGohAgNAIAAgAkEEayICTw0DIAAoAgAhAyAAIAIoAgA2AgAgAiADNgIAIABBBGohAAwACwALIAAoAiQiACACQQN0aiECA0AgACACQQhrIgJPDQIgACkDACEEIAAgAikDADcDACACIAQ3AwAgAEEIaiEADAALAAsQAQALIAFCIIinQXVPBEAgAaciACAAKAIAQQFqNgIACyABC4cCAgZ+An8jAEEgayILJABCgICAgDAhBgJAAkAgACABEJIBIgxBAEgNACAAIAMpAwAiCBBgDQBCgICAgDAhByACQQJOBEAgAykDCCEHCyAMrSEJA0AgBSAJUgRAIAAgASAFEE0iBkKAgICAcINCgICAgOAAUQ0CIAsgATcDECALIAU3AwggCyAGNwMAIAAgCCAHQQMgCxAhIgpCgICAgHCDQoCAgIDgAFENAiAAIAoQJgRAIARFBEAgBiEFDAULIAAgBhAPDAQFIAAgBhAPIAVCAXwhBQwCCwALC0L/////D0KAgICAMCAEGyEFDAELIAAgBhAPQoCAgIDgACEFCyALQSBqJAAgBQufBQIEfwJ+IwBBIGsiBCQAQoCAgIDgACEIAkAgACABEJIBIgZBAEgNAAJAIAGnIgUvAQYiB0EVRgRAIAMpAwAiCUIgiKdBdU8EQCAJpyIHIAcoAgBBAWo2AgALIAAgBEEIaiAJEMQFDQIgBCAENAIINwMQDAELIAdBG00EQCAAIARBCGogAykDABB3DQIgBCAENQIINwMQDAELIAdBHU0EQCAAIARBEGogAykDABD/BEUNAQwCCyAAIARBCGogAykDABBCDQEgBAJ+IAUvAQZBHkYEQCAEKwMItrytDAELIAQpAwgLNwMQCyAEQQA2AggCQCACQQFMBEAgBCAGNgIcDAELIAAgBEEIaiADKQMI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AUg0BDAMLIAAgASAKIAVBOGoQhQEiAkEASA0CIAJFDQELIApCgICAgAh8Qv////8PWAR+IApC/////w+DBUKAgICAwH4gCrm9IgpCgICAgMCBgPz/AH0gCkL///////////8Ag0KAgICAgICA+P8AVhsLIgtCgICAgHCDQoCAgIDgAFENASAFIAk3AxAgBSABNwMoIAUgCzcDICAFIAUpAzgiDzcDGCAAIA1CgICAgDBBBCAFQRBqECEhCiAAIAsQDyAAIA8QDyAFQoCAgIAwNwM4IApCgICAgHCDQoCAgIDgAFENASAAIAkQDyAKIQkLIAhCAXwhCAwBCwsgBSAJNwMwIAUpAzghCwsgACAFKQMwEA8gACALEA9CgICAgOAAIQkLIAAgARAPIAVBQGskACAJC6wIAgN/CX4jAEEwayIFJABCgICAgDAhCSAFQoCAgIAwNwMoAkACQAJAAkAgBEEIcSIHBEAgAUIgiKdBdU8EQCABpyIGIAYoAgBBAWo2AgALIAUgACABEJIBIgasNwMIIAZBAE4NAQwCCyAAIAVBCGogACABECUiARA8DQELIAMpAwAhD0KAgICAMCEOIAJBAk4EQCADKQMIIQ4LIAAgDxBgDQACQAJAAkACQAJAAkACQCAEDg0FAAYBAgYGBgUABgMEBgtCgICAgBAhCQwFCyAAIAECfiAFKQMIIghCgICAgAh8Qv////8PWARAIAhC/////w+DDAELQoCAgIDAfiAIub0iCEKAgICAwIGA/P8AfSAIQv///////////wCDQoCAgICAgID4/wBWGwsQqwIiCUKAgICAcINCgICAgOAAUg0EDAULIAAgAUIAEKsCIglCgICAgHCDQoCAgIDgAFINAwwECyAFIAE3AxAgBSAFNQIINwMYIABBAiAFQRBqEPYCIglCgICAgHCDQoCAgIDgAFINAgwDCyAAED4iCUKAgICAcINCgICAgOAAUg0BQoCAgIDgACEJDAILQoGAgIAQIQkLQgAhCCAFKQMIIgpCACAKQgBVGyEQA0AgCCAQUgRAAkACQCAHBEAgBSAAIAEgCBBzIgo3AyggCkKAgICAcINCgICAgOAAUg0BDAULIAAgASAIIAVBKGoQhQEiAk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AIAUQzQEhBSAEBEAgABA+IgdCgICAgHCDQoCAgIDgAFENASAAIAdBACAFEKUBGiAAIAdBASAAIAYQzQEQpQEaIAchAQwCCyAAIAYQDyAFIQEMAQsgACAFEA8gACAGEA8LIAJBIGokACABC64CAgN+An8jAEEwayICJABCgICAgOAAIQECQCAAEJcBIgVCgICAgHCDQoCAgIDgAFENAAJAIAAQlwEiBkKAgICAcINCgICAgOAAUQ0AIAAgAkEcaiADKQMAELsBIghFDQAgACACQQhqIAMpAwgQuwEiA0UEQCAAIAggAkEcahBeDAELIAWnQQRqIAanQQRqIAggAyAEQQ9xEOQDIQkgACAIIAJBHGoQXiAAIAMgAkEIahBeIAkEQCAAIAkQhAIMAQsgACAFEM0BIQUgBEEQcQRAIAAQPiIHQoCAgIBwg0KAgICA4ABRDQEgACAHQQAgBRClARogACAHQQEgACAGEM0BEKUBGiAHIQEMAgsgACAGEA8gBSEBDAELIAAgBRAPIAAgBhAPCyACQTBqJAAgAQvDAgIBfgJ/IwBBMGsiAiQAQoCAgIDgACEBAkAgACACQShqIAMpAwAQpgENACAAEJcBIgVCgICAgHCDQoCAgIDgAFENACAAIAJBFGogAykDCBC7ASIGRQRAIAAgBRAPDAELIAAoAtgBIQMgAkIANwIMIAJCgICAgICAgICAfzcCBCACIAM2AgAgAkIBEDAaIAIgAikDKCIBpyIHQf////8DQQEQzAEaIAIgAkJ/Qf////8DQQEQdRogBadBBGoiAyAGIAIQkwUaAkAgBEUgAVByDQAgAkIBEDAaIAIgB0EBa0H/////A0EBEMwBGiADIAIQ0wFBAEgNACACQgEQMBogAiAHQf////8DQQEQzAEaIAMgAyACQf////8DQQEQ5AEaCyACEBsgACAGIAJBFGoQXiAAIAUQzQEhAQsgAkEwaiQAIAEL6hMCAn4BfyMAQdABayIEJAAgACAEEJgFIAEgARA0IgNBqi0CfiAEKQMIIgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANB3+AAAn4gBCkDECICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQboqAn4gBCkDGCICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQagqAn4gBCkDICICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQfooAn4gBCkDKCICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQfrfAAJ+IAQpAzAiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0HYKAJ+IAQpAzgiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0G23wACfiAEKQNAIgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANBzSkCfiAEKQNIIgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANBl+AAAn4gBCkDUCICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQeIoAn4gBCkDWCICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQc/fAAJ+IAQpA2AiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0GGKgJ+IAQpA2giAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0Gt4AACfiAEKQNwIgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANBxyoCfiAEKQN4IgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANB8OAAAn4gBCkDgAEiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0HN4AACfiAEKQOIASICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQZIqAn4gBCkDkAEiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0G44AACfiAEKQOYASICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQdUqAn4gBCkDoAEiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0HvJwJ+IAQpA6gBIgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANB6icCfiAEKQOwASICQoCAgIAIfEL/////D1gEQCACQv////8PgwwBC0KAgICAwH4gArm9IgJCgICAgMCBgPz/AH0gAkL///////////8Ag0KAgICAgICA+P8AVhsLEEAgASADQeszAn4gBCkDuAEiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAEgA0H7JwJ+IAQpA8ABIgJCgICAgAh8Qv////8PWARAIAJC/////w+DDAELQoCAgIDAfiACub0iAkKAgICAwIGA/P8AfSACQv///////////wCDQoCAgICAgID4/wBWGwsQQCABIANBo98AAn4gBCkDyAEiAkKAgICACHxC/////w9YBEAgAkL/////D4MMAQtCgICAgMB+IAK5vSICQoCAgIDAgYD8/wB9IAJC////////////AINCgICAgICAgPj/AFYbCxBAIAMQUyEAIARB0AFqJAAgAAufAgEDfiABQv////9vWARAIAAQJEKAgICA4AAPC0KAgICA4AAhBQJ+IAAgAUE2IAFBABAUIgRCgICAgHCDQoCAgIAwUQRAIABBlAEQLQwBCyAAIAQQNwsiBEKAgICAcIMiBkKAgICA4ABSBH4CfiAAIAFBMyABQQAQFCIBQoCAgIBwg0KAgICAMFEEQCAAQS8QLQwBCyAAIAEQNwsiAUKAgICAcIMiBUKAgICA4ABRBEAgACAEEA9CgICAgOAADwsCQCAGQoCAgICQf1EEQCAEpygCBEH/////B3FFDQELIAVCgICAgJB/UQRAIAGnKAIEQf////8HcUUNAQsgAEHMngEgBEH4mQEQvgEhBAsgACAEIAEQxAIFQoCAgIDgAAsLXwEBfwJAIAFFBEAgAkUNASAAIAIQ2QMPCyACRQRAIAAgACgCAEEBazYCACAAIAAoAgRBCGs2AgQgARCbAQwBCyAAKAIIIAAoAgQgAmpPBH8gASACEPMFBUEACw8LQQALJgAgAQRAIAAgACgCAEEBazYCACAAIAAoAgRBCGs2AgQgARCbAQsLCQAgACABNgIYCygBAX8CQCABpygCICIDRQ0AIAMoAgBBBEYNACAAIANBCGogAhDvAwsLPwEBfwJAIAFCgICAgHBUDQAgAaciAi8BBkEvRw0AIAIoAiAiAkUNACAAIAIQ7AMgAEEQaiACIAAoAgQRAAALC0cBAX8CQCABpygCICIDRQ0AIAMpAwAiAUKAgICAYFoEQCAAIAGnIAIRAAALIAMpAwgiAUKAgICAYFQNACAAIAGnIAIRAAALCzABAX8gAacoAiAiAgRAIAAgAikDABAjIAAgAikDCBAjIABBEGogAiAAKAIEEQAACwsnAQF/IAGnKAIgIgIEQCAAIAIpAwAQIyAAQRBqIAIgACgCBBEAAAsLWgECfyABpygCICICBEACQCACKQMAIgFCgICAgHBUDQAgAactAAVBAnENACACKAIMIgNFDQAgACADEOoDIAIpAwAhAQsgACABECMgAEEQaiACIAAoAgQRAAALC3gBA38CQCABpygCICIERQ0AIARBCGohAyAEQQRqIQUDQCADKAIAIgMgBUYNAQJAIAQoAgANACADKQMQIgFCgICAgGBUDQAgACABpyACEQAACyADKQMYIgFCgICAgGBaBEAgACABpyACEQAACyADQQRqIQMMAAsACwuaAQEGfyABpygCICIDBEAgAEEQaiEEIANBBGohBiADKAIIIQIDQCACIAZHBEAgAigCBCEHIAJBEGshBSACQQxrKAIARQRAAkAgAygCAARAIAUQnwUMAQsgACACKQMQECMLIAAgAikDGBAjCyAEIAUgACgCBBEAACAHIQIMAQsLIAQgAygCECAAKAIEEQAAIAQgAyAAKAIEEQAACwuUAgEFfwJAIAFCgICAgHBUDQAgAaciAy8BBkElRw0AIAMoAiAiBUUNAEEAIQMDQAJAIANBE0YEQEEAIQQMAQsgBSADQQJ0aigCCCIEBEAgACAEIAIRAAALIANBAWohAwwBCwsDQCAF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AEKAIoIANLBEAgBCgCJCADQQN0aikDACIBQoCAgIBgWgRAIAAgAacgAhEAAAsgA0EBaiEDDAELCwtGAQN/IAGnIQMDQCADKAIkIQQgAiADKAIoT0UEQCAAIAQgAkEDdGopAwAQIyACQQFqIQIMAQsLIABBEGogBCAAKAIEEQAAC2kBAn8jAEEQayIHJAACfwJAIAGnIggtAAVBCHFFDQAgACAHQQxqIAIQrAFFDQAgBygCDCAIKAIoTw0AQX8gACAIEJIDDQEaCyAAIAEgAiADIAQgBSAGQYCACHIQbQshACAHQRBqJAAgAAuBAgIDfwF+AkACQCACQQBODQAgAacpAyAiCkKAgICAcINCgICAgJB/Ug0AIAJB/////wdxIgggCqciBykCBCIKp0H/////B3FPDQACQEEEIAYQkwNFDQBBASECIAZBgMAAcUUNAiADQoCAgIBwg0KAgICAkH9SDQAgA6ciCSkCBCIBQv////8Hg0IBUg0AIAdBEGohBwJ/IApCgICAgAiDUEUEQCAHIAhBAXRqLwEADAELIAcgCGotAAALAn8gAUKAgICACINQRQRAIAkvARAMAQsgCS0AEAtGDQILIAAgBkHh6QAQbw8LIAAgASACIAMgBCAFIAZBgIAIchBtIQILIAILRgACfwJAIAJBAE4NACABpykDICIBQoCAgIBwg0KAgICAkH9SDQBBACACQf////8HcSABpygCBEH/////B3FJDQEaC0EBCwuzAQECfwJAIANBAE4NACACpykDICICQoCAgIBwg0KAgICAkH9SDQAgA0H/////B3EiAyACpyIEKQIEIgKnQf////8HcU8NAEEBIQUgAUUNACAEQRBqIQQCfyACQoCAgIAIg1BFBEAgBCADQQF0ai8BAAwBCyADIARqLQAACyEDIAFBBDYCACAAIANB//8DcRCfAyECIAFCgICAgDA3AxggAUKAgICAMDcDECABIAI3AwgLIAULWwECfyABpygCECIAQTBqIQMgACAAKAIYIAJxQX9zQQJ0aigCACEAA0ACQCAARQ0AIAMgAEEBa0EDdGoiBCgCBCACRg0AIAQoAgBB////H3EhAAwBCwsgAEEARws1AQF+IAEpAwAiAkIgiKdBdU8EQ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QaiQAQX8gACABRyAAIAFLGwvaAwICfgF/IwBBIGsiBSQAAkACQCAAIAFBLBBLIgJFDQBCgICAgDAhAQJAIAIpAwAiBkKAgICAcINCgICAgDBSBEACfwJAIAanIgMvAQZBFWtB//8DcUEKTQRAIAMoAiAoAgwoAiAtAARFDQEgABBrDAULIAAgBUEcaiAGENYBDQQgBUEcagwBCyADQShqCyEIIAIoAgwiAyAIKAIASQ0BIAAgAikDABAPIAJCgICAgDA3AwALIARBATYCAAwCCyACIANBAWo2AgwgBEEANgIAIAIoAghFBEAgA0EATgRAIAOtIQEMAwtCgICAgMB+IAO4vSIBQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbIQEMAgtCgICAgOAAIQEgACACKQMAIAMQsAEiBkKAgICAcINCgICAgOAAUQ0BIAIoAghBAUYEQCAGIQEMAgsgBSAGNwMIIAUgA0EATgR+IAOtBUKAgICAwH4gA7i9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhsLIgc3AwAgAEECIAUQiQMhASAAIAYQDyAAIAcQDwwBCyAEQQA2AgBCgICAgOAAIQELIAVBIGokACABCxAAIwAgAGtBcHEiACQAIAALBgAgACQACwQAIwAL7gICBH8CfiMAQRBrIgMkAAJAAkAgAikDECIHQoCAgIBwg0KAgICAkH9SBEAgAEGDlAFBABAVDAELIAIpAxghCCAAIAcQswEiBEUEQEEAIQQMAQsgACAIELMBIgZFDQACQCAAIAQgBhDJBSIBRQ0AIAAgARD+A0EASARAIABBARCPBAwBCyABIAEoAgBBAWo2AgAgACABrUKAgICAUIQgACkDwAFBAEEAEMgFIgdCgICAgHCDQoCAgIDgAFENACAAIAcQDyABIQULIAAgBhBUIAVFDQAgAyAAIAUQjQMiBzcDACAHQoCAgIBwg0KAgICA4ABRDQAgACAAIAIpAwBCgICAgDBBASADECEQDyAAIAMpAwAQDwwBCyAAKAIQIgEpA4ABIQcgAUKAgICAIDcDgAEgAyAHNwMIIAAgACACKQMIQoCAg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//7//A00EQCADQYCAwPIDSQ0CIAIgASABoCABIAGiIAFEAAAAAAAA8D+go6GiDwsgAiABIAEgAUQAAAAAAADwP6CjoKIPCyABIAIgAqAQjQYhAAsgAAvLAQECfyMAQRBrIgEkAAJAIAC9QiCIp0H/////B3EiAkH7w6T/A00EQCACQYCAwPIDSQ0BIABEAAAAAAAAAABBABDPAiEADAELIAJBgIDA/wdPBEAgACAAoSEADAELAkACQAJAAkAgACABEJwEQQNxDgMAAQIDCyABKwMAIAErAwhBARDPAiEADAMLIAErAwAgASsDCBDQAiEADAILIAErAwAgASsDCEEBEM8CmiEADAELIAErAwAgASsDCBDQApohAAsgAUEQaiQAIAALoQEBBH8gAiAAKAJUIgMoAgQiBCADKAIAIgVrIgZBACAEIAZPGyIESwRAIAAgACgCAEEQcjYCACAEIQILIAEgAygCDCAFaiACEB8aIAMgAygCACACaiIFNgIAIAAgACgCLCIBNgIEIAAgASAEIAJrIgQgACgCMCIAIAAgBEsbIgBqNgIIIAEgAygCDCAFaiAAEB8aIAMgAygCACAAajYCACACC4sBAQF/IwBBEGsiAyQAAn4CQCACQQNPDQAgACgCVCEAIANBADYCBCADIAAoAgA2AgggAyAAKAIENgIMQQAgA0EEaiACQQJ0aigCACICa6wgAVUNACAAKAIIIAJrrCABUw0AIAAgAiABp2oiADYCACAArQwBC0Gg1ARBHDYCAEJ/CyEBIANBEGokACABC6IBAgF8AX8gAJkhAQJ8IAC9QoCAgIDw/////wCDQiCIpyICQcHcmP8DTQRARAAAAAAAAPA/IAJBgIDA8gNJDQEaIAEQlwIiACAAoiAARAAAAAAAAPA/oCIAIACgo0QAAAAAAADwP6APCyACQcHcmIQETQRAIAEQ6wMiAEQAAAAAAADwPyAAo6BEAAAAAAAA4D+iDwsgAUQAAAAAAADwPxCNBgsLxwEBAn8jAEEQayIBJAACfCAAvUIgiKdB/////wdxIgJB+8Ok/wNNBEBEAAAAAAAA8D8gAkGewZryA0kNARogAEQAAAAAAAAAABDQAgwBCyAAIAChIAJBgIDA/wdPDQAaAkACQAJAAkAgACABEJwEQQNxDgMAAQIDCyABKwMAIAErAwgQ0AIMAwsgASsDACABKwMIQQEQzwKaDAILIAErAwAgASsDCBDQApoMAQsgASsDACABKwMIQQEQzwILIQAgAUEQaiQAIAALBQAgAJwLBQAgAJsLgwIDAnwCfwF+IAC9IgVCIIinQf////8HcSIDQYCAwP8HTwRAIAAgAKAPC0GT8f3UAiEEAkAgA0H//z9NBEBBk/H9ywIhBCAARAAAAAAAAFBDor0iBUIgiKdB/////wdxIgNFDQELIAVCgICAgICAgICAf4MgA0EDbiAEaq1CIIaEvyICIAKiIAIgAKOiIgEgASABoqIgAUTX7eTUALDCP6JE2VHnvstE6L+goiABIAFEwtZJSmDx+T+iRCAk8JLgKP6/oKJEkuZhD+YD/j+goCACor1CgICAgHyDQoCAgIAIfL8iASAAIAEgAaKjIgAgAaEgASABoCAAoKOiIAGgIQALIAALewMBfAF+AX8gAJkhAQJAAnwgAL0iAkI0iKdB/w9xIgNB/QdNBEAgA0HfB0kNAiABIAGgIgAgACABokQAAAAAAADwPyABoaOgDAELIAFEAAAAAAAA8D8gAaGjIgAgAKALEKcDRAAAAAAAAOA/oiEBCyABmiABIAJCAFMbC6gDAgV/AX4gAL1C////////////AINCgYCAgICAgPj/AFQgAb1C////////////AINCgICAgICAgPj/AFhxRQRAIAAgAaAPCyABvSIHQiCIpyICQYCAwP8DayAHpyIFckUEQCAAEJ0EDwsgAkEedkECcSIGIAC9IgdCP4inciEDAkAgB0IgiKdB/////wdxIgQgB6dyRQRAAkACQCADQQJrDgIAAQMLRBgtRFT7IQlADwtEGC1EVPshCcAPCyACQf////8HcSICIAVyRQRARBgtRFT7Ifk/IACmDwsCQCACQYCAwP8HRgRAIARBgIDA/wdHDQEgA0EDdEHQqgRqKwMADwsgBEGAgMD/B0cgAkGAgIAgaiAET3FFBEBEGC1EVPsh+T8gAKYPCwJ8IAYEQEQAAAAAAAAAACAEQYCAgCBqIAJJDQEaCyAAIAGjmR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kwgAyAENgJIIANCADcCQCADQoCAgICAgICAgH83AjggAyAENgI0IANB3ABqIgEgAUJ/Qf////8DQQAQdRogBUEAIAVBAEobIQkgAiAFaiACIAVBAXRuQQFqIgpBAXRqQSBqIQJBACEBA0AgASAJRkUEQCADQcgAaiIHIANB3ABqIghCASACQQAQdRogA0E0aiILIAcgAkEGEJEGIAcgC0IBIAJBABB1GiAIIAggByACQQAQlQEaIAFBAWohAQwBCwsgA0IANwIsIANCgICAgICAgICAfzcCJCADIAQ2AiAgA0IANwIYIANCgICAgICAgICAfzcCECADIAQ2AgwgA0EgaiIBIANB3ABqIgRCAiACQQAQdRogASAEIAEgAkEAEJUBGiADQQxqIAEgASACQQAQQxogAEIAEDAaIAqsIQwDQCAMQgBXRQRAIANByABqIgFCARAwGiADQTRqIgQgDKdBAXRBAXKsEDAaIAEgASAEIAJBABCVARogACAAIAEgAkEAEMsBGiAAIAAgA0EMaiACQQAQQxogDEIBfSEMDAELCyAAIABCASACQQAQdRogACAAIANBIGoiASACQQAQQxogARAbIANBDGoQGyADQTRqEBsgA0HIAGoQGyAAIAVBAWpB/////wNBARDMARogA0HcAGoiASACQQYQ0wIgASABIAasIAJBABDUAiAAIAAgASACQQAQywEaIAEQGyADQfAAaiQAQRAPC0HY/QBB1PwAQdciQajWABAAAAsRACAAIAEgAiADIARBABCWBgsRACAAIAEgAiADIARBARCWBgvYAwEHfyACKAIEIAEoAgRzIQcCQAJAAkACQAJAAkACQCABKAIIIgZB/f///wdMBEAgAigCCCIFQf3///8HSg0BIAZBgICAgHhHDQYgBUGAgICAeEYNBAwHCyAGQf////8HRg0BIAIoAgghBQsgBUH/////B0cNAQsgABA1QQAPCyAGQf7///8HRyIBIAVB/v///wdHcg0BCyAAEDVBAQ8LIAENASAAIAcQjAFBAA8LIAVBgICAgHhGBEAgACAHEIwBQQIPCwJAIAAoAgAiBSgCAEEAIAEoAgwiBiADQSFqQQV2IgggBiAIShsiCiACKAIMIghqIglBAnRBBGogBSgCBBEBACIGBEAgBkEAIAkgASgCDGtBAnQiCxArIgYgC2ogASgCECABKAIMQQJ0EB8aIAAgCkEBahBBRQRAIAUgACgCECAGIAkgAigCECAIEKUERQ0CCyAFKAIAIAZBACAFKAIEEQEAGgsgABA1QSAPCyAGIAgQqAMEQCAAKAIQIgUgBSgCAEEBcjYCAAsgACgCACIFKAIAIAZBACAFKAIEEQEAGiACKAIIIQIgASgCCCEBIAAgBzYCBCAAIAEgAmtBIGo2AgggACADIAQQswIPCyAAIAcQiQFBAAtYAQF+IAAgAykDABD9AUEAR61CgICAgBCEIQQgAUKAgICAcINCgICAgDBRBEAgBA8LIAAgAUEGEGUiAUKAgICAcINCgICAgOAAUgRAIAAgASAEENsBCyABC5MCAgF+AX8jAEEQayIFJAACQAJAIAJFBEAMAQsgACADKQMAELkCIgRCgICAgHCDQoCAgIDgAFENAQJAAkAgBEIgiKdBC2oOAwEAAAILIASnQQRqIAVBCGoQtQUgACAEEA9CgICAgMB+IAUpAwgiBEKAgICAwIGA/P8AfSAEQv///////////wCDQoCAgICAgID4/wBWGyEEDAELIAAgBBA3IgRCgICAgHCDQoCAgIDgAFENASAAIAQQjQEiBEKAgICAcINCgICAgOAAUQ0BCyABQoCAgIBwg0KAgICAMFENACAAIAFBBBBlIgFCgICAgHCDQoCAgIDgAFIEQCAAIAEgBBDbAQsgASEECyAFQRBqJAAgBAs7AQF/A0AgAgRAIAAtAAAhAyAAIAEtAAA6AAAgASADOgAAIAFBAWohASAAQQFqIQAgAkEBayECDAELCwsaACAALQAAIQIgACABLQAAOgAAIAEgAjoAAAtCAQF/IAJBAXYhAgNAIAIEQCAALwEAIQMgACABLwEAOwEAIAEgAzsBACABQQJqIQEgAEECaiEAIAJBAWshAgwBCwsLGgAgAC8BACECIAAgAS8BADsBACABIAI7AQALQgEBfyACQQJ2IQIDQCACBEAgACgCACEDIAAgASgCADYCACABIAM2AgAgAUEEaiEBIABBBGohACACQQFrIQIMAQsLCxoAIAAoAgAhAiAAIAEoAgA2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AIAAgARAlIgFCgICAgHCDQoCAgIDgAFENAiAAIAQgAUKAgICAMEEBENQFDQIgACABEA8LIAJBAWohAgwACwALIAAgBBAPIAAgARAPQoCAgIDgAAsYACAAIAMpAwAgAykDCBBSrUKAgICAEIQL4gICA34DfyMAQSBrIgIkAEKAgICA4AAhBCAAIAMpAwAQJSIFQoCAgIBwg0KAgICA4ABSBEBCgICAgDAhAQJAAkAgACACQRxqIAJBGGogBadBAxCOAQ0AQoCAgIDgACEBIAAQNCIEQoCAgIBwg0KAgICA4ABRDQAgAigCHCEHIAIoAhghCEEAIQMDQCADIAhHBEACQAJAIAAgByADQQN0aiIJKAIEEFwiAUKAgICAcINCgICAgOAAUQ0AIAIgATcDCCACIAU3AwAgACAEIAAgAkEAEMYEIQYgACABEA8gBkKAgICAcIMiAUKAgICAMFENASABQoCAgIDgAFENACAAIAQgCSgCBCAGQYeAARAZQQBODQELIAQhAQwDCyADQQFqIQMMAQsLIAAgByAIEFogBSEBDAELIAAgAigCHCACKAIYEFogACAFEA9CgICAgOAAIQQLIAAgARAPCyACQSBqJAAgBAsQACAAIAMpAwBBESAEEKoCCxAAIAAgAykDAEECQQAQqgILEAAgACADKQMAQQFBABCqAgtHAQF+QoCAgIDgACEEIAAgAykDACIBIAMpAwgQrgYEfkKAgICA4AAFIAFCIIinQXVPBEAgAaciACAAKAIAQQFqNgIACyABCwtBACAAIAMpAwAiASADKQMIQQEQiwJBAEgEQEKAgICA4AAPCyABQiCIp0F1TwRAIAGnIgAgACgCAEEBajYCAAsgAQuJAQEBfiADKQMAIgFC/////29WIAFCgICAgHCDQoCAgIAgUXJFBEAgAEG35ABBABAVQoCAgIDgAA8LAkAgACABEEciAUKAgICAcINCgICAgOAAUgRAIAMpAwgiBEKAgICAcINCgICAgDBRDQEgACABIAQQrgZFDQEgACABEA8LQoCAgIDgAA8LIAELpQQCBX8CfiMAQSBrIgUkACAAIAVBCGoiBkEAED0aIAZBKBA7GiAEQX5xQQJGBEAgBUEIakHxmQ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EgAkKAgICAMEKAgICAMCAFIAQbIAVCgICAgDAgBBtBhaoBQYWaASAEGxBtIQMgACABEA8gACACEBNCgICAgOAAQoCAgIAwIANBAEgbBUKAgICA4AALDwsgACABEA9CgICAgOAAC3IBAX5CgICAgDAhAyABQoCAgIAQhEKAgICAcINCgICAgDBRBEAgABAkQoCAgIDgAA8LIAJCgICAgHCDQoCAgIAgUiACQv////9vWHEEfkKAgICAMAVCgICAgOAAQoCAgIAwIAAgASACQQEQiwJBAEgbCwsyAQF+IAAgARAlIgFCgICAgHCDQoCAgIDgAFEEQCABDwsgACABEOgBIQIgACABEA8gAgugAQIBfgF/IwBBIGsiAiQAQoCAgIDgACEEAkACQCAAIAEQJSIBQoCAgIBwg0KAgICA4ABRDQAgACADKQMAEDEiA0UNACAAIAIgAacgAxBMIgVBAEgNASAFRQRAQoCAgIAQIQQMAgsgAjUCACEEIAAgAhBIIARCAohCAYNCgICAgBCEIQQMAQtBACEDCyAAIAMQEyAAIAEQDyACQSBqJAAgBAvBAQECfgJAAn5CgICAgBAgAykDACIEQoCAgIBwVA0AGkKAgICA4AAgACABECUiAUKAgICAcINCgICAgOAAUQ0AGiAEpyICIAIoAgBBAWo2AgAgAachAgNAIAAgBBCMAiIEQoCAgIBwgyIFQoCAgIDgAFIEQCACIASnRiAFQoCAgIAgUXINAyAAEHtFDQELCyAAIAQQDyAAIAEQD0KAgICA4AALDwsgACAEEA8gACABEA8gBUKAgICAIFKtQoCAgIAQhAt6AQF+IAAgAykDABAxIgJFBEBCgICAgOAADwtCgICAgOAAIQQgACABECUiAUKAgICAcINCgICAgOAAUQRAIAAgAhATIAEPCyAAQQAgAacgAhBMIQMgACACEBMgACABEA9CgICAgOAAIANBAEetQoCAgIAQhCADQQBIGwsIACAAIAEQJQsPACAAIAFBN0EAQQAQrAILLQEBfkKAgICAMCECAkAgARCjAyIARQ0AIAAtABJBBHFFDQAgADUCRCECCyACCzMCAX4Bf0KAgICAMCECAkAgARCjAyIDRQ0AIAMtABJBBHFFDQAgACADKAJAEC0hAgsgAgsoAEKAgICA4AAgACADKQMAIAEQvgUiAEEAR61CgICAgBCEIABBAEgbC7cBAgF+An9CgICAgOAAIQQgACABEGAEfkKAgICA4AAFQcqZASECAkAgAaciAy8BBhDuAUUNAAJAIAMoAiAiAy8AESIFQYAIcUUNACADKAJUIgZFDQAgACAGIAMoAkgQkwIPCyAFQQR2QQNxQQFrIgNBAksNACADQQJ0QfT/AWooAgAhAgsgACACIAAgAUE2IAFBABAUIgFCgICAgHCDQoCAgIAwUQR+IABBLxAtBSABC0G+GRC+AQsL6QUDA34GfwN8AkACfkKAgICA4AAgACABEGANABpCgICAgOAAIAAgACkDMEEOEEkiBUKAgICAcINCgICAgOAAUQ0AGiAFpyIKIAFCgICAgHBaBH8gAactAAVBEHEFQQALIAotAAVB7wFxcjoABSAAQQEgAiACQQFMGyILQQFrIghBA3RBGGoQKSIHRQ0BIAFCIIinQXVPBEAgAaciAiACKAIAQQFqNgIACyAHIAE3AwAgAykDACIEQiCIp0F1TwRAIASnIgIgAigCAEEBajYCAAsgByAINgIQIAcgBDcDCEEAIQIDQCACIAhHBEAgAyACQQFqIglBA3RqKQMAIgRCIIinQXVPBEAgBKciDCAMKAIAQQFqNgIACyAHIAJBA3RqIAQ3AxggCSECDAELCyAKIAc2AiAgAUL/////b1gEQCAAECQMAgsgAEEAIAGnQTAQTCICQQBIDQFCACEEAkAgAkUNACAAIAFBMCABQQAQFCIGQoCAgIBwg0KAgICA4ABRDQIgBkL/////D1gEQCAGpyICIAhrQQAgAiALThutIQQMAQsgBkIgiKdBB2tBbU0EQAJAIAZCgICAgMCBgPz/AHwiBEL///////////8Ag0KAgICAgICA+P8AVg0AIAS/nSIOIAi3Ig9lDQAgDiAPoSENCyANvSIEAn8gDZlEAAAAAAAA4EFjBEAgDaoMAQtBgICAgHgLIgK3vVEEQCACrSEEDAILQoCAgIDAfiAEQoCAgIDAgYD8/wB9IARC////////////AINCgICAgICAgPj/AFYbIQQMAQsg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AKIAggBxCGAUEATg0BDAMLCyAJQoCAgIAIfEL/////D1gEfiAJQv////8PgwVCgICAgMB+IAm5vSIFQoCAgIDAgYD8/wB9IAVC////////////AINCgICAgICAgPj/AFYbCyEGIAEhBSAAIApBMCAGEEVBAEgNAgsgCiEFDAILIAEhBQsgACAKEA9CgICAgOAAIQELIAAgBRAPIA5BMGokACABC+ICAwJ+BX8BfCMAQSBrIgUkAAJAIAIoAgQNACACKAIAIQYCQAJAAn8gAigCCARAIAAgAUEIEGFFDQIgBSAAKQMANwMQIAUgASkDADcDGCAGIAIpAxBCgICAgDBBAiAFQRBqECEiA0KAgICAcINCgICAgOAAUQ0DIANC/////w9YBEAgA6ciAkEfdSACQQBHcgwCCyAGIAVBCGogAxBuQQBIDQMgBSsDCCIKRAAAAAAAAAAAZCAKRAAAAAAAAAAAY2sMAQsgACgCCCIIRQRAIAYgACkDABAoIgNCgICAgHCDQoCAgIDgAFENAyAAIAOnIgg2AggLIAEoAggiCQR/IAgFIAYgASkDABAoIgNCgICAgHCDQoCAgIDgAFENAyABIAOnIgk2AgggACgCCAsgCRCDAgsiBw0CCyAAKQMQIgMgASkDECIEVSADIARTayEHDAELIAJBATYCBAsgBUEgaiQAIAcLXQACQCABQoCAgIBwg0KAgICAMFENACAAKAIQKAKMASgCCCABp0YNACAAIAFBARBlDwsgAykDACIBQiCIpyICQQtqQRFLIAJBfnFBAkdyRQRAIAAQNA8LIAAgARAlC64FAgV+BH8jAEEwayILJAAgC0IANwIcIAsgADYCGCALIAMpAwAiBDcDKEKAgICAMCEGAkACQAJ/IARCgICAgHCDQoCAgIAwUgRAQQAhAkEAIAAgBBBgDQEaIAtBATYCIAtBACECAkAgACALQRBqIAAgARAlIgYQPARADAELQgAhBANAIAspAxAiCCAFVQRAIAkgCk8EQCAAIAIgCiAKQQF2akEfakFwcSIKQRhsIAtBDGoQqAEiA0UNAyALKAIMQRhuIApqIQogAyECC0EAIAAgBiAFIAIgCUEYbGoiDBCFASIDQQBIDQMa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AAsgACAHEA9CgICAgOAADAELIAAgBxAPIAZC/////w+DIAZCgICAgAh8Qv////8PWA0AGkKAgICAwH4gBrm9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhsLIQEgBEEgaiQAIAEL5QMCAn8GfiMAQSBrIgQkAAJ+AkAgACAEQRBqIAAgARAlIggQPA0AQn8hCQJAIAQpAxAiBkIAVw0AIARCADcDCCACQQJOBEAgACAEQQhqIAMpAwhCACAGIAYQdA0CCwJAAkAgCCAEQQRqIAQQigJFBEAgBCkDCCEBDAELIAQpAwgiASAENQIAIgcgASAHVRshCyAEKAIEIQIDQCABIAtRDQEgAykDACIHQiCIp0F1TwRAIAenIgUgBSgCAEEBajYCAAsgAiABp0EDdGopAwAiCkIgiKdBdU8EQCAKpyIFIAUoAgBBAWo2AgALIAAgByAKQQAQvAENAiABQgF8IQEMAAsACyABIAYgASAGVRshBwNAIAEgB1ENAiAAIAggASAEQRhqEIUBIgJBAEgNAyACBEAgAykDACIGQiCIp0F1TwRAIAanIgIgAigCAEEBajYCAAsgACAGIAQpAxhBABC8AQ0CCyABQgF8IQEMAAsACyABIQkLIAAgCBAPIAlC/////w+DIAlCgICAgAh8Qv////8PWA0BGkKAgICAwH4gCbm9IgFCgICAgMCBgPz/AH0gAUL///////////8Ag0KAgICAgICA+P8AVhsMAQsgACAIEA9CgICAgOAACyEBIARBIGokACABC64DAgh+AX8jAEEwayINJABCgICAgDAhBgJAAkAgACANQQhqIAAgARAlIgcQPARAQoCAgIAwIQUMAQtCgICAgDAhBSAAIAMpAwAiChBgDQBCgICAgDAhCSACQQJOBEAgAykDCCEJCyANKQMIIgVCACAFQgBVGyELA0AgCCALUgRAIAgiBUKAgICACFoEQEKAgICAwH4gCLm9IgVCgICAgMCBgPz/AH0gBUL///////////8Ag0KAgICAgICA+P8AVhshBQsgBUKAgICAcINCgICAgOAAUQ0CIAAgByAFEE0iBkKAgICAcINCgICAgOAAUQ0CIA0gATcDICANIAU3AxggDS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F1TwRAIAanIgIgAigCAEEBajYCAAsgBCAGNwMQIAAgBEEQakEIckEAEJkDIQIgBCkDGCEKIAQpAxAhCSACRQ0BC0KAgICAMCELDAYLQgAhBwNAIAAgCSAKIARBCGoQrgEiBkKAgICAcINCgICAgOAAUQ0CIAQoAggEQEKAgICAMCELDAYLAkAgBQRAIAYhAQwBCyAEIAY3AyAgBCAHQv////8PgzcDKCAAIAwgDUECIARBIGoQISEBIAAgBhAPIAFCgICAgHCDQoCAgIDgAFENAwsgACAIIAcgARBqQQBIDQIgB0IBfCEHDAALAAsgACAGECUiC0KAgICAcINCgICAgOAAUQ0CIAAgBEEIaiALEDxBAEgNAiAEAn4gBCkDCCIGQoCAgIAIfEL/////D1gEQCAGQv////8PgwwBC0KAgICAwH4gBrm9IgdCgICAgMCBgPz/AH0gB0L///////////8Ag0KAgICAgICA+P8AVhsLIgc3AyACfgJAIAFCgICAgHBUDQAgAactAAVBEHFFDQAgACABQQEgBEEgahCnAQwBCyAAQoCAgIAwQQEgBEEgahCuAwshCCAAIAcQDyAIQoCAgIBwg0KAgICA4ABRBEBCgICAgDAhCgwCC0IAIQcgBkIAIAZCAFUbIQkDQCAHIAlRBEBCgICAgDAhCkKAgICAMCEJDAULQoCAgIAwIQogACALIAcQcyIGQoCAgIBwg0KAgICA4ABRDQICQCAFBEAgBiEBDAELIAQgBjcDICAEIAdC/////w+DNwMoIAAgDCANQQIgBEEgahAhIQEgACAGEA8gAUKAgICAcINCgICAgOAAUQ0DCyAAIAggByABEGpBAEgNAiAHQgF8IQcMAAsAC0KAgICAMCELIAlCgICAgHCDQoCAgIAwUQ0DIAAgCUEBEK0BGgwDC0KAgICAMCEJDAILQoCAgIAwIQpCgICAgDAhCUKAgICAMCEIDAELIAAgCEEwIAenIgJBAE4EfiAHQv////8PgwVCgICAgMB+IAK4vSIBQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbCxBFQQBODQELIAAgCBAPQoCAgIDgACEICyAAIAsQDyAA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AGELMGIgpBAEgNBCAGQQNqIQYgCkHAAXFBgAFHBEBBACEDDAQFIAJBAWshAiAKQT9xIANBBnRyIQMMAQsACwALIAJBAWohAgwDCyAAIAEQDyAFQQhqEDYhAQwECyAGIQIgAyAHSCADQf//wwBKckUgA0GAcHFBgLADR3ENASAAQcmJARC5BAsgACABEA8gBSgCCCgCECIAQRBqIAUoAgwgACgCBBEAAEKAgICA4AAhAQwCCyAFQQhqIAMQuQEaDAALAAsgBUEgaiQAIAELNwAgACADKQMAELMBIgJFBEBCgICAgOAADwsgACACEIECIAJqQQBBCkEAELgCIQEgACACEFQgAQuHAQEBfyMAQRBrIgIkAAJAIAAgAykDABCzASIERQRAQoCAgIDgACEBDAELAn5CgICAgOAAIAAgAkEMaiADKQMIEHcNABogAigCDCIDBEBCgICAgMB+IANBJWtBXUkNARoLIAAgBBCBAiAEakEAIANBgQgQuAILIQEgACAEEFQLIAJBEGokACABCwkAIAAgARDdAgujAQIBfgF/IwBBEGsiAiQAAn4gACABEN0CIgVCgICAgHCDQoCAgIDgAFEEQCAFDAELQQohBgJAAkAgBA0AIAMpAwAiAUKAgICAcINCgICAgDBRDQAgACABEI4FIgZBAEgNAQtCgICAgOAAIAAgAkEIaiAFEG4NARogACACKwMIIAZBAEEAEI8CDAELIAAgBRAPQoCAgIDgAAshASACQRBqJAAgAQuMAgIBfgF8IwBBEGsiAiQAQoCAgIDgACEEAkAgACABEN0CIgFCgICAgHCDQoCAgIDgAFEEQCABIQQMAQsgACACIAEQbg0AAkACQCADKQMAIgFCgICAgHCDQoCAgIAwUQRAIAIpAwAhAQwBCyAAIAJBDGogARC6AQ0CIAIrAwAiBb0iAUKAgICAgICA+P8Ag0KAgICAgICA+P8AUg0BCyAAQoCAgIDAfiABQoCAgIDAgYD8/wB9IAFC////////////AINCgICAgICAgPj/AFYbEDchBAwBCyACKAIMIgNB5QBrQZt/TQRAIABBijRBABBQDAELIAAgBUEKIANBARCPAiEECyACQRBqJAAgBAvYAQIBfgF8I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QLJxUAAAAAFQAAAAAJFgAAAAAAFgAAFgAAMDEyMzQ1Njc4OUFCQ0RFRgBB5MUECwE6AEGMxgQLCP//////////AEHQxgQLAxAvUQBB3MYECx0DAAAAAAAAAAIAAAAAAAAAAQAAAAEAAAABAAAABQBBhMcECwKWAQBBnMcECwuXAQAAmAEAAOwqAQBBtMcECwECAEHExwQLCP//////////AEGIyAQLCXgjAQAAAAAABQBBnMgECwKZAQBBtMgECw6XAQAAmgEAAPgqAQAABABBzMgECwEBAEHcyAQLBf////8KAEGgyQQLAxAkAQ=="; - if (!R.startsWith(Q)) { - var fa = R; - R = a.locateFile ? a.locateFile(fa, x) : x + fa; - } - function ha(b) { try { - if (b == R && E) - return new Uint8Array(E); - var c = C(b); - if (c) - return c; - if (A) - return A(b); - throw "both async and sync fetching of the wasm failed"; - } - catch (d) { - F(d); - } } - function ia(b) { if (!E && (u || v)) { - if ("function" == typeof fetch && !b.startsWith("file://")) - return fetch(b, { credentials: "same-origin" }).then(function (c) { if (!c.ok) - throw "failed to load wasm binary file at '" + b + "'"; return c.arrayBuffer(); }).catch(function () { return ha(b); }); - if (z) - return new Promise(function (c, d) { z(b, function (e) { c(new Uint8Array(e)); }, d); }); - } return Promise.resolve().then(function () { return ha(b); }); } - function ja(b, c, d) { return ia(b).then(function (e) { return WebAssembly.instantiate(e, c); }).then(function (e) { return e; }).then(d, function (e) { D("failed to asynchronously prepare wasm: " + e); F(e); }); } - function ka(b, c) { var d = R; return E || "function" != typeof WebAssembly.instantiateStreaming || d.startsWith(Q) || d.startsWith("file://") || w || "function" != typeof fetch ? ja(d, b, c) : fetch(d, { credentials: "same-origin" }).then(function (e) { return WebAssembly.instantiateStreaming(e, b).then(c, function (f) { D("wasm streaming compile failed: " + f); D("falling back to ArrayBuffer instantiation"); return ja(d, b, c); }); }); } - function S(b) { for (; 0 < b.length;) - b.shift()(a); } - var la = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0; - function na(b, c, d) { var e = c + d; for (d = c; b[d] && !(d >= e);) - ++d; if (16 < d - c && b.buffer && la) - return la.decode(b.subarray(c, d)); for (e = ""; c < d;) { - var f = b[c++]; - if (f & 128) { - var g = b[c++] & 63; - if (192 == (f & 224)) - e += String.fromCharCode((f & 31) << 6 | g); - else { - var h = b[c++] & 63; - f = 224 == (f & 240) ? (f & 15) << 12 | g << 6 | h : (f & 7) << 18 | g << 12 | h << 6 | b[c++] & 63; - 65536 > f ? e += String.fromCharCode(f) : (f -= 65536, e += String.fromCharCode(55296 | f >> 10, 56320 | f & 1023)); - } - } - else - e += String.fromCharCode(f); - } return e; } - function T(b, c) { return b ? na(J, b, c) : ""; } - var oa = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], pa = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; - function U(b) { for (var c = 0, d = 0; d < b.length; ++d) { - var e = b.charCodeAt(d); - 127 >= e ? c++ : 2047 >= e ? c += 2 : 55296 <= e && 57343 >= e ? (c += 4, ++d) : c += 3; - } return c; } - function V(b, c, d) { var e = J; if (!(0 < d)) - return 0; var f = c; d = c + d - 1; for (var g = 0; g < b.length; ++g) { - var h = b.charCodeAt(g); - if (55296 <= h && 57343 >= h) { - var k = b.charCodeAt(++g); - h = 65536 + ((h & 1023) << 10) | k & 1023; - } - if (127 >= h) { - if (c >= d) - break; - e[c++] = h; - } - else { - if (2047 >= h) { - if (c + 1 >= d) - break; - e[c++] = 192 | h >> 6; - } - else { - if (65535 >= h) { - if (c + 2 >= d) - break; - e[c++] = 224 | h >> 12; - } - else { - if (c + 3 >= d) - break; - e[c++] = 240 | h >> 18; - e[c++] = 128 | h >> 12 & 63; - } - e[c++] = 128 | h >> 6 & 63; - } - e[c++] = 128 | h & 63; - } - } e[c] = 0; return c - f; } - function qa(b) { var c = U(b) + 1, d = ra(c); d && V(b, d, c); return d; } - var W = {}; - function sa() { if (!X) { - var b = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: ("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _: t || "./this.program" }, c; - for (c in W) - void 0 === W[c] ? delete b[c] : b[c] = W[c]; - var d = []; - for (c in b) - d.push(c + "=" + b[c]); - X = d; - } return X; } - var X, ta = [null, [], []]; - function ua(b, c, d, e) { var f = { string: l => { var q = 0; if (null !== l && void 0 !== l && 0 !== l) { - q = U(l) + 1; - var ma = Y(q); - V(l, ma, q); - q = ma; - } return q; }, array: l => { var q = Y(l.length); I.set(l, q); return q; } }; b = a["_" + b]; var g = [], h = 0; if (e) - for (var k = 0; k < e.length; k++) { - var r = f[d[k]]; - r ? (0 === h && (h = va()), g[k] = r(e[k])) : g[k] = e[k]; - } d = b.apply(null, g); return d = function (l) { 0 !== h && wa(h); return "string" === c ? T(l) : "boolean" === c ? !!l : l; }(d); } - var xa = "function" == typeof atob ? atob : function (b) { - var c = "", d = 0; - b = b.replace(/[^A-Za-z0-9\+\/=]/g, ""); - do { - var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++)); - var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++)); - var g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++)); - var h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(d++)); - e = e << 2 | f >> 4; - f = (f & 15) << 4 | g >> 2; - var k = (g & 3) << 6 | h; - c += String.fromCharCode(e); - 64 !== g && (c += String.fromCharCode(f)); - 64 !== h && (c += String.fromCharCode(k)); - } while (d < b.length); - return c; - }; - function C(b) { if (b.startsWith(Q)) { - b = b.slice(Q.length); - if ("boolean" == typeof w && w) { - var c = Buffer.from(b, "base64"); - c = new Uint8Array(c.buffer, c.byteOffset, c.byteLength); - } - else - try { - var d = xa(b), e = new Uint8Array(d.length); - for (b = 0; b < d.length; ++b) - e[b] = d.charCodeAt(b); - c = e; - } - catch (f) { - throw Error("Converting base64 string to bytes failed."); - } - return c; - } } - var ya = { a: function (b, c, d, e) { F("Assertion failed: " + T(b) + ", at: " + [c ? T(c) : "unknown filename", d, e ? T(e) : "unknown function"]); }, l: function (b, c) { - b = new Date(1E3 * (L[b >> 2] + 4294967296 * K[b + 4 >> 2])); - K[c >> 2] = b.getSeconds(); - K[c + 4 >> 2] = b.getMinutes(); - K[c + 8 >> 2] = b.getHours(); - K[c + 12 >> 2] = b.getDate(); - K[c + 16 >> 2] = b.getMonth(); - K[c + 20 >> 2] = b.getFullYear() - 1900; - K[c + 24 >> 2] = b.getDay(); - var d = b.getFullYear(); - K[c + 28 >> 2] = (0 !== d % 4 || 0 === d % 100 && 0 !== d % 400 ? pa : oa)[b.getMonth()] + b.getDate() - 1 | 0; - K[c + 36 >> 2] = -(60 * b.getTimezoneOffset()); - d = (new Date(b.getFullYear(), 6, 1)).getTimezoneOffset(); - var e = (new Date(b.getFullYear(), 0, 1)).getTimezoneOffset(); - K[c + 32 >> 2] = (d != e && b.getTimezoneOffset() == Math.min(e, d)) | 0; - }, k: function (b, c, d) { function e(r) { return (r = r.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? r[1] : "GMT"; } var f = (new Date).getFullYear(), g = new Date(f, 0, 1), h = new Date(f, 6, 1); f = g.getTimezoneOffset(); var k = h.getTimezoneOffset(); L[b >> 2] = 60 * Math.max(f, k); K[c >> 2] = Number(f != k); b = e(g); c = e(h); b = qa(b); c = qa(c); k < f ? (L[d >> 2] = b, L[d + 4 >> 2] = c) : (L[d >> 2] = c, L[d + 4 >> 2] = b); }, b: function () { F(""); }, - m: function () { return Date.now(); }, j: function (b) { var c = J.length; b >>>= 0; if (2147483648 < b) - return false; for (var d = 1; 4 >= d; d *= 2) { - var e = c * (1 + .2 / d); - e = Math.min(e, b + 100663296); - var f = Math, g = f.min; - e = Math.max(b, e); - e += (65536 - e % 65536) % 65536; - a: { - var h = G.buffer; - try { - G.grow(g.call(f, 2147483648, e) - h.byteLength + 65535 >>> 16); - M(); - var k = 1; - break a; - } - catch (r) { } - k = void 0; - } - if (k) - return true; - } return false; }, e: function (b, c) { - var d = 0; - sa().forEach(function (e, f) { - var g = c + d; - f = L[b + 4 * f >> 2] = g; - for (g = 0; g < e.length; ++g) - I[f++ >> 0] = e.charCodeAt(g); - I[f >> 0] = 0; - d += e.length + - 1; - }); - return 0; - }, f: function (b, c) { var d = sa(); L[b >> 2] = d.length; var e = 0; d.forEach(function (f) { e += f.length + 1; }); L[c >> 2] = e; return 0; }, d: function () { return 52; }, i: function () { return 70; }, c: function (b, c, d, e) { for (var f = 0, g = 0; g < d; g++) { - var h = L[c >> 2], k = L[c + 4 >> 2]; - c += 8; - for (var r = 0; r < k; r++) { - var l = J[h + r], q = ta[b]; - 0 === l || 10 === l ? ((1 === b ? aa : D)(na(q, 0)), q.length = 0) : q.push(l); - } - f += k; - } L[e >> 2] = f; return 0; }, o: function (b, c, d, e, f) { return a.callbacks.callFunction(void 0, b, c, d, e, f); }, n: function (b) { - return a.callbacks.shouldInterrupt(void 0, b); - }, h: function (b, c, d) { d = T(d); return a.callbacks.loadModuleSource(void 0, b, c, d); }, g: function (b, c, d, e) { d = T(d); e = T(e); return a.callbacks.normalizeModule(void 0, b, c, d, e); } }; - (function () { function b(d) { d = d.exports; a.asm = d; G = a.asm.p; M(); ca.unshift(a.asm.q); N--; a.monitorRunDependencies && a.monitorRunDependencies(N); if (0 == N && (P)) { - var e = P; - P = null; - e(); - } return d; } var c = { a: ya }; N++; a.monitorRunDependencies && a.monitorRunDependencies(N); if (a.instantiateWasm) - try { - return a.instantiateWasm(c, b); - } - catch (d) { - D("Module.instantiateWasm callback failed with error: " + d), n(d); - } ka(c, function (d) { b(d.instance); }).catch(n); return {}; })(); - var ra = a._malloc = function () { return (ra = a._malloc = a.asm.r).apply(null, arguments); }; - a._QTS_Throw = function () { return (a._QTS_Throw = a.asm.s).apply(null, arguments); }; - a._QTS_NewError = function () { return (a._QTS_NewError = a.asm.t).apply(null, arguments); }; - a._QTS_RuntimeSetMemoryLimit = function () { return (a._QTS_RuntimeSetMemoryLimit = a.asm.u).apply(null, arguments); }; - a._QTS_RuntimeComputeMemoryUsage = function () { return (a._QTS_RuntimeComputeMemoryUsage = a.asm.v).apply(null, arguments); }; - a._QTS_RuntimeDumpMemoryUsage = function () { return (a._QTS_RuntimeDumpMemoryUsage = a.asm.w).apply(null, arguments); }; - a._QTS_RecoverableLeakCheck = function () { return (a._QTS_RecoverableLeakCheck = a.asm.x).apply(null, arguments); }; - a._QTS_BuildIsSanitizeLeak = function () { return (a._QTS_BuildIsSanitizeLeak = a.asm.y).apply(null, arguments); }; - a._QTS_RuntimeSetMaxStackSize = function () { return (a._QTS_RuntimeSetMaxStackSize = a.asm.z).apply(null, arguments); }; - a._QTS_GetUndefined = function () { return (a._QTS_GetUndefined = a.asm.A).apply(null, arguments); }; - a._QTS_GetNull = function () { return (a._QTS_GetNull = a.asm.B).apply(null, arguments); }; - a._QTS_GetFalse = function () { return (a._QTS_GetFalse = a.asm.C).apply(null, arguments); }; - a._QTS_GetTrue = function () { return (a._QTS_GetTrue = a.asm.D).apply(null, arguments); }; - a._QTS_NewRuntime = function () { return (a._QTS_NewRuntime = a.asm.E).apply(null, arguments); }; - a._QTS_FreeRuntime = function () { return (a._QTS_FreeRuntime = a.asm.F).apply(null, arguments); }; - a._QTS_NewContext = function () { return (a._QTS_NewContext = a.asm.G).apply(null, arguments); }; - a._QTS_FreeContext = function () { return (a._QTS_FreeContext = a.asm.H).apply(null, arguments); }; - a._QTS_FreeValuePointer = function () { return (a._QTS_FreeValuePointer = a.asm.I).apply(null, arguments); }; - a._free = function () { return (a._free = a.asm.J).apply(null, arguments); }; - a._QTS_FreeValuePointerRuntime = function () { return (a._QTS_FreeValuePointerRuntime = a.asm.K).apply(null, arguments); }; - a._QTS_FreeVoidPointer = function () { return (a._QTS_FreeVoidPointer = a.asm.L).apply(null, arguments); }; - a._QTS_FreeCString = function () { return (a._QTS_FreeCString = a.asm.M).apply(null, arguments); }; - a._QTS_DupValuePointer = function () { return (a._QTS_DupValuePointer = a.asm.N).apply(null, arguments); }; - a._QTS_NewObject = function () { return (a._QTS_NewObject = a.asm.O).apply(null, arguments); }; - a._QTS_NewObjectProto = function () { return (a._QTS_NewObjectProto = a.asm.P).apply(null, arguments); }; - a._QTS_NewArray = function () { return (a._QTS_NewArray = a.asm.Q).apply(null, arguments); }; - a._QTS_NewFloat64 = function () { return (a._QTS_NewFloat64 = a.asm.R).apply(null, arguments); }; - a._QTS_GetFloat64 = function () { return (a._QTS_GetFloat64 = a.asm.S).apply(null, arguments); }; - a._QTS_NewString = function () { return (a._QTS_NewString = a.asm.T).apply(null, arguments); }; - a._QTS_GetString = function () { return (a._QTS_GetString = a.asm.U).apply(null, arguments); }; - a._QTS_NewSymbol = function () { return (a._QTS_NewSymbol = a.asm.V).apply(null, arguments); }; - a._QTS_GetSymbolDescriptionOrKey = function () { return (a._QTS_GetSymbolDescriptionOrKey = a.asm.W).apply(null, arguments); }; - a._QTS_IsGlobalSymbol = function () { return (a._QTS_IsGlobalSymbol = a.asm.X).apply(null, arguments); }; - a._QTS_IsJobPending = function () { return (a._QTS_IsJobPending = a.asm.Y).apply(null, arguments); }; - a._QTS_ExecutePendingJob = function () { return (a._QTS_ExecutePendingJob = a.asm.Z).apply(null, arguments); }; - a._QTS_GetProp = function () { return (a._QTS_GetProp = a.asm._).apply(null, arguments); }; - a._QTS_SetProp = function () { return (a._QTS_SetProp = a.asm.$).apply(null, arguments); }; - a._QTS_DefineProp = function () { return (a._QTS_DefineProp = a.asm.aa).apply(null, arguments); }; - a._QTS_Call = function () { return (a._QTS_Call = a.asm.ba).apply(null, arguments); }; - a._QTS_ResolveException = function () { return (a._QTS_ResolveException = a.asm.ca).apply(null, arguments); }; - a._QTS_Dump = function () { return (a._QTS_Dump = a.asm.da).apply(null, arguments); }; - a._QTS_Eval = function () { return (a._QTS_Eval = a.asm.ea).apply(null, arguments); }; - a._QTS_Typeof = function () { return (a._QTS_Typeof = a.asm.fa).apply(null, arguments); }; - a._QTS_GetGlobalObject = function () { return (a._QTS_GetGlobalObject = a.asm.ga).apply(null, arguments); }; - a._QTS_NewPromiseCapability = function () { return (a._QTS_NewPromiseCapability = a.asm.ha).apply(null, arguments); }; - a._QTS_TestStringArg = function () { return (a._QTS_TestStringArg = a.asm.ia).apply(null, arguments); }; - a._QTS_BuildIsDebug = function () { return (a._QTS_BuildIsDebug = a.asm.ja).apply(null, arguments); }; - a._QTS_BuildIsAsyncify = function () { return (a._QTS_BuildIsAsyncify = a.asm.ka).apply(null, arguments); }; - a._QTS_NewFunction = function () { return (a._QTS_NewFunction = a.asm.la).apply(null, arguments); }; - a._QTS_ArgvGetJSValueConstPointer = function () { return (a._QTS_ArgvGetJSValueConstPointer = a.asm.ma).apply(null, arguments); }; - a._QTS_RuntimeEnableInterruptHandler = function () { return (a._QTS_RuntimeEnableInterruptHandler = a.asm.na).apply(null, arguments); }; - a._QTS_RuntimeDisableInterruptHandler = function () { return (a._QTS_RuntimeDisableInterruptHandler = a.asm.oa).apply(null, arguments); }; - a._QTS_RuntimeEnableModuleLoader = function () { return (a._QTS_RuntimeEnableModuleLoader = a.asm.pa).apply(null, arguments); }; - a._QTS_RuntimeDisableModuleLoader = function () { return (a._QTS_RuntimeDisableModuleLoader = a.asm.qa).apply(null, arguments); }; - function va() { return (va = a.asm.sa).apply(null, arguments); } - function wa() { return (wa = a.asm.ta).apply(null, arguments); } - function Y() { return (Y = a.asm.ua).apply(null, arguments); } - a.___start_em_js = 74916; - a.___stop_em_js = 75818; - a.cwrap = function (b, c, d, e) { var f = !d || d.every(g => "number" === g || "boolean" === g); return "string" !== c && f && !e ? a["_" + b] : function () { return ua(b, c, d, arguments); }; }; - a.UTF8ToString = T; - a.stringToUTF8 = function (b, c, d) { return V(b, c, d); }; - a.lengthBytesUTF8 = U; - var Z; - P = function za() { Z || Aa(); Z || (P = za); }; - function Aa() { function b() { if (!Z && (Z = true, a.calledRun = true, !H)) { - S(ca); - m(a); - if (a.onRuntimeInitialized) - a.onRuntimeInitialized(); - if (a.postRun) - for ("function" == typeof a.postRun && (a.postRun = [a.postRun]); a.postRun.length;) { - var c = a.postRun.shift(); - da.unshift(c); - } - S(da); - } } if (!(0 < N)) { - if (a.preRun) - for ("function" == typeof a.preRun && (a.preRun = [a.preRun]); a.preRun.length;) - ea(); - S(ba); - 0 < N || (a.setStatus ? (a.setStatus("Running..."), setTimeout(function () { setTimeout(function () { a.setStatus(""); }, 1); b(); }, 1)) : b()); - } } - if (a.preInit) - for ("function" == typeof a.preInit && (a.preInit = [a.preInit]); 0 < a.preInit.length;) - a.preInit.pop()(); - Aa(); - return QuickJSRaw.ready; - }); - })(); - module.exports = QuickJSRaw; - } (emscriptenModule_WASM_RELEASE_SYNC)); - return emscriptenModule_WASM_RELEASE_SYNC.exports; -} - -var hasRequiredVariants; - -function requireVariants () { - if (hasRequiredVariants) return variants; - hasRequiredVariants = 1; - (function (exports$1) { - var __createBinding = (variants && variants.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (variants && variants.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (variants && variants.__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; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.RELEASE_ASYNC = exports$1.DEBUG_ASYNC = exports$1.RELEASE_SYNC = exports$1.DEBUG_SYNC = exports$1.memoizePromiseFactory = exports$1.newQuickJSAsyncWASMModule = exports$1.newQuickJSWASMModule = void 0; - const esmHelpers_1 = /*@__PURE__*/ requireEsmHelpers(); - async function newQuickJSWASMModule( - variant = exports$1.RELEASE_SYNC) { - const [wasmModuleLoader, QuickJSFFI, { QuickJSWASMModule }] = await Promise.all([ - variant.importModuleLoader(), - variant.importFFI(), - Promise.resolve().then(() => __importStar(/*@__PURE__*/ requireModule())).then(esmHelpers_1.unwrapTypescript), - ]); - const wasmModule = await wasmModuleLoader(); - wasmModule.type = "sync"; - const ffi = new QuickJSFFI(wasmModule); - return new QuickJSWASMModule(wasmModule, ffi); - } - exports$1.newQuickJSWASMModule = newQuickJSWASMModule; - async function newQuickJSAsyncWASMModule( - variant = exports$1.RELEASE_ASYNC) { - const [wasmModuleLoader, QuickJSAsyncFFI, { QuickJSAsyncWASMModule }] = await Promise.all([ - variant.importModuleLoader(), - variant.importFFI(), - Promise.resolve().then(() => __importStar(/*@__PURE__*/ requireModuleAsyncify())).then(esmHelpers_1.unwrapTypescript), - ]); - const wasmModule = await wasmModuleLoader(); - wasmModule.type = "async"; - const ffi = new QuickJSAsyncFFI(wasmModule); - return new QuickJSAsyncWASMModule(wasmModule, ffi); - } - exports$1.newQuickJSAsyncWASMModule = newQuickJSAsyncWASMModule; - function memoizePromiseFactory(fn) { - let promise; - return () => { - return (promise ?? (promise = fn())); - }; - } - exports$1.memoizePromiseFactory = memoizePromiseFactory; - exports$1.DEBUG_SYNC = { - type: "sync", - async importFFI() { - throw new Error("not implemented"); - }, - async importModuleLoader() { - throw new Error("not implemented"); - }, - }; - exports$1.RELEASE_SYNC = { - type: "sync", - async importFFI() { - const mod = await Promise.resolve().then(() => __importStar(/*@__PURE__*/ requireFfi_WASM_RELEASE_SYNC())); - return (0, esmHelpers_1.unwrapTypescript)(mod).QuickJSFFI; - }, - async importModuleLoader() { - const mod = await Promise.resolve().then(() => __importStar(/*@__PURE__*/ requireEmscriptenModule_WASM_RELEASE_SYNC())); - return (0, esmHelpers_1.unwrapJavascript)(mod); - }, - }; - exports$1.DEBUG_ASYNC = { - type: "async", - async importFFI() { - throw new Error("not implemented"); - }, - async importModuleLoader() { - throw new Error("not implemented"); - }, - }; - exports$1.RELEASE_ASYNC = { - type: "async", - async importFFI() { - throw new Error("not implemented"); - }, - async importModuleLoader() { - throw new Error("not implemented"); - }, - }; - } (variants)); - return variants; -} - -var vmInterface = {}; - -var hasRequiredVmInterface; - -function requireVmInterface () { - if (hasRequiredVmInterface) return vmInterface; - hasRequiredVmInterface = 1; - Object.defineProperty(vmInterface, "__esModule", { value: true }); - vmInterface.isFail = vmInterface.isSuccess = void 0; - function isSuccess(successOrFail) { - return "error" in successOrFail === false; - } - vmInterface.isSuccess = isSuccess; - function isFail(successOrFail) { - return "error" in successOrFail === true; - } - vmInterface.isFail = isFail; - return vmInterface; -} - -var moduleTest = {}; - -var hasRequiredModuleTest; - -function requireModuleTest () { - if (hasRequiredModuleTest) return moduleTest; - hasRequiredModuleTest = 1; - Object.defineProperty(moduleTest, "__esModule", { value: true }); - moduleTest.TestQuickJSWASMModule = void 0; - const errors_1 = /*@__PURE__*/ requireErrors(); - const lifetime_1 = /*@__PURE__*/ requireLifetime(); - class TestQuickJSWASMModule { - constructor(parent) { - this.parent = parent; - this.contexts = new Set(); - this.runtimes = new Set(); - } - newRuntime(options) { - const runtime = this.parent.newRuntime({ - ...options, - ownedLifetimes: [ - new lifetime_1.Lifetime(undefined, undefined, () => this.runtimes.delete(runtime)), - ...(options?.ownedLifetimes ?? []), - ], - }); - this.runtimes.add(runtime); - return runtime; - } - newContext(options) { - const context = this.parent.newContext({ - ...options, - ownedLifetimes: [ - new lifetime_1.Lifetime(undefined, undefined, () => this.contexts.delete(context)), - ...(options?.ownedLifetimes ?? []), - ], - }); - this.contexts.add(context); - return context; - } - evalCode(code, options) { - return this.parent.evalCode(code, options); - } - disposeAll() { - const allDisposables = [...this.contexts, ...this.runtimes]; - this.runtimes.clear(); - this.contexts.clear(); - allDisposables.forEach((d) => { - if (d.alive) { - d.dispose(); - } - }); - } - assertNoMemoryAllocated() { - const leaksDetected = this.getFFI().QTS_RecoverableLeakCheck(); - if (leaksDetected) { - throw new errors_1.QuickJSMemoryLeakDetected("Leak sanitizer detected un-freed memory"); - } - if (this.contexts.size > 0) { - throw new errors_1.QuickJSMemoryLeakDetected(`${this.contexts.size} contexts leaked`); - } - if (this.runtimes.size > 0) { - throw new errors_1.QuickJSMemoryLeakDetected(`${this.runtimes.size} runtimes leaked`); - } - } - getFFI() { - return this.parent.getFFI(); - } - } - moduleTest.TestQuickJSWASMModule = TestQuickJSWASMModule; - return moduleTest; -} - -var hasRequiredDist$2; - -function requireDist$2 () { - if (hasRequiredDist$2) return dist; - hasRequiredDist$2 = 1; - (function (exports$1) { - var __createBinding = (dist && dist.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist && dist.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __exportStar = (dist && dist.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); - }; - var __importStar = (dist && dist.__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; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.shouldInterruptAfterDeadline = exports$1.newAsyncContext = exports$1.newAsyncRuntime = exports$1.getQuickJSSync = exports$1.getQuickJS = exports$1.errors = exports$1.RELEASE_SYNC = exports$1.RELEASE_ASYNC = exports$1.DEBUG_SYNC = exports$1.DEBUG_ASYNC = exports$1.newQuickJSAsyncWASMModule = exports$1.newQuickJSWASMModule = void 0; - const variants_1 = /*@__PURE__*/ requireVariants(); - Object.defineProperty(exports$1, "newQuickJSWASMModule", { enumerable: true, get: function () { return variants_1.newQuickJSWASMModule; } }); - Object.defineProperty(exports$1, "newQuickJSAsyncWASMModule", { enumerable: true, get: function () { return variants_1.newQuickJSAsyncWASMModule; } }); - Object.defineProperty(exports$1, "DEBUG_ASYNC", { enumerable: true, get: function () { return variants_1.DEBUG_ASYNC; } }); - Object.defineProperty(exports$1, "DEBUG_SYNC", { enumerable: true, get: function () { return variants_1.DEBUG_SYNC; } }); - Object.defineProperty(exports$1, "RELEASE_ASYNC", { enumerable: true, get: function () { return variants_1.RELEASE_ASYNC; } }); - Object.defineProperty(exports$1, "RELEASE_SYNC", { enumerable: true, get: function () { return variants_1.RELEASE_SYNC; } }); - __exportStar(/*@__PURE__*/ requireVmInterface(), exports$1); - __exportStar(/*@__PURE__*/ requireLifetime(), exports$1); - exports$1.errors = __importStar(/*@__PURE__*/ requireErrors()); - __exportStar(/*@__PURE__*/ requireDeferredPromise(), exports$1); - __exportStar(/*@__PURE__*/ requireModuleTest(), exports$1); - let singleton = undefined; - let singletonPromise = undefined; - async function getQuickJS() { - singletonPromise ?? (singletonPromise = (0, variants_1.newQuickJSWASMModule)().then((instance) => { - singleton = instance; - return instance; - })); - return await singletonPromise; - } - exports$1.getQuickJS = getQuickJS; - function getQuickJSSync() { - if (!singleton) { - throw new Error("QuickJS not initialized. Await getQuickJS() at least once."); - } - return singleton; - } - exports$1.getQuickJSSync = getQuickJSSync; - async function newAsyncRuntime(options) { - const module = await (0, variants_1.newQuickJSAsyncWASMModule)(); - return module.newRuntime(options); - } - exports$1.newAsyncRuntime = newAsyncRuntime; - async function newAsyncContext(options) { - const module = await (0, variants_1.newQuickJSAsyncWASMModule)(); - return module.newContext(options); - } - exports$1.newAsyncContext = newAsyncContext; - function shouldInterruptAfterDeadline(deadline) { - const deadlineAsNumber = typeof deadline === "number" ? deadline : deadline.getTime(); - return function () { - return Date.now() > deadlineAsNumber; - }; - } - exports$1.shouldInterruptAfterDeadline = shouldInterruptAfterDeadline; - } (dist)); - return dist; -} - -var hasRequiredDist$1; - -function requireDist$1 () { - if (hasRequiredDist$1) return dist$6; - hasRequiredDist$1 = 1; - var __createBinding = (dist$6 && dist$6.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist$6 && dist$6.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (dist$6 && dist$6.__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 __importDefault = (dist$6 && dist$6.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(dist$6, "__esModule", { value: true }); - dist$6.PacProxyAgent = void 0; - const net = __importStar(require$$0$7); - const tls = __importStar(require$$1$2); - const crypto = __importStar(require$$2$1); - const events_1 = require$$0$8; - const debug_1 = __importDefault(requireSrc()); - const url_1 = require$$5; - const agent_base_1 = requireDist$b(); - const get_uri_1 = requireDist$5(); - const pac_resolver_1 = requireDist$3(); - const quickjs_emscripten_1 = /*@__PURE__*/ requireDist$2(); - const debug = (0, debug_1.default)('pac-proxy-agent'); - const setServernameFromNonIpHost = (options) => { - if (options.servername === undefined && - options.host && - !net.isIP(options.host)) { - return { - ...options, - servername: options.host, - }; - } - return options; - }; - class PacProxyAgent extends agent_base_1.Agent { - constructor(uri, opts) { - super(opts); - this.clearResolverPromise = () => { - this.resolverPromise = undefined; - }; - const uriStr = typeof uri === 'string' ? uri : uri.href; - this.uri = new url_1.URL(uriStr.replace(/^pac\+/i, '')); - debug('Creating PacProxyAgent with URI %o', this.uri.href); - this.opts = { ...opts }; - this.cache = undefined; - this.resolver = undefined; - this.resolverHash = ''; - this.resolverPromise = undefined; - if (!this.opts.filename) { - this.opts.filename = this.uri.href; - } - } - getResolver() { - if (!this.resolverPromise) { - this.resolverPromise = this.loadResolver(); - this.resolverPromise.then(this.clearResolverPromise, this.clearResolverPromise); - } - return this.resolverPromise; - } - async loadResolver() { - try { - const [qjs, code] = await Promise.all([ - (0, quickjs_emscripten_1.getQuickJS)(), - this.loadPacFile(), - ]); - const hash = crypto.createHash('sha1').update(code).digest('hex'); - if (this.resolver && this.resolverHash === hash) { - debug('Same sha1 hash for code - contents have not changed, reusing previous proxy resolver'); - return this.resolver; - } - debug('Creating new proxy resolver instance'); - this.resolver = (0, pac_resolver_1.createPacResolver)(qjs, code, this.opts); - this.resolverHash = hash; - return this.resolver; - } - catch (err) { - if (this.resolver && - err.code === 'ENOTMODIFIED') { - debug('Got ENOTMODIFIED response, reusing previous proxy resolver'); - return this.resolver; - } - throw err; - } - } - async loadPacFile() { - debug('Loading PAC file: %o', this.uri); - const rs = await (0, get_uri_1.getUri)(this.uri, { ...this.opts, cache: this.cache }); - debug('Got `Readable` instance for URI'); - this.cache = rs; - const buf = await (0, agent_base_1.toBuffer)(rs); - debug('Read %o byte PAC file from URI', buf.length); - return buf.toString('utf8'); - } - async connect(req, opts) { - const { secureEndpoint } = opts; - const isWebSocket = req.getHeader('upgrade') === 'websocket'; - const resolver = await this.getResolver(); - const protocol = secureEndpoint ? 'https:' : 'http:'; - const host = opts.host && net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - const url = Object.assign(new url_1.URL(req.path, `${protocol}//${host}`), undefined ); - debug('url: %s', url); - let result = await resolver(url); - if (!result) { - result = 'DIRECT'; - } - const proxies = String(result) - .trim() - .split(/\s*;\s*/g) - .filter(Boolean); - if (this.opts.fallbackToDirect && !proxies.includes('DIRECT')) { - proxies.push('DIRECT'); - } - for (const proxy of proxies) { - let agent = null; - let socket = null; - const [type, target] = proxy.split(/\s+/); - debug('Attempting to use proxy: %o', proxy); - if (type === 'DIRECT') { - if (secureEndpoint) { - socket = tls.connect(setServernameFromNonIpHost(opts)); - } - else { - socket = net.connect(opts); - } - } - else if (type === 'SOCKS' || type === 'SOCKS5') { - const { SocksProxyAgent } = await Promise.resolve().then(() => __importStar(requireDist$8())); - agent = new SocksProxyAgent(`socks://${target}`, this.opts); - } - else if (type === 'SOCKS4') { - const { SocksProxyAgent } = await Promise.resolve().then(() => __importStar(requireDist$8())); - agent = new SocksProxyAgent(`socks4a://${target}`, this.opts); - } - else if (type === 'PROXY' || - type === 'HTTP' || - type === 'HTTPS') { - const proxyURL = `${type === 'HTTPS' ? 'https' : 'http'}://${target}`; - if (secureEndpoint || isWebSocket) { - const { HttpsProxyAgent } = await Promise.resolve().then(() => __importStar(requireDist$9())); - agent = new HttpsProxyAgent(proxyURL, this.opts); - } - else { - const { HttpProxyAgent } = await Promise.resolve().then(() => __importStar(requireDist$a())); - agent = new HttpProxyAgent(proxyURL, this.opts); - } - } - try { - if (socket) { - await (0, events_1.once)(socket, 'connect'); - req.emit('proxy', { proxy, socket }); - return socket; - } - if (agent) { - const s = await agent.connect(req, opts); - if (!(s instanceof net.Socket)) { - throw new Error('Expected a `net.Socket` to be returned from agent'); - } - req.emit('proxy', { proxy, socket: s }); - return s; - } - throw new Error(`Could not determine proxy type for: ${proxy}`); - } - catch (err) { - debug('Got error for proxy %o: %o', proxy, err); - req.emit('proxy', { proxy, error: err }); - } - } - throw new Error(`Failed to establish a socket connection to proxies: ${JSON.stringify(proxies)}`); - } - } - PacProxyAgent.protocols = [ - 'pac+data', - 'pac+file', - 'pac+ftp', - 'pac+http', - 'pac+https', - ]; - dist$6.PacProxyAgent = PacProxyAgent; - return dist$6; -} - -var hasRequiredDist; - -function requireDist () { - if (hasRequiredDist) return dist$b; - hasRequiredDist = 1; - (function (exports$1) { - var __createBinding = (dist$b && dist$b.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = (dist$b && dist$b.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = (dist$b && dist$b.__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 __importDefault = (dist$b && dist$b.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.ProxyAgent = exports$1.proxies = void 0; - const http = __importStar(require$$0$6); - const https = __importStar(require$$1$1); - const url_1 = require$$5; - const lru_cache_1 = __importDefault(/*@__PURE__*/ requireLruCache()); - const agent_base_1 = requireDist$b(); - const debug_1 = __importDefault(requireSrc()); - const proxy_from_env_1 = requireProxyFromEnv(); - const debug = (0, debug_1.default)('proxy-agent'); - const wellKnownAgents = { - http: async () => (await Promise.resolve().then(() => __importStar(requireDist$a()))).HttpProxyAgent, - https: async () => (await Promise.resolve().then(() => __importStar(requireDist$9()))).HttpsProxyAgent, - socks: async () => (await Promise.resolve().then(() => __importStar(requireDist$8()))).SocksProxyAgent, - pac: async () => (await Promise.resolve().then(() => __importStar(requireDist$1()))).PacProxyAgent, - }; - exports$1.proxies = { - http: [wellKnownAgents.http, wellKnownAgents.https], - https: [wellKnownAgents.http, wellKnownAgents.https], - socks: [wellKnownAgents.socks, wellKnownAgents.socks], - socks4: [wellKnownAgents.socks, wellKnownAgents.socks], - socks4a: [wellKnownAgents.socks, wellKnownAgents.socks], - socks5: [wellKnownAgents.socks, wellKnownAgents.socks], - socks5h: [wellKnownAgents.socks, wellKnownAgents.socks], - 'pac+data': [wellKnownAgents.pac, wellKnownAgents.pac], - 'pac+file': [wellKnownAgents.pac, wellKnownAgents.pac], - 'pac+ftp': [wellKnownAgents.pac, wellKnownAgents.pac], - 'pac+http': [wellKnownAgents.pac, wellKnownAgents.pac], - 'pac+https': [wellKnownAgents.pac, wellKnownAgents.pac], - }; - function isValidProtocol(v) { - return Object.keys(exports$1.proxies).includes(v); - } - class ProxyAgent extends agent_base_1.Agent { - constructor(opts) { - super(opts); - this.cache = new lru_cache_1.default({ - max: 20, - dispose: (agent) => agent.destroy(), - }); - debug('Creating new ProxyAgent instance: %o', opts); - this.connectOpts = opts; - this.httpAgent = opts?.httpAgent || new http.Agent(opts); - this.httpsAgent = - opts?.httpsAgent || new https.Agent(opts); - this.getProxyForUrl = opts?.getProxyForUrl || proxy_from_env_1.getProxyForUrl; - } - async connect(req, opts) { - const { secureEndpoint } = opts; - const isWebSocket = req.getHeader('upgrade') === 'websocket'; - const protocol = secureEndpoint - ? isWebSocket - ? 'wss:' - : 'https:' - : isWebSocket - ? 'ws:' - : 'http:'; - const host = req.getHeader('host'); - const url = new url_1.URL(req.path, `${protocol}//${host}`).href; - const proxy = await this.getProxyForUrl(url, req); - if (!proxy) { - debug('Proxy not enabled for URL: %o', url); - return secureEndpoint ? this.httpsAgent : this.httpAgent; - } - debug('Request URL: %o', url); - debug('Proxy URL: %o', proxy); - const cacheKey = `${protocol}+${proxy}`; - let agent = this.cache.get(cacheKey); - if (!agent) { - const proxyUrl = new url_1.URL(proxy); - const proxyProto = proxyUrl.protocol.replace(':', ''); - if (!isValidProtocol(proxyProto)) { - throw new Error(`Unsupported protocol for proxy URL: ${proxy}`); - } - const ctor = await exports$1.proxies[proxyProto][secureEndpoint || isWebSocket ? 1 : 0](); - agent = new ctor(proxy, this.connectOpts); - this.cache.set(cacheKey, agent); - } - else { - debug('Cache hit for proxy URL: %o', proxy); - } - return agent; - } - destroy() { - for (const agent of this.cache.values()) { - agent.destroy(); - } - super.destroy(); - } - } - exports$1.ProxyAgent = ProxyAgent; - } (dist$b)); - return dist$b; -} - -var distExports = requireDist(); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function httpRequest(url, method, response, keepAlive = true) { - const options = { - protocol: url.protocol, - hostname: url.hostname, - port: url.port, - path: url.pathname + url.search, - method, - headers: keepAlive ? { Connection: 'keep-alive' } : undefined, - auth: urlToHttpOptions(url).auth, - agent: new distExports.ProxyAgent(), - }; - const requestCallback = (res) => { - if (res.statusCode && - res.statusCode >= 300 && - res.statusCode < 400 && - res.headers.location) { - httpRequest(new URL$1(res.headers.location), method, response); - res.resume(); - } - else { - response(res); - } - }; - const request = options.protocol === 'https:' - ? https$1.request(options, requestCallback) - : http$1.request(options, requestCallback); - request.end(); - return request; -} -async function getJSON(url) { - const text = await getText(url); - try { - return JSON.parse(text); - } - catch { - throw new Error('Could not parse JSON from ' + url.toString()); - } -} -function getText(url) { - return new Promise((resolve, reject) => { - const request = httpRequest(url, 'GET', response => { - let data = ''; - if (response.statusCode && response.statusCode >= 400) { - return reject(new Error(`Got status code ${response.statusCode}`)); - } - response.on('data', chunk => { - data += chunk; - }); - response.on('end', () => { - try { - return resolve(String(data)); - } - catch { - return reject(new Error(`Failed to read text response from ${url}`)); - } - }); - }, false); - request.on('error', err => { - reject(err); - }); - }); -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function folder$3(platform) { - switch (platform) { - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return 'linux64'; - case BrowserPlatform.MAC_ARM: - return 'mac-arm64'; - case BrowserPlatform.MAC: - return 'mac-x64'; - case BrowserPlatform.WIN32: - return 'win32'; - case BrowserPlatform.WIN64: - return 'win64'; - } -} -function resolveDownloadUrl$4(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') { - return `${baseUrl}/${resolveDownloadPath$4(platform, buildId).join('/')}`; -} -function resolveDownloadPath$4(platform, buildId) { - return [buildId, folder$3(platform), `chrome-${folder$3(platform)}.zip`]; -} -function relativeExecutablePath$4(platform, _buildId) { - switch (platform) { - case BrowserPlatform.MAC: - case BrowserPlatform.MAC_ARM: - return path$1.join('chrome-' + folder$3(platform), 'Google Chrome for Testing.app', 'Contents', 'MacOS', 'Google Chrome for Testing'); - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return path$1.join('chrome-linux64', 'chrome'); - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return path$1.join('chrome-' + folder$3(platform), 'chrome.exe'); - } -} -let baseVersionUrl$1 = 'https://googlechromelabs.github.io/chrome-for-testing'; -async function getLastKnownGoodReleaseForChannel(channel) { - const data = (await getJSON(new URL(`${baseVersionUrl$1}/last-known-good-versions.json`))); - for (const channel of Object.keys(data.channels)) { - data.channels[channel.toLowerCase()] = data.channels[channel]; - delete data.channels[channel]; - } - return data.channels[channel]; -} -async function getLastKnownGoodReleaseForMilestone(milestone) { - const data = (await getJSON(new URL(`${baseVersionUrl$1}/latest-versions-per-milestone.json`))); - return data.milestones[milestone]; -} -async function getLastKnownGoodReleaseForBuild( -buildPrefix) { - const data = (await getJSON(new URL(`${baseVersionUrl$1}/latest-patch-versions-per-build.json`))); - return data.builds[buildPrefix]; -} -async function resolveBuildId$3(channel) { - if (Object.values(ChromeReleaseChannel).includes(channel)) { - return (await getLastKnownGoodReleaseForChannel(channel)).version; - } - if (channel.match(/^\d+$/)) { - return (await getLastKnownGoodReleaseForMilestone(channel))?.version; - } - if (channel.match(/^\d+\.\d+\.\d+$/)) { - return (await getLastKnownGoodReleaseForBuild(channel))?.version; - } - return; -} -const WINDOWS_ENV_PARAM_NAMES = [ - 'PROGRAMFILES', - 'ProgramW6432', - 'ProgramFiles(x86)', - 'LOCALAPPDATA', -]; -function getChromeWindowsLocation(channel, locationsPrefixes) { - if (locationsPrefixes.size === 0) { - throw new Error('Non of the common Windows Env variables were set'); - } - let suffix; - switch (channel) { - case ChromeReleaseChannel.STABLE: - suffix = 'Google\\Chrome\\Application\\chrome.exe'; - break; - case ChromeReleaseChannel.BETA: - suffix = 'Google\\Chrome Beta\\Application\\chrome.exe'; - break; - case ChromeReleaseChannel.CANARY: - suffix = 'Google\\Chrome SxS\\Application\\chrome.exe'; - break; - case ChromeReleaseChannel.DEV: - suffix = 'Google\\Chrome Dev\\Application\\chrome.exe'; - break; - } - return [...locationsPrefixes.values()].map(l => { - return path$1.win32.join(l, suffix); - }); -} -function getWslVariable(variable) { - try { - const result = execSync(`cmd.exe /c echo %${variable.toLocaleUpperCase()}%`, { - stdio: ['ignore', 'pipe', 'ignore'], - encoding: 'utf-8', - }).trim(); - if (result) { - return result; - } - } - catch { } - return; -} -function getWslLocation(channel) { - const wslVersion = execSync('wslinfo --version', { - stdio: ['ignore', 'pipe', 'ignore'], - encoding: 'utf-8', - }).trim(); - if (!wslVersion) { - throw new Error('Not in WSL or unsupported version of WSL.'); - } - const wslPrefixes = new Set(); - for (const name of WINDOWS_ENV_PARAM_NAMES) { - const wslPrefix = getWslVariable(name); - if (wslPrefix) { - wslPrefixes.add(wslPrefix); - } - } - const windowsPath = getChromeWindowsLocation(channel, wslPrefixes); - return windowsPath.map(path => { - return execSync(`wslpath "${path}"`).toString().trim(); - }); -} -function getChromeLinuxOrWslLocation(channel) { - const locations = []; - switch (channel) { - case ChromeReleaseChannel.STABLE: - locations.push('/opt/google/chrome/chrome'); - break; - case ChromeReleaseChannel.BETA: - locations.push('/opt/google/chrome-beta/chrome'); - break; - case ChromeReleaseChannel.CANARY: - locations.push('/opt/google/chrome-canary/chrome'); - break; - case ChromeReleaseChannel.DEV: - locations.push('/opt/google/chrome-unstable/chrome'); - break; - } - try { - const wslPath = getWslLocation(channel); - if (wslPath) { - locations.push(...wslPath); - } - } - catch { - } - return locations; -} -function resolveSystemExecutablePaths$1(platform, channel) { - switch (platform) { - case BrowserPlatform.WIN64: - case BrowserPlatform.WIN32: - const prefixLocation = new Set(WINDOWS_ENV_PARAM_NAMES.map(name => { - return process.env[name]; - }).filter((l) => { - return !!l; - })); - prefixLocation.add('C:\\Program Files'); - prefixLocation.add('C:\\Program Files (x86)'); - prefixLocation.add('D:\\Program Files'); - prefixLocation.add('D:\\Program Files (x86)'); - return getChromeWindowsLocation(channel, prefixLocation); - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - switch (channel) { - case ChromeReleaseChannel.STABLE: - return [ - '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', - ]; - case ChromeReleaseChannel.BETA: - return [ - '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta', - ]; - case ChromeReleaseChannel.CANARY: - return [ - '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary', - ]; - case ChromeReleaseChannel.DEV: - return [ - '/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev', - ]; - } - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return getChromeLinuxOrWslLocation(channel); - } -} -function resolveDefaultUserDataDir$1(platform, channel) { - switch (platform) { - case BrowserPlatform.WIN64: - case BrowserPlatform.WIN32: - switch (channel) { - case ChromeReleaseChannel.STABLE: - return path$1.join(getLocalAppDataWin(), 'Google', 'Chrome', 'User Data'); - case ChromeReleaseChannel.BETA: - return path$1.join(getLocalAppDataWin(), 'Google', 'Chrome Beta', 'User Data'); - case ChromeReleaseChannel.CANARY: - return path$1.join(getLocalAppDataWin(), 'Google', 'Chrome SxS', 'User Data'); - case ChromeReleaseChannel.DEV: - return path$1.join(getLocalAppDataWin(), 'Google', 'Chrome Dev', 'User Data'); - } - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - switch (channel) { - case ChromeReleaseChannel.STABLE: - return path$1.join(getBaseUserDataDirPathMac(), 'Chrome'); - case ChromeReleaseChannel.BETA: - return path$1.join(getBaseUserDataDirPathMac(), 'Chrome Beta'); - case ChromeReleaseChannel.DEV: - return path$1.join(getBaseUserDataDirPathMac(), 'Chrome Dev'); - case ChromeReleaseChannel.CANARY: - return path$1.join(getBaseUserDataDirPathMac(), 'Chrome Canary'); - } - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - switch (channel) { - case ChromeReleaseChannel.STABLE: - return path$1.join(getConfigHomeLinux(), 'google-chrome'); - case ChromeReleaseChannel.BETA: - return path$1.join(getConfigHomeLinux(), 'google-chrome-beta'); - case ChromeReleaseChannel.CANARY: - return path$1.join(getConfigHomeLinux(), 'google-chrome-canary'); - case ChromeReleaseChannel.DEV: - return path$1.join(getConfigHomeLinux(), 'google-chrome-unstable'); - } - } -} -function getLocalAppDataWin() { - return (process.env['LOCALAPPDATA'] || path$1.join(os.homedir(), 'AppData', 'Local')); -} -function getConfigHomeLinux() { - return (process.env['CHROME_CONFIG_HOME'] || - process.env['XDG_CONFIG_HOME'] || - path$1.join(os.homedir(), '.config')); -} -function getBaseUserDataDirPathMac() { - return path$1.join(os.homedir(), 'Library', 'Application Support', 'Google'); -} -function compareVersions$2(a, b) { - if (!semver.valid(a)) { - throw new Error(`Version ${a} is not a valid semver version`); - } - if (!semver.valid(b)) { - throw new Error(`Version ${b} is not a valid semver version`); - } - if (semver.gt(a, b)) { - return 1; - } - else if (semver.lt(a, b)) { - return -1; - } - else { - return 0; - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function folder$2(platform) { - switch (platform) { - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return 'linux64'; - case BrowserPlatform.MAC_ARM: - return 'mac-arm64'; - case BrowserPlatform.MAC: - return 'mac-x64'; - case BrowserPlatform.WIN32: - return 'win32'; - case BrowserPlatform.WIN64: - return 'win64'; - } -} -function resolveDownloadUrl$3(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') { - return `${baseUrl}/${resolveDownloadPath$3(platform, buildId).join('/')}`; -} -function resolveDownloadPath$3(platform, buildId) { - return [ - buildId, - folder$2(platform), - `chrome-headless-shell-${folder$2(platform)}.zip`, - ]; -} -function relativeExecutablePath$3(platform, _buildId) { - switch (platform) { - case BrowserPlatform.MAC: - case BrowserPlatform.MAC_ARM: - return path$1.join('chrome-headless-shell-' + folder$2(platform), 'chrome-headless-shell'); - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return path$1.join('chrome-headless-shell-linux64', 'chrome-headless-shell'); - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return path$1.join('chrome-headless-shell-' + folder$2(platform), 'chrome-headless-shell.exe'); - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function folder$1(platform) { - switch (platform) { - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return 'linux64'; - case BrowserPlatform.MAC_ARM: - return 'mac-arm64'; - case BrowserPlatform.MAC: - return 'mac-x64'; - case BrowserPlatform.WIN32: - return 'win32'; - case BrowserPlatform.WIN64: - return 'win64'; - } -} -function resolveDownloadUrl$2(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') { - return `${baseUrl}/${resolveDownloadPath$2(platform, buildId).join('/')}`; -} -function resolveDownloadPath$2(platform, buildId) { - return [buildId, folder$1(platform), `chromedriver-${folder$1(platform)}.zip`]; -} -function relativeExecutablePath$2(platform, _buildId) { - switch (platform) { - case BrowserPlatform.MAC: - case BrowserPlatform.MAC_ARM: - return path$1.join('chromedriver-' + folder$1(platform), 'chromedriver'); - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return path$1.join('chromedriver-linux64', 'chromedriver'); - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return path$1.join('chromedriver-' + folder$1(platform), 'chromedriver.exe'); - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function archive$1(platform, buildId) { - switch (platform) { - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return 'chrome-linux'; - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - return 'chrome-mac'; - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return parseInt(buildId, 10) > 591479 ? 'chrome-win' : 'chrome-win32'; - } -} -function folder(platform) { - switch (platform) { - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return 'Linux_x64'; - case BrowserPlatform.MAC_ARM: - return 'Mac_Arm'; - case BrowserPlatform.MAC: - return 'Mac'; - case BrowserPlatform.WIN32: - return 'Win'; - case BrowserPlatform.WIN64: - return 'Win_x64'; - } -} -function resolveDownloadUrl$1(platform, buildId, baseUrl = 'https://storage.googleapis.com/chromium-browser-snapshots') { - return `${baseUrl}/${resolveDownloadPath$1(platform, buildId).join('/')}`; -} -function resolveDownloadPath$1(platform, buildId) { - return [folder(platform), buildId, `${archive$1(platform, buildId)}.zip`]; -} -function relativeExecutablePath$1(platform, _buildId) { - switch (platform) { - case BrowserPlatform.MAC: - case BrowserPlatform.MAC_ARM: - return path$1.join('chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'); - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return path$1.join('chrome-linux', 'chrome'); - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return path$1.join('chrome-win', 'chrome.exe'); - } -} -async function resolveBuildId$2(platform) { - return await getText(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`)); -} -function compareVersions$1(a, b) { - return Number(a) - Number(b); -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function getFormat$1(buildId) { - const majorVersion = Number(buildId.split('.').shift()); - return majorVersion >= 135 ? 'xz' : 'bz2'; -} -function archiveNightly(platform, buildId) { - switch (platform) { - case BrowserPlatform.LINUX: - return `firefox-${buildId}.en-US.linux-x86_64.tar.${getFormat$1(buildId)}`; - case BrowserPlatform.LINUX_ARM: - return `firefox-${buildId}.en-US.linux-aarch64.tar.${getFormat$1(buildId)}`; - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - return `firefox-${buildId}.en-US.mac.dmg`; - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return `firefox-${buildId}.en-US.${platform}.zip`; - } -} -function archive(platform, buildId) { - switch (platform) { - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return `firefox-${buildId}.tar.${getFormat$1(buildId)}`; - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - return `Firefox ${buildId}.dmg`; - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return `Firefox Setup ${buildId}.exe`; - } -} -function platformName(platform) { - switch (platform) { - case BrowserPlatform.LINUX: - return `linux-x86_64`; - case BrowserPlatform.LINUX_ARM: - return `linux-aarch64`; - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - return `mac`; - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return platform; - } -} -function parseBuildId(buildId) { - for (const value of Object.values(FirefoxChannel)) { - if (buildId.startsWith(value + '_')) { - buildId = buildId.substring(value.length + 1); - return [value, buildId]; - } - } - return [FirefoxChannel.NIGHTLY, buildId]; -} -function resolveDownloadUrl(platform, buildId, baseUrl) { - const [channel] = parseBuildId(buildId); - switch (channel) { - case FirefoxChannel.NIGHTLY: - baseUrl ??= - 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central'; - break; - case FirefoxChannel.DEVEDITION: - baseUrl ??= 'https://archive.mozilla.org/pub/devedition/releases'; - break; - case FirefoxChannel.BETA: - case FirefoxChannel.STABLE: - case FirefoxChannel.ESR: - baseUrl ??= 'https://archive.mozilla.org/pub/firefox/releases'; - break; - } - return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`; -} -function resolveDownloadPath(platform, buildId) { - const [channel, resolvedBuildId] = parseBuildId(buildId); - switch (channel) { - case FirefoxChannel.NIGHTLY: - return [archiveNightly(platform, resolvedBuildId)]; - case FirefoxChannel.DEVEDITION: - case FirefoxChannel.BETA: - case FirefoxChannel.STABLE: - case FirefoxChannel.ESR: - return [ - resolvedBuildId, - platformName(platform), - 'en-US', - archive(platform, resolvedBuildId), - ]; - } -} -function relativeExecutablePath(platform, buildId) { - const [channel] = parseBuildId(buildId); - switch (channel) { - case FirefoxChannel.NIGHTLY: - switch (platform) { - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - return path$1.join('Firefox Nightly.app', 'Contents', 'MacOS', 'firefox'); - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return path$1.join('firefox', 'firefox'); - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return path$1.join('firefox', 'firefox.exe'); - } - case FirefoxChannel.BETA: - case FirefoxChannel.DEVEDITION: - case FirefoxChannel.ESR: - case FirefoxChannel.STABLE: - switch (platform) { - case BrowserPlatform.MAC_ARM: - case BrowserPlatform.MAC: - return path$1.join('Firefox.app', 'Contents', 'MacOS', 'firefox'); - case BrowserPlatform.LINUX_ARM: - case BrowserPlatform.LINUX: - return path$1.join('firefox', 'firefox'); - case BrowserPlatform.WIN32: - case BrowserPlatform.WIN64: - return path$1.join('core', 'firefox.exe'); - } - } -} -var FirefoxChannel; -(function (FirefoxChannel) { - FirefoxChannel["STABLE"] = "stable"; - FirefoxChannel["ESR"] = "esr"; - FirefoxChannel["DEVEDITION"] = "devedition"; - FirefoxChannel["BETA"] = "beta"; - FirefoxChannel["NIGHTLY"] = "nightly"; -})(FirefoxChannel || (FirefoxChannel = {})); -let baseVersionUrl = 'https://product-details.mozilla.org/1.0'; -async function resolveBuildId$1(channel = FirefoxChannel.NIGHTLY) { - const channelToVersionKey = { - [FirefoxChannel.ESR]: 'FIREFOX_ESR', - [FirefoxChannel.STABLE]: 'LATEST_FIREFOX_VERSION', - [FirefoxChannel.DEVEDITION]: 'FIREFOX_DEVEDITION', - [FirefoxChannel.BETA]: 'FIREFOX_DEVEDITION', - [FirefoxChannel.NIGHTLY]: 'FIREFOX_NIGHTLY', - }; - const versions = (await getJSON(new URL(`${baseVersionUrl}/firefox_versions.json`))); - const version = versions[channelToVersionKey[channel]]; - if (!version) { - throw new Error(`Channel ${channel} is not found.`); - } - return channel + '_' + version; -} -async function createProfile$1(options) { - if (!fs.existsSync(options.path)) { - await fs.promises.mkdir(options.path, { - recursive: true, - }); - } - await syncPreferences({ - preferences: { - ...defaultProfilePreferences(options.preferences), - ...options.preferences, - }, - path: options.path, - }); -} -function defaultProfilePreferences(extraPrefs) { - const server = 'dummy.test'; - const defaultPrefs = { - 'app.normandy.api_url': '', - 'app.update.checkInstallTime': false, - 'app.update.disabledForTesting': true, - 'apz.content_response_timeout': 60000, - 'browser.contentblocking.features.standard': '-tp,tpPrivate,cookieBehavior0,-cryptoTP,-fp', - 'browser.dom.window.dump.enabled': true, - 'browser.newtabpage.activity-stream.feeds.system.topstories': false, - 'browser.newtabpage.enabled': false, - 'browser.pagethumbnails.capturing_disabled': true, - 'browser.safebrowsing.blockedURIs.enabled': false, - 'browser.safebrowsing.downloads.enabled': false, - 'browser.safebrowsing.malware.enabled': false, - 'browser.safebrowsing.phishing.enabled': false, - 'browser.search.update': false, - 'browser.sessionstore.resume_from_crash': false, - 'browser.shell.checkDefaultBrowser': false, - 'browser.startup.homepage': 'about:blank', - 'browser.startup.homepage_override.mstone': 'ignore', - 'browser.startup.page': 0, - 'browser.tabs.disableBackgroundZombification': false, - 'browser.tabs.warnOnCloseOtherTabs': false, - 'browser.tabs.warnOnOpen': false, - 'browser.translations.automaticallyPopup': false, - 'browser.uitour.enabled': false, - 'browser.urlbar.suggest.searches': false, - 'browser.usedOnWindows10.introURL': '', - 'browser.warnOnQuit': false, - 'datareporting.healthreport.documentServerURI': `http://${server}/dummy/healthreport/`, - 'datareporting.healthreport.logging.consoleEnabled': false, - 'datareporting.healthreport.service.enabled': false, - 'datareporting.healthreport.service.firstRun': false, - 'datareporting.healthreport.uploadEnabled': false, - 'datareporting.policy.dataSubmissionEnabled': false, - 'datareporting.policy.dataSubmissionPolicyBypassNotification': true, - 'devtools.jsonview.enabled': false, - 'dom.disable_open_during_load': false, - 'dom.file.createInChild': true, - 'dom.ipc.reportProcessHangs': false, - 'dom.max_chrome_script_run_time': 0, - 'dom.max_script_run_time': 0, - 'extensions.autoDisableScopes': 0, - 'extensions.enabledScopes': 5, - 'extensions.getAddons.cache.enabled': false, - 'extensions.installDistroAddons': false, - 'extensions.update.enabled': false, - 'extensions.update.notifyUser': false, - 'extensions.webservice.discoverURL': `http://${server}/dummy/discoveryURL`, - 'focusmanager.testmode': true, - 'general.useragent.updates.enabled': false, - 'geo.provider.testing': true, - 'geo.wifi.scan': false, - 'hangmonitor.timeout': 0, - 'javascript.options.showInConsole': true, - 'media.gmp-manager.updateEnabled': false, - 'media.sanity-test.disabled': true, - 'network.cookie.sameSite.laxByDefault': false, - 'network.http.prompt-temp-redirect': false, - 'network.http.speculative-parallel-limit': 0, - 'network.manage-offline-status': false, - 'network.sntp.pools': server, - 'plugin.state.flash': 0, - 'privacy.trackingprotection.enabled': false, - 'remote.enabled': true, - 'remote.bidi.dismiss_file_pickers.enabled': true, - 'screenshots.browser.component.enabled': false, - 'security.certerrors.mitm.priming.enabled': false, - 'security.fileuri.strict_origin_policy': false, - 'security.notification_enable_delay': 0, - 'services.settings.server': `http://${server}/dummy/blocklist/`, - 'signon.autofillForms': false, - 'signon.rememberSignons': false, - 'startup.homepage_welcome_url': 'about:blank', - 'startup.homepage_welcome_url.additional': '', - 'toolkit.cosmeticAnimations.enabled': false, - 'toolkit.startup.max_resumed_crashes': -1, - }; - return Object.assign(defaultPrefs, extraPrefs); -} -async function backupFile(input) { - if (!fs.existsSync(input)) { - return; - } - await fs.promises.copyFile(input, input + '.puppeteer'); -} -async function syncPreferences(options) { - const prefsPath = path$1.join(options.path, 'prefs.js'); - const userPath = path$1.join(options.path, 'user.js'); - const lines = Object.entries(options.preferences).map(([key, value]) => { - return `user_pref(${JSON.stringify(key)}, ${JSON.stringify(value)});`; - }); - const result = await Promise.allSettled([ - backupFile(userPath).then(async () => { - await fs.promises.writeFile(userPath, lines.join('\n')); - }), - backupFile(prefsPath), - ]); - for (const command of result) { - if (command.status === 'rejected') { - throw command.reason; - } - } -} -function compareVersions(a, b) { - return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16); -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -({ - [Browser.CHROMEDRIVER]: resolveDownloadUrl$2, - [Browser.CHROMEHEADLESSSHELL]: resolveDownloadUrl$3, - [Browser.CHROME]: resolveDownloadUrl$4, - [Browser.CHROMIUM]: resolveDownloadUrl$1, - [Browser.FIREFOX]: resolveDownloadUrl, -}); -({ - [Browser.CHROMEDRIVER]: resolveDownloadPath$2, - [Browser.CHROMEHEADLESSSHELL]: resolveDownloadPath$3, - [Browser.CHROME]: resolveDownloadPath$4, - [Browser.CHROMIUM]: resolveDownloadPath$1, - [Browser.FIREFOX]: resolveDownloadPath, -}); -const executablePathByBrowser = { - [Browser.CHROMEDRIVER]: relativeExecutablePath$2, - [Browser.CHROMEHEADLESSSHELL]: relativeExecutablePath$3, - [Browser.CHROME]: relativeExecutablePath$4, - [Browser.CHROMIUM]: relativeExecutablePath$1, - [Browser.FIREFOX]: relativeExecutablePath, -}; -const versionComparators = { - [Browser.CHROMEDRIVER]: compareVersions$2, - [Browser.CHROMEHEADLESSSHELL]: compareVersions$2, - [Browser.CHROME]: compareVersions$2, - [Browser.CHROMIUM]: compareVersions$1, - [Browser.FIREFOX]: compareVersions, -}; -async function resolveBuildIdForBrowserTag(browser, platform, tag) { - switch (browser) { - case Browser.FIREFOX: - switch (tag) { - case BrowserTag.LATEST: - return await resolveBuildId$1(FirefoxChannel.NIGHTLY); - case BrowserTag.BETA: - return await resolveBuildId$1(FirefoxChannel.BETA); - case BrowserTag.NIGHTLY: - return await resolveBuildId$1(FirefoxChannel.NIGHTLY); - case BrowserTag.DEVEDITION: - return await resolveBuildId$1(FirefoxChannel.DEVEDITION); - case BrowserTag.STABLE: - return await resolveBuildId$1(FirefoxChannel.STABLE); - case BrowserTag.ESR: - return await resolveBuildId$1(FirefoxChannel.ESR); - case BrowserTag.CANARY: - case BrowserTag.DEV: - throw new Error(`${tag.toUpperCase()} is not available for Firefox`); - } - case Browser.CHROME: { - switch (tag) { - case BrowserTag.LATEST: - return await resolveBuildId$3(ChromeReleaseChannel.CANARY); - case BrowserTag.BETA: - return await resolveBuildId$3(ChromeReleaseChannel.BETA); - case BrowserTag.CANARY: - return await resolveBuildId$3(ChromeReleaseChannel.CANARY); - case BrowserTag.DEV: - return await resolveBuildId$3(ChromeReleaseChannel.DEV); - case BrowserTag.STABLE: - return await resolveBuildId$3(ChromeReleaseChannel.STABLE); - case BrowserTag.NIGHTLY: - case BrowserTag.DEVEDITION: - case BrowserTag.ESR: - throw new Error(`${tag.toUpperCase()} is not available for Chrome`); - } - } - case Browser.CHROMEDRIVER: { - switch (tag) { - case BrowserTag.LATEST: - case BrowserTag.CANARY: - return await resolveBuildId$3(ChromeReleaseChannel.CANARY); - case BrowserTag.BETA: - return await resolveBuildId$3(ChromeReleaseChannel.BETA); - case BrowserTag.DEV: - return await resolveBuildId$3(ChromeReleaseChannel.DEV); - case BrowserTag.STABLE: - return await resolveBuildId$3(ChromeReleaseChannel.STABLE); - case BrowserTag.NIGHTLY: - case BrowserTag.DEVEDITION: - case BrowserTag.ESR: - throw new Error(`${tag.toUpperCase()} is not available for ChromeDriver`); - } - } - case Browser.CHROMEHEADLESSSHELL: { - switch (tag) { - case BrowserTag.LATEST: - case BrowserTag.CANARY: - return await resolveBuildId$3(ChromeReleaseChannel.CANARY); - case BrowserTag.BETA: - return await resolveBuildId$3(ChromeReleaseChannel.BETA); - case BrowserTag.DEV: - return await resolveBuildId$3(ChromeReleaseChannel.DEV); - case BrowserTag.STABLE: - return await resolveBuildId$3(ChromeReleaseChannel.STABLE); - case BrowserTag.NIGHTLY: - case BrowserTag.DEVEDITION: - case BrowserTag.ESR: - throw new Error(`${tag} is not available for chrome-headless-shell`); - } - } - case Browser.CHROMIUM: - switch (tag) { - case BrowserTag.LATEST: - return await resolveBuildId$2(platform); - case BrowserTag.NIGHTLY: - case BrowserTag.CANARY: - case BrowserTag.DEV: - case BrowserTag.DEVEDITION: - case BrowserTag.BETA: - case BrowserTag.STABLE: - case BrowserTag.ESR: - throw new Error(`${tag} is not supported for Chromium. Use 'latest' instead.`); - } - } -} -async function resolveBuildId(browser, platform, tag) { - const browserTag = tag; - if (Object.values(BrowserTag).includes(browserTag)) { - return await resolveBuildIdForBrowserTag(browser, platform, browserTag); - } - switch (browser) { - case Browser.FIREFOX: - return tag; - case Browser.CHROME: - const chromeResult = await resolveBuildId$3(tag); - if (chromeResult) { - return chromeResult; - } - return tag; - case Browser.CHROMEDRIVER: - const chromeDriverResult = await resolveBuildId$3(tag); - if (chromeDriverResult) { - return chromeDriverResult; - } - return tag; - case Browser.CHROMEHEADLESSSHELL: - const chromeHeadlessShellResult = await resolveBuildId$3(tag); - if (chromeHeadlessShellResult) { - return chromeHeadlessShellResult; - } - return tag; - case Browser.CHROMIUM: - return tag; - } -} -async function createProfile(browser, opts) { - switch (browser) { - case Browser.FIREFOX: - return await createProfile$1(opts); - case Browser.CHROME: - case Browser.CHROMIUM: - throw new Error(`Profile creation is not support for ${browser} yet`); - } -} -function resolveDefaultUserDataDir(browser, platform, channel) { - switch (browser) { - case Browser.CHROMEDRIVER: - case Browser.CHROMEHEADLESSSHELL: - case Browser.FIREFOX: - case Browser.CHROMIUM: - throw new Error(`Default user dir detection is not supported for ${browser} yet.`); - case Browser.CHROME: - return resolveDefaultUserDataDir$1(platform, channel); - } -} -function resolveSystemExecutablePaths(browser, platform, channel) { - switch (browser) { - case Browser.CHROMEDRIVER: - case Browser.CHROMEHEADLESSSHELL: - case Browser.FIREFOX: - case Browser.CHROMIUM: - throw new Error(`System browser detection is not supported for ${browser} yet.`); - case Browser.CHROME: - return resolveSystemExecutablePaths$1(platform, channel); - } -} -function getVersionComparator(browser) { - return versionComparators[browser]; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function detectBrowserPlatform() { - const platform = os.platform(); - const arch = os.arch(); - switch (platform) { - case 'darwin': - return arch === 'arm64' ? BrowserPlatform.MAC_ARM : BrowserPlatform.MAC; - case 'linux': - return arch === 'arm64' - ? BrowserPlatform.LINUX_ARM - : BrowserPlatform.LINUX; - case 'win32': - return arch === 'x64' || - (arch === 'arm64' && isWindows11(os.release())) - ? BrowserPlatform.WIN64 - : BrowserPlatform.WIN32; - default: - return undefined; - } -} -function isWindows11(version) { - const parts = version.split('.'); - if (parts.length > 2) { - const major = parseInt(parts[0], 10); - const minor = parseInt(parts[1], 10); - const patch = parseInt(parts[2], 10); - return (major > 10 || - (major === 10 && minor > 0) || - (major === 10 && minor === 0 && patch >= 22000)); - } - return false; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const debugCache = debug$2('puppeteer:browsers:cache'); -class InstalledBrowser { - browser; - buildId; - platform; - executablePath; - #cache; - constructor(cache, browser, buildId, platform) { - this.#cache = cache; - this.browser = browser; - this.buildId = buildId; - this.platform = platform; - this.executablePath = cache.computeExecutablePath({ - browser, - buildId, - platform, - }); - } - get path() { - return this.#cache.installationDir(this.browser, this.platform, this.buildId); - } - readMetadata() { - return this.#cache.readMetadata(this.browser); - } - writeMetadata(metadata) { - this.#cache.writeMetadata(this.browser, metadata); - } -} -let Cache$2 = class Cache { - #rootDir; - constructor(rootDir) { - this.#rootDir = rootDir; - } - get rootDir() { - return this.#rootDir; - } - browserRoot(browser) { - return path$1.join(this.#rootDir, browser); - } - metadataFile(browser) { - return path$1.join(this.browserRoot(browser), '.metadata'); - } - readMetadata(browser) { - const metatadaPath = this.metadataFile(browser); - if (!fs.existsSync(metatadaPath)) { - return { aliases: {} }; - } - const data = JSON.parse(fs.readFileSync(metatadaPath, 'utf8')); - if (typeof data !== 'object') { - throw new Error('.metadata is not an object'); - } - return data; - } - writeMetadata(browser, metadata) { - const metatadaPath = this.metadataFile(browser); - fs.mkdirSync(path$1.dirname(metatadaPath), { recursive: true }); - fs.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2)); - } - readExecutablePath(browser, platform, buildId) { - const metadata = this.readMetadata(browser); - const key = `${platform}-${buildId}`; - return metadata.executablePaths?.[key] ?? null; - } - writeExecutablePath(browser, platform, buildId, executablePath) { - const metadata = this.readMetadata(browser); - if (!metadata.executablePaths) { - metadata.executablePaths = {}; - } - const key = `${platform}-${buildId}`; - metadata.executablePaths[key] = executablePath; - this.writeMetadata(browser, metadata); - } - resolveAlias(browser, alias) { - const metadata = this.readMetadata(browser); - if (alias === 'latest') { - return Object.values(metadata.aliases || {}) - .sort(getVersionComparator(browser)) - .at(-1); - } - return metadata.aliases[alias]; - } - installationDir(browser, platform, buildId) { - return path$1.join(this.browserRoot(browser), `${platform}-${buildId}`); - } - clear() { - fs.rmSync(this.#rootDir, { - force: true, - recursive: true, - maxRetries: 10, - retryDelay: 500, - }); - } - uninstall(browser, platform, buildId) { - const metadata = this.readMetadata(browser); - for (const alias of Object.keys(metadata.aliases)) { - if (metadata.aliases[alias] === buildId) { - delete metadata.aliases[alias]; - } - } - const key = `${platform}-${buildId}`; - if (metadata.executablePaths?.[key]) { - delete metadata.executablePaths[key]; - this.writeMetadata(browser, metadata); - } - fs.rmSync(this.installationDir(browser, platform, buildId), { - force: true, - recursive: true, - maxRetries: 10, - retryDelay: 500, - }); - } - getInstalledBrowsers() { - if (!fs.existsSync(this.#rootDir)) { - return []; - } - const types = fs.readdirSync(this.#rootDir); - const browsers = types.filter((t) => { - return Object.values(Browser).includes(t); - }); - return browsers.flatMap(browser => { - const files = fs.readdirSync(this.browserRoot(browser)); - return files - .map(file => { - const result = parseFolderPath(path$1.join(this.browserRoot(browser), file)); - if (!result) { - return null; - } - return new InstalledBrowser(this, browser, result.buildId, result.platform); - }) - .filter((item) => { - return item !== null; - }); - }); - } - computeExecutablePath(options) { - options.platform ??= detectBrowserPlatform(); - if (!options.platform) { - throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`); - } - try { - options.buildId = - this.resolveAlias(options.browser, options.buildId) ?? options.buildId; - } - catch { - debugCache('could not read .metadata file for the browser'); - } - const installationDir = this.installationDir(options.browser, options.platform, options.buildId); - const storedExecutablePath = this.readExecutablePath(options.browser, options.platform, options.buildId); - if (storedExecutablePath) { - return path$1.join(installationDir, storedExecutablePath); - } - return path$1.join(installationDir, executablePathByBrowser[options.browser](options.platform, options.buildId)); - } -}; -function parseFolderPath(folderPath) { - const name = path$1.basename(folderPath); - const splits = name.split('-'); - if (splits.length !== 2) { - return; - } - const [platform, buildId] = splits; - if (!buildId || !platform) { - return; - } - return { platform, buildId }; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const debugLaunch = debug$2('puppeteer:browsers:launcher'); -function computeExecutablePath(options) { - if (options.cacheDir === null) { - options.platform ??= detectBrowserPlatform(); - if (options.platform === undefined) { - throw new Error(`No platform specified. Couldn't auto-detect browser platform.`); - } - return executablePathByBrowser[options.browser](options.platform, options.buildId); - } - return new Cache$2(options.cacheDir).computeExecutablePath(options); -} -function computeSystemExecutablePath(options) { - options.platform ??= detectBrowserPlatform(); - if (!options.platform) { - throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`); - } - const paths = resolveSystemExecutablePaths(options.browser, options.platform, options.channel); - for (const path of paths) { - try { - accessSync(path); - return path; - } - catch { } - } - throw new Error(`Could not find Google Chrome executable for channel '${options.channel}' at:${paths.map(path => { - return `\n - ${path}`; - })}.`); -} -function launch$1(opts) { - return new Process(opts); -} -const CDP_WEBSOCKET_ENDPOINT_REGEX = /^DevTools listening on (ws:\/\/.*)$/; -const WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = /^WebDriver BiDi listening on (ws:\/\/.*)$/; -const processListeners = new Map(); -const dispatchers = { - exit: (...args) => { - processListeners.get('exit')?.forEach(handler => { - return handler(...args); - }); - }, - SIGINT: (...args) => { - processListeners.get('SIGINT')?.forEach(handler => { - return handler(...args); - }); - }, - SIGHUP: (...args) => { - processListeners.get('SIGHUP')?.forEach(handler => { - return handler(...args); - }); - }, - SIGTERM: (...args) => { - processListeners.get('SIGTERM')?.forEach(handler => { - return handler(...args); - }); - }, -}; -function subscribeToProcessEvent(event, handler) { - const listeners = processListeners.get(event) || []; - if (listeners.length === 0) { - process.on(event, dispatchers[event]); - } - listeners.push(handler); - processListeners.set(event, listeners); -} -function unsubscribeFromProcessEvent(event, handler) { - const listeners = processListeners.get(event) || []; - const existingListenerIdx = listeners.indexOf(handler); - if (existingListenerIdx === -1) { - return; - } - listeners.splice(existingListenerIdx, 1); - processListeners.set(event, listeners); - if (listeners.length === 0) { - process.off(event, dispatchers[event]); - } -} -class Process { - #executablePath; - #args; - #browserProcess; - #exited = false; - #hooksRan = false; - #onExitHook = async () => { }; - #browserProcessExiting; - #logs = []; - #maxLogLinesSize = 1000; - #lineEmitter = new EventEmitter$1(); - #onAbort = () => { - this.kill(); - }; - #signal; - constructor(opts) { - this.#executablePath = opts.executablePath; - this.#args = opts.args ?? []; - this.#signal = opts.signal; - if (this.#signal?.aborted) { - throw new Error(this.#signal.reason ? this.#signal.reason : 'Launch aborted'); - } - this.#signal?.addEventListener('abort', this.#onAbort, { once: true }); - opts.pipe ??= false; - opts.dumpio ??= false; - opts.handleSIGINT ??= true; - opts.handleSIGTERM ??= true; - opts.handleSIGHUP ??= true; - opts.detached ??= process.platform !== 'win32'; - const stdio = this.#configureStdio({ - pipe: opts.pipe, - }); - const env = opts.env || {}; - debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(' ')}`, { - detached: opts.detached, - env: Object.keys(env).reduce((res, key) => { - if (key.toLowerCase().startsWith('puppeteer_')) { - res[key] = env[key]; - } - return res; - }, {}), - stdio, - }); - this.#browserProcess = childProcess.spawn(this.#executablePath, this.#args, { - detached: opts.detached, - env, - stdio, - }); - this.#recordStream(this.#browserProcess.stderr); - this.#recordStream(this.#browserProcess.stdout); - debugLaunch(`Launched ${this.#browserProcess.pid}`); - if (opts.dumpio) { - this.#browserProcess.stderr?.pipe(process.stderr); - this.#browserProcess.stdout?.pipe(process.stdout); - } - subscribeToProcessEvent('exit', this.#onDriverProcessExit); - if (opts.handleSIGINT) { - subscribeToProcessEvent('SIGINT', this.#onDriverProcessSignal); - } - if (opts.handleSIGTERM) { - subscribeToProcessEvent('SIGTERM', this.#onDriverProcessSignal); - } - if (opts.handleSIGHUP) { - subscribeToProcessEvent('SIGHUP', this.#onDriverProcessSignal); - } - if (opts.onExit) { - this.#onExitHook = opts.onExit; - } - this.#browserProcessExiting = new Promise((resolve, reject) => { - this.#browserProcess.once('exit', async () => { - debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`); - this.#clearListeners(); - this.#exited = true; - try { - await this.#runHooks(); - } - catch (err) { - reject(err); - return; - } - resolve(); - }); - }); - } - async #runHooks() { - if (this.#hooksRan) { - return; - } - this.#hooksRan = true; - await this.#onExitHook(); - } - get nodeProcess() { - return this.#browserProcess; - } - #configureStdio(opts) { - if (opts.pipe) { - return ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']; - } - else { - return ['pipe', 'pipe', 'pipe']; - } - } - #clearListeners() { - unsubscribeFromProcessEvent('exit', this.#onDriverProcessExit); - unsubscribeFromProcessEvent('SIGINT', this.#onDriverProcessSignal); - unsubscribeFromProcessEvent('SIGTERM', this.#onDriverProcessSignal); - unsubscribeFromProcessEvent('SIGHUP', this.#onDriverProcessSignal); - this.#signal?.removeEventListener('abort', this.#onAbort); - } - #onDriverProcessExit = (_code) => { - this.kill(); - }; - #onDriverProcessSignal = (signal) => { - switch (signal) { - case 'SIGINT': - this.kill(); - process.exit(130); - case 'SIGTERM': - case 'SIGHUP': - void this.close(); - break; - } - }; - async close() { - await this.#runHooks(); - if (!this.#exited) { - this.kill(); - } - return await this.#browserProcessExiting; - } - hasClosed() { - return this.#browserProcessExiting; - } - kill() { - debugLaunch(`Trying to kill ${this.#browserProcess.pid}`); - if (this.#browserProcess && - this.#browserProcess.pid && - pidExists(this.#browserProcess.pid)) { - try { - debugLaunch(`Browser process ${this.#browserProcess.pid} exists`); - if (process.platform === 'win32') { - try { - childProcess.execSync(`taskkill /pid ${this.#browserProcess.pid} /T /F`); - } - catch (error) { - debugLaunch(`Killing ${this.#browserProcess.pid} using taskkill failed`, error); - this.#browserProcess.kill(); - } - } - else { - const processGroupId = -this.#browserProcess.pid; - try { - process.kill(processGroupId, 'SIGKILL'); - } - catch (error) { - debugLaunch(`Killing ${this.#browserProcess.pid} using process.kill failed`, error); - this.#browserProcess.kill('SIGKILL'); - } - } - } - catch (error) { - throw new Error(`${PROCESS_ERROR_EXPLANATION}\nError cause: ${isErrorLike(error) ? error.stack : error}`); - } - } - this.#clearListeners(); - } - #recordStream(stream) { - const rl = readline.createInterface(stream); - const cleanup = () => { - rl.off('line', onLine); - rl.off('close', onClose); - try { - rl.close(); - } - catch { } - }; - const onLine = (line) => { - if (line.trim() === '') { - return; - } - this.#logs.push(line); - const delta = this.#logs.length - this.#maxLogLinesSize; - if (delta) { - this.#logs.splice(0, delta); - } - this.#lineEmitter.emit('line', line); - }; - const onClose = () => { - cleanup(); - }; - rl.on('line', onLine); - rl.on('close', onClose); - } - getRecentLogs() { - return [...this.#logs]; - } - waitForLineOutput(regex, timeout = 0) { - return new Promise((resolve, reject) => { - const onClose = (errorOrCode) => { - cleanup(); - reject(new Error([ - `Failed to launch the browser process: ${errorOrCode instanceof Error - ? ` ${errorOrCode.message}` - : ` Code: ${errorOrCode}`}`, - '', - `stderr:`, - this.getRecentLogs().join('\n'), - '', - 'TROUBLESHOOTING: https://pptr.dev/troubleshooting', - '', - ].join('\n'))); - }; - this.#browserProcess.on('exit', onClose); - this.#browserProcess.on('error', onClose); - const timeoutId = timeout > 0 ? setTimeout(onTimeout, timeout) : undefined; - this.#lineEmitter.on('line', onLine); - const cleanup = () => { - clearTimeout(timeoutId); - this.#lineEmitter.off('line', onLine); - this.#browserProcess.off('exit', onClose); - this.#browserProcess.off('error', onClose); - }; - function onTimeout() { - cleanup(); - reject(new TimeoutError(`Timed out after ${timeout} ms while waiting for the WS endpoint URL to appear in stdout!`)); - } - for (const line of this.#logs) { - onLine(line); - } - function onLine(line) { - const match = line.match(regex); - if (!match) { - return; - } - cleanup(); - resolve(match[1]); - } - }); - } -} -const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary. -This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser. -Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed. -If you think this is a bug, please report it on the Puppeteer issue tracker.`; -function pidExists(pid) { - try { - return process.kill(pid, 0); - } - catch (error) { - if (isErrnoException(error)) { - if (error.code && error.code === 'ESRCH') { - return false; - } - } - throw error; - } -} -function isErrorLike(obj) { - return (typeof obj === 'object' && obj !== null && 'name' in obj && 'message' in obj); -} -function isErrnoException(obj) { - return (isErrorLike(obj) && - ('errno' in obj || 'code' in obj || 'path' in obj || 'syscall' in obj)); -} -class TimeoutError extends Error { - constructor(message) { - super(message); - this.name = this.constructor.name; - Error.captureStackTrace(this, this.constructor); - } -} - -var nodeProgress = {exports: {}}; - -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -var hasRequiredNodeProgress; - -function requireNodeProgress () { - if (hasRequiredNodeProgress) return nodeProgress.exports; - hasRequiredNodeProgress = 1; - (function (module, exports$1) { - module.exports = ProgressBar; - function ProgressBar(fmt, options) { - this.stream = options.stream || process.stderr; - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - this.fmt = fmt; - this.curr = options.curr || 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear; - this.chars = { - complete : options.complete || '=', - incomplete : options.incomplete || '-', - head : options.head || (options.complete || '=') - }; - this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0; - this.lastRender = -Infinity; - this.callback = options.callback || function () {}; - this.tokens = {}; - this.lastDraw = ''; - } - ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - if ('object' == typeof len) tokens = len, len = 1; - if (tokens) this.tokens = tokens; - if (0 == this.curr) this.start = new Date; - this.curr += len; - this.render(); - if (this.curr >= this.total) { - this.render(undefined, true); - this.complete = true; - this.terminate(); - this.callback(this); - return; - } - }; - ProgressBar.prototype.render = function (tokens, force) { - force = force !== undefined ? force : false; - if (tokens) this.tokens = tokens; - if (!this.stream.isTTY) return; - var now = Date.now(); - var delta = now - this.lastRender; - if (!force && (delta < this.renderThrottle)) { - return; - } else { - this.lastRender = now; - } - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - var percent = Math.floor(ratio * 100); - var incomplete, complete, completeLength; - var elapsed = new Date - this.start; - var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - var rate = this.curr / (elapsed / 1000); - var str = this.fmt - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000) - .toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%') - .replace(':rate', Math.round(rate)); - var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length); - if(availableSpace && process.platform === 'win32'){ - availableSpace = availableSpace - 1; - } - var width = Math.min(this.width, availableSpace); - completeLength = Math.round(width * ratio); - complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete); - incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete); - if(completeLength > 0) - complete = complete.slice(0, -1) + this.chars.head; - str = str.replace(':bar', complete + incomplete); - if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]); - if (this.lastDraw !== str) { - this.stream.cursorTo(0); - this.stream.write(str); - this.stream.clearLine(1); - this.lastDraw = str; - } - }; - ProgressBar.prototype.update = function (ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - this.tick(delta, tokens); - }; - ProgressBar.prototype.interrupt = function (message) { - this.stream.clearLine(); - this.stream.cursorTo(0); - this.stream.write(message); - this.stream.write('\n'); - this.stream.write(this.lastDraw); - }; - ProgressBar.prototype.terminate = function () { - if (this.clear) { - if (this.stream.clearLine) { - this.stream.clearLine(); - this.stream.cursorTo(0); - } - } else { - this.stream.write('\n'); - } - }; - } (nodeProgress)); - return nodeProgress.exports; -} - -var progress; -var hasRequiredProgress; - -function requireProgress () { - if (hasRequiredProgress) return progress; - hasRequiredProgress = 1; - progress = requireNodeProgress(); - return progress; -} - -requireProgress(); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -debug$2('puppeteer:browsers:fileUtil'); - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -debug$2('puppeteer:browsers:install'); -async function uninstall(options) { - options.platform ??= detectBrowserPlatform(); - if (!options.platform) { - throw new Error(`Cannot detect the browser platform for: ${os.platform()} (${os.arch()})`); - } - new Cache$2(options.cacheDir).uninstall(options.browser, options.platform, options.buildId); -} -async function getInstalledBrowsers(options) { - return new Cache$2(options.cacheDir).getInstalledBrowsers(); -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -var main = /*#__PURE__*/Object.freeze({ - __proto__: null, - get Browser () { return Browser; }, - get BrowserPlatform () { return BrowserPlatform; }, - get BrowserTag () { return BrowserTag; }, - CDP_WEBSOCKET_ENDPOINT_REGEX: CDP_WEBSOCKET_ENDPOINT_REGEX, - Cache: Cache$2, - get ChromeReleaseChannel () { return ChromeReleaseChannel; }, - InstalledBrowser: InstalledBrowser, - Process: Process, - TimeoutError: TimeoutError, - WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX: WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, - computeExecutablePath: computeExecutablePath, - computeSystemExecutablePath: computeSystemExecutablePath, - createProfile: createProfile, - detectBrowserPlatform: detectBrowserPlatform, - getInstalledBrowsers: getInstalledBrowsers, - getVersionComparator: getVersionComparator, - launch: launch$1, - resolveBuildId: resolveBuildId, - resolveDefaultUserDataDir: resolveDefaultUserDataDir, - uninstall: uninstall -}); - -var bufferUtil = {exports: {}}; - -var constants; -var hasRequiredConstants; - -function requireConstants () { - if (hasRequiredConstants) return constants; - hasRequiredConstants = 1; - const BINARY_TYPES = ['nodebuffer', 'arraybuffer', 'fragments']; - const hasBlob = typeof Blob !== 'undefined'; - if (hasBlob) BINARY_TYPES.push('blob'); - constants = { - BINARY_TYPES, - CLOSE_TIMEOUT: 30000, - EMPTY_BUFFER: Buffer.alloc(0), - GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11', - hasBlob, - kForOnEventAttribute: Symbol('kIsForOnEventAttribute'), - kListener: Symbol('kListener'), - kStatusCode: Symbol('status-code'), - kWebSocket: Symbol('websocket'), - NOOP: () => {} - }; - return constants; -} - -var hasRequiredBufferUtil; - -function requireBufferUtil () { - if (hasRequiredBufferUtil) return bufferUtil.exports; - hasRequiredBufferUtil = 1; - const { EMPTY_BUFFER } = requireConstants(); - const FastBuffer = Buffer[Symbol.species]; - function concat(list, totalLength) { - if (list.length === 0) return EMPTY_BUFFER; - if (list.length === 1) return list[0]; - const target = Buffer.allocUnsafe(totalLength); - let offset = 0; - for (let i = 0; i < list.length; i++) { - const buf = list[i]; - target.set(buf, offset); - offset += buf.length; - } - if (offset < totalLength) { - return new FastBuffer(target.buffer, target.byteOffset, offset); - } - return target; - } - function _mask(source, mask, output, offset, length) { - for (let i = 0; i < length; i++) { - output[offset + i] = source[i] ^ mask[i & 3]; - } - } - function _unmask(buffer, mask) { - for (let i = 0; i < buffer.length; i++) { - buffer[i] ^= mask[i & 3]; - } - } - function toArrayBuffer(buf) { - if (buf.length === buf.buffer.byteLength) { - return buf.buffer; - } - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length); - } - function toBuffer(data) { - toBuffer.readOnly = true; - if (Buffer.isBuffer(data)) return data; - let buf; - if (data instanceof ArrayBuffer) { - buf = new FastBuffer(data); - } else if (ArrayBuffer.isView(data)) { - buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength); - } else { - buf = Buffer.from(data); - toBuffer.readOnly = false; - } - return buf; - } - bufferUtil.exports = { - concat, - mask: _mask, - toArrayBuffer, - toBuffer, - unmask: _unmask - }; - if (!process.env.WS_NO_BUFFER_UTIL) { - try { - const bufferUtil$1 = require('bufferutil'); - bufferUtil.exports.mask = function (source, mask, output, offset, length) { - if (length < 48) _mask(source, mask, output, offset, length); - else bufferUtil$1.mask(source, mask, output, offset, length); - }; - bufferUtil.exports.unmask = function (buffer, mask) { - if (buffer.length < 32) _unmask(buffer, mask); - else bufferUtil$1.unmask(buffer, mask); - }; - } catch (e) { - } - } - return bufferUtil.exports; -} - -var limiter; -var hasRequiredLimiter; - -function requireLimiter () { - if (hasRequiredLimiter) return limiter; - hasRequiredLimiter = 1; - const kDone = Symbol('kDone'); - const kRun = Symbol('kRun'); - class Limiter { - constructor(concurrency) { - this[kDone] = () => { - this.pending--; - this[kRun](); - }; - this.concurrency = concurrency || Infinity; - this.jobs = []; - this.pending = 0; - } - add(job) { - this.jobs.push(job); - this[kRun](); - } - [kRun]() { - if (this.pending === this.concurrency) return; - if (this.jobs.length) { - const job = this.jobs.shift(); - this.pending++; - job(this[kDone]); - } - } - } - limiter = Limiter; - return limiter; -} - -var permessageDeflate; -var hasRequiredPermessageDeflate; - -function requirePermessageDeflate () { - if (hasRequiredPermessageDeflate) return permessageDeflate; - hasRequiredPermessageDeflate = 1; - const zlib = require$$0$a; - const bufferUtil = requireBufferUtil(); - const Limiter = requireLimiter(); - const { kStatusCode } = requireConstants(); - const FastBuffer = Buffer[Symbol.species]; - const TRAILER = Buffer.from([0x00, 0x00, 0xff, 0xff]); - const kPerMessageDeflate = Symbol('permessage-deflate'); - const kTotalLength = Symbol('total-length'); - const kCallback = Symbol('callback'); - const kBuffers = Symbol('buffers'); - const kError = Symbol('error'); - let zlibLimiter; - class PerMessageDeflate { - constructor(options, isServer, maxPayload) { - this._maxPayload = maxPayload | 0; - this._options = options || {}; - this._threshold = - this._options.threshold !== undefined ? this._options.threshold : 1024; - this._isServer = !!isServer; - this._deflate = null; - this._inflate = null; - this.params = null; - if (!zlibLimiter) { - const concurrency = - this._options.concurrencyLimit !== undefined - ? this._options.concurrencyLimit - : 10; - zlibLimiter = new Limiter(concurrency); - } - } - static get extensionName() { - return 'permessage-deflate'; - } - offer() { - const params = {}; - if (this._options.serverNoContextTakeover) { - params.server_no_context_takeover = true; - } - if (this._options.clientNoContextTakeover) { - params.client_no_context_takeover = true; - } - if (this._options.serverMaxWindowBits) { - params.server_max_window_bits = this._options.serverMaxWindowBits; - } - if (this._options.clientMaxWindowBits) { - params.client_max_window_bits = this._options.clientMaxWindowBits; - } else if (this._options.clientMaxWindowBits == null) { - params.client_max_window_bits = true; - } - return params; - } - accept(configurations) { - configurations = this.normalizeParams(configurations); - this.params = this._isServer - ? this.acceptAsServer(configurations) - : this.acceptAsClient(configurations); - return this.params; - } - cleanup() { - if (this._inflate) { - this._inflate.close(); - this._inflate = null; - } - if (this._deflate) { - const callback = this._deflate[kCallback]; - this._deflate.close(); - this._deflate = null; - if (callback) { - callback( - new Error( - 'The deflate stream was closed while data was being processed' - ) - ); - } - } - } - acceptAsServer(offers) { - const opts = this._options; - const accepted = offers.find((params) => { - if ( - (opts.serverNoContextTakeover === false && - params.server_no_context_takeover) || - (params.server_max_window_bits && - (opts.serverMaxWindowBits === false || - (typeof opts.serverMaxWindowBits === 'number' && - opts.serverMaxWindowBits > params.server_max_window_bits))) || - (typeof opts.clientMaxWindowBits === 'number' && - !params.client_max_window_bits) - ) { - return false; - } - return true; - }); - if (!accepted) { - throw new Error('None of the extension offers can be accepted'); - } - if (opts.serverNoContextTakeover) { - accepted.server_no_context_takeover = true; - } - if (opts.clientNoContextTakeover) { - accepted.client_no_context_takeover = true; - } - if (typeof opts.serverMaxWindowBits === 'number') { - accepted.server_max_window_bits = opts.serverMaxWindowBits; - } - if (typeof opts.clientMaxWindowBits === 'number') { - accepted.client_max_window_bits = opts.clientMaxWindowBits; - } else if ( - accepted.client_max_window_bits === true || - opts.clientMaxWindowBits === false - ) { - delete accepted.client_max_window_bits; - } - return accepted; - } - acceptAsClient(response) { - const params = response[0]; - if ( - this._options.clientNoContextTakeover === false && - params.client_no_context_takeover - ) { - throw new Error('Unexpected parameter "client_no_context_takeover"'); - } - if (!params.client_max_window_bits) { - if (typeof this._options.clientMaxWindowBits === 'number') { - params.client_max_window_bits = this._options.clientMaxWindowBits; - } - } else if ( - this._options.clientMaxWindowBits === false || - (typeof this._options.clientMaxWindowBits === 'number' && - params.client_max_window_bits > this._options.clientMaxWindowBits) - ) { - throw new Error( - 'Unexpected or invalid parameter "client_max_window_bits"' - ); - } - return params; - } - normalizeParams(configurations) { - configurations.forEach((params) => { - Object.keys(params).forEach((key) => { - let value = params[key]; - if (value.length > 1) { - throw new Error(`Parameter "${key}" must have only a single value`); - } - value = value[0]; - if (key === 'client_max_window_bits') { - if (value !== true) { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - value = num; - } else if (!this._isServer) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - } else if (key === 'server_max_window_bits') { - const num = +value; - if (!Number.isInteger(num) || num < 8 || num > 15) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - value = num; - } else if ( - key === 'client_no_context_takeover' || - key === 'server_no_context_takeover' - ) { - if (value !== true) { - throw new TypeError( - `Invalid value for parameter "${key}": ${value}` - ); - } - } else { - throw new Error(`Unknown parameter "${key}"`); - } - params[key] = value; - }); - }); - return configurations; - } - decompress(data, fin, callback) { - zlibLimiter.add((done) => { - this._decompress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - compress(data, fin, callback) { - zlibLimiter.add((done) => { - this._compress(data, fin, (err, result) => { - done(); - callback(err, result); - }); - }); - } - _decompress(data, fin, callback) { - const endpoint = this._isServer ? 'client' : 'server'; - if (!this._inflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = - typeof this.params[key] !== 'number' - ? zlib.Z_DEFAULT_WINDOWBITS - : this.params[key]; - this._inflate = zlib.createInflateRaw({ - ...this._options.zlibInflateOptions, - windowBits - }); - this._inflate[kPerMessageDeflate] = this; - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - this._inflate.on('error', inflateOnError); - this._inflate.on('data', inflateOnData); - } - this._inflate[kCallback] = callback; - this._inflate.write(data); - if (fin) this._inflate.write(TRAILER); - this._inflate.flush(() => { - const err = this._inflate[kError]; - if (err) { - this._inflate.close(); - this._inflate = null; - callback(err); - return; - } - const data = bufferUtil.concat( - this._inflate[kBuffers], - this._inflate[kTotalLength] - ); - if (this._inflate._readableState.endEmitted) { - this._inflate.close(); - this._inflate = null; - } else { - this._inflate[kTotalLength] = 0; - this._inflate[kBuffers] = []; - if (fin && this.params[`${endpoint}_no_context_takeover`]) { - this._inflate.reset(); - } - } - callback(null, data); - }); - } - _compress(data, fin, callback) { - const endpoint = this._isServer ? 'server' : 'client'; - if (!this._deflate) { - const key = `${endpoint}_max_window_bits`; - const windowBits = - typeof this.params[key] !== 'number' - ? zlib.Z_DEFAULT_WINDOWBITS - : this.params[key]; - this._deflate = zlib.createDeflateRaw({ - ...this._options.zlibDeflateOptions, - windowBits - }); - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - this._deflate.on('data', deflateOnData); - } - this._deflate[kCallback] = callback; - this._deflate.write(data); - this._deflate.flush(zlib.Z_SYNC_FLUSH, () => { - if (!this._deflate) { - return; - } - let data = bufferUtil.concat( - this._deflate[kBuffers], - this._deflate[kTotalLength] - ); - if (fin) { - data = new FastBuffer(data.buffer, data.byteOffset, data.length - 4); - } - this._deflate[kCallback] = null; - this._deflate[kTotalLength] = 0; - this._deflate[kBuffers] = []; - if (fin && this.params[`${endpoint}_no_context_takeover`]) { - this._deflate.reset(); - } - callback(null, data); - }); - } - } - permessageDeflate = PerMessageDeflate; - function deflateOnData(chunk) { - this[kBuffers].push(chunk); - this[kTotalLength] += chunk.length; - } - function inflateOnData(chunk) { - this[kTotalLength] += chunk.length; - if ( - this[kPerMessageDeflate]._maxPayload < 1 || - this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload - ) { - this[kBuffers].push(chunk); - return; - } - this[kError] = new RangeError('Max payload size exceeded'); - this[kError].code = 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'; - this[kError][kStatusCode] = 1009; - this.removeListener('data', inflateOnData); - this.reset(); - } - function inflateOnError(err) { - this[kPerMessageDeflate]._inflate = null; - if (this[kError]) { - this[kCallback](this[kError]); - return; - } - err[kStatusCode] = 1007; - this[kCallback](err); - } - return permessageDeflate; -} - -var validation = {exports: {}}; - -var hasRequiredValidation; - -function requireValidation () { - if (hasRequiredValidation) return validation.exports; - hasRequiredValidation = 1; - const { isUtf8 } = require$$0$9; - const { hasBlob } = requireConstants(); - const tokenChars = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 - ]; - function isValidStatusCode(code) { - return ( - (code >= 1000 && - code <= 1014 && - code !== 1004 && - code !== 1005 && - code !== 1006) || - (code >= 3000 && code <= 4999) - ); - } - function _isValidUTF8(buf) { - const len = buf.length; - let i = 0; - while (i < len) { - if ((buf[i] & 0x80) === 0) { - i++; - } else if ((buf[i] & 0xe0) === 0xc0) { - if ( - i + 1 === len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i] & 0xfe) === 0xc0 - ) { - return false; - } - i += 2; - } else if ((buf[i] & 0xf0) === 0xe0) { - if ( - i + 2 >= len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i + 2] & 0xc0) !== 0x80 || - (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || - (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) - ) { - return false; - } - i += 3; - } else if ((buf[i] & 0xf8) === 0xf0) { - if ( - i + 3 >= len || - (buf[i + 1] & 0xc0) !== 0x80 || - (buf[i + 2] & 0xc0) !== 0x80 || - (buf[i + 3] & 0xc0) !== 0x80 || - (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || - (buf[i] === 0xf4 && buf[i + 1] > 0x8f) || - buf[i] > 0xf4 - ) { - return false; - } - i += 4; - } else { - return false; - } - } - return true; - } - function isBlob(value) { - return ( - hasBlob && - typeof value === 'object' && - typeof value.arrayBuffer === 'function' && - typeof value.type === 'string' && - typeof value.stream === 'function' && - (value[Symbol.toStringTag] === 'Blob' || - value[Symbol.toStringTag] === 'File') - ); - } - validation.exports = { - isBlob, - isValidStatusCode, - isValidUTF8: _isValidUTF8, - tokenChars - }; - if (isUtf8) { - validation.exports.isValidUTF8 = function (buf) { - return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf); - }; - } else if (!process.env.WS_NO_UTF_8_VALIDATE) { - try { - const isValidUTF8 = require('utf-8-validate'); - validation.exports.isValidUTF8 = function (buf) { - return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf); - }; - } catch (e) { - } - } - return validation.exports; -} - -var receiver; -var hasRequiredReceiver; - -function requireReceiver () { - if (hasRequiredReceiver) return receiver; - hasRequiredReceiver = 1; - const { Writable } = require$$1$3; - const PerMessageDeflate = requirePermessageDeflate(); - const { - BINARY_TYPES, - EMPTY_BUFFER, - kStatusCode, - kWebSocket - } = requireConstants(); - const { concat, toArrayBuffer, unmask } = requireBufferUtil(); - const { isValidStatusCode, isValidUTF8 } = requireValidation(); - const FastBuffer = Buffer[Symbol.species]; - const GET_INFO = 0; - const GET_PAYLOAD_LENGTH_16 = 1; - const GET_PAYLOAD_LENGTH_64 = 2; - const GET_MASK = 3; - const GET_DATA = 4; - const INFLATING = 5; - const DEFER_EVENT = 6; - class Receiver extends Writable { - constructor(options = {}) { - super(); - this._allowSynchronousEvents = - options.allowSynchronousEvents !== undefined - ? options.allowSynchronousEvents - : true; - this._binaryType = options.binaryType || BINARY_TYPES[0]; - this._extensions = options.extensions || {}; - this._isServer = !!options.isServer; - this._maxPayload = options.maxPayload | 0; - this._skipUTF8Validation = !!options.skipUTF8Validation; - this[kWebSocket] = undefined; - this._bufferedBytes = 0; - this._buffers = []; - this._compressed = false; - this._payloadLength = 0; - this._mask = undefined; - this._fragmented = 0; - this._masked = false; - this._fin = false; - this._opcode = 0; - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragments = []; - this._errored = false; - this._loop = false; - this._state = GET_INFO; - } - _write(chunk, encoding, cb) { - if (this._opcode === 0x08 && this._state == GET_INFO) return cb(); - this._bufferedBytes += chunk.length; - this._buffers.push(chunk); - this.startLoop(cb); - } - consume(n) { - this._bufferedBytes -= n; - if (n === this._buffers[0].length) return this._buffers.shift(); - if (n < this._buffers[0].length) { - const buf = this._buffers[0]; - this._buffers[0] = new FastBuffer( - buf.buffer, - buf.byteOffset + n, - buf.length - n - ); - return new FastBuffer(buf.buffer, buf.byteOffset, n); - } - const dst = Buffer.allocUnsafe(n); - do { - const buf = this._buffers[0]; - const offset = dst.length - n; - if (n >= buf.length) { - dst.set(this._buffers.shift(), offset); - } else { - dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset); - this._buffers[0] = new FastBuffer( - buf.buffer, - buf.byteOffset + n, - buf.length - n - ); - } - n -= buf.length; - } while (n > 0); - return dst; - } - startLoop(cb) { - this._loop = true; - do { - switch (this._state) { - case GET_INFO: - this.getInfo(cb); - break; - case GET_PAYLOAD_LENGTH_16: - this.getPayloadLength16(cb); - break; - case GET_PAYLOAD_LENGTH_64: - this.getPayloadLength64(cb); - break; - case GET_MASK: - this.getMask(); - break; - case GET_DATA: - this.getData(cb); - break; - case INFLATING: - case DEFER_EVENT: - this._loop = false; - return; - } - } while (this._loop); - if (!this._errored) cb(); - } - getInfo(cb) { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - const buf = this.consume(2); - if ((buf[0] & 0x30) !== 0x00) { - const error = this.createError( - RangeError, - 'RSV2 and RSV3 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_2_3' - ); - cb(error); - return; - } - const compressed = (buf[0] & 0x40) === 0x40; - if (compressed && !this._extensions[PerMessageDeflate.extensionName]) { - const error = this.createError( - RangeError, - 'RSV1 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_1' - ); - cb(error); - return; - } - this._fin = (buf[0] & 0x80) === 0x80; - this._opcode = buf[0] & 0x0f; - this._payloadLength = buf[1] & 0x7f; - if (this._opcode === 0x00) { - if (compressed) { - const error = this.createError( - RangeError, - 'RSV1 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_1' - ); - cb(error); - return; - } - if (!this._fragmented) { - const error = this.createError( - RangeError, - 'invalid opcode 0', - true, - 1002, - 'WS_ERR_INVALID_OPCODE' - ); - cb(error); - return; - } - this._opcode = this._fragmented; - } else if (this._opcode === 0x01 || this._opcode === 0x02) { - if (this._fragmented) { - const error = this.createError( - RangeError, - `invalid opcode ${this._opcode}`, - true, - 1002, - 'WS_ERR_INVALID_OPCODE' - ); - cb(error); - return; - } - this._compressed = compressed; - } else if (this._opcode > 0x07 && this._opcode < 0x0b) { - if (!this._fin) { - const error = this.createError( - RangeError, - 'FIN must be set', - true, - 1002, - 'WS_ERR_EXPECTED_FIN' - ); - cb(error); - return; - } - if (compressed) { - const error = this.createError( - RangeError, - 'RSV1 must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_RSV_1' - ); - cb(error); - return; - } - if ( - this._payloadLength > 0x7d || - (this._opcode === 0x08 && this._payloadLength === 1) - ) { - const error = this.createError( - RangeError, - `invalid payload length ${this._payloadLength}`, - true, - 1002, - 'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH' - ); - cb(error); - return; - } - } else { - const error = this.createError( - RangeError, - `invalid opcode ${this._opcode}`, - true, - 1002, - 'WS_ERR_INVALID_OPCODE' - ); - cb(error); - return; - } - if (!this._fin && !this._fragmented) this._fragmented = this._opcode; - this._masked = (buf[1] & 0x80) === 0x80; - if (this._isServer) { - if (!this._masked) { - const error = this.createError( - RangeError, - 'MASK must be set', - true, - 1002, - 'WS_ERR_EXPECTED_MASK' - ); - cb(error); - return; - } - } else if (this._masked) { - const error = this.createError( - RangeError, - 'MASK must be clear', - true, - 1002, - 'WS_ERR_UNEXPECTED_MASK' - ); - cb(error); - return; - } - if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16; - else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64; - else this.haveLength(cb); - } - getPayloadLength16(cb) { - if (this._bufferedBytes < 2) { - this._loop = false; - return; - } - this._payloadLength = this.consume(2).readUInt16BE(0); - this.haveLength(cb); - } - getPayloadLength64(cb) { - if (this._bufferedBytes < 8) { - this._loop = false; - return; - } - const buf = this.consume(8); - const num = buf.readUInt32BE(0); - if (num > Math.pow(2, 53 - 32) - 1) { - const error = this.createError( - RangeError, - 'Unsupported WebSocket frame: payload length > 2^53 - 1', - false, - 1009, - 'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH' - ); - cb(error); - return; - } - this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4); - this.haveLength(cb); - } - haveLength(cb) { - if (this._payloadLength && this._opcode < 0x08) { - this._totalPayloadLength += this._payloadLength; - if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) { - const error = this.createError( - RangeError, - 'Max payload size exceeded', - false, - 1009, - 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' - ); - cb(error); - return; - } - } - if (this._masked) this._state = GET_MASK; - else this._state = GET_DATA; - } - getMask() { - if (this._bufferedBytes < 4) { - this._loop = false; - return; - } - this._mask = this.consume(4); - this._state = GET_DATA; - } - getData(cb) { - let data = EMPTY_BUFFER; - if (this._payloadLength) { - if (this._bufferedBytes < this._payloadLength) { - this._loop = false; - return; - } - data = this.consume(this._payloadLength); - if ( - this._masked && - (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0 - ) { - unmask(data, this._mask); - } - } - if (this._opcode > 0x07) { - this.controlMessage(data, cb); - return; - } - if (this._compressed) { - this._state = INFLATING; - this.decompress(data, cb); - return; - } - if (data.length) { - this._messageLength = this._totalPayloadLength; - this._fragments.push(data); - } - this.dataMessage(cb); - } - decompress(data, cb) { - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - perMessageDeflate.decompress(data, this._fin, (err, buf) => { - if (err) return cb(err); - if (buf.length) { - this._messageLength += buf.length; - if (this._messageLength > this._maxPayload && this._maxPayload > 0) { - const error = this.createError( - RangeError, - 'Max payload size exceeded', - false, - 1009, - 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH' - ); - cb(error); - return; - } - this._fragments.push(buf); - } - this.dataMessage(cb); - if (this._state === GET_INFO) this.startLoop(cb); - }); - } - dataMessage(cb) { - if (!this._fin) { - this._state = GET_INFO; - return; - } - const messageLength = this._messageLength; - const fragments = this._fragments; - this._totalPayloadLength = 0; - this._messageLength = 0; - this._fragmented = 0; - this._fragments = []; - if (this._opcode === 2) { - let data; - if (this._binaryType === 'nodebuffer') { - data = concat(fragments, messageLength); - } else if (this._binaryType === 'arraybuffer') { - data = toArrayBuffer(concat(fragments, messageLength)); - } else if (this._binaryType === 'blob') { - data = new Blob(fragments); - } else { - data = fragments; - } - if (this._allowSynchronousEvents) { - this.emit('message', data, true); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit('message', data, true); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } else { - const buf = concat(fragments, messageLength); - if (!this._skipUTF8Validation && !isValidUTF8(buf)) { - const error = this.createError( - Error, - 'invalid UTF-8 sequence', - true, - 1007, - 'WS_ERR_INVALID_UTF8' - ); - cb(error); - return; - } - if (this._state === INFLATING || this._allowSynchronousEvents) { - this.emit('message', buf, false); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit('message', buf, false); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } - } - controlMessage(data, cb) { - if (this._opcode === 0x08) { - if (data.length === 0) { - this._loop = false; - this.emit('conclude', 1005, EMPTY_BUFFER); - this.end(); - } else { - const code = data.readUInt16BE(0); - if (!isValidStatusCode(code)) { - const error = this.createError( - RangeError, - `invalid status code ${code}`, - true, - 1002, - 'WS_ERR_INVALID_CLOSE_CODE' - ); - cb(error); - return; - } - const buf = new FastBuffer( - data.buffer, - data.byteOffset + 2, - data.length - 2 - ); - if (!this._skipUTF8Validation && !isValidUTF8(buf)) { - const error = this.createError( - Error, - 'invalid UTF-8 sequence', - true, - 1007, - 'WS_ERR_INVALID_UTF8' - ); - cb(error); - return; - } - this._loop = false; - this.emit('conclude', code, buf); - this.end(); - } - this._state = GET_INFO; - return; - } - if (this._allowSynchronousEvents) { - this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data); - this._state = GET_INFO; - } else { - this._state = DEFER_EVENT; - setImmediate(() => { - this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data); - this._state = GET_INFO; - this.startLoop(cb); - }); - } - } - createError(ErrorCtor, message, prefix, statusCode, errorCode) { - this._loop = false; - this._errored = true; - const err = new ErrorCtor( - prefix ? `Invalid WebSocket frame: ${message}` : message - ); - Error.captureStackTrace(err, this.createError); - err.code = errorCode; - err[kStatusCode] = statusCode; - return err; - } - } - receiver = Receiver; - return receiver; -} - -var sender; -var hasRequiredSender; - -function requireSender () { - if (hasRequiredSender) return sender; - hasRequiredSender = 1; - const { Duplex } = require$$1$3; - const { randomFillSync } = require$$2$1; - const PerMessageDeflate = requirePermessageDeflate(); - const { EMPTY_BUFFER, kWebSocket, NOOP } = requireConstants(); - const { isBlob, isValidStatusCode } = requireValidation(); - const { mask: applyMask, toBuffer } = requireBufferUtil(); - const kByteLength = Symbol('kByteLength'); - const maskBuffer = Buffer.alloc(4); - const RANDOM_POOL_SIZE = 8 * 1024; - let randomPool; - let randomPoolPointer = RANDOM_POOL_SIZE; - const DEFAULT = 0; - const DEFLATING = 1; - const GET_BLOB_DATA = 2; - class Sender { - constructor(socket, extensions, generateMask) { - this._extensions = extensions || {}; - if (generateMask) { - this._generateMask = generateMask; - this._maskBuffer = Buffer.alloc(4); - } - this._socket = socket; - this._firstFragment = true; - this._compress = false; - this._bufferedBytes = 0; - this._queue = []; - this._state = DEFAULT; - this.onerror = NOOP; - this[kWebSocket] = undefined; - } - static frame(data, options) { - let mask; - let merge = false; - let offset = 2; - let skipMasking = false; - if (options.mask) { - mask = options.maskBuffer || maskBuffer; - if (options.generateMask) { - options.generateMask(mask); - } else { - if (randomPoolPointer === RANDOM_POOL_SIZE) { - if (randomPool === undefined) { - randomPool = Buffer.alloc(RANDOM_POOL_SIZE); - } - randomFillSync(randomPool, 0, RANDOM_POOL_SIZE); - randomPoolPointer = 0; - } - mask[0] = randomPool[randomPoolPointer++]; - mask[1] = randomPool[randomPoolPointer++]; - mask[2] = randomPool[randomPoolPointer++]; - mask[3] = randomPool[randomPoolPointer++]; - } - skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0; - offset = 6; - } - let dataLength; - if (typeof data === 'string') { - if ( - (!options.mask || skipMasking) && - options[kByteLength] !== undefined - ) { - dataLength = options[kByteLength]; - } else { - data = Buffer.from(data); - dataLength = data.length; - } - } else { - dataLength = data.length; - merge = options.mask && options.readOnly && !skipMasking; - } - let payloadLength = dataLength; - if (dataLength >= 65536) { - offset += 8; - payloadLength = 127; - } else if (dataLength > 125) { - offset += 2; - payloadLength = 126; - } - const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset); - target[0] = options.fin ? options.opcode | 0x80 : options.opcode; - if (options.rsv1) target[0] |= 0x40; - target[1] = payloadLength; - if (payloadLength === 126) { - target.writeUInt16BE(dataLength, 2); - } else if (payloadLength === 127) { - target[2] = target[3] = 0; - target.writeUIntBE(dataLength, 4, 6); - } - if (!options.mask) return [target, data]; - target[1] |= 0x80; - target[offset - 4] = mask[0]; - target[offset - 3] = mask[1]; - target[offset - 2] = mask[2]; - target[offset - 1] = mask[3]; - if (skipMasking) return [target, data]; - if (merge) { - applyMask(data, mask, target, offset, dataLength); - return [target]; - } - applyMask(data, mask, data, 0, dataLength); - return [target, data]; - } - close(code, data, mask, cb) { - let buf; - if (code === undefined) { - buf = EMPTY_BUFFER; - } else if (typeof code !== 'number' || !isValidStatusCode(code)) { - throw new TypeError('First argument must be a valid error code number'); - } else if (data === undefined || !data.length) { - buf = Buffer.allocUnsafe(2); - buf.writeUInt16BE(code, 0); - } else { - const length = Buffer.byteLength(data); - if (length > 123) { - throw new RangeError('The message must not be greater than 123 bytes'); - } - buf = Buffer.allocUnsafe(2 + length); - buf.writeUInt16BE(code, 0); - if (typeof data === 'string') { - buf.write(data, 2); - } else { - buf.set(data, 2); - } - } - const options = { - [kByteLength]: buf.length, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 0x08, - readOnly: false, - rsv1: false - }; - if (this._state !== DEFAULT) { - this.enqueue([this.dispatch, buf, false, options, cb]); - } else { - this.sendFrame(Sender.frame(buf, options), cb); - } - } - ping(data, mask, cb) { - let byteLength; - let readOnly; - if (typeof data === 'string') { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (byteLength > 125) { - throw new RangeError('The data size must not be greater than 125 bytes'); - } - const options = { - [kByteLength]: byteLength, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 0x09, - readOnly, - rsv1: false - }; - if (isBlob(data)) { - if (this._state !== DEFAULT) { - this.enqueue([this.getBlobData, data, false, options, cb]); - } else { - this.getBlobData(data, false, options, cb); - } - } else if (this._state !== DEFAULT) { - this.enqueue([this.dispatch, data, false, options, cb]); - } else { - this.sendFrame(Sender.frame(data, options), cb); - } - } - pong(data, mask, cb) { - let byteLength; - let readOnly; - if (typeof data === 'string') { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (byteLength > 125) { - throw new RangeError('The data size must not be greater than 125 bytes'); - } - const options = { - [kByteLength]: byteLength, - fin: true, - generateMask: this._generateMask, - mask, - maskBuffer: this._maskBuffer, - opcode: 0x0a, - readOnly, - rsv1: false - }; - if (isBlob(data)) { - if (this._state !== DEFAULT) { - this.enqueue([this.getBlobData, data, false, options, cb]); - } else { - this.getBlobData(data, false, options, cb); - } - } else if (this._state !== DEFAULT) { - this.enqueue([this.dispatch, data, false, options, cb]); - } else { - this.sendFrame(Sender.frame(data, options), cb); - } - } - send(data, options, cb) { - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - let opcode = options.binary ? 2 : 1; - let rsv1 = options.compress; - let byteLength; - let readOnly; - if (typeof data === 'string') { - byteLength = Buffer.byteLength(data); - readOnly = false; - } else if (isBlob(data)) { - byteLength = data.size; - readOnly = false; - } else { - data = toBuffer(data); - byteLength = data.length; - readOnly = toBuffer.readOnly; - } - if (this._firstFragment) { - this._firstFragment = false; - if ( - rsv1 && - perMessageDeflate && - perMessageDeflate.params[ - perMessageDeflate._isServer - ? 'server_no_context_takeover' - : 'client_no_context_takeover' - ] - ) { - rsv1 = byteLength >= perMessageDeflate._threshold; - } - this._compress = rsv1; - } else { - rsv1 = false; - opcode = 0; - } - if (options.fin) this._firstFragment = true; - const opts = { - [kByteLength]: byteLength, - fin: options.fin, - generateMask: this._generateMask, - mask: options.mask, - maskBuffer: this._maskBuffer, - opcode, - readOnly, - rsv1 - }; - if (isBlob(data)) { - if (this._state !== DEFAULT) { - this.enqueue([this.getBlobData, data, this._compress, opts, cb]); - } else { - this.getBlobData(data, this._compress, opts, cb); - } - } else if (this._state !== DEFAULT) { - this.enqueue([this.dispatch, data, this._compress, opts, cb]); - } else { - this.dispatch(data, this._compress, opts, cb); - } - } - getBlobData(blob, compress, options, cb) { - this._bufferedBytes += options[kByteLength]; - this._state = GET_BLOB_DATA; - blob - .arrayBuffer() - .then((arrayBuffer) => { - if (this._socket.destroyed) { - const err = new Error( - 'The socket was closed while the blob was being read' - ); - process.nextTick(callCallbacks, this, err, cb); - return; - } - this._bufferedBytes -= options[kByteLength]; - const data = toBuffer(arrayBuffer); - if (!compress) { - this._state = DEFAULT; - this.sendFrame(Sender.frame(data, options), cb); - this.dequeue(); - } else { - this.dispatch(data, compress, options, cb); - } - }) - .catch((err) => { - process.nextTick(onError, this, err, cb); - }); - } - dispatch(data, compress, options, cb) { - if (!compress) { - this.sendFrame(Sender.frame(data, options), cb); - return; - } - const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName]; - this._bufferedBytes += options[kByteLength]; - this._state = DEFLATING; - perMessageDeflate.compress(data, options.fin, (_, buf) => { - if (this._socket.destroyed) { - const err = new Error( - 'The socket was closed while data was being compressed' - ); - callCallbacks(this, err, cb); - return; - } - this._bufferedBytes -= options[kByteLength]; - this._state = DEFAULT; - options.readOnly = false; - this.sendFrame(Sender.frame(buf, options), cb); - this.dequeue(); - }); - } - dequeue() { - while (this._state === DEFAULT && this._queue.length) { - const params = this._queue.shift(); - this._bufferedBytes -= params[3][kByteLength]; - Reflect.apply(params[0], this, params.slice(1)); - } - } - enqueue(params) { - this._bufferedBytes += params[3][kByteLength]; - this._queue.push(params); - } - sendFrame(list, cb) { - if (list.length === 2) { - this._socket.cork(); - this._socket.write(list[0]); - this._socket.write(list[1], cb); - this._socket.uncork(); - } else { - this._socket.write(list[0], cb); - } - } - } - sender = Sender; - function callCallbacks(sender, err, cb) { - if (typeof cb === 'function') cb(err); - for (let i = 0; i < sender._queue.length; i++) { - const params = sender._queue[i]; - const callback = params[params.length - 1]; - if (typeof callback === 'function') callback(err); - } - } - function onError(sender, err, cb) { - callCallbacks(sender, err, cb); - sender.onerror(err); - } - return sender; -} - -var eventTarget; -var hasRequiredEventTarget; - -function requireEventTarget () { - if (hasRequiredEventTarget) return eventTarget; - hasRequiredEventTarget = 1; - const { kForOnEventAttribute, kListener } = requireConstants(); - const kCode = Symbol('kCode'); - const kData = Symbol('kData'); - const kError = Symbol('kError'); - const kMessage = Symbol('kMessage'); - const kReason = Symbol('kReason'); - const kTarget = Symbol('kTarget'); - const kType = Symbol('kType'); - const kWasClean = Symbol('kWasClean'); - class Event { - constructor(type) { - this[kTarget] = null; - this[kType] = type; - } - get target() { - return this[kTarget]; - } - get type() { - return this[kType]; - } - } - Object.defineProperty(Event.prototype, 'target', { enumerable: true }); - Object.defineProperty(Event.prototype, 'type', { enumerable: true }); - class CloseEvent extends Event { - constructor(type, options = {}) { - super(type); - this[kCode] = options.code === undefined ? 0 : options.code; - this[kReason] = options.reason === undefined ? '' : options.reason; - this[kWasClean] = options.wasClean === undefined ? false : options.wasClean; - } - get code() { - return this[kCode]; - } - get reason() { - return this[kReason]; - } - get wasClean() { - return this[kWasClean]; - } - } - Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true }); - Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true }); - Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true }); - class ErrorEvent extends Event { - constructor(type, options = {}) { - super(type); - this[kError] = options.error === undefined ? null : options.error; - this[kMessage] = options.message === undefined ? '' : options.message; - } - get error() { - return this[kError]; - } - get message() { - return this[kMessage]; - } - } - Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true }); - Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true }); - class MessageEvent extends Event { - constructor(type, options = {}) { - super(type); - this[kData] = options.data === undefined ? null : options.data; - } - get data() { - return this[kData]; - } - } - Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true }); - const EventTarget = { - addEventListener(type, handler, options = {}) { - for (const listener of this.listeners(type)) { - if ( - !options[kForOnEventAttribute] && - listener[kListener] === handler && - !listener[kForOnEventAttribute] - ) { - return; - } - } - let wrapper; - if (type === 'message') { - wrapper = function onMessage(data, isBinary) { - const event = new MessageEvent('message', { - data: isBinary ? data : data.toString() - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - } else if (type === 'close') { - wrapper = function onClose(code, message) { - const event = new CloseEvent('close', { - code, - reason: message.toString(), - wasClean: this._closeFrameReceived && this._closeFrameSent - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - } else if (type === 'error') { - wrapper = function onError(error) { - const event = new ErrorEvent('error', { - error, - message: error.message - }); - event[kTarget] = this; - callListener(handler, this, event); - }; - } else if (type === 'open') { - wrapper = function onOpen() { - const event = new Event('open'); - event[kTarget] = this; - callListener(handler, this, event); - }; - } else { - return; - } - wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute]; - wrapper[kListener] = handler; - if (options.once) { - this.once(type, wrapper); - } else { - this.on(type, wrapper); - } - }, - removeEventListener(type, handler) { - for (const listener of this.listeners(type)) { - if (listener[kListener] === handler && !listener[kForOnEventAttribute]) { - this.removeListener(type, listener); - break; - } - } - } - }; - eventTarget = { - CloseEvent, - ErrorEvent, - Event, - EventTarget, - MessageEvent - }; - function callListener(listener, thisArg, event) { - if (typeof listener === 'object' && listener.handleEvent) { - listener.handleEvent.call(listener, event); - } else { - listener.call(thisArg, event); - } - } - return eventTarget; -} - -var extension; -var hasRequiredExtension; - -function requireExtension () { - if (hasRequiredExtension) return extension; - hasRequiredExtension = 1; - const { tokenChars } = requireValidation(); - function push(dest, name, elem) { - if (dest[name] === undefined) dest[name] = [elem]; - else dest[name].push(elem); - } - function parse(header) { - const offers = Object.create(null); - let params = Object.create(null); - let mustUnescape = false; - let isEscaping = false; - let inQuotes = false; - let extensionName; - let paramName; - let start = -1; - let code = -1; - let end = -1; - let i = 0; - for (; i < header.length; i++) { - code = header.charCodeAt(i); - if (extensionName === undefined) { - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if ( - i !== 0 && - (code === 0x20 || code === 0x09) - ) { - if (end === -1 && start !== -1) end = i; - } else if (code === 0x3b || code === 0x2c ) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (end === -1) end = i; - const name = header.slice(start, end); - if (code === 0x2c) { - push(offers, name, params); - params = Object.create(null); - } else { - extensionName = name; - } - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } else if (paramName === undefined) { - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 0x20 || code === 0x09) { - if (end === -1 && start !== -1) end = i; - } else if (code === 0x3b || code === 0x2c) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (end === -1) end = i; - push(params, header.slice(start, end), true); - if (code === 0x2c) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = undefined; - } - start = end = -1; - } else if (code === 0x3d && start !== -1 && end === -1) { - paramName = header.slice(start, i); - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } else { - if (isEscaping) { - if (tokenChars[code] !== 1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (start === -1) start = i; - else if (!mustUnescape) mustUnescape = true; - isEscaping = false; - } else if (inQuotes) { - if (tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (code === 0x22 && start !== -1) { - inQuotes = false; - end = i; - } else if (code === 0x5c ) { - isEscaping = true; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) { - inQuotes = true; - } else if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if (start !== -1 && (code === 0x20 || code === 0x09)) { - if (end === -1) end = i; - } else if (code === 0x3b || code === 0x2c) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (end === -1) end = i; - let value = header.slice(start, end); - if (mustUnescape) { - value = value.replace(/\\/g, ''); - mustUnescape = false; - } - push(params, paramName, value); - if (code === 0x2c) { - push(offers, extensionName, params); - params = Object.create(null); - extensionName = undefined; - } - paramName = undefined; - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } - } - if (start === -1 || inQuotes || code === 0x20 || code === 0x09) { - throw new SyntaxError('Unexpected end of input'); - } - if (end === -1) end = i; - const token = header.slice(start, end); - if (extensionName === undefined) { - push(offers, token, params); - } else { - if (paramName === undefined) { - push(params, token, true); - } else if (mustUnescape) { - push(params, paramName, token.replace(/\\/g, '')); - } else { - push(params, paramName, token); - } - push(offers, extensionName, params); - } - return offers; - } - function format(extensions) { - return Object.keys(extensions) - .map((extension) => { - let configurations = extensions[extension]; - if (!Array.isArray(configurations)) configurations = [configurations]; - return configurations - .map((params) => { - return [extension] - .concat( - Object.keys(params).map((k) => { - let values = params[k]; - if (!Array.isArray(values)) values = [values]; - return values - .map((v) => (v === true ? k : `${k}=${v}`)) - .join('; '); - }) - ) - .join('; '); - }) - .join(', '); - }) - .join(', '); - } - extension = { format, parse }; - return extension; -} - -var websocket; -var hasRequiredWebsocket; - -function requireWebsocket () { - if (hasRequiredWebsocket) return websocket; - hasRequiredWebsocket = 1; - const EventEmitter = require$$0$8; - const https = require$$1$1; - const http = require$$0$6; - const net = require$$0$7; - const tls = require$$1$2; - const { randomBytes, createHash } = require$$2$1; - const { Duplex, Readable } = require$$1$3; - const { URL } = require$$5; - const PerMessageDeflate = requirePermessageDeflate(); - const Receiver = requireReceiver(); - const Sender = requireSender(); - const { isBlob } = requireValidation(); - const { - BINARY_TYPES, - CLOSE_TIMEOUT, - EMPTY_BUFFER, - GUID, - kForOnEventAttribute, - kListener, - kStatusCode, - kWebSocket, - NOOP - } = requireConstants(); - const { - EventTarget: { addEventListener, removeEventListener } - } = requireEventTarget(); - const { format, parse } = requireExtension(); - const { toBuffer } = requireBufferUtil(); - const kAborted = Symbol('kAborted'); - const protocolVersions = [8, 13]; - const readyStates = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED']; - const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/; - class WebSocket extends EventEmitter { - constructor(address, protocols, options) { - super(); - this._binaryType = BINARY_TYPES[0]; - this._closeCode = 1006; - this._closeFrameReceived = false; - this._closeFrameSent = false; - this._closeMessage = EMPTY_BUFFER; - this._closeTimer = null; - this._errorEmitted = false; - this._extensions = {}; - this._paused = false; - this._protocol = ''; - this._readyState = WebSocket.CONNECTING; - this._receiver = null; - this._sender = null; - this._socket = null; - if (address !== null) { - this._bufferedAmount = 0; - this._isServer = false; - this._redirects = 0; - if (protocols === undefined) { - protocols = []; - } else if (!Array.isArray(protocols)) { - if (typeof protocols === 'object' && protocols !== null) { - options = protocols; - protocols = []; - } else { - protocols = [protocols]; - } - } - initAsClient(this, address, protocols, options); - } else { - this._autoPong = options.autoPong; - this._closeTimeout = options.closeTimeout; - this._isServer = true; - } - } - get binaryType() { - return this._binaryType; - } - set binaryType(type) { - if (!BINARY_TYPES.includes(type)) return; - this._binaryType = type; - if (this._receiver) this._receiver._binaryType = type; - } - get bufferedAmount() { - if (!this._socket) return this._bufferedAmount; - return this._socket._writableState.length + this._sender._bufferedBytes; - } - get extensions() { - return Object.keys(this._extensions).join(); - } - get isPaused() { - return this._paused; - } - get onclose() { - return null; - } - get onerror() { - return null; - } - get onopen() { - return null; - } - get onmessage() { - return null; - } - get protocol() { - return this._protocol; - } - get readyState() { - return this._readyState; - } - get url() { - return this._url; - } - setSocket(socket, head, options) { - const receiver = new Receiver({ - allowSynchronousEvents: options.allowSynchronousEvents, - binaryType: this.binaryType, - extensions: this._extensions, - isServer: this._isServer, - maxPayload: options.maxPayload, - skipUTF8Validation: options.skipUTF8Validation - }); - const sender = new Sender(socket, this._extensions, options.generateMask); - this._receiver = receiver; - this._sender = sender; - this._socket = socket; - receiver[kWebSocket] = this; - sender[kWebSocket] = this; - socket[kWebSocket] = this; - receiver.on('conclude', receiverOnConclude); - receiver.on('drain', receiverOnDrain); - receiver.on('error', receiverOnError); - receiver.on('message', receiverOnMessage); - receiver.on('ping', receiverOnPing); - receiver.on('pong', receiverOnPong); - sender.onerror = senderOnError; - if (socket.setTimeout) socket.setTimeout(0); - if (socket.setNoDelay) socket.setNoDelay(); - if (head.length > 0) socket.unshift(head); - socket.on('close', socketOnClose); - socket.on('data', socketOnData); - socket.on('end', socketOnEnd); - socket.on('error', socketOnError); - this._readyState = WebSocket.OPEN; - this.emit('open'); - } - emitClose() { - if (!this._socket) { - this._readyState = WebSocket.CLOSED; - this.emit('close', this._closeCode, this._closeMessage); - return; - } - if (this._extensions[PerMessageDeflate.extensionName]) { - this._extensions[PerMessageDeflate.extensionName].cleanup(); - } - this._receiver.removeAllListeners(); - this._readyState = WebSocket.CLOSED; - this.emit('close', this._closeCode, this._closeMessage); - } - close(code, data) { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - const msg = 'WebSocket was closed before the connection was established'; - abortHandshake(this, this._req, msg); - return; - } - if (this.readyState === WebSocket.CLOSING) { - if ( - this._closeFrameSent && - (this._closeFrameReceived || this._receiver._writableState.errorEmitted) - ) { - this._socket.end(); - } - return; - } - this._readyState = WebSocket.CLOSING; - this._sender.close(code, data, !this._isServer, (err) => { - if (err) return; - this._closeFrameSent = true; - if ( - this._closeFrameReceived || - this._receiver._writableState.errorEmitted - ) { - this._socket.end(); - } - }); - setCloseTimer(this); - } - pause() { - if ( - this.readyState === WebSocket.CONNECTING || - this.readyState === WebSocket.CLOSED - ) { - return; - } - this._paused = true; - this._socket.pause(); - } - ping(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) { - throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); - } - if (typeof data === 'function') { - cb = data; - data = mask = undefined; - } else if (typeof mask === 'function') { - cb = mask; - mask = undefined; - } - if (typeof data === 'number') data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - if (mask === undefined) mask = !this._isServer; - this._sender.ping(data || EMPTY_BUFFER, mask, cb); - } - pong(data, mask, cb) { - if (this.readyState === WebSocket.CONNECTING) { - throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); - } - if (typeof data === 'function') { - cb = data; - data = mask = undefined; - } else if (typeof mask === 'function') { - cb = mask; - mask = undefined; - } - if (typeof data === 'number') data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - if (mask === undefined) mask = !this._isServer; - this._sender.pong(data || EMPTY_BUFFER, mask, cb); - } - resume() { - if ( - this.readyState === WebSocket.CONNECTING || - this.readyState === WebSocket.CLOSED - ) { - return; - } - this._paused = false; - if (!this._receiver._writableState.needDrain) this._socket.resume(); - } - send(data, options, cb) { - if (this.readyState === WebSocket.CONNECTING) { - throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); - } - if (typeof options === 'function') { - cb = options; - options = {}; - } - if (typeof data === 'number') data = data.toString(); - if (this.readyState !== WebSocket.OPEN) { - sendAfterClose(this, data, cb); - return; - } - const opts = { - binary: typeof data !== 'string', - mask: !this._isServer, - compress: true, - fin: true, - ...options - }; - if (!this._extensions[PerMessageDeflate.extensionName]) { - opts.compress = false; - } - this._sender.send(data || EMPTY_BUFFER, opts, cb); - } - terminate() { - if (this.readyState === WebSocket.CLOSED) return; - if (this.readyState === WebSocket.CONNECTING) { - const msg = 'WebSocket was closed before the connection was established'; - abortHandshake(this, this._req, msg); - return; - } - if (this._socket) { - this._readyState = WebSocket.CLOSING; - this._socket.destroy(); - } - } - } - Object.defineProperty(WebSocket, 'CONNECTING', { - enumerable: true, - value: readyStates.indexOf('CONNECTING') - }); - Object.defineProperty(WebSocket.prototype, 'CONNECTING', { - enumerable: true, - value: readyStates.indexOf('CONNECTING') - }); - Object.defineProperty(WebSocket, 'OPEN', { - enumerable: true, - value: readyStates.indexOf('OPEN') - }); - Object.defineProperty(WebSocket.prototype, 'OPEN', { - enumerable: true, - value: readyStates.indexOf('OPEN') - }); - Object.defineProperty(WebSocket, 'CLOSING', { - enumerable: true, - value: readyStates.indexOf('CLOSING') - }); - Object.defineProperty(WebSocket.prototype, 'CLOSING', { - enumerable: true, - value: readyStates.indexOf('CLOSING') - }); - Object.defineProperty(WebSocket, 'CLOSED', { - enumerable: true, - value: readyStates.indexOf('CLOSED') - }); - Object.defineProperty(WebSocket.prototype, 'CLOSED', { - enumerable: true, - value: readyStates.indexOf('CLOSED') - }); - [ - 'binaryType', - 'bufferedAmount', - 'extensions', - 'isPaused', - 'protocol', - 'readyState', - 'url' - ].forEach((property) => { - Object.defineProperty(WebSocket.prototype, property, { enumerable: true }); - }); - ['open', 'error', 'close', 'message'].forEach((method) => { - Object.defineProperty(WebSocket.prototype, `on${method}`, { - enumerable: true, - get() { - for (const listener of this.listeners(method)) { - if (listener[kForOnEventAttribute]) return listener[kListener]; - } - return null; - }, - set(handler) { - for (const listener of this.listeners(method)) { - if (listener[kForOnEventAttribute]) { - this.removeListener(method, listener); - break; - } - } - if (typeof handler !== 'function') return; - this.addEventListener(method, handler, { - [kForOnEventAttribute]: true - }); - } - }); - }); - WebSocket.prototype.addEventListener = addEventListener; - WebSocket.prototype.removeEventListener = removeEventListener; - websocket = WebSocket; - function initAsClient(websocket, address, protocols, options) { - const opts = { - allowSynchronousEvents: true, - autoPong: true, - closeTimeout: CLOSE_TIMEOUT, - protocolVersion: protocolVersions[1], - maxPayload: 100 * 1024 * 1024, - skipUTF8Validation: false, - perMessageDeflate: true, - followRedirects: false, - maxRedirects: 10, - ...options, - socketPath: undefined, - hostname: undefined, - protocol: undefined, - timeout: undefined, - method: 'GET', - host: undefined, - path: undefined, - port: undefined - }; - websocket._autoPong = opts.autoPong; - websocket._closeTimeout = opts.closeTimeout; - if (!protocolVersions.includes(opts.protocolVersion)) { - throw new RangeError( - `Unsupported protocol version: ${opts.protocolVersion} ` + - `(supported versions: ${protocolVersions.join(', ')})` - ); - } - let parsedUrl; - if (address instanceof URL) { - parsedUrl = address; - } else { - try { - parsedUrl = new URL(address); - } catch (e) { - throw new SyntaxError(`Invalid URL: ${address}`); - } - } - if (parsedUrl.protocol === 'http:') { - parsedUrl.protocol = 'ws:'; - } else if (parsedUrl.protocol === 'https:') { - parsedUrl.protocol = 'wss:'; - } - websocket._url = parsedUrl.href; - const isSecure = parsedUrl.protocol === 'wss:'; - const isIpcUrl = parsedUrl.protocol === 'ws+unix:'; - let invalidUrlMessage; - if (parsedUrl.protocol !== 'ws:' && !isSecure && !isIpcUrl) { - invalidUrlMessage = - 'The URL\'s protocol must be one of "ws:", "wss:", ' + - '"http:", "https:", or "ws+unix:"'; - } else if (isIpcUrl && !parsedUrl.pathname) { - invalidUrlMessage = "The URL's pathname is empty"; - } else if (parsedUrl.hash) { - invalidUrlMessage = 'The URL contains a fragment identifier'; - } - if (invalidUrlMessage) { - const err = new SyntaxError(invalidUrlMessage); - if (websocket._redirects === 0) { - throw err; - } else { - emitErrorAndClose(websocket, err); - return; - } - } - const defaultPort = isSecure ? 443 : 80; - const key = randomBytes(16).toString('base64'); - const request = isSecure ? https.request : http.request; - const protocolSet = new Set(); - let perMessageDeflate; - opts.createConnection = - opts.createConnection || (isSecure ? tlsConnect : netConnect); - opts.defaultPort = opts.defaultPort || defaultPort; - opts.port = parsedUrl.port || defaultPort; - opts.host = parsedUrl.hostname.startsWith('[') - ? parsedUrl.hostname.slice(1, -1) - : parsedUrl.hostname; - opts.headers = { - ...opts.headers, - 'Sec-WebSocket-Version': opts.protocolVersion, - 'Sec-WebSocket-Key': key, - Connection: 'Upgrade', - Upgrade: 'websocket' - }; - opts.path = parsedUrl.pathname + parsedUrl.search; - opts.timeout = opts.handshakeTimeout; - if (opts.perMessageDeflate) { - perMessageDeflate = new PerMessageDeflate( - opts.perMessageDeflate !== true ? opts.perMessageDeflate : {}, - false, - opts.maxPayload - ); - opts.headers['Sec-WebSocket-Extensions'] = format({ - [PerMessageDeflate.extensionName]: perMessageDeflate.offer() - }); - } - if (protocols.length) { - for (const protocol of protocols) { - if ( - typeof protocol !== 'string' || - !subprotocolRegex.test(protocol) || - protocolSet.has(protocol) - ) { - throw new SyntaxError( - 'An invalid or duplicated subprotocol was specified' - ); - } - protocolSet.add(protocol); - } - opts.headers['Sec-WebSocket-Protocol'] = protocols.join(','); - } - if (opts.origin) { - if (opts.protocolVersion < 13) { - opts.headers['Sec-WebSocket-Origin'] = opts.origin; - } else { - opts.headers.Origin = opts.origin; - } - } - if (parsedUrl.username || parsedUrl.password) { - opts.auth = `${parsedUrl.username}:${parsedUrl.password}`; - } - if (isIpcUrl) { - const parts = opts.path.split(':'); - opts.socketPath = parts[0]; - opts.path = parts[1]; - } - let req; - if (opts.followRedirects) { - if (websocket._redirects === 0) { - websocket._originalIpc = isIpcUrl; - websocket._originalSecure = isSecure; - websocket._originalHostOrSocketPath = isIpcUrl - ? opts.socketPath - : parsedUrl.host; - const headers = options && options.headers; - options = { ...options, headers: {} }; - if (headers) { - for (const [key, value] of Object.entries(headers)) { - options.headers[key.toLowerCase()] = value; - } - } - } else if (websocket.listenerCount('redirect') === 0) { - const isSameHost = isIpcUrl - ? websocket._originalIpc - ? opts.socketPath === websocket._originalHostOrSocketPath - : false - : websocket._originalIpc - ? false - : parsedUrl.host === websocket._originalHostOrSocketPath; - if (!isSameHost || (websocket._originalSecure && !isSecure)) { - delete opts.headers.authorization; - delete opts.headers.cookie; - if (!isSameHost) delete opts.headers.host; - opts.auth = undefined; - } - } - if (opts.auth && !options.headers.authorization) { - options.headers.authorization = - 'Basic ' + Buffer.from(opts.auth).toString('base64'); - } - req = websocket._req = request(opts); - if (websocket._redirects) { - websocket.emit('redirect', websocket.url, req); - } - } else { - req = websocket._req = request(opts); - } - if (opts.timeout) { - req.on('timeout', () => { - abortHandshake(websocket, req, 'Opening handshake has timed out'); - }); - } - req.on('error', (err) => { - if (req === null || req[kAborted]) return; - req = websocket._req = null; - emitErrorAndClose(websocket, err); - }); - req.on('response', (res) => { - const location = res.headers.location; - const statusCode = res.statusCode; - if ( - location && - opts.followRedirects && - statusCode >= 300 && - statusCode < 400 - ) { - if (++websocket._redirects > opts.maxRedirects) { - abortHandshake(websocket, req, 'Maximum redirects exceeded'); - return; - } - req.abort(); - let addr; - try { - addr = new URL(location, address); - } catch (e) { - const err = new SyntaxError(`Invalid URL: ${location}`); - emitErrorAndClose(websocket, err); - return; - } - initAsClient(websocket, addr, protocols, options); - } else if (!websocket.emit('unexpected-response', req, res)) { - abortHandshake( - websocket, - req, - `Unexpected server response: ${res.statusCode}` - ); - } - }); - req.on('upgrade', (res, socket, head) => { - websocket.emit('upgrade', res); - if (websocket.readyState !== WebSocket.CONNECTING) return; - req = websocket._req = null; - const upgrade = res.headers.upgrade; - if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { - abortHandshake(websocket, socket, 'Invalid Upgrade header'); - return; - } - const digest = createHash('sha1') - .update(key + GUID) - .digest('base64'); - if (res.headers['sec-websocket-accept'] !== digest) { - abortHandshake(websocket, socket, 'Invalid Sec-WebSocket-Accept header'); - return; - } - const serverProt = res.headers['sec-websocket-protocol']; - let protError; - if (serverProt !== undefined) { - if (!protocolSet.size) { - protError = 'Server sent a subprotocol but none was requested'; - } else if (!protocolSet.has(serverProt)) { - protError = 'Server sent an invalid subprotocol'; - } - } else if (protocolSet.size) { - protError = 'Server sent no subprotocol'; - } - if (protError) { - abortHandshake(websocket, socket, protError); - return; - } - if (serverProt) websocket._protocol = serverProt; - const secWebSocketExtensions = res.headers['sec-websocket-extensions']; - if (secWebSocketExtensions !== undefined) { - if (!perMessageDeflate) { - const message = - 'Server sent a Sec-WebSocket-Extensions header but no extension ' + - 'was requested'; - abortHandshake(websocket, socket, message); - return; - } - let extensions; - try { - extensions = parse(secWebSocketExtensions); - } catch (err) { - const message = 'Invalid Sec-WebSocket-Extensions header'; - abortHandshake(websocket, socket, message); - return; - } - const extensionNames = Object.keys(extensions); - if ( - extensionNames.length !== 1 || - extensionNames[0] !== PerMessageDeflate.extensionName - ) { - const message = 'Server indicated an extension that was not requested'; - abortHandshake(websocket, socket, message); - return; - } - try { - perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]); - } catch (err) { - const message = 'Invalid Sec-WebSocket-Extensions header'; - abortHandshake(websocket, socket, message); - return; - } - websocket._extensions[PerMessageDeflate.extensionName] = - perMessageDeflate; - } - websocket.setSocket(socket, head, { - allowSynchronousEvents: opts.allowSynchronousEvents, - generateMask: opts.generateMask, - maxPayload: opts.maxPayload, - skipUTF8Validation: opts.skipUTF8Validation - }); - }); - if (opts.finishRequest) { - opts.finishRequest(req, websocket); - } else { - req.end(); - } - } - function emitErrorAndClose(websocket, err) { - websocket._readyState = WebSocket.CLOSING; - websocket._errorEmitted = true; - websocket.emit('error', err); - websocket.emitClose(); - } - function netConnect(options) { - options.path = options.socketPath; - return net.connect(options); - } - function tlsConnect(options) { - options.path = undefined; - if (!options.servername && options.servername !== '') { - options.servername = net.isIP(options.host) ? '' : options.host; - } - return tls.connect(options); - } - function abortHandshake(websocket, stream, message) { - websocket._readyState = WebSocket.CLOSING; - const err = new Error(message); - Error.captureStackTrace(err, abortHandshake); - if (stream.setHeader) { - stream[kAborted] = true; - stream.abort(); - if (stream.socket && !stream.socket.destroyed) { - stream.socket.destroy(); - } - process.nextTick(emitErrorAndClose, websocket, err); - } else { - stream.destroy(err); - stream.once('error', websocket.emit.bind(websocket, 'error')); - stream.once('close', websocket.emitClose.bind(websocket)); - } - } - function sendAfterClose(websocket, data, cb) { - if (data) { - const length = isBlob(data) ? data.size : toBuffer(data).length; - if (websocket._socket) websocket._sender._bufferedBytes += length; - else websocket._bufferedAmount += length; - } - if (cb) { - const err = new Error( - `WebSocket is not open: readyState ${websocket.readyState} ` + - `(${readyStates[websocket.readyState]})` - ); - process.nextTick(cb, err); - } - } - function receiverOnConclude(code, reason) { - const websocket = this[kWebSocket]; - websocket._closeFrameReceived = true; - websocket._closeMessage = reason; - websocket._closeCode = code; - if (websocket._socket[kWebSocket] === undefined) return; - websocket._socket.removeListener('data', socketOnData); - process.nextTick(resume, websocket._socket); - if (code === 1005) websocket.close(); - else websocket.close(code, reason); - } - function receiverOnDrain() { - const websocket = this[kWebSocket]; - if (!websocket.isPaused) websocket._socket.resume(); - } - function receiverOnError(err) { - const websocket = this[kWebSocket]; - if (websocket._socket[kWebSocket] !== undefined) { - websocket._socket.removeListener('data', socketOnData); - process.nextTick(resume, websocket._socket); - websocket.close(err[kStatusCode]); - } - if (!websocket._errorEmitted) { - websocket._errorEmitted = true; - websocket.emit('error', err); - } - } - function receiverOnFinish() { - this[kWebSocket].emitClose(); - } - function receiverOnMessage(data, isBinary) { - this[kWebSocket].emit('message', data, isBinary); - } - function receiverOnPing(data) { - const websocket = this[kWebSocket]; - if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP); - websocket.emit('ping', data); - } - function receiverOnPong(data) { - this[kWebSocket].emit('pong', data); - } - function resume(stream) { - stream.resume(); - } - function senderOnError(err) { - const websocket = this[kWebSocket]; - if (websocket.readyState === WebSocket.CLOSED) return; - if (websocket.readyState === WebSocket.OPEN) { - websocket._readyState = WebSocket.CLOSING; - setCloseTimer(websocket); - } - this._socket.end(); - if (!websocket._errorEmitted) { - websocket._errorEmitted = true; - websocket.emit('error', err); - } - } - function setCloseTimer(websocket) { - websocket._closeTimer = setTimeout( - websocket._socket.destroy.bind(websocket._socket), - websocket._closeTimeout - ); - } - function socketOnClose() { - const websocket = this[kWebSocket]; - this.removeListener('close', socketOnClose); - this.removeListener('data', socketOnData); - this.removeListener('end', socketOnEnd); - websocket._readyState = WebSocket.CLOSING; - if ( - !this._readableState.endEmitted && - !websocket._closeFrameReceived && - !websocket._receiver._writableState.errorEmitted && - this._readableState.length !== 0 - ) { - const chunk = this.read(this._readableState.length); - websocket._receiver.write(chunk); - } - websocket._receiver.end(); - this[kWebSocket] = undefined; - clearTimeout(websocket._closeTimer); - if ( - websocket._receiver._writableState.finished || - websocket._receiver._writableState.errorEmitted - ) { - websocket.emitClose(); - } else { - websocket._receiver.on('error', receiverOnFinish); - websocket._receiver.on('finish', receiverOnFinish); - } - } - function socketOnData(chunk) { - if (!this[kWebSocket]._receiver.write(chunk)) { - this.pause(); - } - } - function socketOnEnd() { - const websocket = this[kWebSocket]; - websocket._readyState = WebSocket.CLOSING; - websocket._receiver.end(); - this.end(); - } - function socketOnError() { - const websocket = this[kWebSocket]; - this.removeListener('error', socketOnError); - this.on('error', NOOP); - if (websocket) { - websocket._readyState = WebSocket.CLOSING; - this.destroy(); - } - } - return websocket; -} - -var stream; -var hasRequiredStream; - -function requireStream () { - if (hasRequiredStream) return stream; - hasRequiredStream = 1; - requireWebsocket(); - const { Duplex } = require$$1$3; - function emitClose(stream) { - stream.emit('close'); - } - function duplexOnEnd() { - if (!this.destroyed && this._writableState.finished) { - this.destroy(); - } - } - function duplexOnError(err) { - this.removeListener('error', duplexOnError); - this.destroy(); - if (this.listenerCount('error') === 0) { - this.emit('error', err); - } - } - function createWebSocketStream(ws, options) { - let terminateOnDestroy = true; - const duplex = new Duplex({ - ...options, - autoDestroy: false, - emitClose: false, - objectMode: false, - writableObjectMode: false - }); - ws.on('message', function message(msg, isBinary) { - const data = - !isBinary && duplex._readableState.objectMode ? msg.toString() : msg; - if (!duplex.push(data)) ws.pause(); - }); - ws.once('error', function error(err) { - if (duplex.destroyed) return; - terminateOnDestroy = false; - duplex.destroy(err); - }); - ws.once('close', function close() { - if (duplex.destroyed) return; - duplex.push(null); - }); - duplex._destroy = function (err, callback) { - if (ws.readyState === ws.CLOSED) { - callback(err); - process.nextTick(emitClose, duplex); - return; - } - let called = false; - ws.once('error', function error(err) { - called = true; - callback(err); - }); - ws.once('close', function close() { - if (!called) callback(err); - process.nextTick(emitClose, duplex); - }); - if (terminateOnDestroy) ws.terminate(); - }; - duplex._final = function (callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once('open', function open() { - duplex._final(callback); - }); - return; - } - if (ws._socket === null) return; - if (ws._socket._writableState.finished) { - callback(); - if (duplex._readableState.endEmitted) duplex.destroy(); - } else { - ws._socket.once('finish', function finish() { - callback(); - }); - ws.close(); - } - }; - duplex._read = function () { - if (ws.isPaused) ws.resume(); - }; - duplex._write = function (chunk, encoding, callback) { - if (ws.readyState === ws.CONNECTING) { - ws.once('open', function open() { - duplex._write(chunk, encoding, callback); - }); - return; - } - ws.send(chunk, callback); - }; - duplex.on('end', duplexOnEnd); - duplex.on('error', duplexOnError); - return duplex; - } - stream = createWebSocketStream; - return stream; -} - -requireStream(); - -requireReceiver(); - -requireSender(); - -var websocketExports = requireWebsocket(); -var WebSocket$1 = /*@__PURE__*/getDefaultExportFromCjs(websocketExports); - -var subprotocol; -var hasRequiredSubprotocol; - -function requireSubprotocol () { - if (hasRequiredSubprotocol) return subprotocol; - hasRequiredSubprotocol = 1; - const { tokenChars } = requireValidation(); - function parse(header) { - const protocols = new Set(); - let start = -1; - let end = -1; - let i = 0; - for (i; i < header.length; i++) { - const code = header.charCodeAt(i); - if (end === -1 && tokenChars[code] === 1) { - if (start === -1) start = i; - } else if ( - i !== 0 && - (code === 0x20 || code === 0x09) - ) { - if (end === -1 && start !== -1) end = i; - } else if (code === 0x2c ) { - if (start === -1) { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - if (end === -1) end = i; - const protocol = header.slice(start, end); - if (protocols.has(protocol)) { - throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); - } - protocols.add(protocol); - start = end = -1; - } else { - throw new SyntaxError(`Unexpected character at index ${i}`); - } - } - if (start === -1 || end !== -1) { - throw new SyntaxError('Unexpected end of input'); - } - const protocol = header.slice(start, i); - if (protocols.has(protocol)) { - throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`); - } - protocols.add(protocol); - return protocols; - } - subprotocol = { parse }; - return subprotocol; -} - -var websocketServer; -var hasRequiredWebsocketServer; - -function requireWebsocketServer () { - if (hasRequiredWebsocketServer) return websocketServer; - hasRequiredWebsocketServer = 1; - const EventEmitter = require$$0$8; - const http = require$$0$6; - const { Duplex } = require$$1$3; - const { createHash } = require$$2$1; - const extension = requireExtension(); - const PerMessageDeflate = requirePermessageDeflate(); - const subprotocol = requireSubprotocol(); - const WebSocket = requireWebsocket(); - const { CLOSE_TIMEOUT, GUID, kWebSocket } = requireConstants(); - const keyRegex = /^[+/0-9A-Za-z]{22}==$/; - const RUNNING = 0; - const CLOSING = 1; - const CLOSED = 2; - class WebSocketServer extends EventEmitter { - constructor(options, callback) { - super(); - options = { - allowSynchronousEvents: true, - autoPong: true, - maxPayload: 100 * 1024 * 1024, - skipUTF8Validation: false, - perMessageDeflate: false, - handleProtocols: null, - clientTracking: true, - closeTimeout: CLOSE_TIMEOUT, - verifyClient: null, - noServer: false, - backlog: null, - server: null, - host: null, - path: null, - port: null, - WebSocket, - ...options - }; - if ( - (options.port == null && !options.server && !options.noServer) || - (options.port != null && (options.server || options.noServer)) || - (options.server && options.noServer) - ) { - throw new TypeError( - 'One and only one of the "port", "server", or "noServer" options ' + - 'must be specified' - ); - } - if (options.port != null) { - this._server = http.createServer((req, res) => { - const body = http.STATUS_CODES[426]; - res.writeHead(426, { - 'Content-Length': body.length, - 'Content-Type': 'text/plain' - }); - res.end(body); - }); - this._server.listen( - options.port, - options.host, - options.backlog, - callback - ); - } else if (options.server) { - this._server = options.server; - } - if (this._server) { - const emitConnection = this.emit.bind(this, 'connection'); - this._removeListeners = addListeners(this._server, { - listening: this.emit.bind(this, 'listening'), - error: this.emit.bind(this, 'error'), - upgrade: (req, socket, head) => { - this.handleUpgrade(req, socket, head, emitConnection); - } - }); - } - if (options.perMessageDeflate === true) options.perMessageDeflate = {}; - if (options.clientTracking) { - this.clients = new Set(); - this._shouldEmitClose = false; - } - this.options = options; - this._state = RUNNING; - } - address() { - if (this.options.noServer) { - throw new Error('The server is operating in "noServer" mode'); - } - if (!this._server) return null; - return this._server.address(); - } - close(cb) { - if (this._state === CLOSED) { - if (cb) { - this.once('close', () => { - cb(new Error('The server is not running')); - }); - } - process.nextTick(emitClose, this); - return; - } - if (cb) this.once('close', cb); - if (this._state === CLOSING) return; - this._state = CLOSING; - if (this.options.noServer || this.options.server) { - if (this._server) { - this._removeListeners(); - this._removeListeners = this._server = null; - } - if (this.clients) { - if (!this.clients.size) { - process.nextTick(emitClose, this); - } else { - this._shouldEmitClose = true; - } - } else { - process.nextTick(emitClose, this); - } - } else { - const server = this._server; - this._removeListeners(); - this._removeListeners = this._server = null; - server.close(() => { - emitClose(this); - }); - } - } - shouldHandle(req) { - if (this.options.path) { - const index = req.url.indexOf('?'); - const pathname = index !== -1 ? req.url.slice(0, index) : req.url; - if (pathname !== this.options.path) return false; - } - return true; - } - handleUpgrade(req, socket, head, cb) { - socket.on('error', socketOnError); - const key = req.headers['sec-websocket-key']; - const upgrade = req.headers.upgrade; - const version = +req.headers['sec-websocket-version']; - if (req.method !== 'GET') { - const message = 'Invalid HTTP method'; - abortHandshakeOrEmitwsClientError(this, req, socket, 405, message); - return; - } - if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') { - const message = 'Invalid Upgrade header'; - abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); - return; - } - if (key === undefined || !keyRegex.test(key)) { - const message = 'Missing or invalid Sec-WebSocket-Key header'; - abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); - return; - } - if (version !== 13 && version !== 8) { - const message = 'Missing or invalid Sec-WebSocket-Version header'; - abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, { - 'Sec-WebSocket-Version': '13, 8' - }); - return; - } - if (!this.shouldHandle(req)) { - abortHandshake(socket, 400); - return; - } - const secWebSocketProtocol = req.headers['sec-websocket-protocol']; - let protocols = new Set(); - if (secWebSocketProtocol !== undefined) { - try { - protocols = subprotocol.parse(secWebSocketProtocol); - } catch (err) { - const message = 'Invalid Sec-WebSocket-Protocol header'; - abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); - return; - } - } - const secWebSocketExtensions = req.headers['sec-websocket-extensions']; - const extensions = {}; - if ( - this.options.perMessageDeflate && - secWebSocketExtensions !== undefined - ) { - const perMessageDeflate = new PerMessageDeflate( - this.options.perMessageDeflate, - true, - this.options.maxPayload - ); - try { - const offers = extension.parse(secWebSocketExtensions); - if (offers[PerMessageDeflate.extensionName]) { - perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]); - extensions[PerMessageDeflate.extensionName] = perMessageDeflate; - } - } catch (err) { - const message = - 'Invalid or unacceptable Sec-WebSocket-Extensions header'; - abortHandshakeOrEmitwsClientError(this, req, socket, 400, message); - return; - } - } - if (this.options.verifyClient) { - const info = { - origin: - req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`], - secure: !!(req.socket.authorized || req.socket.encrypted), - req - }; - if (this.options.verifyClient.length === 2) { - this.options.verifyClient(info, (verified, code, message, headers) => { - if (!verified) { - return abortHandshake(socket, code || 401, message, headers); - } - this.completeUpgrade( - extensions, - key, - protocols, - req, - socket, - head, - cb - ); - }); - return; - } - if (!this.options.verifyClient(info)) return abortHandshake(socket, 401); - } - this.completeUpgrade(extensions, key, protocols, req, socket, head, cb); - } - completeUpgrade(extensions, key, protocols, req, socket, head, cb) { - if (!socket.readable || !socket.writable) return socket.destroy(); - if (socket[kWebSocket]) { - throw new Error( - 'server.handleUpgrade() was called more than once with the same ' + - 'socket, possibly due to a misconfiguration' - ); - } - if (this._state > RUNNING) return abortHandshake(socket, 503); - const digest = createHash('sha1') - .update(key + GUID) - .digest('base64'); - const headers = [ - 'HTTP/1.1 101 Switching Protocols', - 'Upgrade: websocket', - 'Connection: Upgrade', - `Sec-WebSocket-Accept: ${digest}` - ]; - const ws = new this.options.WebSocket(null, undefined, this.options); - if (protocols.size) { - const protocol = this.options.handleProtocols - ? this.options.handleProtocols(protocols, req) - : protocols.values().next().value; - if (protocol) { - headers.push(`Sec-WebSocket-Protocol: ${protocol}`); - ws._protocol = protocol; - } - } - if (extensions[PerMessageDeflate.extensionName]) { - const params = extensions[PerMessageDeflate.extensionName].params; - const value = extension.format({ - [PerMessageDeflate.extensionName]: [params] - }); - headers.push(`Sec-WebSocket-Extensions: ${value}`); - ws._extensions = extensions; - } - this.emit('headers', headers, req); - socket.write(headers.concat('\r\n').join('\r\n')); - socket.removeListener('error', socketOnError); - ws.setSocket(socket, head, { - allowSynchronousEvents: this.options.allowSynchronousEvents, - maxPayload: this.options.maxPayload, - skipUTF8Validation: this.options.skipUTF8Validation - }); - if (this.clients) { - this.clients.add(ws); - ws.on('close', () => { - this.clients.delete(ws); - if (this._shouldEmitClose && !this.clients.size) { - process.nextTick(emitClose, this); - } - }); - } - cb(ws, req); - } - } - websocketServer = WebSocketServer; - function addListeners(server, map) { - for (const event of Object.keys(map)) server.on(event, map[event]); - return function removeListeners() { - for (const event of Object.keys(map)) { - server.removeListener(event, map[event]); - } - }; - } - function emitClose(server) { - server._state = CLOSED; - server.emit('close'); - } - function socketOnError() { - this.destroy(); - } - function abortHandshake(socket, code, message, headers) { - message = message || http.STATUS_CODES[code]; - headers = { - Connection: 'close', - 'Content-Type': 'text/html', - 'Content-Length': Buffer.byteLength(message), - ...headers - }; - socket.once('finish', socket.destroy); - socket.end( - `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + - Object.keys(headers) - .map((h) => `${h}: ${headers[h]}`) - .join('\r\n') + - '\r\n\r\n' + - message - ); - } - function abortHandshakeOrEmitwsClientError( - server, - req, - socket, - code, - message, - headers - ) { - if (server.listenerCount('wsClientError')) { - const err = new Error(message); - Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError); - server.emit('wsClientError', err, socket, req); - } else { - abortHandshake(socket, code, message, headers); - } - } - return websocketServer; -} - -requireWebsocketServer(); - -/** - * @license - * Copyright 2018 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class NodeWebSocketTransport { - static create(url, headers) { - return new Promise((resolve, reject) => { - const ws = new WebSocket$1(url, [], { - followRedirects: true, - perMessageDeflate: false, - allowSynchronousEvents: false, - maxPayload: 256 * 1024 * 1024, - headers: { - 'User-Agent': `Puppeteer ${packageVersion}`, - ...headers, - }, - }); - ws.addEventListener('open', () => { - return resolve(new NodeWebSocketTransport(ws)); - }); - ws.addEventListener('error', reject); - }); - } - #ws; - onmessage; - onclose; - constructor(ws) { - this.#ws = ws; - this.#ws.addEventListener('message', event => { - if (this.onmessage) { - this.onmessage.call(null, event.data); - } - }); - this.#ws.addEventListener('close', () => { - if (this.onclose) { - this.onclose.call(null); - } - }); - this.#ws.addEventListener('error', () => { }); - } - send(message) { - this.#ws.send(message); - } - close() { - this.#ws.close(); - } -} - -var NodeWebSocketTransport$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - NodeWebSocketTransport: NodeWebSocketTransport -}); - -class PipeTransport { - #pipeWrite; - #subscriptions = new DisposableStack(); - #isClosed = false; - #pendingMessage = []; - onclose; - onmessage; - constructor(pipeWrite, pipeRead) { - this.#pipeWrite = pipeWrite; - const pipeReadEmitter = this.#subscriptions.use( - new EventEmitter(pipeRead)); - pipeReadEmitter.on('data', buffer => { - return this.#dispatch(buffer); - }); - pipeReadEmitter.on('close', () => { - if (this.onclose) { - this.onclose.call(null); - } - }); - pipeReadEmitter.on('error', debugError); - const pipeWriteEmitter = this.#subscriptions.use( - new EventEmitter(pipeWrite)); - pipeWriteEmitter.on('error', debugError); - } - send(message) { - assert(!this.#isClosed, '`PipeTransport` is closed.'); - this.#pipeWrite.write(message); - this.#pipeWrite.write('\0'); - } - #dispatch(buffer) { - assert(!this.#isClosed, '`PipeTransport` is closed.'); - this.#pendingMessage.push(buffer); - if (buffer.indexOf('\0') === -1) { - return; - } - const concatBuffer = Buffer.concat(this.#pendingMessage); - let start = 0; - let end = concatBuffer.indexOf('\0'); - while (end !== -1) { - const message = concatBuffer.toString(undefined, start, end); - setImmediate(() => { - if (this.onmessage) { - this.onmessage.call(null, message); - } - }); - start = end + 1; - end = concatBuffer.indexOf('\0', start); - } - if (start >= concatBuffer.length) { - this.#pendingMessage = []; - } - else { - this.#pendingMessage = [concatBuffer.subarray(start)]; - } - } - close() { - this.#isClosed = true; - this.#subscriptions.dispose(); - } -} - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class BrowserLauncher { - #browser; - puppeteer; - constructor(puppeteer, browser) { - this.puppeteer = puppeteer; - this.#browser = browser; - } - get browser() { - return this.#browser; - } - async launch(options = {}) { - const { dumpio = false, enableExtensions = false, env = process.env, handleSIGINT = true, handleSIGTERM = true, handleSIGHUP = true, acceptInsecureCerts = false, networkEnabled = true, defaultViewport = DEFAULT_VIEWPORT, downloadBehavior, slowMo = 0, timeout = 30000, waitForInitialPage = true, protocolTimeout, handleDevToolsAsPage, idGenerator = createIncrementalIdGenerator(), } = options; - let { protocol } = options; - if (this.#browser === 'firefox' && protocol === undefined) { - protocol = 'webDriverBiDi'; - } - if (this.#browser === 'firefox' && protocol === 'cdp') { - throw new Error('Connecting to Firefox using CDP is no longer supported'); - } - const launchArgs = await this.computeLaunchArguments({ - ...options, - protocol, - }); - if (!existsSync(launchArgs.executablePath)) { - throw new Error(`Browser was not found at the configured executablePath (${launchArgs.executablePath})`); - } - const usePipe = launchArgs.args.includes('--remote-debugging-pipe'); - const onProcessExit = async () => { - await this.cleanUserDataDir(launchArgs.userDataDir, { - isTemp: launchArgs.isTempUserDataDir, - }); - }; - if (this.#browser === 'firefox' && - protocol === 'webDriverBiDi' && - usePipe) { - throw new Error('Pipe connections are not supported with Firefox and WebDriver BiDi'); - } - const browserProcess = launch$1({ - executablePath: launchArgs.executablePath, - args: launchArgs.args, - handleSIGHUP, - handleSIGTERM, - handleSIGINT, - dumpio, - env, - pipe: usePipe, - onExit: onProcessExit, - signal: options.signal, - }); - let browser; - let cdpConnection; - let closing = false; - const browserCloseCallback = async () => { - if (closing) { - return; - } - closing = true; - await this.closeBrowser(browserProcess, cdpConnection); - }; - try { - if (this.#browser === 'firefox') { - browser = await this.createBiDiBrowser(browserProcess, browserCloseCallback, { - timeout, - protocolTimeout, - slowMo, - defaultViewport, - acceptInsecureCerts, - networkEnabled, - idGenerator, - }); - } - else { - if (usePipe) { - cdpConnection = await this.createCdpPipeConnection(browserProcess, { - timeout, - protocolTimeout, - slowMo, - idGenerator, - }); - } - else { - cdpConnection = await this.createCdpSocketConnection(browserProcess, { - timeout, - protocolTimeout, - slowMo, - idGenerator, - }); - } - if (protocol === 'webDriverBiDi') { - browser = await this.createBiDiOverCdpBrowser(browserProcess, cdpConnection, browserCloseCallback, { - defaultViewport, - acceptInsecureCerts, - networkEnabled, - }); - } - else { - browser = await CdpBrowser._create(cdpConnection, [], acceptInsecureCerts, defaultViewport, downloadBehavior, browserProcess.nodeProcess, browserCloseCallback, options.targetFilter, undefined, undefined, networkEnabled, handleDevToolsAsPage); - } - } - } - catch (error) { - void browserCloseCallback(); - const logs = browserProcess.getRecentLogs().join('\n'); - if (logs.includes('Failed to create a ProcessSingleton for your profile directory') || - (process.platform === 'win32' && - existsSync(join$1(launchArgs.userDataDir, 'lockfile')))) { - throw new Error(`The browser is already running for ${launchArgs.userDataDir}. Use a different \`userDataDir\` or stop the running browser first.`); - } - if (logs.includes('Missing X server') && options.headless === false) { - throw new Error(`Missing X server to start the headful browser. Either set headless to true or use xvfb-run to run your Puppeteer script.`); - } - if (error instanceof TimeoutError) { - throw new TimeoutError$1(error.message); - } - throw error; - } - if (Array.isArray(enableExtensions)) { - if (this.#browser === 'chrome' && !usePipe) { - throw new Error('To use `enableExtensions` with a list of paths in Chrome, you must be connected with `--remote-debugging-pipe` (`pipe: true`).'); - } - await Promise.all([ - enableExtensions.map(path => { - return browser.installExtension(path); - }), - ]); - } - if (waitForInitialPage) { - await this.waitForPageTarget(browser, timeout); - } - return browser; - } - async closeBrowser(browserProcess, cdpConnection) { - if (cdpConnection) { - try { - await cdpConnection.closeBrowser(); - await browserProcess.hasClosed(); - } - catch (error) { - debugError(error); - await browserProcess.close(); - } - } - else { - await firstValueFrom(race(from(browserProcess.hasClosed()), timer(5000).pipe(map(() => { - return from(browserProcess.close()); - })))); - } - } - async waitForPageTarget(browser, timeout) { - try { - await browser.waitForTarget(t => { - return t.type() === 'page'; - }, { timeout }); - } - catch (error) { - await browser.close(); - throw error; - } - } - async createCdpSocketConnection(browserProcess, opts) { - const browserWSEndpoint = await browserProcess.waitForLineOutput(CDP_WEBSOCKET_ENDPOINT_REGEX, opts.timeout); - const transport = await NodeWebSocketTransport.create(browserWSEndpoint); - return new Connection(browserWSEndpoint, transport, opts.slowMo, opts.protocolTimeout, - false, opts.idGenerator); - } - async createCdpPipeConnection(browserProcess, opts) { - const { 3: pipeWrite, 4: pipeRead } = browserProcess.nodeProcess.stdio; - const transport = new PipeTransport(pipeWrite, pipeRead); - return new Connection('', transport, opts.slowMo, opts.protocolTimeout, - false, opts.idGenerator); - } - async createBiDiOverCdpBrowser(browserProcess, cdpConnection, closeCallback, opts) { - const bidiOnly = process.env['PUPPETEER_WEBDRIVER_BIDI_ONLY'] === 'true'; - const BiDi = await import( '../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js'); - const bidiConnection = await BiDi.connectBidiOverCdp(cdpConnection); - return await BiDi.BidiBrowser.create({ - connection: bidiConnection, - cdpConnection: bidiOnly ? undefined : cdpConnection, - closeCallback, - process: browserProcess.nodeProcess, - defaultViewport: opts.defaultViewport, - acceptInsecureCerts: opts.acceptInsecureCerts, - networkEnabled: opts.networkEnabled, - }); - } - async createBiDiBrowser(browserProcess, closeCallback, opts) { - const browserWSEndpoint = (await browserProcess.waitForLineOutput(WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, opts.timeout)) + '/session'; - const transport = await NodeWebSocketTransport.create(browserWSEndpoint); - const BiDi = await import( '../../../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/bidi.js'); - const bidiConnection = new BiDi.BidiConnection(browserWSEndpoint, transport, opts.idGenerator, opts.slowMo, opts.protocolTimeout); - return await BiDi.BidiBrowser.create({ - connection: bidiConnection, - closeCallback, - process: browserProcess.nodeProcess, - defaultViewport: opts.defaultViewport, - acceptInsecureCerts: opts.acceptInsecureCerts, - networkEnabled: opts.networkEnabled ?? true, - }); - } - getProfilePath() { - return join$1(this.puppeteer.configuration.temporaryDirectory ?? tmpdir(), `puppeteer_dev_${this.browser}_profile-`); - } - resolveExecutablePath(headless, validatePath = true) { - let executablePath = this.puppeteer.configuration.executablePath; - if (executablePath) { - if (validatePath && !existsSync(executablePath)) { - throw new Error(`Tried to find the browser at the configured path (${executablePath}), but no executable was found.`); - } - return executablePath; - } - function puppeteerBrowserToInstalledBrowser(browser, headless) { - switch (browser) { - case 'chrome': - if (headless === 'shell') { - return Browser.CHROMEHEADLESSSHELL; - } - return Browser.CHROME; - case 'firefox': - return Browser.FIREFOX; - } - return Browser.CHROME; - } - const browserType = puppeteerBrowserToInstalledBrowser(this.browser, headless); - executablePath = computeExecutablePath({ - cacheDir: this.puppeteer.defaultDownloadPath, - browser: browserType, - buildId: this.puppeteer.browserVersion, - }); - if (validatePath && !existsSync(executablePath)) { - const configVersion = this.puppeteer.configuration?.[this.browser]?.version; - if (configVersion) { - throw new Error(`Tried to find the browser at the configured path (${executablePath}) for version ${configVersion}, but no executable was found.`); - } - switch (this.browser) { - case 'chrome': - throw new Error(`Could not find Chrome (ver. ${this.puppeteer.browserVersion}). This can occur if either\n` + - ` 1. you did not perform an installation before running the script (e.g. \`npx puppeteer browsers install ${browserType}\`) or\n` + - ` 2. your cache path is incorrectly configured (which is: ${this.puppeteer.configuration.cacheDirectory}).\n` + - 'For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.'); - case 'firefox': - throw new Error(`Could not find Firefox (rev. ${this.puppeteer.browserVersion}). This can occur if either\n` + - ' 1. you did not perform an installation for Firefox before running the script (e.g. `npx puppeteer browsers install firefox`) or\n' + - ` 2. your cache path is incorrectly configured (which is: ${this.puppeteer.configuration.cacheDirectory}).\n` + - 'For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.'); - } - } - return executablePath; - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -function convertPuppeteerChannelToBrowsersChannel(channel) { - switch (channel) { - case 'chrome': - return ChromeReleaseChannel.STABLE; - case 'chrome-dev': - return ChromeReleaseChannel.DEV; - case 'chrome-beta': - return ChromeReleaseChannel.BETA; - case 'chrome-canary': - return ChromeReleaseChannel.CANARY; - } -} - -var LaunchOptions = /*#__PURE__*/Object.freeze({ - __proto__: null, - convertPuppeteerChannelToBrowsersChannel: convertPuppeteerChannelToBrowsersChannel -}); - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -const rmOptions = { - force: true, - recursive: true, - maxRetries: 5, -}; -async function rm(path) { - await fs.promises.rm(path, rmOptions); -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class ChromeLauncher extends BrowserLauncher { - constructor(puppeteer) { - super(puppeteer, 'chrome'); - } - launch(options = {}) { - if (this.puppeteer.configuration.logLevel === 'warn' && - process.platform === 'darwin' && - process.arch === 'x64') { - const cpus = os.cpus(); - if (cpus[0]?.model.includes('Apple')) { - console.warn([ - '\x1B[1m\x1B[43m\x1B[30m', - 'Degraded performance warning:\x1B[0m\x1B[33m', - 'Launching Chrome on Mac Silicon (arm64) from an x64 Node installation results in', - 'Rosetta translating the Chrome binary, even if Chrome is already arm64. This would', - 'result in huge performance issues. To resolve this, you must run Puppeteer with', - 'a version of Node built for arm64.', - ].join('\n ')); - } - } - return super.launch(options); - } - async computeLaunchArguments(options = {}) { - const { ignoreDefaultArgs = false, args = [], pipe = false, debuggingPort, channel, executablePath, } = options; - const chromeArguments = []; - if (!ignoreDefaultArgs) { - chromeArguments.push(...this.defaultArgs(options)); - } - else if (Array.isArray(ignoreDefaultArgs)) { - chromeArguments.push(...this.defaultArgs(options).filter(arg => { - return !ignoreDefaultArgs.includes(arg); - })); - } - else { - chromeArguments.push(...args); - } - if (!chromeArguments.some(argument => { - return argument.startsWith('--remote-debugging-'); - })) { - if (pipe) { - assert(!debuggingPort, 'Browser should be launched with either pipe or debugging port - not both.'); - chromeArguments.push('--remote-debugging-pipe'); - } - else { - chromeArguments.push(`--remote-debugging-port=${debuggingPort || 0}`); - } - } - let isTempUserDataDir = false; - let userDataDirIndex = chromeArguments.findIndex(arg => { - return arg.startsWith('--user-data-dir'); - }); - if (userDataDirIndex < 0) { - isTempUserDataDir = true; - chromeArguments.push(`--user-data-dir=${await mkdtemp(this.getProfilePath())}`); - userDataDirIndex = chromeArguments.length - 1; - } - const userDataDir = chromeArguments[userDataDirIndex].split('=', 2)[1]; - assert(typeof userDataDir === 'string', '`--user-data-dir` is malformed'); - let chromeExecutable = executablePath; - if (!chromeExecutable) { - assert(channel || !this.puppeteer._isPuppeteerCore, `An \`executablePath\` or \`channel\` must be specified for \`puppeteer-core\``); - chromeExecutable = channel - ? this.executablePath(channel) - : this.resolveExecutablePath(options.headless ?? true); - } - return { - executablePath: chromeExecutable, - args: chromeArguments, - isTempUserDataDir, - userDataDir, - }; - } - async cleanUserDataDir(path, opts) { - if (opts.isTemp) { - try { - await rm(path); - } - catch (error) { - debugError(error); - throw error; - } - } - } - defaultArgs(options = {}) { - const userDisabledFeatures = getFeatures('--disable-features', options.args); - if (options.args && userDisabledFeatures.length > 0) { - removeMatchingFlags(options.args, '--disable-features'); - } - const turnOnExperimentalFeaturesForTesting = process.env['PUPPETEER_TEST_EXPERIMENTAL_CHROME_FEATURES'] === 'true'; - const disabledFeatures = [ - 'Translate', - 'AcceptCHFrame', - 'MediaRouter', - 'OptimizationHints', - 'RenderDocument', - 'PartitionAllocSchedulerLoopQuarantineTaskControlledPurge', - ...(turnOnExperimentalFeaturesForTesting - ? [] - : [ - 'ProcessPerSiteUpToMainFrameThreshold', - 'IsolateSandboxedIframes', - ]), - ...userDisabledFeatures, - ].filter(feature => { - return feature !== ''; - }); - const userEnabledFeatures = getFeatures('--enable-features', options.args); - if (options.args && userEnabledFeatures.length > 0) { - removeMatchingFlags(options.args, '--enable-features'); - } - const enabledFeatures = [ - 'PdfOopif', - ...userEnabledFeatures, - ].filter(feature => { - return feature !== ''; - }); - const chromeArguments = [ - '--allow-pre-commit-input', - '--disable-background-networking', - '--disable-background-timer-throttling', - '--disable-backgrounding-occluded-windows', - '--disable-breakpad', - '--disable-client-side-phishing-detection', - '--disable-component-extensions-with-background-pages', - '--disable-crash-reporter', - '--disable-default-apps', - '--disable-dev-shm-usage', - '--disable-hang-monitor', - '--disable-infobars', - '--disable-ipc-flooding-protection', - '--disable-popup-blocking', - '--disable-prompt-on-repost', - '--disable-renderer-backgrounding', - '--disable-search-engine-choice-screen', - '--disable-sync', - '--enable-automation', - '--export-tagged-pdf', - '--force-color-profile=srgb', - '--generate-pdf-document-outline', - '--metrics-recording-only', - '--no-first-run', - '--password-store=basic', - '--use-mock-keychain', - `--disable-features=${disabledFeatures.join(',')}`, - `--enable-features=${enabledFeatures.join(',')}`, - ].filter(arg => { - return arg !== ''; - }); - const { devtools = false, headless = !devtools, args = [], userDataDir, enableExtensions = false, } = options; - if (process.env['PUPPETEER_DANGEROUS_NO_SANDBOX'] === 'true' && - !args.includes('--no-sandbox')) { - chromeArguments.push('--no-sandbox'); - } - if (userDataDir) { - chromeArguments.push(`--user-data-dir=${path$1.posix.isAbsolute(userDataDir) || path$1.win32.isAbsolute(userDataDir) ? userDataDir : path$1.resolve(userDataDir)}`); - } - if (devtools) { - chromeArguments.push('--auto-open-devtools-for-tabs'); - } - if (headless) { - chromeArguments.push(headless === 'shell' ? '--headless' : '--headless=new', '--hide-scrollbars', '--mute-audio'); - } - chromeArguments.push(enableExtensions - ? '--enable-unsafe-extension-debugging' - : '--disable-extensions'); - if (args.every(arg => { - return arg.startsWith('-'); - })) { - chromeArguments.push('about:blank'); - } - chromeArguments.push(...args); - return chromeArguments; - } - executablePath(channel, validatePath = true) { - if (channel) { - return computeSystemExecutablePath({ - browser: Browser.CHROME, - channel: convertPuppeteerChannelToBrowsersChannel(channel), - }); - } - else { - return this.resolveExecutablePath(undefined, validatePath); - } - } -} -function getFeatures(flag, options = []) { - return options - .filter(s => { - return s.startsWith(flag.endsWith('=') ? flag : `${flag}=`); - }) - .map(s => { - return s.split(new RegExp(`${flag}=\\s*`))[1]?.trim(); - }) - .filter(s => { - return s; - }); -} -function removeMatchingFlags(array, flag) { - const regex = new RegExp(`^${flag}=.*`); - let i = 0; - while (i < array.length) { - if (regex.test(array[i])) { - array.splice(i, 1); - } - else { - i++; - } - } - return array; -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class FirefoxLauncher extends BrowserLauncher { - constructor(puppeteer) { - super(puppeteer, 'firefox'); - } - static getPreferences(extraPrefsFirefox) { - return { - ...extraPrefsFirefox, - 'fission.webContentIsolationStrategy': 0, - }; - } - async computeLaunchArguments(options = {}) { - const { ignoreDefaultArgs = false, args = [], executablePath, pipe = false, extraPrefsFirefox = {}, debuggingPort = null, } = options; - const firefoxArguments = []; - if (!ignoreDefaultArgs) { - firefoxArguments.push(...this.defaultArgs(options)); - } - else if (Array.isArray(ignoreDefaultArgs)) { - firefoxArguments.push(...this.defaultArgs(options).filter(arg => { - return !ignoreDefaultArgs.includes(arg); - })); - } - else { - firefoxArguments.push(...args); - } - if (!firefoxArguments.some(argument => { - return argument.startsWith('--remote-debugging-'); - })) { - if (pipe) { - assert(debuggingPort === null, 'Browser should be launched with either pipe or debugging port - not both.'); - } - firefoxArguments.push(`--remote-debugging-port=${debuggingPort || 0}`); - } - let userDataDir; - let isTempUserDataDir = true; - const profileArgIndex = firefoxArguments.findIndex(arg => { - return ['-profile', '--profile'].includes(arg); - }); - if (profileArgIndex !== -1) { - userDataDir = firefoxArguments[profileArgIndex + 1]; - if (!userDataDir) { - throw new Error(`Missing value for profile command line argument`); - } - isTempUserDataDir = false; - } - else { - userDataDir = await mkdtemp(this.getProfilePath()); - firefoxArguments.push('--profile'); - firefoxArguments.push(userDataDir); - } - await createProfile(Browser.FIREFOX, { - path: userDataDir, - preferences: FirefoxLauncher.getPreferences(extraPrefsFirefox), - }); - let firefoxExecutable; - if (this.puppeteer._isPuppeteerCore || executablePath) { - assert(executablePath, `An \`executablePath\` must be specified for \`puppeteer-core\``); - firefoxExecutable = executablePath; - } - else { - firefoxExecutable = this.executablePath(undefined); - } - return { - isTempUserDataDir, - userDataDir, - args: firefoxArguments, - executablePath: firefoxExecutable, - }; - } - async cleanUserDataDir(userDataDir, opts) { - if (opts.isTemp) { - try { - await rm(userDataDir); - } - catch (error) { - debugError(error); - throw error; - } - } - else { - try { - const backupSuffix = '.puppeteer'; - const backupFiles = ['prefs.js', 'user.js']; - const results = await Promise.allSettled(backupFiles.map(async (file) => { - const prefsBackupPath = path$1.join(userDataDir, file + backupSuffix); - if (fs.existsSync(prefsBackupPath)) { - const prefsPath = path$1.join(userDataDir, file); - await unlink(prefsPath); - await rename(prefsBackupPath, prefsPath); - } - })); - for (const result of results) { - if (result.status === 'rejected') { - throw result.reason; - } - } - } - catch (error) { - debugError(error); - } - } - } - executablePath(_, validatePath = true) { - return this.resolveExecutablePath(undefined, - validatePath); - } - defaultArgs(options = {}) { - const { devtools = false, headless = !devtools, args = [], userDataDir = null, } = options; - const firefoxArguments = []; - switch (os.platform()) { - case 'darwin': - firefoxArguments.push('--foreground'); - break; - case 'win32': - firefoxArguments.push('--wait-for-browser'); - break; - } - if (userDataDir) { - firefoxArguments.push('--profile'); - firefoxArguments.push(userDataDir); - } - if (headless) { - firefoxArguments.push('--headless'); - } - if (devtools) { - firefoxArguments.push('--devtools'); - } - if (args.every(arg => { - return arg.startsWith('-'); - })) { - firefoxArguments.push('about:blank'); - } - firefoxArguments.push(...args); - return firefoxArguments; - } -} - -/** - * @license - * Copyright 2020 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -class PuppeteerNode extends Puppeteer { - #launcher; - #lastLaunchedBrowser; - defaultBrowserRevision; - configuration = {}; - constructor(settings) { - const { configuration, ...commonSettings } = settings; - super(commonSettings); - if (configuration) { - this.configuration = configuration; - } - switch (this.configuration.defaultBrowser) { - case 'firefox': - this.defaultBrowserRevision = PUPPETEER_REVISIONS.firefox; - break; - default: - this.configuration.defaultBrowser = 'chrome'; - this.defaultBrowserRevision = PUPPETEER_REVISIONS.chrome; - break; - } - this.connect = this.connect.bind(this); - this.launch = this.launch.bind(this); - this.executablePath = this.executablePath.bind(this); - this.defaultArgs = this.defaultArgs.bind(this); - this.trimCache = this.trimCache.bind(this); - } - connect(options) { - return super.connect(options); - } - launch(options = {}) { - const { browser = this.defaultBrowser } = options; - this.#lastLaunchedBrowser = browser; - switch (browser) { - case 'chrome': - this.defaultBrowserRevision = PUPPETEER_REVISIONS.chrome; - break; - case 'firefox': - this.defaultBrowserRevision = PUPPETEER_REVISIONS.firefox; - break; - default: - throw new Error(`Unknown product: ${browser}`); - } - this.#launcher = this.#getLauncher(browser); - return this.#launcher.launch(options); - } - #getLauncher(browser) { - if (this.#launcher && this.#launcher.browser === browser) { - return this.#launcher; - } - switch (browser) { - case 'chrome': - return new ChromeLauncher(this); - case 'firefox': - return new FirefoxLauncher(this); - default: - throw new Error(`Unknown product: ${browser}`); - } - } - executablePath(optsOrChannel) { - if (optsOrChannel === undefined) { - return this.#getLauncher(this.lastLaunchedBrowser).executablePath(undefined, - false); - } - if (typeof optsOrChannel === 'string') { - return this.#getLauncher('chrome').executablePath(optsOrChannel, - false); - } - return this.#getLauncher(optsOrChannel.browser ?? this.lastLaunchedBrowser).resolveExecutablePath(optsOrChannel.headless, false); - } - get browserVersion() { - return (this.configuration?.[this.lastLaunchedBrowser]?.version ?? - this.defaultBrowserRevision); - } - get defaultDownloadPath() { - return this.configuration.cacheDirectory; - } - get lastLaunchedBrowser() { - return this.#lastLaunchedBrowser ?? this.defaultBrowser; - } - get defaultBrowser() { - return this.configuration.defaultBrowser ?? 'chrome'; - } - get product() { - return this.lastLaunchedBrowser; - } - defaultArgs(options = {}) { - return this.#getLauncher(options.browser ?? this.lastLaunchedBrowser).defaultArgs(options); - } - async trimCache() { - const platform = detectBrowserPlatform(); - if (!platform) { - throw new Error('The current platform is not supported.'); - } - const cacheDir = this.configuration.cacheDirectory; - const installedBrowsers = await getInstalledBrowsers({ - cacheDir, - }); - const puppeteerBrowsers = [ - { - product: 'chrome', - browser: Browser.CHROME, - currentBuildId: '', - }, - { - product: 'firefox', - browser: Browser.FIREFOX, - currentBuildId: '', - }, - ]; - await Promise.all(puppeteerBrowsers.map(async (item) => { - const tag = this.configuration?.[item.product]?.version ?? - PUPPETEER_REVISIONS[item.product]; - item.currentBuildId = await resolveBuildId(item.browser, platform, tag); - })); - const currentBrowserBuilds = new Set(puppeteerBrowsers.map(browser => { - return `${browser.browser}_${browser.currentBuildId}`; - })); - const currentBrowsers = new Set(puppeteerBrowsers.map(browser => { - return browser.browser; - })); - for (const installedBrowser of installedBrowsers) { - if (!currentBrowsers.has(installedBrowser.browser)) { - continue; - } - if (currentBrowserBuilds.has(`${installedBrowser.browser}_${installedBrowser.buildId}`)) { - continue; - } - await uninstall({ - browser: installedBrowser.browser, - platform, - cacheDir, - buildId: installedBrowser.buildId, - }); - } - } -} - -/** - * @license - * Copyright 2023 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -var __runInitializers = (undefined && undefined.__runInitializers) || function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; -var __esDecorate = (undefined && undefined.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; -var __setFunctionName = (undefined && undefined.__setFunctionName) || function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; -const CRF_VALUE = 30; -const DEFAULT_FPS = 30; -const debugFfmpeg = debug$2('puppeteer:ffmpeg'); -let ScreenRecorder = (() => { - let _classSuper = PassThrough; - let _instanceExtraInitializers = []; - let _private_writeFrame_decorators; - let _private_writeFrame_descriptor; - let _stop_decorators; - return class ScreenRecorder extends _classSuper { - static { - const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; - __esDecorate(this, _private_writeFrame_descriptor = { value: __setFunctionName(async function (buffer) { - const error = await new Promise(resolve => { - this.#process.stdin.write(buffer, resolve); - }); - if (error) { - console.log(`ffmpeg failed to write: ${error.message}.`); - } - }, "#writeFrame") }, _private_writeFrame_decorators, { kind: "method", name: "#writeFrame", static: false, private: true, access: { has: obj => #writeFrame in obj, get: obj => obj.#writeFrame }, metadata: _metadata }, null, _instanceExtraInitializers); - __esDecorate(this, null, _stop_decorators, { kind: "method", name: "stop", static: false, private: false, access: { has: obj => "stop" in obj, get: obj => obj.stop }, metadata: _metadata }, null, _instanceExtraInitializers); - if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); - } - #page = __runInitializers(this, _instanceExtraInitializers); - #process; - #controller = new AbortController(); - #lastFrame; - #fps; - constructor(page, width, height, { ffmpegPath, speed, scale, crop, format, fps, loop, delay, quality, colors, path, overwrite, } = {}) { - super({ allowHalfOpen: false }); - ffmpegPath ??= 'ffmpeg'; - format ??= 'webm'; - fps ??= DEFAULT_FPS; - loop ||= -1; - delay ??= -1; - quality ??= CRF_VALUE; - colors ??= 256; - overwrite ??= true; - this.#fps = fps; - const { error } = spawnSync(ffmpegPath); - if (error) { - throw error; - } - const filters = [ - `crop='min(${width},iw):min(${height},ih):0:0'`, - `pad=${width}:${height}:0:0`, - ]; - if (speed) { - filters.push(`setpts=${1 / speed}*PTS`); - } - if (crop) { - filters.push(`crop=${crop.width}:${crop.height}:${crop.x}:${crop.y}`); - } - if (scale) { - filters.push(`scale=iw*${scale}:-1:flags=lanczos`); - } - const formatArgs = this.#getFormatArgs(format, fps, loop, delay, quality, colors); - const vf = formatArgs.indexOf('-vf'); - if (vf !== -1) { - filters.push(formatArgs.splice(vf, 2).at(-1) ?? ''); - } - if (path) { - fs.mkdirSync(dirname$1(path), { recursive: overwrite }); - } - this.#process = spawn$1(ffmpegPath, - [ - ['-loglevel', 'error'], - ['-avioflags', 'direct'], - [ - '-fpsprobesize', - '0', - '-probesize', - '32', - '-analyzeduration', - '0', - '-fflags', - 'nobuffer', - ], - ['-f', 'image2pipe', '-vcodec', 'png', '-i', 'pipe:0'], - ['-an'], - ['-threads', '1'], - ['-framerate', `${fps}`], - ['-b:v', '0'], - formatArgs, - ['-vf', filters.join()], - [overwrite ? '-y' : '-n'], - 'pipe:1', - ].flat(), { stdio: ['pipe', 'pipe', 'pipe'] }); - this.#process.stdout.pipe(this); - this.#process.stderr.on('data', (data) => { - debugFfmpeg(data.toString('utf8')); - }); - this.#page = page; - const { client } = this.#page.mainFrame(); - client.once(CDPSessionEvent.Disconnected, () => { - void this.stop().catch(debugError); - }); - this.#lastFrame = lastValueFrom(fromEmitterEvent(client, 'Page.screencastFrame').pipe(tap(event => { - void client.send('Page.screencastFrameAck', { - sessionId: event.sessionId, - }); - }), filter(event => { - return event.metadata.timestamp !== undefined; - }), map(event => { - return { - buffer: Buffer.from(event.data, 'base64'), - timestamp: event.metadata.timestamp, - }; - }), bufferCount(2, 1), concatMap(([{ timestamp: previousTimestamp, buffer }, { timestamp }]) => { - return from(Array(Math.round(fps * Math.max(timestamp - previousTimestamp, 0))).fill(buffer)); - }), map(buffer => { - void this.#writeFrame(buffer); - return [buffer, performance.now()]; - }), takeUntil(fromEvent(this.#controller.signal, 'abort'))), { defaultValue: [Buffer.from([]), performance.now()] }); - } - #getFormatArgs(format, fps, loop, delay, quality, colors) { - const libvpx = [ - ['-vcodec', 'vp9'], - ['-crf', `${quality}`], - [ - '-deadline', - 'realtime', - '-cpu-used', - `${Math.min(os.cpus().length / 2, 8)}`, - ], - ]; - switch (format) { - case 'webm': - return [ - ...libvpx, - ['-f', 'webm'], - ].flat(); - case 'gif': - fps = DEFAULT_FPS === fps ? 20 : 'source_fps'; - if (loop === Infinity) { - loop = 0; - } - if (delay !== -1) { - delay /= 10; - } - return [ - [ - '-vf', - `fps=${fps},split[s0][s1];[s0]palettegen=stats_mode=diff:max_colors=${colors}[p];[s1][p]paletteuse=dither=bayer`, - ], - ['-loop', `${loop}`], - ['-final_delay', `${delay}`], - ['-f', 'gif'], - ].flat(); - case 'mp4': - return [ - ...libvpx, - ['-movflags', 'hybrid_fragmented'], - ['-f', 'mp4'], - ].flat(); - } - } - get #writeFrame() { return _private_writeFrame_descriptor.value; } - async stop() { - if (this.#controller.signal.aborted) { - return; - } - await this.#page._stopScreencast().catch(debugError); - this.#controller.abort(); - const [buffer, timestamp] = await this.#lastFrame; - await Promise.all(Array(Math.max(1, Math.round((this.#fps * (performance.now() - timestamp)) / 1000))) - .fill(buffer) - .map(this.#writeFrame.bind(this))); - this.#process.stdin.end(); - await new Promise(resolve => { - this.#process.once('close', resolve); - }); - } - async [(_private_writeFrame_decorators = [guarded()], _stop_decorators = [guarded()], asyncDisposeSymbol)]() { - await this.stop(); - } - }; -})(); - -/** - * @license - * Copyright 2017 Google Inc. - * SPDX-License-Identifier: Apache-2.0 - */ -environment.value = { - fs, - path: path$1, - ScreenRecorder: ScreenRecorder, -}; -const puppeteer = new PuppeteerNode({ - isPuppeteerCore: true, -}); -const { -connect, -defaultArgs, -executablePath, -launch, } = puppeteer; - -// Copyright 2019 The Chromium Authors - -var App = /*#__PURE__*/Object.freeze({ - __proto__: null -}); - -// Copyright 2025 The Chromium Authors -class WritableDevToolsContext { - #instances = new Map(); - get(ctor) { - const instance = this.#instances.get(ctor); - if (!instance) { - throw new Error(`No instance for ${ctor.name}. Ensure the bootstrapper creates it.`); - } - return instance; - } - has(ctor) { - return this.#instances.has(ctor); - } - set(ctor, instance) { - this.#instances.set(ctor, instance); - } - delete(ctor) { - this.#instances.delete(ctor); - } -} -let gInstance = null; -function globalInstance() { - if (!gInstance) { - gInstance = new WritableDevToolsContext(); - } - return gInstance; -} - -// Copyright 2026 The Chromium Authors -var ExperimentName; -(function (ExperimentName) { - ExperimentName["ALL"] = "*"; - ExperimentName["CAPTURE_NODE_CREATION_STACKS"] = "capture-node-creation-stacks"; - ExperimentName["LIVE_HEAP_PROFILE"] = "live-heap-profile"; - ExperimentName["PROTOCOL_MONITOR"] = "protocol-monitor"; - ExperimentName["SAMPLING_HEAP_PROFILER_TIMELINE"] = "sampling-heap-profiler-timeline"; - ExperimentName["SHOW_OPTION_TO_EXPOSE_INTERNALS_IN_HEAP_SNAPSHOT"] = "show-option-to-expose-internals-in-heap-snapshot"; - ExperimentName["TIMELINE_INVALIDATION_TRACKING"] = "timeline-invalidation-tracking"; - ExperimentName["TIMELINE_SHOW_ALL_EVENTS"] = "timeline-show-all-events"; - ExperimentName["APCA"] = "apca"; - ExperimentName["FONT_EDITOR"] = "font-editor"; - ExperimentName["FULL_ACCESSIBILITY_TREE"] = "full-accessibility-tree"; - ExperimentName["EXPERIMENTAL_COOKIE_FEATURES"] = "experimental-cookie-features"; - ExperimentName["INSTRUMENTATION_BREAKPOINTS"] = "instrumentation-breakpoints"; - ExperimentName["USE_SOURCE_MAP_SCOPES"] = "use-source-map-scopes"; - ExperimentName["TIMELINE_DEBUG_MODE"] = "timeline-debug-mode"; - ExperimentName["DURABLE_MESSAGES"] = "durable-messages"; - ExperimentName["JPEG_XL"] = "jpeg-xl"; -})(ExperimentName || (ExperimentName = {})); - -function getChromeVersion() { return ''; }const hostConfig = {}; -const Runtime = { - isDescriptorEnabled: () => true, - queryParam: () => null, -}; -const experiments = { - isEnabled: () => false, -}; - -// Copyright 2019 The Chromium Authors -const registeredAppProvider = []; -function registerAppProvider(registration) { - registeredAppProvider.push(registration); -} -function getRegisteredAppProviders() { - return registeredAppProvider - .filter(provider => Runtime.isDescriptorEnabled({ condition: provider.condition })) - .sort((firstProvider, secondProvider) => { - const order1 = firstProvider.order || 0; - const order2 = secondProvider.order || 0; - return order1 - order2; - }); -} - -var AppProvider = /*#__PURE__*/Object.freeze({ - __proto__: null, - getRegisteredAppProviders: getRegisteredAppProviders, - registerAppProvider: registerAppProvider -}); - -// Copyright 2020 The Chromium Authors -const BASE64_CHARS$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const BASE64_CODES$1 = new Uint8Array(123); -for (let index = 0; index < BASE64_CHARS$1.length; ++index) { - BASE64_CODES$1[BASE64_CHARS$1.charCodeAt(index)] = index; -} -function decode$1(input) { - let bytesLength = ((input.length * 3) / 4) >>> 0; - if (input.charCodeAt(input.length - 2) === 0x3d ) { - bytesLength -= 2; - } - else if (input.charCodeAt(input.length - 1) === 0x3d ) { - bytesLength -= 1; - } - const bytes = new Uint8Array(bytesLength); - for (let index = 0, offset = 0; index < input.length; index += 4) { - const a = BASE64_CODES$1[input.charCodeAt(index + 0)]; - const b = BASE64_CODES$1[input.charCodeAt(index + 1)]; - const c = BASE64_CODES$1[input.charCodeAt(index + 2)]; - const d = BASE64_CODES$1[input.charCodeAt(index + 3)]; - bytes[offset++] = (a << 2) | (b >> 4); - bytes[offset++] = ((b & 0x0f) << 4) | (c >> 2); - bytes[offset++] = ((c & 0x03) << 6) | (d & 0x3f); - } - return bytes; -} -function encode(input) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onerror = () => reject(new Error('failed to convert to base64: internal error')); - reader.onload = () => { - if (reader.result === '') { - reject(new Error('failed to convert to base64: input too large to encode as base64 string')); - return; - } - const blobAsUrl = reader.result; - const index = blobAsUrl.indexOf(','); - const base64 = blobAsUrl.slice(index + 1); - resolve(base64); - }; - reader.readAsDataURL(new Blob([input])); - }); -} - -var Base64 = /*#__PURE__*/Object.freeze({ - __proto__: null, - BASE64_CHARS: BASE64_CHARS$1, - BASE64_CODES: BASE64_CODES$1, - decode: decode$1, - encode: encode -}); - -// Copyright 2016 The Chromium Authors -class CharacterIdMap { - #elementToCharacter = new Map(); - #characterToElement = new Map(); - #charCode = 33; - toChar(object) { - let character = this.#elementToCharacter.get(object); - if (!character) { - if (this.#charCode >= 0xFFFF) { - throw new Error('CharacterIdMap ran out of capacity!'); - } - character = String.fromCharCode(this.#charCode++); - this.#elementToCharacter.set(object, character); - this.#characterToElement.set(character, object); - } - return character; - } - fromChar(character) { - const object = this.#characterToElement.get(character); - if (object === undefined) { - return null; - } - return object; - } -} - -var CharacterIdMap$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - CharacterIdMap: CharacterIdMap -}); - -// Copyright 2020 The Chromium Authors -const removeElement = (array, element, firstOnly) => { - let index = array.indexOf(element); - if (index === -1) { - return false; - } - for (let i = index + 1, n = array.length; i < n; ++i) { - if (array[i] !== element) { - array[index++] = array[i]; - } - } - array.length = index; - return true; -}; -function swap(array, i1, i2) { - const temp = array[i1]; - array[i1] = array[i2]; - array[i2] = temp; -} -function mergeOrIntersect(array1, array2, comparator, mergeNotIntersect) { - const result = []; - let i = 0; - let j = 0; - while (i < array1.length && j < array2.length) { - const compareValue = comparator(array1[i], array2[j]); - { - result.push(compareValue <= 0 ? array1[i] : array2[j]); - } - if (compareValue <= 0) { - i++; - } - if (compareValue >= 0) { - j++; - } - } - { - while (i < array1.length) { - result.push(array1[i++]); - } - while (j < array2.length) { - result.push(array2[j++]); - } - } - return result; -} -const mergeOrdered = (array1, array2, comparator) => { - return mergeOrIntersect(array1, array2, comparator); -}; -const DEFAULT_COMPARATOR = (a, b) => { - return a < b ? -1 : (a > b ? 1 : 0); -}; -function lowerBound(array, needle, comparator, left, right) { - let l = 0; - let r = right !== undefined ? right : array.length; - while (l < r) { - const m = (l + r) >> 1; - if (comparator(needle, array[m]) > 0) { - l = m + 1; - } - else { - r = m; - } - } - return r; -} -function upperBound(array, needle, comparator, left, right) { - let l = 0; - let r = array.length; - while (l < r) { - const m = (l + r) >> 1; - if (comparator(needle, array[m]) >= 0) { - l = m + 1; - } - else { - r = m; - } - } - return r; -} -function nearestIndex(arr, predicate, searchStart) { - const searchFromEnd = searchStart === "END" ; - if (arr.length === 0) { - return null; - } - let left = 0; - let right = arr.length - 1; - let pivot = 0; - let matchesPredicate = false; - let moveToTheRight = false; - let middle = 0; - do { - middle = left + (right - left) / 2; - pivot = searchFromEnd ? Math.ceil(middle) : Math.floor(middle); - matchesPredicate = predicate(arr[pivot]); - moveToTheRight = matchesPredicate === searchFromEnd; - if (moveToTheRight) { - left = Math.min(right, pivot + (left === pivot ? 1 : 0)); - } - else { - right = Math.max(left, pivot + (right === pivot ? -1 : 0)); - } - } while (right !== left); - if (!predicate(arr[left])) { - return null; - } - return left; -} -function nearestIndexFromBeginning(arr, predicate) { - return nearestIndex(arr, predicate, "BEGINNING" ); -} -function nearestIndexFromEnd(arr, predicate) { - return nearestIndex(arr, predicate, "END" ); -} -function arrayDoesNotContainNullOrUndefined(arr) { - return !arr.includes(null) && !arr.includes(undefined); -} - -// Copyright 2020 The Chromium Authors -const isValid = (date) => { - return !isNaN(date.getTime()); -}; - -// Copyright 2021 The Chromium Authors -const EmptyUrlString = ''; - -// Copyright 2025 The Chromium Authors -class NodeWorkerScope { - postMessage(message) { - WorkerThreads.parentPort?.postMessage(message); - } - set onmessage(listener) { - WorkerThreads.parentPort?.on('message', data => { - listener({ data }); - }); - } -} -class NodeWorker { - #workerPromise; - #disposed = false; - #rejectWorkerPromise; - constructor(url) { - this.#workerPromise = new Promise((resolve, reject) => { - this.#rejectWorkerPromise = reject; - const worker = new WorkerThreads.Worker(new URL(url)); - worker.once('message', (message) => { - if (message === 'workerReady') { - resolve(worker); - } - }); - worker.on('error', reject); - }); - } - postMessage(message) { - void this.#workerPromise.then(worker => { - if (!this.#disposed) { - worker.postMessage(message); - } - }); - } - dispose() { - this.#disposed = true; - void this.#workerPromise.then(worker => worker.terminate()); - } - terminate(immediately) { - if (immediately) { - this.#rejectWorkerPromise?.(new Error('Worker terminated')); - } - this.dispose(); - } - set onmessage(listener) { - void this.#workerPromise.then(worker => { - worker.on('message', data => { - if (!this.#disposed) { - listener({ data }); - } - }); - }); - } - set onerror(listener) { - void this.#workerPromise.then(worker => { - worker.on('error', (error) => { - if (!this.#disposed) { - listener({ type: 'error', ...error }); - } - }); - }); - } -} -const HOST_RUNTIME$2 = { - createWorker(url) { - return new NodeWorker(url); - }, - workerScope: new NodeWorkerScope(), -}; - -var HostRuntime$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - HOST_RUNTIME: HOST_RUNTIME$2 -}); - -// Copyright 2025 The Chromium Authors - -var node = /*#__PURE__*/Object.freeze({ - __proto__: null, - HostRuntime: HostRuntime$1 -}); - -// Copyright 2025 The Chromium Authors -class WebWorkerScope { - postMessage(message) { - self.postMessage(message); - } - set onmessage(listener) { - self.onmessage = listener; - } -} -class WebWorker { - #workerPromise; - #disposed; - #rejectWorkerPromise; - constructor(workerLocation) { - this.#workerPromise = new Promise((fulfill, reject) => { - this.#rejectWorkerPromise = reject; - const worker = new Worker(new URL(workerLocation), { type: 'module' }); - worker.onerror = event => { - console.error(`Failed to load worker for ${workerLocation}:`, event); - }; - worker.onmessage = (event) => { - console.assert(event.data === 'workerReady'); - worker.onmessage = null; - fulfill(worker); - }; - }); - } - postMessage(message, transfer) { - void this.#workerPromise.then(worker => { - if (!this.#disposed) { - worker.postMessage(message, transfer ?? []); - } - }); - } - dispose() { - this.#disposed = true; - void this.#workerPromise.then(worker => worker.terminate()); - } - terminate(immediately = false) { - if (immediately) { - this.#rejectWorkerPromise?.(new Error('Worker terminated')); - } - this.dispose(); - } - set onmessage(listener) { - void this.#workerPromise.then(worker => { - worker.onmessage = listener; - }); - } - set onerror(listener) { - void this.#workerPromise.then(worker => { - worker.onerror = listener; - }); - } -} -const HOST_RUNTIME$1 = { - createWorker(url) { - return new WebWorker(url); - }, - workerScope: new WebWorkerScope(), -}; - -var HostRuntime = /*#__PURE__*/Object.freeze({ - __proto__: null, - HOST_RUNTIME: HOST_RUNTIME$1 -}); - -// Copyright 2025 The Chromium Authors - -var browser = /*#__PURE__*/Object.freeze({ - __proto__: null, - HostRuntime: HostRuntime -}); - -// Copyright 2025 The Chromium Authors -const IS_NODE = typeof process !== 'undefined' && process.versions?.node !== null; -const IS_BROWSER = -typeof window !== 'undefined' || (typeof self !== 'undefined' && typeof self.postMessage === 'function'); -const HOST_RUNTIME = await (async () => { - if (IS_NODE) { - return (await Promise.resolve().then(function () { return node; })).HostRuntime.HOST_RUNTIME; - } - if (IS_BROWSER) { - return (await Promise.resolve().then(function () { return browser; })).HostRuntime.HOST_RUNTIME; - } - throw new Error('Unknown runtime!'); -})(); - -// Copyright 2020 The Chromium Authors -class Multimap { - map = new Map(); - set(key, value) { - let set = this.map.get(key); - if (!set) { - set = new Set(); - this.map.set(key, set); - } - set.add(value); - } - get(key) { - return this.map.get(key) || new Set(); - } - has(key) { - return this.map.has(key); - } - hasValue(key, value) { - const set = this.map.get(key); - if (!set) { - return false; - } - return set.has(value); - } - get size() { - return this.map.size; - } - delete(key, value) { - const values = this.get(key); - if (!values) { - return false; - } - const result = values.delete(value); - if (!values.size) { - this.map.delete(key); - } - return result; - } - deleteAll(key) { - this.map.delete(key); - } - keysArray() { - return [...this.map.keys()]; - } - keys() { - return this.map.keys(); - } - valuesArray() { - const result = []; - for (const set of this.map.values()) { - result.push(...set.values()); - } - return result; - } - clear() { - this.map.clear(); - } -} -function getWithDefault(map, key, defaultValueFactory) { - let value = map.get(key); - if (value === undefined || value === null) { - value = defaultValueFactory(key); - map.set(key, value); - } - return value; -} - -// Copyright 2023 The Chromium Authors -const ADDITIONAL_TEXT_MIME_TYPES = new Set([ - 'application/ecmascript', - 'application/javascript', - 'application/json', - 'application/json+protobuf', - 'application/mpegurl', - 'application/vnd.apple.mpegurl', - 'application/vnd.dart', - 'application/xml', - 'application/x-aspx', - 'application/x-javascript', - 'application/x-jsp', - 'application/x-httpd-php', - 'application/x-mpegurl', - 'audio/mpegurl', - 'audio/x-mpegurl', -]); -function isTextType(mimeType) { - return mimeType.startsWith('text/') || mimeType.startsWith('multipart/') || mimeType.includes('json') || - mimeType.endsWith('+xml') || ADDITIONAL_TEXT_MIME_TYPES.has(mimeType); -} -function parseContentType(contentType) { - if (contentType === '*/*') { - return { mimeType: null, charset: null }; - } - const { mimeType, params } = parseMimeType(contentType); - const charset = params.get('charset')?.toLowerCase().trim() ?? null; - return { mimeType, charset }; -} -function parseMimeType(contentType) { - contentType = contentType.trim(); - let mimeTypeEnd = findFirstIndexOf(contentType, ' \t;('); - if (mimeTypeEnd < 0) { - mimeTypeEnd = contentType.length; - } - const slashPos = contentType.indexOf('/'); - if (slashPos < 0 || slashPos > mimeTypeEnd) { - return { mimeType: null, params: new Map() }; - } - const mimeType = contentType.substring(0, mimeTypeEnd).toLowerCase(); - const params = new Map(); - let offset = contentType.indexOf(';', mimeTypeEnd); - while (offset >= 0 && offset < contentType.length) { - ++offset; - offset = findFirstIndexNotOf(contentType, ' \t', offset); - if (offset < 0) { - continue; - } - const paramNameStart = offset; - offset = findFirstIndexOf(contentType, ';=', offset); - if (offset < 0 || contentType[offset] === ';') { - continue; - } - const paramName = contentType.substring(paramNameStart, offset).toLowerCase(); - ++offset; - offset = findFirstIndexNotOf(contentType, ' \t', offset); - let paramValue = ''; - if (offset < 0 || contentType[offset] === ';') { - continue; - } - else if (contentType[offset] !== '"') { - const valueStart = offset; - offset = contentType.indexOf(';', offset); - const valueEnd = offset >= 0 ? offset : contentType.length; - paramValue = contentType.substring(valueStart, valueEnd).trimEnd(); - } - else { - ++offset; - while (offset < contentType.length && contentType[offset] !== '"') { - if (contentType[offset] === '\\' && offset + 1 < contentType.length) { - ++offset; - } - paramValue += contentType[offset]; - ++offset; - } - offset = contentType.indexOf(';', offset); - } - if (!params.has(paramName)) { - params.set(paramName, paramValue); - } - } - return { mimeType, params }; -} -function findFirstIndexOf(searchString, characters, pos = 0) { - for (let i = pos; i < searchString.length; i++) { - if (characters.includes(searchString[i])) { - return i; - } - } - return -1; -} -function findFirstIndexNotOf(searchString, characters, pos = 0) { - for (let i = pos; i < searchString.length; i++) { - if (!characters.includes(searchString[i])) { - return i; - } - } - return -1; -} - -// Copyright 2020 The Chromium Authors -const clamp$1 = (num, min, max) => { - let clampedNumber = num; - if (num < min) { - clampedNumber = min; - } - else if (num > max) { - clampedNumber = max; - } - return clampedNumber; -}; -const floor = (value, precision = 0) => { - if (precision > 0 && precision < 1) { - precision = 1 / precision; - return Math.floor(value / precision) * precision; - } - const mult = Math.pow(10, precision); - return Math.floor(value * mult) / mult; -}; - -// Copyright 2020 The Chromium Authors -const escapeCharacters = (inputString, charsToEscape) => { - let foundChar = false; - for (let i = 0; i < charsToEscape.length; ++i) { - if (inputString.indexOf(charsToEscape.charAt(i)) !== -1) { - foundChar = true; - break; - } - } - if (!foundChar) { - return String(inputString); - } - let result = ''; - for (let i = 0; i < inputString.length; ++i) { - if (charsToEscape.indexOf(inputString.charAt(i)) !== -1) { - result += '\\'; - } - result += inputString.charAt(i); - } - return result; -}; -const sprintf = (fmt, ...args) => { - let argIndex = 0; - const RE = /%(?:(\d+)\$)?(?:\.(\d*))?([%dfs])/g; - return fmt.replaceAll(RE, (_, index, precision, specifier) => { - if (specifier === '%') { - return '%'; - } - if (index !== undefined) { - argIndex = parseInt(index, 10) - 1; - if (argIndex < 0) { - throw new RangeError(`Invalid parameter index ${argIndex + 1}`); - } - } - if (argIndex >= args.length) { - throw new RangeError(`Expected at least ${argIndex + 1} format parameters, but only ${args.length} where given.`); - } - if (specifier === 's') { - const argValue = String(args[argIndex++]); - if (precision !== undefined) { - return argValue.substring(0, Number(precision)); - } - return argValue; - } - let argValue = Number(args[argIndex++]); - if (isNaN(argValue)) { - argValue = 0; - } - if (specifier === 'd') { - return String(Math.floor(argValue)).padStart(Number(precision), '0'); - } - if (precision !== undefined) { - return argValue.toFixed(Number(precision)); - } - return String(argValue); - }); -}; -const findIndexesOfSubString = (inputString, searchString) => { - const matches = []; - let i = inputString.indexOf(searchString); - while (i !== -1) { - matches.push(i); - i = inputString.indexOf(searchString, i + searchString.length); - } - return matches; -}; -const findLineEndingIndexes = (inputString) => { - const endings = findIndexesOfSubString(inputString, '\n'); - endings.push(inputString.length); - return endings; -}; -const trimURL = (url, baseURLDomain) => { - let result = url.replace(/^(https|http|file):\/\//i, ''); - if (baseURLDomain) { - if (result.toLowerCase().startsWith(baseURLDomain.toLowerCase())) { - result = result.substr(baseURLDomain.length); - } - } - return result; -}; -const removeURLFragment = (inputStr) => { - const url = new URL(inputStr); - url.hash = ''; - return url.toString(); -}; -const SPECIAL_REGEX_CHARACTERS = '^[]{}()\\.^$*+?|-,'; -const regexSpecialCharacters = function () { - return SPECIAL_REGEX_CHARACTERS; -}; -const createSearchRegex = function (query, caseSensitive, isRegex, matchWholeWord = false) { - const regexFlags = caseSensitive ? 'g' : 'gi'; - let regexObject; - if (isRegex) { - try { - regexObject = new RegExp(query, regexFlags); - } - catch { - } - } - if (!regexObject) { - regexObject = createPlainTextSearchRegex(query, regexFlags); - } - if (matchWholeWord && regexObject) { - regexObject = new RegExp(`\\b${regexObject.source}\\b`, regexFlags); - } - return regexObject; -}; -const hashCode = function (string) { - if (!string) { - return 0; - } - const p = ((1 << 30) * 4 - 5); - const z = 0x5033d967; - const z2 = 0x59d2f15d; - let s = 0; - let zi = 1; - for (let i = 0; i < string.length; i++) { - const xi = string.charCodeAt(i) * z2; - s = (s + zi * xi) % p; - zi = (zi * z) % p; - } - s = (s + zi * (p - 1)) % p; - return Math.abs(s | 0); -}; -const compare = (a, b) => { - if (a > b) { - return 1; - } - if (a < b) { - return -1; - } - return 0; -}; -const trimEndWithMaxLength = (str, maxLength) => { - if (str.length <= maxLength) { - return str; - } - const ellipsis = '…'; - const ellipsisLength = 1; - const segmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' }); - const iterator = segmenter.segment(str)[Symbol.iterator](); - let lastSegmentIndex = 0; - for (let i = 0; i <= maxLength - ellipsisLength; i++) { - const result = iterator.next(); - if (result.done) { - return str; - } - lastSegmentIndex = result.value.index; - } - for (let i = 0; i < ellipsisLength; i++) { - if (iterator.next().done) { - return str; - } - } - return str.slice(0, lastSegmentIndex) + ellipsis; -}; -const escapeForRegExp = (str) => { - return escapeCharacters(str, SPECIAL_REGEX_CHARACTERS); -}; -const createPlainTextSearchRegex = function (query, flags) { - let regex = ''; - for (let i = 0; i < query.length; ++i) { - const c = query.charAt(i); - if (regexSpecialCharacters().indexOf(c) !== -1) { - regex += '\\'; - } - regex += c; - } - return new RegExp(regex, flags); -}; -const WORD = /[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b|_)|[A-Za-z][0-9]+[a-z]?|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g; -const toKebabCase = function (input) { - return (input.match?.(WORD)?.map(w => w.toLowerCase()).join('-').replaceAll('-.-', '.') || input); -}; -function toKebabCaseKeys(settingValue) { - return Object.fromEntries(Object.entries(settingValue).map(([key, value]) => [toKebabCase(key), value])); -} -const stringifyWithPrecision = function stringifyWithPrecision(s, precision = 2) { - if (precision === 0) { - return s.toFixed(0); - } - const string = s.toFixed(precision).replace(/\.?0*$/, ''); - return string === '-0' ? '0' : string; -}; -const concatBase64 = function (lhs, rhs) { - if (lhs.length === 0 || !lhs.endsWith('=')) { - return lhs + rhs; - } - const lhsLeaveAsIs = lhs.substring(0, lhs.length - 4); - const lhsToDecode = lhs.substring(lhs.length - 4); - return lhsLeaveAsIs + globalThis.btoa(globalThis.atob(lhsToDecode) + globalThis.atob(rhs)); -}; - -// Copyright 2023 The Chromium Authors -function milliSecondsToSeconds(x) { - return (x / 1000); -} -function microSecondsToMilliSeconds(x) { - return (x / 1000); -} - -// Copyright 2020 The Chromium Authors -function assertNotNullOrUndefined(val, message) { - if (val === null || val === undefined) { - throw new Error(`Expected given value to not be null/undefined but it was: ${val}${''}`); - } -} -function assertNever(_type, message) { - throw new Error(message); -} - -// Copyright 2021 The Chromium Authors -const LocalizedEmptyString = ''; - -var UIString = /*#__PURE__*/Object.freeze({ - __proto__: null, - LocalizedEmptyString: LocalizedEmptyString -}); - -// Copyright 2022 The Chromium Authors -const D50_X = 0.9642; -const D50_Y = 1.0; -const D50_Z = 0.8251; -class Vector3 { - values = [0, 0, 0]; - constructor(values) { - if (values) { - this.values = values; - } - } -} -class Matrix3x3 { - values = [ - [0, 0, 0], - [0, 0, 0], - [0, 0, 0], - ]; - constructor(values) { - if (values) { - this.values = values; - } - } - multiply(other) { - const dst = new Vector3(); - for (let row = 0; row < 3; ++row) { - dst.values[row] = this.values[row][0] * other.values[0] + this.values[row][1] * other.values[1] + - this.values[row][2] * other.values[2]; - } - return dst; - } -} -class TransferFunction { - g; - a; - b; - c; - d; - e; - f; - constructor(g, a, b = 0, c = 0, d = 0, e = 0, f = 0) { - this.g = g; - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - } - eval(val) { - const sign = val < 0 ? -1 : 1.0; - const abs = val * sign; - if (abs < this.d) { - return sign * (this.c * abs + this.f); - } - return sign * (Math.pow(this.a * abs + this.b, this.g) + this.e); - } -} -const NAMED_TRANSFER_FN = { - sRGB: new TransferFunction(2.4, (1 / 1.055), (0.055 / 1.055), (1 / 12.92), 0.04045, 0.0, 0.0), - sRGB_INVERSE: new TransferFunction(0.416667, 1.13728, -0, 12.92, 0.0031308, -0.0549698, -0), - proPhotoRGB: new TransferFunction(1.8, 1), - proPhotoRGB_INVERSE: new TransferFunction(0.555556, 1, -0, 0, 0, 0, 0), - k2Dot2: new TransferFunction(2.2, 1.0), - k2Dot2_INVERSE: new TransferFunction(0.454545, 1), - rec2020: new TransferFunction(2.22222, 0.909672, 0.0903276, 0.222222, 0.0812429, 0, 0), - rec2020_INVERSE: new TransferFunction(0.45, 1.23439, -0, 4.5, 0.018054, -0.0993195, -0), -}; -const NAMED_GAMUTS = { - sRGB: new Matrix3x3([ - [0.436065674, 0.385147095, 0.143066406], - [0.222488403, 0.716873169, 0.060607910], - [0.013916016, 0.097076416, 0.714096069], - ]), - sRGB_INVERSE: new Matrix3x3([ - [3.134112151374599, -1.6173924597114966, -0.4906334036481285], - [-0.9787872938826594, 1.9162795854799963, 0.0334547139520088], - [0.07198304248352326, -0.2289858493321844, 1.4053851325241447], - ]), - displayP3: new Matrix3x3([ - [0.515102, 0.291965, 0.157153], - [0.241182, 0.692236, 0.0665819], - [-104941e-8, 0.0418818, 0.784378], - ]), - displayP3_INVERSE: new Matrix3x3([ - [2.404045155982687, -0.9898986932663839, -0.3976317191366333], - [-0.8422283799266768, 1.7988505115115485, 0.016048170293157416], - [0.04818705979712955, -0.09737385156228891, 1.2735066448052303], - ]), - adobeRGB: new Matrix3x3([ - [0.60974, 0.20528, 0.14919], - [0.31111, 0.62567, 0.06322], - [0.01947, 0.06087, 0.74457], - ]), - adobeRGB_INVERSE: new Matrix3x3([ - [1.9625385510109137, -0.6106892546501431, -0.3413827467482388], - [-0.9787580455521, 1.9161624707082339, 0.03341676594241408], - [0.028696263137883395, -0.1406807819331586, 1.349252109991369], - ]), - rec2020: new Matrix3x3([ - [0.673459, 0.165661, 0.125100], - [0.279033, 0.675338, 0.0456288], - [-193139e-8, 0.0299794, 0.797162], - ]), - rec2020_INVERSE: new Matrix3x3([ - [1.647275201661012, -0.3936024771460771, -0.23598028884792507], - [-0.6826176165196962, 1.647617775014935, 0.01281626807852422], - [0.029662725298529837, -0.06291668721366285, 1.2533964313435522], - ])}; -function degToRad(deg) { - return deg * (Math.PI / 180); -} -function radToDeg(rad) { - return rad * (180 / Math.PI); -} -function applyTransferFns(fn, r, g, b) { - return [fn.eval(r), fn.eval(g), fn.eval(b)]; -} -const OKLAB_TO_LMS_MATRIX = new Matrix3x3([ - [0.99999999845051981432, 0.39633779217376785678, 0.21580375806075880339], - [1.0000000088817607767, -0.10556134232365635, -0.06385417477170591], - [1.0000000546724109177, -0.08948418209496575, -1.2914855378640917], -]); -const LMS_TO_OKLAB_MATRIX = new Matrix3x3([ - [0.2104542553, 0.7936177849999999, -0.0040720468], - [1.9779984951000003, -2.4285922049999997, 0.4505937099000001], - [0.025904037099999982, 0.7827717662, -0.8086757660000001], -]); -const XYZ_TO_LMS_MATRIX = new Matrix3x3([ - [0.8190224432164319, 0.3619062562801221, -0.12887378261216414], - [0.0329836671980271, 0.9292868468965546, 0.03614466816999844], - [0.048177199566046255, 0.26423952494422764, 0.6335478258136937], -]); -const LMS_TO_XYZ_MATRIX = new Matrix3x3([ - [1.226879873374156, -0.5578149965554814, 0.2813910501772159], - [-0.040575762624313734, 1.1122868293970596, -0.07171106666151703], - [-0.07637294974672144, -0.4214933239627915, 1.586924024427242], -]); -const PRO_PHOTO_TO_XYZD50_MATRIX = new Matrix3x3([ - [0.7976700747153241, 0.13519395152800417, 0.03135596341127167], - [0.28803902352472205, 0.7118744007923554, 0.00008661179538844252], - [2.739876695467402e-7, -14405226518969991e-22, 0.825211112593861], -]); -const XYZD50_TO_PRO_PHOTO_MATRIX = new Matrix3x3([ - [1.3459533710138858, -0.25561367037652133, -0.051116041522131374], - [-0.544600415668951, 1.5081687311475767, 0.020535163968720935], - [-13975622054109725e-22, 0.000002717590904589903, 1.2118111696814942], -]); -const XYZD65_TO_XYZD50_MATRIX = new Matrix3x3([ - [1.0478573189120088, 0.022907374491829943, -0.050162247377152525], - [0.029570500050499514, 0.9904755577034089, -0.017061518194840468], - [-0.00924047197558879, 0.015052921526981566, 0.7519708530777581], -]); -const XYZD50_TO_XYZD65_MATRIX = new Matrix3x3([ - [0.9555366447632887, -0.02306009252137888, 0.06321844147263304], - [-0.028315378228764922, 1.009951351591575, 0.021026001591792402], - [0.012308773293784308, -0.02050053471777469, 1.3301947294775631], -]); -class ColorConverter { - static labToXyzd50(l, a, b) { - let y = (l + 16.0) / 116.0; - let x = y + a / 500.0; - let z = y - b / 200.0; - function labInverseTransferFunction(t) { - const delta = (24.0 / 116.0); - if (t <= delta) { - return (108.0 / 841.0) * (t - (16.0 / 116.0)); - } - return t * t * t; - } - x = labInverseTransferFunction(x) * D50_X; - y = labInverseTransferFunction(y) * D50_Y; - z = labInverseTransferFunction(z) * D50_Z; - return [x, y, z]; - } - static xyzd50ToLab(x, y, z) { - function labTransferFunction(t) { - const deltaLimit = (24.0 / 116.0) * (24.0 / 116.0) * (24.0 / 116.0); - if (t <= deltaLimit) { - return (841.0 / 108.0) * t + (16.0 / 116.0); - } - return Math.pow(t, 1.0 / 3.0); - } - x = labTransferFunction(x / D50_X); - y = labTransferFunction(y / D50_Y); - z = labTransferFunction(z / D50_Z); - const l = 116.0 * y - 16.0; - const a = 500.0 * (x - y); - const b = 200.0 * (y - z); - return [l, a, b]; - } - static oklabToXyzd65(l, a, b) { - const labInput = new Vector3([l, a, b]); - const lmsIntermediate = OKLAB_TO_LMS_MATRIX.multiply(labInput); - lmsIntermediate.values[0] = lmsIntermediate.values[0] * lmsIntermediate.values[0] * lmsIntermediate.values[0]; - lmsIntermediate.values[1] = lmsIntermediate.values[1] * lmsIntermediate.values[1] * lmsIntermediate.values[1]; - lmsIntermediate.values[2] = lmsIntermediate.values[2] * lmsIntermediate.values[2] * lmsIntermediate.values[2]; - const xyzOutput = LMS_TO_XYZ_MATRIX.multiply(lmsIntermediate); - return xyzOutput.values; - } - static xyzd65ToOklab(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const lmsIntermediate = XYZ_TO_LMS_MATRIX.multiply(xyzInput); - lmsIntermediate.values[0] = Math.pow(lmsIntermediate.values[0], 1.0 / 3.0); - lmsIntermediate.values[1] = Math.pow(lmsIntermediate.values[1], 1.0 / 3.0); - lmsIntermediate.values[2] = Math.pow(lmsIntermediate.values[2], 1.0 / 3.0); - const labOutput = LMS_TO_OKLAB_MATRIX.multiply(lmsIntermediate); - return [labOutput.values[0], labOutput.values[1], labOutput.values[2]]; - } - static lchToLab(l, c, h) { - if (h === undefined) { - return [l, 0, 0]; - } - return [l, c * Math.cos(degToRad(h)), c * Math.sin(degToRad(h))]; - } - static labToLch(l, a, b) { - return [l, Math.sqrt(a * a + b * b), radToDeg(Math.atan2(b, a))]; - } - static displayP3ToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.sRGB, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.displayP3.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToDisplayP3(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.displayP3_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static proPhotoToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = PRO_PHOTO_TO_XYZD50_MATRIX.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToProPhoto(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = XYZD50_TO_PRO_PHOTO_MATRIX.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.proPhotoRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static adobeRGBToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.k2Dot2, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.adobeRGB.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToAdobeRGB(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.adobeRGB_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.k2Dot2_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static rec2020ToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.rec2020, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.rec2020.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToRec2020(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.rec2020_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.rec2020_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static xyzd50ToD65(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const xyzOutput = XYZD50_TO_XYZD65_MATRIX.multiply(xyzInput); - return xyzOutput.values; - } - static xyzd65ToD50(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const xyzOutput = XYZD65_TO_XYZD50_MATRIX.multiply(xyzInput); - return xyzOutput.values; - } - static xyzd50TosRGBLinear(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbResult = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput); - return rgbResult.values; - } - static srgbLinearToXyzd50(r, g, b) { - const rgbInput = new Vector3([r, g, b]); - const xyzOutput = NAMED_GAMUTS.sRGB.multiply(rgbInput); - return xyzOutput.values; - } - static srgbToXyzd50(r, g, b) { - const [mappedR, mappedG, mappedB] = applyTransferFns(NAMED_TRANSFER_FN.sRGB, r, g, b); - const rgbInput = new Vector3([mappedR, mappedG, mappedB]); - const xyzOutput = NAMED_GAMUTS.sRGB.multiply(rgbInput); - return xyzOutput.values; - } - static xyzd50ToSrgb(x, y, z) { - const xyzInput = new Vector3([x, y, z]); - const rgbOutput = NAMED_GAMUTS.sRGB_INVERSE.multiply(xyzInput); - return applyTransferFns(NAMED_TRANSFER_FN.sRGB_INVERSE, rgbOutput.values[0], rgbOutput.values[1], rgbOutput.values[2]); - } - static oklchToXyzd50(lInput, c, h) { - const [l, a, b] = ColorConverter.lchToLab(lInput, c, h); - const [x65, y65, z65] = ColorConverter.oklabToXyzd65(l, a, b); - return ColorConverter.xyzd65ToD50(x65, y65, z65); - } - static xyzd50ToOklch(x, y, z) { - const [x65, y65, z65] = ColorConverter.xyzd50ToD65(x, y, z); - const [l, a, b] = ColorConverter.xyzd65ToOklab(x65, y65, z65); - return ColorConverter.labToLch(l, a, b); - } -} - -var ColorConverter$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - ColorConverter: ColorConverter -}); - -// Copyright 2020 The Chromium Authors -function blendColors(fgRGBA, bgRGBA) { - const alpha = fgRGBA[3]; - return [ - ((1 - alpha) * bgRGBA[0]) + (alpha * fgRGBA[0]), - ((1 - alpha) * bgRGBA[1]) + (alpha * fgRGBA[1]), - ((1 - alpha) * bgRGBA[2]) + (alpha * fgRGBA[2]), - alpha + (bgRGBA[3] * (1 - alpha)), - ]; -} -function rgbToHue([r, g, b]) { - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - const diff = max - min; - let h; - if (min === max) { - h = 0; - } - else if (r === max) { - h = ((1 / 6 * (g - b) / diff) + 1) % 1; - } - else if (g === max) { - h = (1 / 6 * (b - r) / diff) + 1 / 3; - } - else { - h = (1 / 6 * (r - g) / diff) + 2 / 3; - } - return h; -} -function rgbToHsl(rgb) { - const [h, s, l] = rgbaToHsla([...rgb, undefined]); - return [h, s, l]; -} -function rgbaToHsla([r, g, b, a]) { - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - const diff = max - min; - const sum = max + min; - const h = rgbToHue([r, g, b]); - const l = 0.5 * sum; - let s; - if (l === 0) { - s = 0; - } - else if (l === 1) { - s = 0; - } - else if (l <= 0.5) { - s = diff / sum; - } - else { - s = diff / (2 - sum); - } - return [h, s, l, a]; -} -function rgbToHwb(rgb) { - const [h, w, b] = rgbaToHwba([...rgb, undefined]); - return [h, w, b]; -} -function rgbaToHwba([r, g, b, a]) { - const h = rgbToHue([r, g, b]); - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - return [h, min, 1 - max, a]; -} -function luminance([rSRGB, gSRGB, bSRGB]) { - const r = rSRGB <= 0.04045 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055) / 1.055), 2.4); - const g = gSRGB <= 0.04045 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055) / 1.055), 2.4); - const b = bSRGB <= 0.04045 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055) / 1.055), 2.4); - return 0.2126 * r + 0.7152 * g + 0.0722 * b; -} -function contrastRatio(fgRGBA, bgRGBA) { - const blendedFg = blendColors(fgRGBA, bgRGBA); - const fgLuminance = luminance(blendedFg); - const bgLuminance = luminance(bgRGBA); - const contrastRatio = (Math.max(fgLuminance, bgLuminance) + 0.05) / (Math.min(fgLuminance, bgLuminance) + 0.05); - return contrastRatio; -} -const mainTRC = 2.4; -const normBgExp = 0.56; -const normFgExp = 0.57; -const revBgExp = 0.65; -const revFgExp = 0.62; -const blkThrs = 0.022; -const blkClmp = 1.414; -const scaleBoW = 1.14; -const scaleWoB = 1.14; -const loConOffset = 0.027; -const loClip = 0.1; -const deltaLuminanceMin = 0.0005; -function luminanceAPCA([rSRGB, gSRGB, bSRGB]) { - const r = Math.pow(rSRGB, mainTRC); - const g = Math.pow(gSRGB, mainTRC); - const b = Math.pow(bSRGB, mainTRC); - return 0.2126729 * r + 0.7151522 * g + 0.0721750 * b; -} -function contrastRatioAPCA(fgRGBA, bgRGBA) { - const blendedFg = blendColors(fgRGBA, bgRGBA); - return contrastRatioByLuminanceAPCA(luminanceAPCA(blendedFg), luminanceAPCA(bgRGBA)); -} -function clampLuminance(value) { - return value > blkThrs ? value : (value + Math.pow(blkThrs - value, blkClmp)); -} -function contrastRatioByLuminanceAPCA(fgLuminance, bgLuminance) { - fgLuminance = clampLuminance(fgLuminance); - bgLuminance = clampLuminance(bgLuminance); - if (Math.abs(fgLuminance - bgLuminance) < deltaLuminanceMin) { - return 0; - } - let result = 0; - if (bgLuminance > fgLuminance) { - result = (Math.pow(bgLuminance, normBgExp) - Math.pow(fgLuminance, normFgExp)) * scaleBoW; - result = result < loClip ? 0 : result - loConOffset; - } - else { - result = (Math.pow(bgLuminance, revBgExp) - Math.pow(fgLuminance, revFgExp)) * scaleWoB; - result = result > -loClip ? 0 : result + loConOffset; - } - return result * 100; -} -function desiredLuminanceAPCA(luminance, contrast, lighter) { - luminance = clampLuminance(luminance); - contrast /= 100; - function computeLuminance() { - if (!lighter) { - return Math.pow(Math.abs(Math.pow(luminance, normBgExp) - (contrast + loConOffset) / scaleBoW), 1 / normFgExp); - } - return Math.pow(Math.abs(Math.pow(luminance, revBgExp) - (-contrast - loConOffset) / scaleWoB), 1 / revFgExp); - } - let desiredLuminance = computeLuminance(); - if (desiredLuminance < 0 || desiredLuminance > 1) { - lighter = !lighter; - desiredLuminance = computeLuminance(); - } - return desiredLuminance; -} -const contrastAPCALookupTable = [ - [12, -1, -1, -1, -1, 100, 90, 80, -1, -1], - [14, -1, -1, -1, 100, 90, 80, 60, 60, -1], - [16, -1, -1, 100, 90, 80, 60, 55, 50, 50], - [18, -1, -1, 90, 80, 60, 55, 50, 40, 40], - [24, -1, 100, 80, 60, 55, 50, 40, 38, 35], - [30, -1, 90, 70, 55, 50, 40, 38, 35, 40], - [36, -1, 80, 60, 50, 40, 38, 35, 30, 25], - [48, 100, 70, 55, 40, 38, 35, 30, 25, 20], - [60, 90, 60, 50, 38, 35, 30, 25, 20, 20], - [72, 80, 55, 40, 35, 30, 25, 20, 20, 20], - [96, 70, 50, 35, 30, 25, 20, 20, 20, 20], - [120, 60, 40, 30, 25, 20, 20, 20, 20, 20], -]; -contrastAPCALookupTable.reverse(); -function getAPCAThreshold(fontSize, fontWeight) { - const size = parseFloat(fontSize.replace('px', '')); - const weight = parseFloat(fontWeight); - for (const [rowSize, ...rowWeights] of contrastAPCALookupTable) { - if (size >= rowSize) { - for (const [idx, keywordWeight] of [900, 800, 700, 600, 500, 400, 300, 200, 100].entries()) { - if (weight >= keywordWeight) { - const threshold = rowWeights[rowWeights.length - 1 - idx]; - return threshold === -1 ? null : threshold; - } - } - } - } - return null; -} -function isLargeFont(fontSize, fontWeight) { - const boldWeights = ['bold', 'bolder']; - const fontSizePx = parseFloat(fontSize.replace('px', '')); - const isBold = isNaN(Number(fontWeight)) ? boldWeights.includes(fontWeight) : Number(fontWeight) >= 600; - const fontSizePt = fontSizePx * 72 / 96; - if (isBold) { - return fontSizePt >= 14; - } - return fontSizePt >= 18; -} -const contrastThresholds = { - largeFont: { aa: 3.0, aaa: 4.5 }, - normalFont: { aa: 4.5, aaa: 7.0 }, -}; -function getContrastThreshold(fontSize, fontWeight) { - if (isLargeFont(fontSize, fontWeight)) { - return contrastThresholds.largeFont; - } - return contrastThresholds.normalFont; -} - -var ColorUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - blendColors: blendColors, - contrastRatio: contrastRatio, - contrastRatioAPCA: contrastRatioAPCA, - contrastRatioByLuminanceAPCA: contrastRatioByLuminanceAPCA, - desiredLuminanceAPCA: desiredLuminanceAPCA, - getAPCAThreshold: getAPCAThreshold, - getContrastThreshold: getContrastThreshold, - isLargeFont: isLargeFont, - luminance: luminance, - luminanceAPCA: luminanceAPCA, - rgbToHsl: rgbToHsl, - rgbToHwb: rgbToHwb, - rgbaToHsla: rgbaToHsla, - rgbaToHwba: rgbaToHwba -}); - -// Copyright 2021 The Chromium Authors -/* - * Copyright (C) 2009 Apple Inc. All rights reserved. - * Copyright (C) 2009 Joseph Pecoraro - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -function normalizeHue(hue) { - return ((hue % 360) + 360) % 360; -} -function parseAngle(angleText) { - const angle = angleText.replace(/(deg|g?rad|turn)$/, ''); - if (isNaN(angle) || angleText.match(/\s+(deg|g?rad|turn)/)) { - return null; - } - const number = parseFloat(angle); - if (angleText.includes('turn')) { - return number * 360; - } - if (angleText.includes('grad')) { - return number * 9 / 10; - } - if (angleText.includes('rad')) { - return number * 180 / Math.PI; - } - return number; -} -function getFormat(formatText) { - switch (formatText) { - case "hex" : - return "hex" ; - case "hexa" : - return "hexa" ; - case "rgb" : - return "rgb" ; - case "rgba" : - return "rgba" ; - case "hsl" : - return "hsl" ; - case "hsla" : - return "hsla" ; - case "hwb" : - return "hwb" ; - case "hwba" : - return "hwba" ; - case "lch" : - return "lch" ; - case "oklch" : - return "oklch" ; - case "lab" : - return "lab" ; - case "oklab" : - return "oklab" ; - } - return getColorSpace(formatText); -} -function getColorSpace(colorSpaceText) { - switch (colorSpaceText) { - case "srgb" : - return "srgb" ; - case "srgb-linear" : - return "srgb-linear" ; - case "display-p3" : - return "display-p3" ; - case "a98-rgb" : - return "a98-rgb" ; - case "prophoto-rgb" : - return "prophoto-rgb" ; - case "rec2020" : - return "rec2020" ; - case "xyz" : - return "xyz" ; - case "xyz-d50" : - return "xyz-d50" ; - case "xyz-d65" : - return "xyz-d65" ; - } - return null; -} -function mapPercentToRange(percent, range) { - const sign = Math.sign(percent); - const absPercent = Math.abs(percent); - const [outMin, outMax] = range; - return sign * (absPercent * (outMax - outMin) / 100 + outMin); -} -function parse$2(text) { - if (!text.match(/\s/)) { - const match = text.toLowerCase().match(/^(?:#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|(\w+))$/i); - if (match) { - if (match[1]) { - return Legacy.fromHex(match[1], text); - } - if (match[2]) { - return Nickname.fromName(match[2], text); - } - return null; - } - } - const match = text.toLowerCase().match(/^\s*(?:(rgba?)|(hsla?)|(hwba?)|(lch)|(oklch)|(lab)|(oklab)|(color))\((.*)\)\s*$/); - if (match) { - const isRgbaMatch = Boolean(match[1]); - const isHslaMatch = Boolean(match[2]); - const isHwbaMatch = Boolean(match[3]); - const isLchMatch = Boolean(match[4]); - const isOklchMatch = Boolean(match[5]); - const isLabMatch = Boolean(match[6]); - const isOklabMatch = Boolean(match[7]); - const isColorMatch = Boolean(match[8]); - const valuesText = match[9]; - if (isColorMatch) { - return ColorFunction.fromSpec(text, valuesText); - } - const isOldSyntax = isRgbaMatch || isHslaMatch || isHwbaMatch; - const allowCommas = isRgbaMatch || isHslaMatch; - const convertNoneToZero = !isOldSyntax; - const values = splitColorFunctionParameters(valuesText, { allowCommas, convertNoneToZero }); - if (!values) { - return null; - } - const spec = [values[0], values[1], values[2], values[3]]; - if (isRgbaMatch) { - return Legacy.fromRGBAFunction(values[0], values[1], values[2], values[3], text); - } - if (isHslaMatch) { - return HSL.fromSpec(spec, text); - } - if (isHwbaMatch) { - return HWB.fromSpec(spec, text); - } - if (isLchMatch) { - return LCH.fromSpec(spec, text); - } - if (isOklchMatch) { - return Oklch.fromSpec(spec, text); - } - if (isLabMatch) { - return Lab.fromSpec(spec, text); - } - if (isOklabMatch) { - return Oklab.fromSpec(spec, text); - } - } - return null; -} -function splitColorFunctionParameters(content, { allowCommas, convertNoneToZero }) { - const components = content.trim(); - let values = []; - if (allowCommas) { - values = components.split(/\s*,\s*/); - } - if (!allowCommas || values.length === 1) { - values = components.split(/\s+/); - if (values[3] === '/') { - values.splice(3, 1); - if (values.length !== 4) { - return null; - } - } - else if ((values.length > 2 && values[2].indexOf('/') !== -1) || (values.length > 3 && values[3].indexOf('/') !== -1)) { - const alpha = values.slice(2, 4).join(''); - values = values.slice(0, 2).concat(alpha.split(/\//)).concat(values.slice(4)); - } - else if (values.length >= 4) { - return null; - } - } - if (values.length !== 3 && values.length !== 4 || values.indexOf('') > -1) { - return null; - } - if (convertNoneToZero) { - return values.map(value => value === 'none' ? '0' : value); - } - return values; -} -function clamp(value, { min, max }) { - if (value === null) { - return value; - } - { - value = Math.max(value, min); - } - if (max !== undefined) { - value = Math.min(value, max); - } - return value; -} -function parsePercentage(value, range) { - if (!value.endsWith('%')) { - return null; - } - const percentage = parseFloat(value.substr(0, value.length - 1)); - return isNaN(percentage) ? null : mapPercentToRange(percentage, range); -} -function parseNumber(value) { - const number = parseFloat(value); - return isNaN(number) ? null : number; -} -function parseAlpha(value) { - if (value === undefined) { - return null; - } - return clamp(parsePercentage(value, [0, 1]) ?? parseNumber(value), { min: 0, max: 1 }); -} -function parsePercentOrNumber(value, range = [0, 1]) { - if (isNaN(value.replace('%', ''))) { - return null; - } - const parsed = parseFloat(value); - if (value.indexOf('%') !== -1) { - if (value.indexOf('%') !== value.length - 1) { - return null; - } - return mapPercentToRange(parsed, range); - } - return parsed; -} -function parseRgbNumeric(value) { - const parsed = parsePercentOrNumber(value); - if (parsed === null) { - return null; - } - if (value.indexOf('%') !== -1) { - return parsed; - } - return parsed / 255; -} -function parseHueNumeric(value) { - const angle = value.replace(/(deg|g?rad|turn)$/, ''); - if (isNaN(angle) || value.match(/\s+(deg|g?rad|turn)/)) { - return null; - } - const number = parseFloat(angle); - if (value.indexOf('turn') !== -1) { - return number % 1; - } - if (value.indexOf('grad') !== -1) { - return (number / 400) % 1; - } - if (value.indexOf('rad') !== -1) { - return (number / (2 * Math.PI)) % 1; - } - return (number / 360) % 1; -} -function parseSatLightNumeric(value) { - if (value.indexOf('%') !== value.length - 1 || isNaN(value.replace('%', ''))) { - return null; - } - const parsed = parseFloat(value); - return parsed / 100; -} -function parseAlphaNumeric(value) { - return parsePercentOrNumber(value); -} -function hsva2hsla(hsva) { - const h = hsva[0]; - let s = hsva[1]; - const v = hsva[2]; - const t = (2 - s) * v; - if (v === 0 || s === 0) { - s = 0; - } - else { - s *= v / (t < 1 ? t : 2 - t); - } - return [h, s, t / 2, hsva[3]]; -} -function hsl2rgb(hsl) { - const h = hsl[0]; - let s = hsl[1]; - const l = hsl[2]; - function hue2rgb(p, q, h) { - if (h < 0) { - h += 1; - } - else if (h > 1) { - h -= 1; - } - if ((h * 6) < 1) { - return p + (q - p) * h * 6; - } - if ((h * 2) < 1) { - return q; - } - if ((h * 3) < 2) { - return p + (q - p) * ((2 / 3) - h) * 6; - } - return p; - } - if (s < 0) { - s = 0; - } - let q; - if (l <= 0.5) { - q = l * (1 + s); - } - else { - q = l + s - (l * s); - } - const p = 2 * l - q; - const tr = h + (1 / 3); - const tg = h; - const tb = h - (1 / 3); - return [hue2rgb(p, q, tr), hue2rgb(p, q, tg), hue2rgb(p, q, tb), hsl[3]]; -} -function hwb2rgb(hwb) { - const h = hwb[0]; - const w = hwb[1]; - const b = hwb[2]; - const whiteRatio = w / (w + b); - let result = [whiteRatio, whiteRatio, whiteRatio, hwb[3]]; - if (w + b < 1) { - result = hsl2rgb([h, 1, 0.5, hwb[3]]); - for (let i = 0; i < 3; ++i) { - result[i] += w - (w + b) * result[i]; - } - } - return result; -} -function hsva2rgba(hsva) { - return hsl2rgb(hsva2hsla(hsva)); -} -function rgb2hsv(rgba) { - const hsla = rgbToHsl(rgba); - const h = hsla[0]; - let s = hsla[1]; - const l = hsla[2]; - s *= l < 0.5 ? l : 1 - l; - return [h, s !== 0 ? 2 * s / (l + s) : 0, (l + s)]; -} -function desiredLuminance(luminance, contrast, lighter) { - function computeLuminance() { - if (lighter) { - return (luminance + 0.05) * contrast - 0.05; - } - return (luminance + 0.05) / contrast - 0.05; - } - let desiredLuminance = computeLuminance(); - if (desiredLuminance < 0 || desiredLuminance > 1) { - lighter = !lighter; - desiredLuminance = computeLuminance(); - } - return desiredLuminance; -} -function approachColorValue(candidateHSVA, index, desiredLuminance, candidateLuminance) { - const epsilon = 0.0002; - let x = candidateHSVA[index]; - let multiplier = 1; - let dLuminance = candidateLuminance(candidateHSVA) - desiredLuminance; - let previousSign = Math.sign(dLuminance); - for (let guard = 100; guard; guard--) { - if (Math.abs(dLuminance) < epsilon) { - candidateHSVA[index] = x; - return x; - } - const sign = Math.sign(dLuminance); - if (sign !== previousSign) { - multiplier /= 2; - previousSign = sign; - } - else if (x < 0 || x > 1) { - return null; - } - x += multiplier * (index === 2 ? -dLuminance : dLuminance); - candidateHSVA[index] = x; - dLuminance = candidateLuminance(candidateHSVA) - desiredLuminance; - } - return null; -} -function findFgColorForContrast(fgColor, bgColor, requiredContrast) { - const candidateHSVA = fgColor.as("hsl" ).hsva(); - const bgRGBA = bgColor.rgba(); - const candidateLuminance = (candidateHSVA) => { - return luminance(blendColors(Legacy.fromHSVA(candidateHSVA).rgba(), bgRGBA)); - }; - const bgLuminance = luminance(bgColor.rgba()); - const fgLuminance = candidateLuminance(candidateHSVA); - const fgIsLighter = fgLuminance > bgLuminance; - const desired = desiredLuminance(bgLuminance, requiredContrast, fgIsLighter); - const saturationComponentIndex = 1; - const valueComponentIndex = 2; - if (approachColorValue(candidateHSVA, valueComponentIndex, desired, candidateLuminance)) { - return Legacy.fromHSVA(candidateHSVA); - } - candidateHSVA[valueComponentIndex] = 1; - if (approachColorValue(candidateHSVA, saturationComponentIndex, desired, candidateLuminance)) { - return Legacy.fromHSVA(candidateHSVA); - } - return null; -} -function findFgColorForContrastAPCA(fgColor, bgColor, requiredContrast) { - const candidateHSVA = fgColor.as("hsl" ).hsva(); - const candidateLuminance = (candidateHSVA) => { - return luminanceAPCA(Legacy.fromHSVA(candidateHSVA).rgba()); - }; - const bgLuminance = luminanceAPCA(bgColor.rgba()); - const fgLuminance = candidateLuminance(candidateHSVA); - const fgIsLighter = fgLuminance >= bgLuminance; - const desiredLuminance = desiredLuminanceAPCA(bgLuminance, requiredContrast, fgIsLighter); - const saturationComponentIndex = 1; - const valueComponentIndex = 2; - if (approachColorValue(candidateHSVA, valueComponentIndex, desiredLuminance, candidateLuminance)) { - const candidate = Legacy.fromHSVA(candidateHSVA); - if (Math.abs(contrastRatioAPCA(bgColor.rgba(), candidate.rgba())) >= requiredContrast) { - return candidate; - } - } - candidateHSVA[valueComponentIndex] = 1; - if (approachColorValue(candidateHSVA, saturationComponentIndex, desiredLuminance, candidateLuminance)) { - const candidate = Legacy.fromHSVA(candidateHSVA); - if (Math.abs(contrastRatioAPCA(bgColor.rgba(), candidate.rgba())) >= requiredContrast) { - return candidate; - } - } - return null; -} -const EPSILON = 0.01; -const WIDE_RANGE_EPSILON = 1; -function equals(a, b, accuracy = EPSILON) { - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return false; - } - for (const i in a) { - if (!equals(a[i], b[i])) { - return false; - } - } - return true; - } - if (Array.isArray(a) || Array.isArray(b)) { - return false; - } - if (a === null || b === null) { - return a === b; - } - return Math.abs(a - b) < accuracy; -} -function lessOrEquals(a, b, accuracy = EPSILON) { - return a - b <= accuracy; -} -class Lab { - l; - a; - b; - alpha; - #authoredText; - #rawParams; - channels = ["l" , "a" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(self.l, self.a, self.b), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => self, - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.labToXyzd50(this.l, this.a, this.b); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, a, b, alpha, authoredText) { - this.#rawParams = [l, a, b]; - this.l = clamp(l, { min: 0, max: 100 }); - if (equals(this.l, 0, WIDE_RANGE_EPSILON) || equals(this.l, 100, WIDE_RANGE_EPSILON)) { - a = b = 0; - } - this.a = a; - this.b = b; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - is(format) { - return format === this.format(); - } - as(format) { - return Lab.#conversions[format](this); - } - asLegacyColor() { - return this.as("rgba" ); - } - equal(color) { - const lab = color.as("lab" ); - return equals(lab.l, this.l, WIDE_RANGE_EPSILON) && equals(lab.a, this.a) && equals(lab.b, this.b) && - equals(lab.alpha, this.alpha); - } - format() { - return "lab" ; - } - setAlpha(alpha) { - return new Lab(this.l, this.a, this.b, alpha, undefined); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.a, this.b); - } - #stringify(l, a, b) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `lab(${stringifyWithPrecision(l, 0)} ${stringifyWithPrecision(a)} ${stringifyWithPrecision(b)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 100]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const a = parsePercentage(spec[1], [0, 125]) ?? parseNumber(spec[1]); - if (a === null) { - return null; - } - const b = parsePercentage(spec[2], [0, 125]) ?? parseNumber(spec[2]); - if (b === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new Lab(L, a, b, alpha, text); - } -} -class LCH { - #rawParams; - l; - c; - h; - alpha; - #authoredText; - channels = ["l" , "c" , "h" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => self, - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.lchToLab(self.l, self.c, self.h), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.labToXyzd50(...ColorConverter.lchToLab(this.l, this.c, this.h)); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, c, h, alpha, authoredText) { - this.#rawParams = [l, c, h]; - this.l = clamp(l, { min: 0, max: 100 }); - c = equals(this.l, 0, WIDE_RANGE_EPSILON) || equals(this.l, 100, WIDE_RANGE_EPSILON) ? 0 : c; - this.c = clamp(c, { min: 0 }); - h = equals(c, 0) ? 0 : h; - this.h = normalizeHue(h); - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - return LCH.#conversions[format](this); - } - equal(color) { - const lch = color.as("lch" ); - return equals(lch.l, this.l, WIDE_RANGE_EPSILON) && equals(lch.c, this.c) && equals(lch.h, this.h) && - equals(lch.alpha, this.alpha); - } - format() { - return "lch" ; - } - setAlpha(alpha) { - return new LCH(this.l, this.c, this.h, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.c, this.h); - } - #stringify(l, c, h) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `lch(${stringifyWithPrecision(l, 0)} ${stringifyWithPrecision(c)} ${stringifyWithPrecision(h)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - isHuePowerless() { - return equals(this.c, 0); - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 100]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const c = parsePercentage(spec[1], [0, 150]) ?? parseNumber(spec[1]); - if (c === null) { - return null; - } - const h = parseAngle(spec[2]); - if (h === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new LCH(L, c, h, alpha, text); - } -} -class Oklab { - #rawParams; - l; - a; - b; - alpha; - #authoredText; - channels = ["l" , "a" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => self, - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.xyzd65ToD50(...ColorConverter.oklabToXyzd65(this.l, this.a, this.b)); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, a, b, alpha, authoredText) { - this.#rawParams = [l, a, b]; - this.l = clamp(l, { min: 0, max: 1 }); - if (equals(this.l, 0) || equals(this.l, 1)) { - a = b = 0; - } - this.a = a; - this.b = b; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - return Oklab.#conversions[format](this); - } - equal(color) { - const oklab = color.as("oklab" ); - return equals(oklab.l, this.l) && equals(oklab.a, this.a) && equals(oklab.b, this.b) && - equals(oklab.alpha, this.alpha); - } - format() { - return "oklab" ; - } - setAlpha(alpha) { - return new Oklab(this.l, this.a, this.b, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.a, this.b); - } - #stringify(l, a, b) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `oklab(${stringifyWithPrecision(l)} ${stringifyWithPrecision(a)} ${stringifyWithPrecision(b)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 1]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const a = parsePercentage(spec[1], [0, 0.4]) ?? parseNumber(spec[1]); - if (a === null) { - return null; - } - const b = parsePercentage(spec[2], [0, 0.4]) ?? parseNumber(spec[2]); - if (b === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new Oklab(L, a, b, alpha, text); - } -} -class Oklch { - #rawParams; - l; - c; - h; - alpha; - #authoredText; - channels = ["l" , "c" , "h" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => self, - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - return ColorConverter.oklchToXyzd50(this.l, this.c, this.h); - } - #getRGBArray(withAlpha = true) { - const params = ColorConverter.xyzd50ToSrgb(...this.#toXyzd50()); - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(l, c, h, alpha, authoredText) { - this.#rawParams = [l, c, h]; - this.l = clamp(l, { min: 0, max: 1 }); - c = equals(this.l, 0) || equals(this.l, 1) ? 0 : c; - this.c = clamp(c, { min: 0 }); - h = equals(c, 0) ? 0 : h; - this.h = normalizeHue(h); - this.alpha = clamp(alpha, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - return Oklch.#conversions[format](this); - } - equal(color) { - const oklch = color.as("oklch" ); - return equals(oklch.l, this.l) && equals(oklch.c, this.c) && equals(oklch.h, this.h) && - equals(oklch.alpha, this.alpha); - } - format() { - return "oklch" ; - } - setAlpha(alpha) { - return new Oklch(this.l, this.c, this.h, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.l, this.c, this.h); - } - #stringify(l, c, h) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `oklch(${stringifyWithPrecision(l)} ${stringifyWithPrecision(c)} ${stringifyWithPrecision(h)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return false; - } - static fromSpec(spec, text) { - const L = parsePercentage(spec[0], [0, 1]) ?? parseNumber(spec[0]); - if (L === null) { - return null; - } - const c = parsePercentage(spec[1], [0, 0.4]) ?? parseNumber(spec[1]); - if (c === null) { - return null; - } - const h = parseAngle(spec[2]); - if (h === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new Oklch(L, c, h, alpha, text); - } -} -class ColorFunction { - #rawParams; - p0; - p1; - p2; - alpha; - colorSpace; - #authoredText; - get channels() { - return this.isXYZ() ? ["x" , "y" , "z" , "alpha" ] : - ["r" , "g" , "b" , "alpha" ]; - } - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - const [p0, p1, p2] = this.#rawParams; - switch (this.colorSpace) { - case "srgb" : - return ColorConverter.srgbToXyzd50(p0, p1, p2); - case "srgb-linear" : - return ColorConverter.srgbLinearToXyzd50(p0, p1, p2); - case "display-p3" : - return ColorConverter.displayP3ToXyzd50(p0, p1, p2); - case "a98-rgb" : - return ColorConverter.adobeRGBToXyzd50(p0, p1, p2); - case "prophoto-rgb" : - return ColorConverter.proPhotoToXyzd50(p0, p1, p2); - case "rec2020" : - return ColorConverter.rec2020ToXyzd50(p0, p1, p2); - case "xyz-d50" : - return [p0, p1, p2]; - case "xyz" : - case "xyz-d65" : - return ColorConverter.xyzd65ToD50(p0, p1, p2); - } - throw new Error('Invalid color space'); - } - #getRGBArray(withAlpha = true) { - const [p0, p1, p2] = this.#rawParams; - const params = this.colorSpace === "srgb" ? [p0, p1, p2] : [...ColorConverter.xyzd50ToSrgb(...this.#toXyzd50())]; - if (withAlpha) { - return [...params, this.alpha ?? undefined]; - } - return params; - } - constructor(colorSpace, p0, p1, p2, alpha, authoredText) { - this.#rawParams = [p0, p1, p2]; - this.colorSpace = colorSpace; - this.#authoredText = authoredText; - if (this.colorSpace !== "xyz-d50" && this.colorSpace !== "xyz-d65" && this.colorSpace !== "xyz" ) { - p0 = clamp(p0, { min: 0, max: 1 }); - p1 = clamp(p1, { min: 0, max: 1 }); - p2 = clamp(p2, { min: 0, max: 1 }); - } - this.p0 = p0; - this.p1 = p1; - this.p2 = p2; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - } - asLegacyColor() { - return this.as("rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - if (this.colorSpace === format) { - return this; - } - return ColorFunction.#conversions[format](this); - } - equal(color) { - const space = color.as(this.colorSpace); - return equals(this.p0, space.p0) && equals(this.p1, space.p1) && equals(this.p2, space.p2) && - equals(this.alpha, space.alpha); - } - format() { - return this.colorSpace; - } - setAlpha(alpha) { - return new ColorFunction(this.colorSpace, this.p0, this.p1, this.p2, alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.p0, this.p1, this.p2); - } - #stringify(p0, p1, p2) { - const alpha = this.alpha === null || equals(this.alpha, 1) ? - '' : - ` / ${stringifyWithPrecision(this.alpha)}`; - return `color(${this.colorSpace} ${stringifyWithPrecision(p0)} ${stringifyWithPrecision(p1)} ${stringifyWithPrecision(p2)}${alpha})`; - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - if (this.colorSpace !== "xyz-d50" && this.colorSpace !== "xyz-d65" && this.colorSpace !== "xyz" ) { - return !equals(this.#rawParams, [this.p0, this.p1, this.p2]); - } - return false; - } - isXYZ() { - switch (this.colorSpace) { - case "xyz" : - case "xyz-d50" : - case "xyz-d65" : - return true; - } - return false; - } - static fromSpec(authoredText, parametersWithAlphaText) { - const [parametersText, alphaText] = parametersWithAlphaText.split('/', 2); - const parameters = parametersText.trim().split(/\s+/); - const [colorSpaceText, ...remainingParams] = parameters; - const colorSpace = getColorSpace(colorSpaceText); - if (!colorSpace) { - return null; - } - if (remainingParams.length === 0 && alphaText === undefined) { - return new ColorFunction(colorSpace, 0, 0, 0, null, authoredText); - } - if (remainingParams.length === 0 && alphaText !== undefined && alphaText.trim().split(/\s+/).length > 1) { - return null; - } - if (remainingParams.length > 3) { - return null; - } - const nonesReplacedParams = remainingParams.map(param => param === 'none' ? '0' : param); - const values = nonesReplacedParams.map(param => parsePercentOrNumber(param, [0, 1])); - const containsNull = values.includes(null); - if (containsNull) { - return null; - } - const alphaValue = alphaText ? parsePercentOrNumber(alphaText, [0, 1]) ?? 1 : 1; - const rgbOrXyza = [ - values[0] ?? 0, - values[1] ?? 0, - values[2] ?? 0, - alphaValue, - ]; - return new ColorFunction(colorSpace, ...rgbOrXyza, authoredText); - } -} -class HSL { - h; - s; - l; - alpha; - #rawParams; - #authoredText; - channels = ["h" , "s" , "l" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => self, - ["hsla" ]: (self) => self, - ["hwb" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb(self.#getRGBArray( false)), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #getRGBArray(withAlpha = true) { - const rgb = hsl2rgb([this.h, this.s, this.l, 0]); - if (withAlpha) { - return [rgb[0], rgb[1], rgb[2], this.alpha ?? undefined]; - } - return [rgb[0], rgb[1], rgb[2]]; - } - #toXyzd50() { - const rgb = this.#getRGBArray(false); - return ColorConverter.srgbToXyzd50(rgb[0], rgb[1], rgb[2]); - } - constructor(h, s, l, alpha, authoredText) { - this.#rawParams = [h, s, l]; - this.l = clamp(l, { min: 0, max: 1 }); - s = equals(this.l, 0) || equals(this.l, 1) ? 0 : s; - this.s = clamp(s, { min: 0, max: 1 }); - h = equals(this.s, 0) ? 0 : h; - this.h = normalizeHue(h * 360) / 360; - this.alpha = clamp(alpha ?? null, { min: 0, max: 1 }); - this.#authoredText = authoredText; - } - equal(color) { - const hsl = color.as("hsl" ); - return equals(this.h, hsl.h) && equals(this.s, hsl.s) && equals(this.l, hsl.l) && equals(this.alpha, hsl.alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.h, this.s, this.l); - } - #stringify(h, s, l) { - const start = sprintf('hsl(%sdeg %s% %s%', stringifyWithPrecision(h * 360), stringifyWithPrecision(s * 100), stringifyWithPrecision(l * 100)); - if (this.alpha !== null && this.alpha !== 1) { - return start + - sprintf(' / %s%)', stringifyWithPrecision(this.alpha * 100)); - } - return start + ')'; - } - setAlpha(alpha) { - return new HSL(this.h, this.s, this.l, alpha); - } - format() { - return this.alpha === null || this.alpha === 1 ? "hsl" : "hsla" ; - } - is(format) { - return format === this.format(); - } - as(format) { - if (format === this.format()) { - return this; - } - return HSL.#conversions[format](this); - } - asLegacyColor() { - return this.as("rgba" ); - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return !lessOrEquals(this.#rawParams[1], 1) || !lessOrEquals(0, this.#rawParams[1]); - } - static fromSpec(spec, text) { - const h = parseHueNumeric(spec[0]); - if (h === null) { - return null; - } - const s = parseSatLightNumeric(spec[1]); - if (s === null) { - return null; - } - const l = parseSatLightNumeric(spec[2]); - if (l === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new HSL(h, s, l, alpha, text); - } - hsva() { - const s = this.s * (this.l < 0.5 ? this.l : 1 - this.l); - return [this.h, s !== 0 ? 2 * s / (this.l + s) : 0, (this.l + s), this.alpha ?? 1]; - } - canonicalHSLA() { - return [Math.round(this.h * 360), Math.round(this.s * 100), Math.round(this.l * 100), this.alpha ?? 1]; - } -} -class HWB { - h; - w; - b; - alpha; - #rawParams; - #authoredText; - channels = ["h" , "w" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#getRGBArray( false), "hex" ), - ["hexa" ]: (self) => new Legacy(self.#getRGBArray( true), "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#getRGBArray( false), "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#getRGBArray( true), "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl(self.#getRGBArray( false)), self.alpha), - ["hwb" ]: (self) => self, - ["hwba" ]: (self) => self, - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #getRGBArray(withAlpha = true) { - const rgb = hwb2rgb([this.h, this.w, this.b, 0]); - if (withAlpha) { - return [rgb[0], rgb[1], rgb[2], this.alpha ?? undefined]; - } - return [rgb[0], rgb[1], rgb[2]]; - } - #toXyzd50() { - const rgb = this.#getRGBArray(false); - return ColorConverter.srgbToXyzd50(rgb[0], rgb[1], rgb[2]); - } - constructor(h, w, b, alpha, authoredText) { - this.#rawParams = [h, w, b]; - this.w = clamp(w, { min: 0, max: 1 }); - this.b = clamp(b, { min: 0, max: 1 }); - h = lessOrEquals(1, this.w + this.b) ? 0 : h; - this.h = normalizeHue(h * 360) / 360; - this.alpha = clamp(alpha, { min: 0, max: 1 }); - if (lessOrEquals(1, this.w + this.b)) { - const ratio = this.w / this.b; - this.b = 1 / (1 + ratio); - this.w = 1 - this.b; - } - this.#authoredText = authoredText; - } - equal(color) { - const hwb = color.as("hwb" ); - return equals(this.h, hwb.h) && equals(this.w, hwb.w) && equals(this.b, hwb.b) && equals(this.alpha, hwb.alpha); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(this.h, this.w, this.b); - } - #stringify(h, w, b) { - const start = sprintf('hwb(%sdeg %s% %s%', stringifyWithPrecision(h * 360), stringifyWithPrecision(w * 100), stringifyWithPrecision(b * 100)); - if (this.alpha !== null && this.alpha !== 1) { - return start + - sprintf(' / %s%)', stringifyWithPrecision(this.alpha * 100)); - } - return start + ')'; - } - setAlpha(alpha) { - return new HWB(this.h, this.w, this.b, alpha, this.#authoredText); - } - format() { - return this.alpha !== null && !equals(this.alpha, 1) ? "hwba" : "hwb" ; - } - is(format) { - return format === this.format(); - } - as(format) { - if (format === this.format()) { - return this; - } - return HWB.#conversions[format](this); - } - asLegacyColor() { - return this.as("rgba" ); - } - getAuthoredText() { - return this.#authoredText ?? null; - } - canonicalHWBA() { - return [ - Math.round(this.h * 360), - Math.round(this.w * 100), - Math.round(this.b * 100), - this.alpha ?? 1, - ]; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(...this.#rawParams); - } - isGamutClipped() { - return !lessOrEquals(this.#rawParams[1], 1) || !lessOrEquals(0, this.#rawParams[1]) || - !lessOrEquals(this.#rawParams[2], 1) || !lessOrEquals(0, this.#rawParams[2]); - } - static fromSpec(spec, text) { - const h = parseHueNumeric(spec[0]); - if (h === null) { - return null; - } - const w = parseSatLightNumeric(spec[1]); - if (w === null) { - return null; - } - const b = parseSatLightNumeric(spec[2]); - if (b === null) { - return null; - } - const alpha = parseAlpha(spec[3]); - return new HWB(h, w, b, alpha, text); - } -} -function toRgbValue(value) { - return Math.round(value * 255); -} -class ShortFormatColorBase { - color; - channels = ["r" , "g" , "b" , "alpha" ]; - constructor(color) { - this.color = color; - } - get alpha() { - return this.color.alpha; - } - rgba() { - return this.color.rgba(); - } - equal(color) { - return this.color.equal(color); - } - setAlpha(alpha) { - return this.color.setAlpha(alpha); - } - format() { - return (this.alpha ?? 1) !== 1 ? "hexa" : "hex" ; - } - as(format) { - return this.color.as(format); - } - is(format) { - return this.color.is(format); - } - asLegacyColor() { - return this.color.asLegacyColor(); - } - getAuthoredText() { - return this.color.getAuthoredText(); - } - getRawParameters() { - return this.color.getRawParameters(); - } - isGamutClipped() { - return this.color.isGamutClipped(); - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - const [r, g, b] = this.color.rgba(); - return this.stringify(r, g, b); - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - const [r, g, b] = this.getRawParameters(); - return this.stringify(r, g, b); - } -} -class ShortHex extends ShortFormatColorBase { - setAlpha(alpha) { - return new ShortHex(this.color.setAlpha(alpha)); - } - asString(format) { - return format && format !== this.format() ? super.as(format).asString() : super.asString(); - } - stringify(r, g, b) { - function toShortHexValue(value) { - return (Math.round(value * 255) / 17).toString(16); - } - if (this.color.hasAlpha()) { - return sprintf('#%s%s%s%s', toShortHexValue(r), toShortHexValue(g), toShortHexValue(b), toShortHexValue(this.alpha ?? 1)) - .toLowerCase(); - } - return sprintf('#%s%s%s', toShortHexValue(r), toShortHexValue(g), toShortHexValue(b)) - .toLowerCase(); - } -} -class Nickname extends ShortFormatColorBase { - nickname; - constructor(nickname, color) { - super(color); - this.nickname = nickname; - } - static fromName(name, text) { - const nickname = name.toLowerCase(); - const rgba = Nicknames.get(nickname); - if (rgba !== undefined) { - return new Nickname(nickname, Legacy.fromRGBA(rgba, text)); - } - return null; - } - stringify() { - return this.nickname; - } - getAsRawString(format) { - return this.color.getAsRawString(format); - } -} -class Legacy { - #rawParams; - #rgba; - #authoredText; - #format; - channels = ["r" , "g" , "b" , "alpha" ]; - static #conversions = { - ["hex" ]: (self) => new Legacy(self.#rgba, "hex" ), - ["hexa" ]: (self) => new Legacy(self.#rgba, "hexa" ), - ["rgb" ]: (self) => new Legacy(self.#rgba, "rgb" ), - ["rgba" ]: (self) => new Legacy(self.#rgba, "rgba" ), - ["hsl" ]: (self) => new HSL(...rgbToHsl([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["hsla" ]: (self) => new HSL(...rgbToHsl([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["hwb" ]: (self) => new HWB(...rgbToHwb([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["hwba" ]: (self) => new HWB(...rgbToHwb([self.#rgba[0], self.#rgba[1], self.#rgba[2]]), self.alpha), - ["lch" ]: (self) => new LCH(...ColorConverter.labToLch(...ColorConverter.xyzd50ToLab(...self.#toXyzd50())), self.alpha), - ["oklch" ]: (self) => new Oklch(...ColorConverter.xyzd50ToOklch(...self.#toXyzd50()), self.alpha), - ["lab" ]: (self) => new Lab(...ColorConverter.xyzd50ToLab(...self.#toXyzd50()), self.alpha), - ["oklab" ]: (self) => new Oklab(...ColorConverter.xyzd65ToOklab(...ColorConverter.xyzd50ToD65(...self.#toXyzd50())), self.alpha), - ["srgb" ]: (self) => new ColorFunction("srgb" , ...ColorConverter.xyzd50ToSrgb(...self.#toXyzd50()), self.alpha), - ["srgb-linear" ]: (self) => new ColorFunction("srgb-linear" , ...ColorConverter.xyzd50TosRGBLinear(...self.#toXyzd50()), self.alpha), - ["display-p3" ]: (self) => new ColorFunction("display-p3" , ...ColorConverter.xyzd50ToDisplayP3(...self.#toXyzd50()), self.alpha), - ["a98-rgb" ]: (self) => new ColorFunction("a98-rgb" , ...ColorConverter.xyzd50ToAdobeRGB(...self.#toXyzd50()), self.alpha), - ["prophoto-rgb" ]: (self) => new ColorFunction("prophoto-rgb" , ...ColorConverter.xyzd50ToProPhoto(...self.#toXyzd50()), self.alpha), - ["rec2020" ]: (self) => new ColorFunction("rec2020" , ...ColorConverter.xyzd50ToRec2020(...self.#toXyzd50()), self.alpha), - ["xyz" ]: (self) => new ColorFunction("xyz" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - ["xyz-d50" ]: (self) => new ColorFunction("xyz-d50" , ...self.#toXyzd50(), self.alpha), - ["xyz-d65" ]: (self) => new ColorFunction("xyz-d65" , ...ColorConverter.xyzd50ToD65(...self.#toXyzd50()), self.alpha), - }; - #toXyzd50() { - const [r, g, b] = this.#rgba; - return ColorConverter.srgbToXyzd50(r, g, b); - } - get alpha() { - switch (this.format()) { - case "hexa" : - case "rgba" : - return this.#rgba[3]; - default: - return null; - } - } - asLegacyColor() { - return this; - } - nickname() { - const nickname = RGBAToNickname.get(String(this.canonicalRGBA())); - return nickname ? new Nickname(nickname, this) : null; - } - shortHex() { - for (let i = 0; i < 4; ++i) { - const c = Math.round(this.#rgba[i] * 255); - if (c % 0x11) { - return null; - } - } - return new ShortHex(this); - } - constructor(rgba, format, authoredText) { - this.#authoredText = authoredText || null; - this.#format = format; - this.#rawParams = [rgba[0], rgba[1], rgba[2]]; - this.#rgba = [ - clamp(rgba[0], { min: 0, max: 1 }), - clamp(rgba[1], { min: 0, max: 1 }), - clamp(rgba[2], { min: 0, max: 1 }), - clamp(rgba[3] ?? 1, { min: 0, max: 1 }), - ]; - } - static fromHex(hex, text) { - hex = hex.toLowerCase(); - const hasAlpha = hex.length === 4 || hex.length === 8; - const format = hasAlpha ? "hexa" : "hex" ; - const isShort = hex.length <= 4; - if (isShort) { - hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2) + - hex.charAt(3) + hex.charAt(3); - } - const r = parseInt(hex.substring(0, 2), 16); - const g = parseInt(hex.substring(2, 4), 16); - const b = parseInt(hex.substring(4, 6), 16); - let a = 1; - if (hex.length === 8) { - a = parseInt(hex.substring(6, 8), 16) / 255; - } - const color = new Legacy([r / 255, g / 255, b / 255, a], format, text); - return isShort ? new ShortHex(color) : color; - } - static fromRGBAFunction(r, g, b, alpha, text) { - const rgba = [ - parseRgbNumeric(r), - parseRgbNumeric(g), - parseRgbNumeric(b), - alpha ? parseAlphaNumeric(alpha) : 1, - ]; - if (!arrayDoesNotContainNullOrUndefined(rgba)) { - return null; - } - return new Legacy(rgba, alpha ? "rgba" : "rgb" , text); - } - static fromRGBA(rgba, authoredText) { - return new Legacy([rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3]], "rgba" , authoredText); - } - static fromHSVA(hsva) { - const rgba = hsva2rgba(hsva); - return new Legacy(rgba, "rgba" ); - } - is(format) { - return format === this.format(); - } - as(format) { - if (format === this.format()) { - return this; - } - return Legacy.#conversions[format](this); - } - format() { - return this.#format; - } - hasAlpha() { - return this.#rgba[3] !== 1; - } - detectHEXFormat() { - const hasAlpha = this.hasAlpha(); - return hasAlpha ? "hexa" : "hex" ; - } - asString(format) { - if (format) { - return this.as(format).asString(); - } - return this.#stringify(format, this.#rgba[0], this.#rgba[1], this.#rgba[2]); - } - #stringify(format, r, g, b) { - if (!format) { - format = this.#format; - } - function toHexValue(value) { - const hex = Math.round(value * 255).toString(16); - return hex.length === 1 ? '0' + hex : hex; - } - switch (format) { - case "rgb" : - case "rgba" : { - const start = sprintf('rgb(%d %d %d', toRgbValue(r), toRgbValue(g), toRgbValue(b)); - if (this.hasAlpha()) { - return start + sprintf(' / %d%)', Math.round(this.#rgba[3] * 100)); - } - return start + ')'; - } - case "hex" : - case "hexa" : { - if (this.hasAlpha()) { - return sprintf('#%s%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b), toHexValue(this.#rgba[3])) - .toLowerCase(); - } - return sprintf('#%s%s%s', toHexValue(r), toHexValue(g), toHexValue(b)).toLowerCase(); - } - } - } - getAuthoredText() { - return this.#authoredText ?? null; - } - getRawParameters() { - return [...this.#rawParams]; - } - getAsRawString(format) { - if (format) { - return this.as(format).getAsRawString(); - } - return this.#stringify(format, ...this.#rawParams); - } - isGamutClipped() { - return !equals(this.#rawParams.map(toRgbValue), [this.#rgba[0], this.#rgba[1], this.#rgba[2]].map(toRgbValue), WIDE_RANGE_EPSILON); - } - rgba() { - return [...this.#rgba]; - } - canonicalRGBA() { - const rgba = new Array(4); - for (let i = 0; i < 3; ++i) { - rgba[i] = Math.round(this.#rgba[i] * 255); - } - rgba[3] = this.#rgba[3]; - return rgba; - } - toProtocolRGBA() { - const rgba = this.canonicalRGBA(); - const result = { r: rgba[0], g: rgba[1], b: rgba[2] }; - if (rgba[3] !== 1) { - result.a = rgba[3]; - } - return result; - } - invert() { - const rgba = [0, 0, 0, 0]; - rgba[0] = 1 - this.#rgba[0]; - rgba[1] = 1 - this.#rgba[1]; - rgba[2] = 1 - this.#rgba[2]; - rgba[3] = this.#rgba[3]; - return new Legacy(rgba, "rgba" ); - } - grayscale() { - const [r, g, b] = this.#rgba; - const gray = r * 0.299 + g * 0.587 + b * 0.114; - return new Legacy([gray, gray, gray, 0.5], "rgba" ); - } - setAlpha(alpha) { - const rgba = [...this.#rgba]; - rgba[3] = alpha; - return new Legacy(rgba, "rgba" ); - } - blendWith(fgColor) { - const rgba = blendColors(fgColor.#rgba, this.#rgba); - return new Legacy(rgba, "rgba" ); - } - blendWithAlpha(alpha) { - const rgba = [...this.#rgba]; - rgba[3] *= alpha; - return new Legacy(rgba, "rgba" ); - } - setFormat(format) { - this.#format = format; - } - equal(other) { - const legacy = other.as(this.#format); - return equals(toRgbValue(this.#rgba[0]), toRgbValue(legacy.#rgba[0]), WIDE_RANGE_EPSILON) && - equals(toRgbValue(this.#rgba[1]), toRgbValue(legacy.#rgba[1]), WIDE_RANGE_EPSILON) && - equals(toRgbValue(this.#rgba[2]), toRgbValue(legacy.#rgba[2]), WIDE_RANGE_EPSILON) && - equals(this.#rgba[3], legacy.#rgba[3]); - } -} -const Regex = /((?:rgba?|hsla?|hwba?|lab|lch|oklab|oklch|color)\([^)]+\)|#[0-9a-fA-F]{8}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,4}|\b[a-zA-Z]+\b(?!-))/g; -const ColorMixRegex = /color-mix\(.*,\s*(?.+)\s*,\s*(?.+)\s*\)/g; -const COLOR_TO_RGBA_ENTRIES = [ - ['aliceblue', [240, 248, 255]], - ['antiquewhite', [250, 235, 215]], - ['aqua', [0, 255, 255]], - ['aquamarine', [127, 255, 212]], - ['azure', [240, 255, 255]], - ['beige', [245, 245, 220]], - ['bisque', [255, 228, 196]], - ['black', [0, 0, 0]], - ['blanchedalmond', [255, 235, 205]], - ['blue', [0, 0, 255]], - ['blueviolet', [138, 43, 226]], - ['brown', [165, 42, 42]], - ['burlywood', [222, 184, 135]], - ['cadetblue', [95, 158, 160]], - ['chartreuse', [127, 255, 0]], - ['chocolate', [210, 105, 30]], - ['coral', [255, 127, 80]], - ['cornflowerblue', [100, 149, 237]], - ['cornsilk', [255, 248, 220]], - ['crimson', [237, 20, 61]], - ['cyan', [0, 255, 255]], - ['darkblue', [0, 0, 139]], - ['darkcyan', [0, 139, 139]], - ['darkgoldenrod', [184, 134, 11]], - ['darkgray', [169, 169, 169]], - ['darkgrey', [169, 169, 169]], - ['darkgreen', [0, 100, 0]], - ['darkkhaki', [189, 183, 107]], - ['darkmagenta', [139, 0, 139]], - ['darkolivegreen', [85, 107, 47]], - ['darkorange', [255, 140, 0]], - ['darkorchid', [153, 50, 204]], - ['darkred', [139, 0, 0]], - ['darksalmon', [233, 150, 122]], - ['darkseagreen', [143, 188, 143]], - ['darkslateblue', [72, 61, 139]], - ['darkslategray', [47, 79, 79]], - ['darkslategrey', [47, 79, 79]], - ['darkturquoise', [0, 206, 209]], - ['darkviolet', [148, 0, 211]], - ['deeppink', [255, 20, 147]], - ['deepskyblue', [0, 191, 255]], - ['dimgray', [105, 105, 105]], - ['dimgrey', [105, 105, 105]], - ['dodgerblue', [30, 144, 255]], - ['firebrick', [178, 34, 34]], - ['floralwhite', [255, 250, 240]], - ['forestgreen', [34, 139, 34]], - ['fuchsia', [255, 0, 255]], - ['gainsboro', [220, 220, 220]], - ['ghostwhite', [248, 248, 255]], - ['gold', [255, 215, 0]], - ['goldenrod', [218, 165, 32]], - ['gray', [128, 128, 128]], - ['grey', [128, 128, 128]], - ['green', [0, 128, 0]], - ['greenyellow', [173, 255, 47]], - ['honeydew', [240, 255, 240]], - ['hotpink', [255, 105, 180]], - ['indianred', [205, 92, 92]], - ['indigo', [75, 0, 130]], - ['ivory', [255, 255, 240]], - ['khaki', [240, 230, 140]], - ['lavender', [230, 230, 250]], - ['lavenderblush', [255, 240, 245]], - ['lawngreen', [124, 252, 0]], - ['lemonchiffon', [255, 250, 205]], - ['lightblue', [173, 216, 230]], - ['lightcoral', [240, 128, 128]], - ['lightcyan', [224, 255, 255]], - ['lightgoldenrodyellow', [250, 250, 210]], - ['lightgreen', [144, 238, 144]], - ['lightgray', [211, 211, 211]], - ['lightgrey', [211, 211, 211]], - ['lightpink', [255, 182, 193]], - ['lightsalmon', [255, 160, 122]], - ['lightseagreen', [32, 178, 170]], - ['lightskyblue', [135, 206, 250]], - ['lightslategray', [119, 136, 153]], - ['lightslategrey', [119, 136, 153]], - ['lightsteelblue', [176, 196, 222]], - ['lightyellow', [255, 255, 224]], - ['lime', [0, 255, 0]], - ['limegreen', [50, 205, 50]], - ['linen', [250, 240, 230]], - ['magenta', [255, 0, 255]], - ['maroon', [128, 0, 0]], - ['mediumaquamarine', [102, 205, 170]], - ['mediumblue', [0, 0, 205]], - ['mediumorchid', [186, 85, 211]], - ['mediumpurple', [147, 112, 219]], - ['mediumseagreen', [60, 179, 113]], - ['mediumslateblue', [123, 104, 238]], - ['mediumspringgreen', [0, 250, 154]], - ['mediumturquoise', [72, 209, 204]], - ['mediumvioletred', [199, 21, 133]], - ['midnightblue', [25, 25, 112]], - ['mintcream', [245, 255, 250]], - ['mistyrose', [255, 228, 225]], - ['moccasin', [255, 228, 181]], - ['navajowhite', [255, 222, 173]], - ['navy', [0, 0, 128]], - ['oldlace', [253, 245, 230]], - ['olive', [128, 128, 0]], - ['olivedrab', [107, 142, 35]], - ['orange', [255, 165, 0]], - ['orangered', [255, 69, 0]], - ['orchid', [218, 112, 214]], - ['palegoldenrod', [238, 232, 170]], - ['palegreen', [152, 251, 152]], - ['paleturquoise', [175, 238, 238]], - ['palevioletred', [219, 112, 147]], - ['papayawhip', [255, 239, 213]], - ['peachpuff', [255, 218, 185]], - ['peru', [205, 133, 63]], - ['pink', [255, 192, 203]], - ['plum', [221, 160, 221]], - ['powderblue', [176, 224, 230]], - ['purple', [128, 0, 128]], - ['rebeccapurple', [102, 51, 153]], - ['red', [255, 0, 0]], - ['rosybrown', [188, 143, 143]], - ['royalblue', [65, 105, 225]], - ['saddlebrown', [139, 69, 19]], - ['salmon', [250, 128, 114]], - ['sandybrown', [244, 164, 96]], - ['seagreen', [46, 139, 87]], - ['seashell', [255, 245, 238]], - ['sienna', [160, 82, 45]], - ['silver', [192, 192, 192]], - ['skyblue', [135, 206, 235]], - ['slateblue', [106, 90, 205]], - ['slategray', [112, 128, 144]], - ['slategrey', [112, 128, 144]], - ['snow', [255, 250, 250]], - ['springgreen', [0, 255, 127]], - ['steelblue', [70, 130, 180]], - ['tan', [210, 180, 140]], - ['teal', [0, 128, 128]], - ['thistle', [216, 191, 216]], - ['tomato', [255, 99, 71]], - ['turquoise', [64, 224, 208]], - ['violet', [238, 130, 238]], - ['wheat', [245, 222, 179]], - ['white', [255, 255, 255]], - ['whitesmoke', [245, 245, 245]], - ['yellow', [255, 255, 0]], - ['yellowgreen', [154, 205, 50]], - ['transparent', [0, 0, 0, 0]], -]; -console.assert(COLOR_TO_RGBA_ENTRIES.every(([nickname]) => nickname.toLowerCase() === nickname), 'All color nicknames must be lowercase.'); -const Nicknames = new Map(COLOR_TO_RGBA_ENTRIES); -const RGBAToNickname = new Map( -COLOR_TO_RGBA_ENTRIES.map(([nickname, [r, g, b, a = 1]]) => { - return [String([r, g, b, a]), nickname]; -})); -const LAYOUT_LINES_HIGHLIGHT_COLOR = [127, 32, 210]; -const PageHighlight = { - Content: Legacy.fromRGBA([111, 168, 220, .66]), - ContentLight: Legacy.fromRGBA([111, 168, 220, .5]), - ContentOutline: Legacy.fromRGBA([9, 83, 148]), - Padding: Legacy.fromRGBA([147, 196, 125, .55]), - PaddingLight: Legacy.fromRGBA([147, 196, 125, .4]), - Border: Legacy.fromRGBA([255, 229, 153, .66]), - BorderLight: Legacy.fromRGBA([255, 229, 153, .5]), - Margin: Legacy.fromRGBA([246, 178, 107, .66]), - MarginLight: Legacy.fromRGBA([246, 178, 107, .5]), - EventTarget: Legacy.fromRGBA([255, 196, 196, .66]), - Shape: Legacy.fromRGBA([96, 82, 177, 0.8]), - ShapeMargin: Legacy.fromRGBA([96, 82, 127, .6]), - CssGrid: Legacy.fromRGBA([0x4b, 0, 0x82, 1]), - LayoutLine: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 1]), - GridBorder: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, 1]), - GapBackground: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, .3]), - GapHatch: Legacy.fromRGBA([...LAYOUT_LINES_HIGHLIGHT_COLOR, .8]), - GridAreaBorder: Legacy.fromRGBA([26, 115, 232, 1]), -}; -const SourceOrderHighlight = { - ParentOutline: Legacy.fromRGBA([224, 90, 183, 1]), - ChildOutline: Legacy.fromRGBA([0, 120, 212, 1]), -}; -const IsolationModeHighlight = { - Resizer: Legacy.fromRGBA([222, 225, 230, 1]), - ResizerHandle: Legacy.fromRGBA([166, 166, 166, 1]), - Mask: Legacy.fromRGBA([248, 249, 249, 1]), -}; -class Generator { - #hueSpace; - #satSpace; - #lightnessSpace; - #alphaSpace; - #colors = new Map(); - constructor(hueSpace, satSpace, lightnessSpace, alphaSpace) { - this.#hueSpace = hueSpace || { min: 0, max: 360 }; - this.#satSpace = satSpace || 67; - this.#lightnessSpace = lightnessSpace || 80; - this.#alphaSpace = alphaSpace || 1; - } - setColorForID(id, color) { - this.#colors.set(id, color); - } - colorForID(id) { - let color = this.#colors.get(id); - if (!color) { - color = this.generateColorForID(id); - this.#colors.set(id, color); - } - return color; - } - generateColorForID(id) { - const hash = hashCode(id); - const h = this.indexToValueInSpace(hash, this.#hueSpace); - const s = this.indexToValueInSpace(hash >> 8, this.#satSpace); - const l = this.indexToValueInSpace(hash >> 16, this.#lightnessSpace); - const a = this.indexToValueInSpace(hash >> 24, this.#alphaSpace); - const start = `hsl(${h}deg ${s}% ${l}%`; - if (a !== 1) { - return `${start} / ${Math.floor(a * 100)}%)`; - } - return `${start})`; - } - indexToValueInSpace(index, space) { - if (typeof space === 'number') { - return space; - } - const count = space.count || space.max - space.min; - index %= count; - return space.min + Math.floor(index / (count - 1) * (space.max - space.min)); - } -} - -var Color = /*#__PURE__*/Object.freeze({ - __proto__: null, - ColorFunction: ColorFunction, - ColorMixRegex: ColorMixRegex, - Generator: Generator, - HSL: HSL, - HWB: HWB, - IsolationModeHighlight: IsolationModeHighlight, - LCH: LCH, - Lab: Lab, - Legacy: Legacy, - Nickname: Nickname, - Nicknames: Nicknames, - Oklab: Oklab, - Oklch: Oklch, - PageHighlight: PageHighlight, - Regex: Regex, - ShortHex: ShortHex, - SourceOrderHighlight: SourceOrderHighlight, - approachColorValue: approachColorValue, - desiredLuminance: desiredLuminance, - findFgColorForContrast: findFgColorForContrast, - findFgColorForContrastAPCA: findFgColorForContrastAPCA, - getFormat: getFormat, - hsl2rgb: hsl2rgb, - hsva2rgba: hsva2rgba, - parse: parse$2, - parseHueNumeric: parseHueNumeric, - rgb2hsv: rgb2hsv -}); - -// Copyright 2021 The Chromium Authors -class ObjectWrapper { - listeners; - addEventListener(eventType, listener, thisObject) { - if (!this.listeners) { - this.listeners = new Map(); - } - let listenersForEventType = this.listeners.get(eventType); - if (!listenersForEventType) { - listenersForEventType = new Set(); - this.listeners.set(eventType, listenersForEventType); - } - listenersForEventType.add({ thisObject, listener }); - return { eventTarget: this, eventType, thisObject, listener }; - } - once(eventType) { - return new Promise(resolve => { - const descriptor = this.addEventListener(eventType, event => { - this.removeEventListener(eventType, descriptor.listener); - resolve(event.data); - }); - }); - } - removeEventListener(eventType, listener, thisObject) { - const listeners = this.listeners?.get(eventType); - if (!listeners) { - return; - } - for (const listenerTuple of listeners) { - if (listenerTuple.listener === listener && listenerTuple.thisObject === thisObject) { - listenerTuple.disposed = true; - listeners.delete(listenerTuple); - } - } - if (!listeners.size) { - this.listeners?.delete(eventType); - } - } - hasEventListeners(eventType) { - return Boolean(this.listeners?.has(eventType)); - } - dispatchEventToListeners(eventType, ...[eventData]) { - const listeners = this.listeners?.get(eventType); - if (!listeners) { - return; - } - const event = { data: eventData, source: this }; - for (const listener of [...listeners]) { - if (!listener.disposed) { - try { - listener.listener.call(listener.thisObject, event); - } - catch (err) { - console.error(`Event listener for ${String(eventType)} throw an error:`, err); - } - } - } - } -} -function eventMixin(base) { - console.assert(base !== HTMLElement); - return class EventHandling extends base { - #events = new ObjectWrapper(); - addEventListener(eventType, listener, thisObject) { - return this.#events.addEventListener(eventType, listener, thisObject); - } - once(eventType) { - return this.#events.once(eventType); - } - removeEventListener(eventType, listener, thisObject) { - this.#events.removeEventListener(eventType, listener, thisObject); - } - hasEventListeners(eventType) { - return this.#events.hasEventListeners(eventType); - } - dispatchEventToListeners(eventType, ...eventData) { - this.#events.dispatchEventToListeners(eventType, ...eventData); - } - }; -} - -var Object$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - ObjectWrapper: ObjectWrapper, - eventMixin: eventMixin -}); - -// Copyright 2021 The Chromium Authors -let devToolsLocaleInstance = null; -class DevToolsLocale { - locale; - lookupClosestDevToolsLocale; - constructor(data) { - this.lookupClosestDevToolsLocale = data.lookupClosestDevToolsLocale; - if (data.settingLanguage === 'browserLanguage') { - this.locale = data.navigatorLanguage || 'en-US'; - } - else { - this.locale = data.settingLanguage; - } - this.locale = this.lookupClosestDevToolsLocale(this.locale); - } - static instance(opts = { create: false }) { - if (!devToolsLocaleInstance && !opts.create) { - throw new Error('No LanguageSelector instance exists yet.'); - } - if (opts.create) { - devToolsLocaleInstance = new DevToolsLocale(opts.data); - } - return devToolsLocaleInstance; - } - static removeInstance() { - devToolsLocaleInstance = null; - } - forceFallbackLocale() { - this.locale = 'en-US'; - } - languageIsSupportedByDevTools(localeString) { - return localeLanguagesMatch(localeString, this.lookupClosestDevToolsLocale(localeString)); - } -} -function localeLanguagesMatch(localeString1, localeString2) { - const locale1 = new Intl.Locale(localeString1); - const locale2 = new Intl.Locale(localeString2); - return locale1.language === locale2.language; -} - -var DevToolsLocale$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - DevToolsLocale: DevToolsLocale, - localeLanguagesMatch: localeLanguagesMatch -}); - -// Copyright 2024 The Chromium Authors -function defineFormatter(options) { - let intlNumberFormat; - return { - format(value, separator) { - if (!intlNumberFormat) { - intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options); - } - return formatAndEnsureSpace$1(intlNumberFormat, value, separator); - }, - formatToParts(value) { - if (!intlNumberFormat) { - intlNumberFormat = new Intl.NumberFormat(DevToolsLocale.instance().locale, options); - } - return intlNumberFormat.formatToParts(value); - }, - }; -} -function formatAndEnsureSpace$1(formatter, value, separator = '\xA0') { - const parts = formatter.formatToParts(value); - let hasSpace = false; - for (const part of parts) { - if (part.type === 'literal') { - if (part.value === ' ') { - hasSpace = true; - part.value = separator; - } - else if (part.value === separator) { - hasSpace = true; - } - } - } - if (hasSpace) { - return parts.map(part => part.value).join(''); - } - const unitIndex = parts.findIndex(part => part.type === 'unit'); - if (unitIndex === -1) { - return parts.map(part => part.value).join(''); - } - if (unitIndex === 0) { - return parts[0].value + separator + parts.slice(1).map(part => part.value).join(''); - } - return parts.slice(0, unitIndex).map(part => part.value).join('') + separator + - parts.slice(unitIndex).map(part => part.value).join(''); -} - -var NumberFormatter = /*#__PURE__*/Object.freeze({ - __proto__: null, - defineFormatter: defineFormatter -}); - -// Copyright 2024 The Chromium Authors -const narrowBytes = defineFormatter({ - style: 'unit', - unit: 'byte', - unitDisplay: 'narrow', - minimumFractionDigits: 0, - maximumFractionDigits: 0, -}); -const narrowKilobytesDecimal = defineFormatter({ - style: 'unit', - unit: 'kilobyte', - unitDisplay: 'narrow', - minimumFractionDigits: 1, - maximumFractionDigits: 1, -}); -const narrowKilobytesInteger = defineFormatter({ - style: 'unit', - unit: 'kilobyte', - unitDisplay: 'narrow', - minimumFractionDigits: 0, - maximumFractionDigits: 0, -}); -const narrowMegabytesDecimal = defineFormatter({ - style: 'unit', - unit: 'megabyte', - unitDisplay: 'narrow', - minimumFractionDigits: 1, - maximumFractionDigits: 1, -}); -const narrowMegabytesInteger = defineFormatter({ - style: 'unit', - unit: 'megabyte', - unitDisplay: 'narrow', - minimumFractionDigits: 0, - maximumFractionDigits: 0, -}); -const bytesToString = (bytes) => { - if (bytes < 1000) { - return narrowBytes.format(bytes); - } - const kilobytes = bytes / 1000; - if (kilobytes < 100) { - return narrowKilobytesDecimal.format(kilobytes); - } - if (kilobytes < 1000) { - return narrowKilobytesInteger.format(kilobytes); - } - const megabytes = kilobytes / 1000; - if (megabytes < 100) { - return narrowMegabytesDecimal.format(megabytes); - } - return narrowMegabytesInteger.format(megabytes); -}; -const formatBytesToKb = (bytes) => { - const kilobytes = bytes / 1000; - if (kilobytes < 100) { - return narrowKilobytesDecimal.format(kilobytes); - } - return narrowKilobytesInteger.format(kilobytes); -}; - -var ByteUtilities = /*#__PURE__*/Object.freeze({ - __proto__: null, - bytesToString: bytesToString, - formatBytesToKb: formatBytesToKb -}); - -var __assign = function () { - __assign = Object.assign || function __assign2(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var ErrorKind; -(function (ErrorKind2) { - ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE"; - ErrorKind2[ErrorKind2["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT"; - ErrorKind2[ErrorKind2["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT"; - ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE"; - ErrorKind2[ErrorKind2["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE"; - ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE"; - ErrorKind2[ErrorKind2["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON"; - ErrorKind2[ErrorKind2["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON"; - ErrorKind2[ErrorKind2["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON"; - ErrorKind2[ErrorKind2["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON"; - ErrorKind2[ErrorKind2["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"; - ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS"; - ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"; - ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"; - ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"; - ErrorKind2[ErrorKind2["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"; - ErrorKind2[ErrorKind2["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR"; - ErrorKind2[ErrorKind2["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE"; - ErrorKind2[ErrorKind2["INVALID_TAG"] = 23] = "INVALID_TAG"; - ErrorKind2[ErrorKind2["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME"; - ErrorKind2[ErrorKind2["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG"; - ErrorKind2[ErrorKind2["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG"; -})(ErrorKind || (ErrorKind = {})); -var TYPE; -(function (TYPE2) { - TYPE2[TYPE2["literal"] = 0] = "literal"; - TYPE2[TYPE2["argument"] = 1] = "argument"; - TYPE2[TYPE2["number"] = 2] = "number"; - TYPE2[TYPE2["date"] = 3] = "date"; - TYPE2[TYPE2["time"] = 4] = "time"; - TYPE2[TYPE2["select"] = 5] = "select"; - TYPE2[TYPE2["plural"] = 6] = "plural"; - TYPE2[TYPE2["pound"] = 7] = "pound"; - TYPE2[TYPE2["tag"] = 8] = "tag"; -})(TYPE || (TYPE = {})); -var SKELETON_TYPE; -(function (SKELETON_TYPE2) { - SKELETON_TYPE2[SKELETON_TYPE2["number"] = 0] = "number"; - SKELETON_TYPE2[SKELETON_TYPE2["dateTime"] = 1] = "dateTime"; -})(SKELETON_TYPE || (SKELETON_TYPE = {})); -function isLiteralElement(el) { - return el.type === TYPE.literal; -} -function isArgumentElement(el) { - return el.type === TYPE.argument; -} -function isNumberElement(el) { - return el.type === TYPE.number; -} -function isDateElement(el) { - return el.type === TYPE.date; -} -function isTimeElement(el) { - return el.type === TYPE.time; -} -function isSelectElement(el) { - return el.type === TYPE.select; -} -function isPluralElement(el) { - return el.type === TYPE.plural; -} -function isPoundElement(el) { - return el.type === TYPE.pound; -} -function isTagElement(el) { - return el.type === TYPE.tag; -} -function isNumberSkeleton(el) { - return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.number); -} -function isDateTimeSkeleton(el) { - return !!(el && typeof el === "object" && el.type === SKELETON_TYPE.dateTime); -} -var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/; -var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; -function parseDateTimeSkeleton(skeleton) { - var result = {}; - skeleton.replace(DATE_TIME_REGEX, function (match) { - var len = match.length; - switch (match[0]) { - case "G": - result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short"; - break; - case "y": - result.year = len === 2 ? "2-digit" : "numeric"; - break; - case "Y": - case "u": - case "U": - case "r": - throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead"); - case "q": - case "Q": - throw new RangeError("`q/Q` (quarter) patterns are not supported"); - case "M": - case "L": - result.month = ["numeric", "2-digit", "short", "long", "narrow"][len - 1]; - break; - case "w": - case "W": - throw new RangeError("`w/W` (week) patterns are not supported"); - case "d": - result.day = ["numeric", "2-digit"][len - 1]; - break; - case "D": - case "F": - case "g": - throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead"); - case "E": - result.weekday = len === 4 ? "short" : len === 5 ? "narrow" : "short"; - break; - case "e": - if (len < 4) { - throw new RangeError("`e..eee` (weekday) patterns are not supported"); - } - result.weekday = ["short", "long", "narrow", "short"][len - 4]; - break; - case "c": - if (len < 4) { - throw new RangeError("`c..ccc` (weekday) patterns are not supported"); - } - result.weekday = ["short", "long", "narrow", "short"][len - 4]; - break; - case "a": - result.hour12 = true; - break; - case "b": - case "B": - throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead"); - case "h": - result.hourCycle = "h12"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "H": - result.hourCycle = "h23"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "K": - result.hourCycle = "h11"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "k": - result.hourCycle = "h24"; - result.hour = ["numeric", "2-digit"][len - 1]; - break; - case "j": - case "J": - case "C": - throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead"); - case "m": - result.minute = ["numeric", "2-digit"][len - 1]; - break; - case "s": - result.second = ["numeric", "2-digit"][len - 1]; - break; - case "S": - case "A": - throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead"); - case "z": - result.timeZoneName = len < 4 ? "short" : "long"; - break; - case "Z": - case "O": - case "v": - case "V": - case "X": - case "x": - throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead"); - } - return ""; - }); - return result; -} -var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; -function parseNumberSkeletonFromString(skeleton) { - if (skeleton.length === 0) { - throw new Error("Number skeleton cannot be empty"); - } - var stringTokens = skeleton.split(WHITE_SPACE_REGEX).filter(function (x) { - return x.length > 0; - }); - var tokens = []; - for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) { - var stringToken = stringTokens_1[_i]; - var stemAndOptions = stringToken.split("/"); - if (stemAndOptions.length === 0) { - throw new Error("Invalid number skeleton"); - } - var stem = stemAndOptions[0], options = stemAndOptions.slice(1); - for (var _a2 = 0, options_1 = options; _a2 < options_1.length; _a2++) { - var option = options_1[_a2]; - if (option.length === 0) { - throw new Error("Invalid number skeleton"); - } - } - tokens.push({ stem, options }); - } - return tokens; -} -function icuUnitToEcma(unit) { - return unit.replace(/^(.*?)-/, ""); -} -var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g; -var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g; -var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g; -var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/; -function parseSignificantPrecision(str) { - var result = {}; - str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) { - if (typeof g2 !== "string") { - result.minimumSignificantDigits = g1.length; - result.maximumSignificantDigits = g1.length; - } - else if (g2 === "+") { - result.minimumSignificantDigits = g1.length; - } - else if (g1[0] === "#") { - result.maximumSignificantDigits = g1.length; - } - else { - result.minimumSignificantDigits = g1.length; - result.maximumSignificantDigits = g1.length + (typeof g2 === "string" ? g2.length : 0); - } - return ""; - }); - return result; -} -function parseSign(str) { - switch (str) { - case "sign-auto": - return { - signDisplay: "auto" - }; - case "sign-accounting": - case "()": - return { - currencySign: "accounting" - }; - case "sign-always": - case "+!": - return { - signDisplay: "always" - }; - case "sign-accounting-always": - case "()!": - return { - signDisplay: "always", - currencySign: "accounting" - }; - case "sign-except-zero": - case "+?": - return { - signDisplay: "exceptZero" - }; - case "sign-accounting-except-zero": - case "()?": - return { - signDisplay: "exceptZero", - currencySign: "accounting" - }; - case "sign-never": - case "+_": - return { - signDisplay: "never" - }; - } -} -function parseConciseScientificAndEngineeringStem(stem) { - var result; - if (stem[0] === "E" && stem[1] === "E") { - result = { - notation: "engineering" - }; - stem = stem.slice(2); - } - else if (stem[0] === "E") { - result = { - notation: "scientific" - }; - stem = stem.slice(1); - } - if (result) { - var signDisplay = stem.slice(0, 2); - if (signDisplay === "+!") { - result.signDisplay = "always"; - stem = stem.slice(2); - } - else if (signDisplay === "+?") { - result.signDisplay = "exceptZero"; - stem = stem.slice(2); - } - if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) { - throw new Error("Malformed concise eng/scientific notation"); - } - result.minimumIntegerDigits = stem.length; - } - return result; -} -function parseNotationOptions(opt) { - var result = {}; - var signOpts = parseSign(opt); - if (signOpts) { - return signOpts; - } - return result; -} -function parseNumberSkeleton(tokens) { - var result = {}; - for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) { - var token = tokens_1[_i]; - switch (token.stem) { - case "percent": - case "%": - result.style = "percent"; - continue; - case "%x100": - result.style = "percent"; - result.scale = 100; - continue; - case "currency": - result.style = "currency"; - result.currency = token.options[0]; - continue; - case "group-off": - case ",_": - result.useGrouping = false; - continue; - case "precision-integer": - case ".": - result.maximumFractionDigits = 0; - continue; - case "measure-unit": - case "unit": - result.style = "unit"; - result.unit = icuUnitToEcma(token.options[0]); - continue; - case "compact-short": - case "K": - result.notation = "compact"; - result.compactDisplay = "short"; - continue; - case "compact-long": - case "KK": - result.notation = "compact"; - result.compactDisplay = "long"; - continue; - case "scientific": - result = __assign(__assign(__assign({}, result), { notation: "scientific" }), token.options.reduce(function (all, opt) { - return __assign(__assign({}, all), parseNotationOptions(opt)); - }, {})); - continue; - case "engineering": - result = __assign(__assign(__assign({}, result), { notation: "engineering" }), token.options.reduce(function (all, opt) { - return __assign(__assign({}, all), parseNotationOptions(opt)); - }, {})); - continue; - case "notation-simple": - result.notation = "standard"; - continue; - case "unit-width-narrow": - result.currencyDisplay = "narrowSymbol"; - result.unitDisplay = "narrow"; - continue; - case "unit-width-short": - result.currencyDisplay = "code"; - result.unitDisplay = "short"; - continue; - case "unit-width-full-name": - result.currencyDisplay = "name"; - result.unitDisplay = "long"; - continue; - case "unit-width-iso-code": - result.currencyDisplay = "symbol"; - continue; - case "scale": - result.scale = parseFloat(token.options[0]); - continue; - case "integer-width": - if (token.options.length > 1) { - throw new RangeError("integer-width stems only accept a single optional option"); - } - token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) { - if (g1) { - result.minimumIntegerDigits = g2.length; - } - else if (g3 && g4) { - throw new Error("We currently do not support maximum integer digits"); - } - else if (g5) { - throw new Error("We currently do not support exact integer digits"); - } - return ""; - }); - continue; - } - if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) { - result.minimumIntegerDigits = token.stem.length; - continue; - } - if (FRACTION_PRECISION_REGEX.test(token.stem)) { - if (token.options.length > 1) { - throw new RangeError("Fraction-precision stems only accept a single optional option"); - } - token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) { - if (g2 === "*") { - result.minimumFractionDigits = g1.length; - } - else if (g3 && g3[0] === "#") { - result.maximumFractionDigits = g3.length; - } - else if (g4 && g5) { - result.minimumFractionDigits = g4.length; - result.maximumFractionDigits = g4.length + g5.length; - } - else { - result.minimumFractionDigits = g1.length; - result.maximumFractionDigits = g1.length; - } - return ""; - }); - if (token.options.length) { - result = __assign(__assign({}, result), parseSignificantPrecision(token.options[0])); - } - continue; - } - if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) { - result = __assign(__assign({}, result), parseSignificantPrecision(token.stem)); - continue; - } - var signOpts = parseSign(token.stem); - if (signOpts) { - result = __assign(__assign({}, result), signOpts); - } - var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem); - if (conciseScientificAndEngineeringOpts) { - result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts); - } - } - return result; -} -var _a$6; -var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*"); -var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$"); -function createLocation(start, end) { - return { start, end }; -} -var hasNativeStartsWith = !!String.prototype.startsWith; -var hasNativeFromCodePoint = !!String.fromCodePoint; -var hasNativeFromEntries = !!Object.fromEntries; -var hasNativeCodePointAt = !!String.prototype.codePointAt; -var hasTrimStart = !!String.prototype.trimStart; -var hasTrimEnd = !!String.prototype.trimEnd; -var hasNativeIsSafeInteger = !!Number.isSafeInteger; -var isSafeInteger = hasNativeIsSafeInteger ? Number.isSafeInteger : function (n) { - return typeof n === "number" && isFinite(n) && Math.floor(n) === n && Math.abs(n) <= 9007199254740991; -}; -var REGEX_SUPPORTS_U_AND_Y = true; -try { - re = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - REGEX_SUPPORTS_U_AND_Y = ((_a$6 = re.exec("a")) === null || _a$6 === void 0 ? void 0 : _a$6[0]) === "a"; -} -catch (_) { - REGEX_SUPPORTS_U_AND_Y = false; -} -var re; -var startsWith = hasNativeStartsWith ? function startsWith2(s, search, position) { - return s.startsWith(search, position); -} : function startsWith3(s, search, position) { - return s.slice(position, position + search.length) === search; -}; -var fromCodePoint = hasNativeFromCodePoint ? String.fromCodePoint : function fromCodePoint2() { - var codePoints = []; - for (var _i = 0; _i < arguments.length; _i++) { - codePoints[_i] = arguments[_i]; - } - var elements = ""; - var length = codePoints.length; - var i = 0; - var code; - while (length > i) { - code = codePoints[i++]; - if (code > 1114111) - throw RangeError(code + " is not a valid code point"); - elements += code < 65536 ? String.fromCharCode(code) : String.fromCharCode(((code -= 65536) >> 10) + 55296, code % 1024 + 56320); - } - return elements; -}; -var fromEntries = hasNativeFromEntries ? Object.fromEntries : function fromEntries2(entries) { - var obj = {}; - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var _a2 = entries_1[_i], k = _a2[0], v = _a2[1]; - obj[k] = v; - } - return obj; -}; -var codePointAt = hasNativeCodePointAt ? function codePointAt2(s, index) { - return s.codePointAt(index); -} : function codePointAt3(s, index) { - var size = s.length; - if (index < 0 || index >= size) { - return void 0; - } - var first = s.charCodeAt(index); - var second; - return first < 55296 || first > 56319 || index + 1 === size || (second = s.charCodeAt(index + 1)) < 56320 || second > 57343 ? first : (first - 55296 << 10) + (second - 56320) + 65536; -}; -var trimStart = hasTrimStart ? function trimStart2(s) { - return s.trimStart(); -} : function trimStart3(s) { - return s.replace(SPACE_SEPARATOR_START_REGEX, ""); -}; -var trimEnd = hasTrimEnd ? function trimEnd2(s) { - return s.trimEnd(); -} : function trimEnd3(s) { - return s.replace(SPACE_SEPARATOR_END_REGEX, ""); -}; -function RE(s, flag) { - return new RegExp(s, flag); -} -var matchIdentifierAtIndex; -if (REGEX_SUPPORTS_U_AND_Y) { - IDENTIFIER_PREFIX_RE_1 = RE("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) { - var _a2; - IDENTIFIER_PREFIX_RE_1.lastIndex = index; - var match = IDENTIFIER_PREFIX_RE_1.exec(s); - return (_a2 = match[1]) !== null && _a2 !== void 0 ? _a2 : ""; - }; -} -else { - matchIdentifierAtIndex = function matchIdentifierAtIndex2(s, index) { - var match = []; - while (true) { - var c = codePointAt(s, index); - if (c === void 0 || _isWhiteSpace(c) || _isPatternSyntax(c)) { - break; - } - match.push(c); - index += c >= 65536 ? 2 : 1; - } - return fromCodePoint.apply(void 0, match); - }; -} -var IDENTIFIER_PREFIX_RE_1; -var Parser = function () { - function Parser2(message, options) { - if (options === void 0) { - options = {}; - } - this.message = message; - this.position = { offset: 0, line: 1, column: 1 }; - this.ignoreTag = !!options.ignoreTag; - this.requiresOtherClause = !!options.requiresOtherClause; - this.shouldParseSkeletons = !!options.shouldParseSkeletons; - } - Parser2.prototype.parse = function () { - if (this.offset() !== 0) { - throw Error("parser can only be used once"); - } - return this.parseMessage(0, "", false); - }; - Parser2.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) { - var elements = []; - while (!this.isEOF()) { - var char = this.char(); - if (char === 123) { - var result = this.parseArgument(nestingLevel, expectingCloseTag); - if (result.err) { - return result; - } - elements.push(result.val); - } - else if (char === 125 && nestingLevel > 0) { - break; - } - else if (char === 35 && (parentArgType === "plural" || parentArgType === "selectordinal")) { - var position = this.clonePosition(); - this.bump(); - elements.push({ - type: TYPE.pound, - location: createLocation(position, this.clonePosition()) - }); - } - else if (char === 60 && !this.ignoreTag && this.peek() === 47) { - if (expectingCloseTag) { - break; - } - else { - return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition())); - } - } - else if (char === 60 && !this.ignoreTag && _isAlpha(this.peek() || 0)) { - var result = this.parseTag(nestingLevel, parentArgType); - if (result.err) { - return result; - } - elements.push(result.val); - } - else { - var result = this.parseLiteral(nestingLevel, parentArgType); - if (result.err) { - return result; - } - elements.push(result.val); - } - } - return { val: elements, err: null }; - }; - Parser2.prototype.parseTag = function (nestingLevel, parentArgType) { - var startPosition = this.clonePosition(); - this.bump(); - var tagName = this.parseTagName(); - this.bumpSpace(); - if (this.bumpIf("/>")) { - return { - val: { - type: TYPE.literal, - value: "<" + tagName + "/>", - location: createLocation(startPosition, this.clonePosition()) - }, - err: null - }; - } - else if (this.bumpIf(">")) { - var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true); - if (childrenResult.err) { - return childrenResult; - } - var children = childrenResult.val; - var endTagStartPosition = this.clonePosition(); - if (this.bumpIf("")) { - return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition())); - } - return { - val: { - type: TYPE.tag, - value: tagName, - children, - location: createLocation(startPosition, this.clonePosition()) - }, - err: null - }; - } - else { - return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition())); - } - } - else { - return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition())); - } - }; - Parser2.prototype.parseTagName = function () { - var startOffset = this.offset(); - this.bump(); - while (!this.isEOF() && _isPotentialElementNameChar(this.char())) { - this.bump(); - } - return this.message.slice(startOffset, this.offset()); - }; - Parser2.prototype.parseLiteral = function (nestingLevel, parentArgType) { - var start = this.clonePosition(); - var value = ""; - while (true) { - var parseQuoteResult = this.tryParseQuote(parentArgType); - if (parseQuoteResult) { - value += parseQuoteResult; - continue; - } - var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType); - if (parseUnquotedResult) { - value += parseUnquotedResult; - continue; - } - var parseLeftAngleResult = this.tryParseLeftAngleBracket(); - if (parseLeftAngleResult) { - value += parseLeftAngleResult; - continue; - } - break; - } - var location = createLocation(start, this.clonePosition()); - return { - val: { type: TYPE.literal, value, location }, - err: null - }; - }; - Parser2.prototype.tryParseLeftAngleBracket = function () { - if (!this.isEOF() && this.char() === 60 && (this.ignoreTag || !_isAlphaOrSlash(this.peek() || 0))) { - this.bump(); - return "<"; - } - return null; - }; - Parser2.prototype.tryParseQuote = function (parentArgType) { - if (this.isEOF() || this.char() !== 39) { - return null; - } - switch (this.peek()) { - case 39: - this.bump(); - this.bump(); - return "'"; - case 123: - case 60: - case 62: - case 125: - break; - case 35: - if (parentArgType === "plural" || parentArgType === "selectordinal") { - break; - } - return null; - default: - return null; - } - this.bump(); - var codePoints = [this.char()]; - this.bump(); - while (!this.isEOF()) { - var ch = this.char(); - if (ch === 39) { - if (this.peek() === 39) { - codePoints.push(39); - this.bump(); - } - else { - this.bump(); - break; - } - } - else { - codePoints.push(ch); - } - this.bump(); - } - return fromCodePoint.apply(void 0, codePoints); - }; - Parser2.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) { - if (this.isEOF()) { - return null; - } - var ch = this.char(); - if (ch === 60 || ch === 123 || ch === 35 && (parentArgType === "plural" || parentArgType === "selectordinal") || ch === 125 && nestingLevel > 0) { - return null; - } - else { - this.bump(); - return fromCodePoint(ch); - } - }; - Parser2.prototype.parseArgument = function (nestingLevel, expectingCloseTag) { - var openingBracePosition = this.clonePosition(); - this.bump(); - this.bumpSpace(); - if (this.isEOF()) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - if (this.char() === 125) { - this.bump(); - return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition())); - } - var value = this.parseIdentifierIfPossible().value; - if (!value) { - return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition())); - } - this.bumpSpace(); - if (this.isEOF()) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - switch (this.char()) { - case 125: { - this.bump(); - return { - val: { - type: TYPE.argument, - value, - location: createLocation(openingBracePosition, this.clonePosition()) - }, - err: null - }; - } - case 44: { - this.bump(); - this.bumpSpace(); - if (this.isEOF()) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition); - } - default: - return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition())); - } - }; - Parser2.prototype.parseIdentifierIfPossible = function () { - var startingPosition = this.clonePosition(); - var startOffset = this.offset(); - var value = matchIdentifierAtIndex(this.message, startOffset); - var endOffset = startOffset + value.length; - this.bumpTo(endOffset); - var endPosition = this.clonePosition(); - var location = createLocation(startingPosition, endPosition); - return { value, location }; - }; - Parser2.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) { - var _a2; - var typeStartPosition = this.clonePosition(); - var argType = this.parseIdentifierIfPossible().value; - var typeEndPosition = this.clonePosition(); - switch (argType) { - case "": - return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition)); - case "number": - case "date": - case "time": { - this.bumpSpace(); - var styleAndLocation = null; - if (this.bumpIf(",")) { - this.bumpSpace(); - var styleStartPosition = this.clonePosition(); - var result = this.parseSimpleArgStyleIfPossible(); - if (result.err) { - return result; - } - var style = trimEnd(result.val); - if (style.length === 0) { - return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition())); - } - var styleLocation = createLocation(styleStartPosition, this.clonePosition()); - styleAndLocation = { style, styleLocation }; - } - var argCloseResult = this.tryParseArgumentClose(openingBracePosition); - if (argCloseResult.err) { - return argCloseResult; - } - var location_1 = createLocation(openingBracePosition, this.clonePosition()); - if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, "::", 0)) { - var skeleton = trimStart(styleAndLocation.style.slice(2)); - if (argType === "number") { - var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation); - if (result.err) { - return result; - } - return { - val: { type: TYPE.number, value, location: location_1, style: result.val }, - err: null - }; - } - else { - if (skeleton.length === 0) { - return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1); - } - var style = { - type: SKELETON_TYPE.dateTime, - pattern: skeleton, - location: styleAndLocation.styleLocation, - parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(skeleton) : {} - }; - var type = argType === "date" ? TYPE.date : TYPE.time; - return { - val: { type, value, location: location_1, style }, - err: null - }; - } - } - return { - val: { - type: argType === "number" ? TYPE.number : argType === "date" ? TYPE.date : TYPE.time, - value, - location: location_1, - style: (_a2 = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a2 !== void 0 ? _a2 : null - }, - err: null - }; - } - case "plural": - case "selectordinal": - case "select": { - var typeEndPosition_1 = this.clonePosition(); - this.bumpSpace(); - if (!this.bumpIf(",")) { - return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1))); - } - this.bumpSpace(); - var identifierAndLocation = this.parseIdentifierIfPossible(); - var pluralOffset = 0; - if (argType !== "select" && identifierAndLocation.value === "offset") { - if (!this.bumpIf(":")) { - return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition())); - } - this.bumpSpace(); - var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE); - if (result.err) { - return result; - } - this.bumpSpace(); - identifierAndLocation = this.parseIdentifierIfPossible(); - pluralOffset = result.val; - } - var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation); - if (optionsResult.err) { - return optionsResult; - } - var argCloseResult = this.tryParseArgumentClose(openingBracePosition); - if (argCloseResult.err) { - return argCloseResult; - } - var location_2 = createLocation(openingBracePosition, this.clonePosition()); - if (argType === "select") { - return { - val: { - type: TYPE.select, - value, - options: fromEntries(optionsResult.val), - location: location_2 - }, - err: null - }; - } - else { - return { - val: { - type: TYPE.plural, - value, - options: fromEntries(optionsResult.val), - offset: pluralOffset, - pluralType: argType === "plural" ? "cardinal" : "ordinal", - location: location_2 - }, - err: null - }; - } - } - default: - return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition)); - } - }; - Parser2.prototype.tryParseArgumentClose = function (openingBracePosition) { - if (this.isEOF() || this.char() !== 125) { - return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition())); - } - this.bump(); - return { val: true, err: null }; - }; - Parser2.prototype.parseSimpleArgStyleIfPossible = function () { - var nestedBraces = 0; - var startPosition = this.clonePosition(); - while (!this.isEOF()) { - var ch = this.char(); - switch (ch) { - case 39: { - this.bump(); - var apostrophePosition = this.clonePosition(); - if (!this.bumpUntil("'")) { - return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition())); - } - this.bump(); - break; - } - case 123: { - nestedBraces += 1; - this.bump(); - break; - } - case 125: { - if (nestedBraces > 0) { - nestedBraces -= 1; - } - else { - return { - val: this.message.slice(startPosition.offset, this.offset()), - err: null - }; - } - break; - } - default: - this.bump(); - break; - } - } - return { - val: this.message.slice(startPosition.offset, this.offset()), - err: null - }; - }; - Parser2.prototype.parseNumberSkeletonFromString = function (skeleton, location) { - var tokens = []; - try { - tokens = parseNumberSkeletonFromString(skeleton); - } - catch (e) { - return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location); - } - return { - val: { - type: SKELETON_TYPE.number, - tokens, - location, - parsedOptions: this.shouldParseSkeletons ? parseNumberSkeleton(tokens) : {} - }, - err: null - }; - }; - Parser2.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) { - var _a2; - var hasOtherClause = false; - var options = []; - var parsedSelectors = new Set(); - var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location; - while (true) { - if (selector.length === 0) { - var startPosition = this.clonePosition(); - if (parentArgType !== "select" && this.bumpIf("=")) { - var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR); - if (result.err) { - return result; - } - selectorLocation = createLocation(startPosition, this.clonePosition()); - selector = this.message.slice(startPosition.offset, this.offset()); - } - else { - break; - } - } - if (parsedSelectors.has(selector)) { - return this.error(parentArgType === "select" ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation); - } - if (selector === "other") { - hasOtherClause = true; - } - this.bumpSpace(); - var openingBracePosition = this.clonePosition(); - if (!this.bumpIf("{")) { - return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition())); - } - var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag); - if (fragmentResult.err) { - return fragmentResult; - } - var argCloseResult = this.tryParseArgumentClose(openingBracePosition); - if (argCloseResult.err) { - return argCloseResult; - } - options.push([ - selector, - { - value: fragmentResult.val, - location: createLocation(openingBracePosition, this.clonePosition()) - } - ]); - parsedSelectors.add(selector); - this.bumpSpace(); - _a2 = this.parseIdentifierIfPossible(), selector = _a2.value, selectorLocation = _a2.location; - } - if (options.length === 0) { - return this.error(parentArgType === "select" ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition())); - } - if (this.requiresOtherClause && !hasOtherClause) { - return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition())); - } - return { val: options, err: null }; - }; - Parser2.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) { - var sign = 1; - var startingPosition = this.clonePosition(); - if (this.bumpIf("+")) ; - else if (this.bumpIf("-")) { - sign = -1; - } - var hasDigits = false; - var decimal = 0; - while (!this.isEOF()) { - var ch = this.char(); - if (ch >= 48 && ch <= 57) { - hasDigits = true; - decimal = decimal * 10 + (ch - 48); - this.bump(); - } - else { - break; - } - } - var location = createLocation(startingPosition, this.clonePosition()); - if (!hasDigits) { - return this.error(expectNumberError, location); - } - decimal *= sign; - if (!isSafeInteger(decimal)) { - return this.error(invalidNumberError, location); - } - return { val: decimal, err: null }; - }; - Parser2.prototype.offset = function () { - return this.position.offset; - }; - Parser2.prototype.isEOF = function () { - return this.offset() === this.message.length; - }; - Parser2.prototype.clonePosition = function () { - return { - offset: this.position.offset, - line: this.position.line, - column: this.position.column - }; - }; - Parser2.prototype.char = function () { - var offset = this.position.offset; - if (offset >= this.message.length) { - throw Error("out of bound"); - } - var code = codePointAt(this.message, offset); - if (code === void 0) { - throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary"); - } - return code; - }; - Parser2.prototype.error = function (kind, location) { - return { - val: null, - err: { - kind, - message: this.message, - location - } - }; - }; - Parser2.prototype.bump = function () { - if (this.isEOF()) { - return; - } - var code = this.char(); - if (code === 10) { - this.position.line += 1; - this.position.column = 1; - this.position.offset += 1; - } - else { - this.position.column += 1; - this.position.offset += code < 65536 ? 1 : 2; - } - }; - Parser2.prototype.bumpIf = function (prefix) { - if (startsWith(this.message, prefix, this.offset())) { - for (var i = 0; i < prefix.length; i++) { - this.bump(); - } - return true; - } - return false; - }; - Parser2.prototype.bumpUntil = function (pattern) { - var currentOffset = this.offset(); - var index = this.message.indexOf(pattern, currentOffset); - if (index >= 0) { - this.bumpTo(index); - return true; - } - else { - this.bumpTo(this.message.length); - return false; - } - }; - Parser2.prototype.bumpTo = function (targetOffset) { - if (this.offset() > targetOffset) { - throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset()); - } - targetOffset = Math.min(targetOffset, this.message.length); - while (true) { - var offset = this.offset(); - if (offset === targetOffset) { - break; - } - if (offset > targetOffset) { - throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary"); - } - this.bump(); - if (this.isEOF()) { - break; - } - } - }; - Parser2.prototype.bumpSpace = function () { - while (!this.isEOF() && _isWhiteSpace(this.char())) { - this.bump(); - } - }; - Parser2.prototype.peek = function () { - if (this.isEOF()) { - return null; - } - var code = this.char(); - var offset = this.offset(); - var nextCode = this.message.charCodeAt(offset + (code >= 65536 ? 2 : 1)); - return nextCode !== null && nextCode !== void 0 ? nextCode : null; - }; - return Parser2; -}(); -function _isAlpha(codepoint) { - return codepoint >= 97 && codepoint <= 122 || codepoint >= 65 && codepoint <= 90; -} -function _isAlphaOrSlash(codepoint) { - return _isAlpha(codepoint) || codepoint === 47; -} -function _isPotentialElementNameChar(c) { - return c === 45 || c === 46 || c >= 48 && c <= 57 || c === 95 || c >= 97 && c <= 122 || c >= 65 && c <= 90 || c == 183 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8255 && c <= 8256 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; -} -function _isWhiteSpace(c) { - return c >= 9 && c <= 13 || c === 32 || c === 133 || c >= 8206 && c <= 8207 || c === 8232 || c === 8233; -} -function _isPatternSyntax(c) { - return c >= 33 && c <= 35 || c === 36 || c >= 37 && c <= 39 || c === 40 || c === 41 || c === 42 || c === 43 || c === 44 || c === 45 || c >= 46 && c <= 47 || c >= 58 && c <= 59 || c >= 60 && c <= 62 || c >= 63 && c <= 64 || c === 91 || c === 92 || c === 93 || c === 94 || c === 96 || c === 123 || c === 124 || c === 125 || c === 126 || c === 161 || c >= 162 && c <= 165 || c === 166 || c === 167 || c === 169 || c === 171 || c === 172 || c === 174 || c === 176 || c === 177 || c === 182 || c === 187 || c === 191 || c === 215 || c === 247 || c >= 8208 && c <= 8213 || c >= 8214 && c <= 8215 || c === 8216 || c === 8217 || c === 8218 || c >= 8219 && c <= 8220 || c === 8221 || c === 8222 || c === 8223 || c >= 8224 && c <= 8231 || c >= 8240 && c <= 8248 || c === 8249 || c === 8250 || c >= 8251 && c <= 8254 || c >= 8257 && c <= 8259 || c === 8260 || c === 8261 || c === 8262 || c >= 8263 && c <= 8273 || c === 8274 || c === 8275 || c >= 8277 && c <= 8286 || c >= 8592 && c <= 8596 || c >= 8597 && c <= 8601 || c >= 8602 && c <= 8603 || c >= 8604 && c <= 8607 || c === 8608 || c >= 8609 && c <= 8610 || c === 8611 || c >= 8612 && c <= 8613 || c === 8614 || c >= 8615 && c <= 8621 || c === 8622 || c >= 8623 && c <= 8653 || c >= 8654 && c <= 8655 || c >= 8656 && c <= 8657 || c === 8658 || c === 8659 || c === 8660 || c >= 8661 && c <= 8691 || c >= 8692 && c <= 8959 || c >= 8960 && c <= 8967 || c === 8968 || c === 8969 || c === 8970 || c === 8971 || c >= 8972 && c <= 8991 || c >= 8992 && c <= 8993 || c >= 8994 && c <= 9e3 || c === 9001 || c === 9002 || c >= 9003 && c <= 9083 || c === 9084 || c >= 9085 && c <= 9114 || c >= 9115 && c <= 9139 || c >= 9140 && c <= 9179 || c >= 9180 && c <= 9185 || c >= 9186 && c <= 9254 || c >= 9255 && c <= 9279 || c >= 9280 && c <= 9290 || c >= 9291 && c <= 9311 || c >= 9472 && c <= 9654 || c === 9655 || c >= 9656 && c <= 9664 || c === 9665 || c >= 9666 && c <= 9719 || c >= 9720 && c <= 9727 || c >= 9728 && c <= 9838 || c === 9839 || c >= 9840 && c <= 10087 || c === 10088 || c === 10089 || c === 10090 || c === 10091 || c === 10092 || c === 10093 || c === 10094 || c === 10095 || c === 10096 || c === 10097 || c === 10098 || c === 10099 || c === 10100 || c === 10101 || c >= 10132 && c <= 10175 || c >= 10176 && c <= 10180 || c === 10181 || c === 10182 || c >= 10183 && c <= 10213 || c === 10214 || c === 10215 || c === 10216 || c === 10217 || c === 10218 || c === 10219 || c === 10220 || c === 10221 || c === 10222 || c === 10223 || c >= 10224 && c <= 10239 || c >= 10240 && c <= 10495 || c >= 10496 && c <= 10626 || c === 10627 || c === 10628 || c === 10629 || c === 10630 || c === 10631 || c === 10632 || c === 10633 || c === 10634 || c === 10635 || c === 10636 || c === 10637 || c === 10638 || c === 10639 || c === 10640 || c === 10641 || c === 10642 || c === 10643 || c === 10644 || c === 10645 || c === 10646 || c === 10647 || c === 10648 || c >= 10649 && c <= 10711 || c === 10712 || c === 10713 || c === 10714 || c === 10715 || c >= 10716 && c <= 10747 || c === 10748 || c === 10749 || c >= 10750 && c <= 11007 || c >= 11008 && c <= 11055 || c >= 11056 && c <= 11076 || c >= 11077 && c <= 11078 || c >= 11079 && c <= 11084 || c >= 11085 && c <= 11123 || c >= 11124 && c <= 11125 || c >= 11126 && c <= 11157 || c === 11158 || c >= 11159 && c <= 11263 || c >= 11776 && c <= 11777 || c === 11778 || c === 11779 || c === 11780 || c === 11781 || c >= 11782 && c <= 11784 || c === 11785 || c === 11786 || c === 11787 || c === 11788 || c === 11789 || c >= 11790 && c <= 11798 || c === 11799 || c >= 11800 && c <= 11801 || c === 11802 || c === 11803 || c === 11804 || c === 11805 || c >= 11806 && c <= 11807 || c === 11808 || c === 11809 || c === 11810 || c === 11811 || c === 11812 || c === 11813 || c === 11814 || c === 11815 || c === 11816 || c === 11817 || c >= 11818 && c <= 11822 || c === 11823 || c >= 11824 && c <= 11833 || c >= 11834 && c <= 11835 || c >= 11836 && c <= 11839 || c === 11840 || c === 11841 || c === 11842 || c >= 11843 && c <= 11855 || c >= 11856 && c <= 11857 || c === 11858 || c >= 11859 && c <= 11903 || c >= 12289 && c <= 12291 || c === 12296 || c === 12297 || c === 12298 || c === 12299 || c === 12300 || c === 12301 || c === 12302 || c === 12303 || c === 12304 || c === 12305 || c >= 12306 && c <= 12307 || c === 12308 || c === 12309 || c === 12310 || c === 12311 || c === 12312 || c === 12313 || c === 12314 || c === 12315 || c === 12316 || c === 12317 || c >= 12318 && c <= 12319 || c === 12320 || c === 12336 || c === 64830 || c === 64831 || c >= 65093 && c <= 65094; -} -function pruneLocation(els) { - els.forEach(function (el) { - delete el.location; - if (isSelectElement(el) || isPluralElement(el)) { - for (var k in el.options) { - delete el.options[k].location; - pruneLocation(el.options[k].value); - } - } - else if (isNumberElement(el) && isNumberSkeleton(el.style)) { - delete el.style.location; - } - else if ((isDateElement(el) || isTimeElement(el)) && isDateTimeSkeleton(el.style)) { - delete el.style.location; - } - else if (isTagElement(el)) { - pruneLocation(el.children); - } - }); -} -function parse$1(message, opts) { - if (opts === void 0) { - opts = {}; - } - opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts); - var result = new Parser(message, opts).parse(); - if (result.err) { - var error = SyntaxError(ErrorKind[result.err.kind]); - error.location = result.err.location; - error.originalMessage = result.err.message; - throw error; - } - if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) { - pruneLocation(result.val); - } - return result.val; -} -function memoize(fn, options) { - var cache = options && options.cache ? options.cache : cacheDefault; - var serializer = options && options.serializer ? options.serializer : serializerDefault; - var strategy = options && options.strategy ? options.strategy : strategyDefault; - return strategy(fn, { - cache, - serializer - }); -} -function isPrimitive(value) { - return value == null || typeof value === "number" || typeof value === "boolean"; -} -function monadic(fn, cache, serializer, arg) { - var cacheKey = isPrimitive(arg) ? arg : serializer(arg); - var computedValue = cache.get(cacheKey); - if (typeof computedValue === "undefined") { - computedValue = fn.call(this, arg); - cache.set(cacheKey, computedValue); - } - return computedValue; -} -function variadic(fn, cache, serializer) { - var args = Array.prototype.slice.call(arguments, 3); - var cacheKey = serializer(args); - var computedValue = cache.get(cacheKey); - if (typeof computedValue === "undefined") { - computedValue = fn.apply(this, args); - cache.set(cacheKey, computedValue); - } - return computedValue; -} -function assemble(fn, context, strategy, cache, serialize) { - return strategy.bind(context, fn, cache, serialize); -} -function strategyDefault(fn, options) { - var strategy = fn.length === 1 ? monadic : variadic; - return assemble(fn, this, strategy, options.cache.create(), options.serializer); -} -function strategyVariadic(fn, options) { - return assemble(fn, this, variadic, options.cache.create(), options.serializer); -} -var serializerDefault = function () { - return JSON.stringify(arguments); -}; -function ObjectWithoutPrototypeCache() { - this.cache = Object.create(null); -} -ObjectWithoutPrototypeCache.prototype.has = function (key) { - return key in this.cache; -}; -ObjectWithoutPrototypeCache.prototype.get = function (key) { - return this.cache[key]; -}; -ObjectWithoutPrototypeCache.prototype.set = function (key, value) { - this.cache[key] = value; -}; -var cacheDefault = { - create: function create() { - return new ObjectWithoutPrototypeCache(); - } -}; -var strategies = { - variadic: strategyVariadic}; -var ErrorCode; -(function (ErrorCode2) { - ErrorCode2["MISSING_VALUE"] = "MISSING_VALUE"; - ErrorCode2["INVALID_VALUE"] = "INVALID_VALUE"; - ErrorCode2["MISSING_INTL_API"] = "MISSING_INTL_API"; -})(ErrorCode || (ErrorCode = {})); -var FormatError = class extends Error { - constructor(msg, code, originalMessage) { - super(msg); - this.code = code; - this.originalMessage = originalMessage; - } - toString() { - return `[formatjs Error: ${this.code}] ${this.message}`; - } -}; -var InvalidValueError = class extends FormatError { - constructor(variableId, value, options, originalMessage) { - super(`Invalid values for "${variableId}": "${value}". Options are "${Object.keys(options).join('", "')}"`, ErrorCode.INVALID_VALUE, originalMessage); - } -}; -var InvalidValueTypeError = class extends FormatError { - constructor(value, type, originalMessage) { - super(`Value for "${value}" must be of type ${type}`, ErrorCode.INVALID_VALUE, originalMessage); - } -}; -var MissingValueError = class extends FormatError { - constructor(variableId, originalMessage) { - super(`The intl string context variable "${variableId}" was not provided to the string "${originalMessage}"`, ErrorCode.MISSING_VALUE, originalMessage); - } -}; -var PART_TYPE; -(function (PART_TYPE2) { - PART_TYPE2[PART_TYPE2["literal"] = 0] = "literal"; - PART_TYPE2[PART_TYPE2["object"] = 1] = "object"; -})(PART_TYPE || (PART_TYPE = {})); -function mergeLiteral(parts) { - if (parts.length < 2) { - return parts; - } - return parts.reduce((all, part) => { - const lastPart = all[all.length - 1]; - if (!lastPart || lastPart.type !== PART_TYPE.literal || part.type !== PART_TYPE.literal) { - all.push(part); - } - else { - lastPart.value += part.value; - } - return all; - }, []); -} -function isFormatXMLElementFn(el) { - return typeof el === "function"; -} -function formatToParts(els, locales, formatters, formats, values, currentPluralValue, originalMessage) { - if (els.length === 1 && isLiteralElement(els[0])) { - return [ - { - type: PART_TYPE.literal, - value: els[0].value - } - ]; - } - const result = []; - for (const el of els) { - if (isLiteralElement(el)) { - result.push({ - type: PART_TYPE.literal, - value: el.value - }); - continue; - } - if (isPoundElement(el)) { - if (typeof currentPluralValue === "number") { - result.push({ - type: PART_TYPE.literal, - value: formatters.getNumberFormat(locales).format(currentPluralValue) - }); - } - continue; - } - const { value: varName } = el; - if (!(values && varName in values)) { - throw new MissingValueError(varName, originalMessage); - } - let value = values[varName]; - if (isArgumentElement(el)) { - if (!value || typeof value === "string" || typeof value === "number") { - value = typeof value === "string" || typeof value === "number" ? String(value) : ""; - } - result.push({ - type: typeof value === "string" ? PART_TYPE.literal : PART_TYPE.object, - value - }); - continue; - } - if (isDateElement(el)) { - const style = typeof el.style === "string" ? formats.date[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0; - result.push({ - type: PART_TYPE.literal, - value: formatters.getDateTimeFormat(locales, style).format(value) - }); - continue; - } - if (isTimeElement(el)) { - const style = typeof el.style === "string" ? formats.time[el.style] : isDateTimeSkeleton(el.style) ? el.style.parsedOptions : void 0; - result.push({ - type: PART_TYPE.literal, - value: formatters.getDateTimeFormat(locales, style).format(value) - }); - continue; - } - if (isNumberElement(el)) { - const style = typeof el.style === "string" ? formats.number[el.style] : isNumberSkeleton(el.style) ? el.style.parsedOptions : void 0; - if (style && style.scale) { - value = value * (style.scale || 1); - } - result.push({ - type: PART_TYPE.literal, - value: formatters.getNumberFormat(locales, style).format(value) - }); - continue; - } - if (isTagElement(el)) { - const { children, value: value2 } = el; - const formatFn = values[value2]; - if (!isFormatXMLElementFn(formatFn)) { - throw new InvalidValueTypeError(value2, "function", originalMessage); - } - const parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue); - let chunks = formatFn(parts.map((p) => p.value)); - if (!Array.isArray(chunks)) { - chunks = [chunks]; - } - result.push(...chunks.map((c) => { - return { - type: typeof c === "string" ? PART_TYPE.literal : PART_TYPE.object, - value: c - }; - })); - } - if (isSelectElement(el)) { - const opt = el.options[value] || el.options.other; - if (!opt) { - throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage); - } - result.push(...formatToParts(opt.value, locales, formatters, formats, values)); - continue; - } - if (isPluralElement(el)) { - let opt = el.options[`=${value}`]; - if (!opt) { - if (!Intl.PluralRules) { - throw new FormatError(`Intl.PluralRules is not available in this environment. -Try polyfilling it using "@formatjs/intl-pluralrules" -`, ErrorCode.MISSING_INTL_API, originalMessage); - } - const rule = formatters.getPluralRules(locales, { type: el.pluralType }).select(value - (el.offset || 0)); - opt = el.options[rule] || el.options.other; - } - if (!opt) { - throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage); - } - result.push(...formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0))); - continue; - } - } - return mergeLiteral(result); -} -function mergeConfig(c1, c2) { - if (!c2) { - return c1; - } - return { - ...c1 || {}, - ...c2 || {}, - ...Object.keys(c1).reduce((all, k) => { - all[k] = { - ...c1[k], - ...c2[k] || {} - }; - return all; - }, {}) - }; -} -function mergeConfigs(defaultConfig, configs) { - if (!configs) { - return defaultConfig; - } - return Object.keys(defaultConfig).reduce((all, k) => { - all[k] = mergeConfig(defaultConfig[k], configs[k]); - return all; - }, { ...defaultConfig }); -} -function createFastMemoizeCache(store) { - return { - create() { - return { - has(key) { - return key in store; - }, - get(key) { - return store[key]; - }, - set(key, value) { - store[key] = value; - } - }; - } - }; -} -function createDefaultFormatters(cache = { - number: {}, - dateTime: {}, - pluralRules: {} -}) { - return { - getNumberFormat: memoize((...args) => new Intl.NumberFormat(...args), { - cache: createFastMemoizeCache(cache.number), - strategy: strategies.variadic - }), - getDateTimeFormat: memoize((...args) => new Intl.DateTimeFormat(...args), { - cache: createFastMemoizeCache(cache.dateTime), - strategy: strategies.variadic - }), - getPluralRules: memoize((...args) => new Intl.PluralRules(...args), { - cache: createFastMemoizeCache(cache.pluralRules), - strategy: strategies.variadic - }) - }; -} -var IntlMessageFormat = class { - constructor(message, locales = IntlMessageFormat.defaultLocale, overrideFormats, opts) { - this.formatterCache = { - number: {}, - dateTime: {}, - pluralRules: {} - }; - this.format = (values) => { - const parts = this.formatToParts(values); - if (parts.length === 1) { - return parts[0].value; - } - const result = parts.reduce((all, part) => { - if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") { - all.push(part.value); - } - else { - all[all.length - 1] += part.value; - } - return all; - }, []); - if (result.length <= 1) { - return result[0] || ""; - } - return result; - }; - this.formatToParts = (values) => formatToParts(this.ast, this.locales, this.formatters, this.formats, values, void 0, this.message); - this.resolvedOptions = () => ({ - locale: Intl.NumberFormat.supportedLocalesOf(this.locales)[0] - }); - this.getAst = () => this.ast; - if (typeof message === "string") { - this.message = message; - if (!IntlMessageFormat.__parse) { - throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`"); - } - this.ast = IntlMessageFormat.__parse(message, { - ignoreTag: opts?.ignoreTag - }); - } - else { - this.ast = message; - } - if (!Array.isArray(this.ast)) { - throw new TypeError("A message must be provided as a String or AST."); - } - this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats); - this.locales = locales; - this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache); - } - static get defaultLocale() { - if (!IntlMessageFormat.memoizedDefaultLocale) { - IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale; - } - return IntlMessageFormat.memoizedDefaultLocale; - } -}; -IntlMessageFormat.memoizedDefaultLocale = null; -IntlMessageFormat.__parse = parse$1; -IntlMessageFormat.formats = { - number: { - integer: { - maximumFractionDigits: 0 - }, - currency: { - style: "currency" - }, - percent: { - style: "percent" - } - }, - date: { - short: { - month: "numeric", - day: "numeric", - year: "2-digit" - }, - medium: { - month: "short", - day: "numeric", - year: "numeric" - }, - long: { - month: "long", - day: "numeric", - year: "numeric" - }, - full: { - weekday: "long", - month: "long", - day: "numeric", - year: "numeric" - } - }, - time: { - short: { - hour: "numeric", - minute: "numeric" - }, - medium: { - hour: "numeric", - minute: "numeric", - second: "numeric" - }, - long: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - }, - full: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - } - } -}; -var lib_esnext_default = IntlMessageFormat; -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -// Copyright 2018 The Lighthouse Authors. All Rights Reserved. -const EMPTY_VALUES_OBJECT = {}; -class RegisteredFileStrings { - filename; - stringStructure; - localizedMessages; - localizedStringSet; - constructor(filename, stringStructure, localizedMessages) { - this.filename = filename; - this.stringStructure = stringStructure; - this.localizedMessages = localizedMessages; - } - getLocalizedStringSetFor(locale) { - if (this.localizedStringSet) { - return this.localizedStringSet; - } - const localeData = this.localizedMessages.get(locale); - if (!localeData) { - throw new Error(`No locale data registered for '${locale}'`); - } - this.localizedStringSet = new LocalizedStringSet(this.filename, this.stringStructure, locale, localeData); - return this.localizedStringSet; - } -} -class LocalizedStringSet { - filename; - stringStructure; - localizedMessages; - cachedSimpleStrings = new Map(); - cachedMessageFormatters = new Map(); - localeForFormatter; - constructor(filename, stringStructure, locale, localizedMessages) { - this.filename = filename; - this.stringStructure = stringStructure; - this.localizedMessages = localizedMessages; - this.localeForFormatter = (locale === 'en-XA' || locale === 'en-XL') ? 'de-DE' : locale; - } - getLocalizedString(message, values = EMPTY_VALUES_OBJECT) { - if (values === EMPTY_VALUES_OBJECT || Object.keys(values).length === 0) { - return this.getSimpleLocalizedString(message); - } - return this.getFormattedLocalizedString(message, values); - } - getMessageFormatterFor(message) { - const keyname = Object.keys(this.stringStructure).find(key => this.stringStructure[key] === message); - if (!keyname) { - throw new Error(`Unable to locate '${message}' in UIStrings object`); - } - const i18nId = `${this.filename} | ${keyname}`; - const localeMessage = this.localizedMessages[i18nId]; - const messageToTranslate = localeMessage ? localeMessage.message : message; - return new lib_esnext_default(messageToTranslate, this.localeForFormatter, undefined, { ignoreTag: true }); - } - getSimpleLocalizedString(message) { - const cachedSimpleString = this.cachedSimpleStrings.get(message); - if (cachedSimpleString) { - return cachedSimpleString; - } - const formatter = this.getMessageFormatterFor(message); - try { - const translatedString = formatter.format(); - this.cachedSimpleStrings.set(message, translatedString); - return translatedString; - } - catch { - const formatter = new lib_esnext_default(message, this.localeForFormatter, undefined, { ignoreTag: true }); - const translatedString = formatter.format(); - this.cachedSimpleStrings.set(message, translatedString); - return translatedString; - } - } - getFormattedLocalizedString(message, values) { - let formatter = this.cachedMessageFormatters.get(message); - if (!formatter) { - formatter = this.getMessageFormatterFor(message); - this.cachedMessageFormatters.set(message, formatter); - } - try { - return formatter.format(values); - } - catch { - const formatter = new lib_esnext_default(message, this.localeForFormatter, undefined, { ignoreTag: true }); - return formatter.format(values); - } - } -} - -// Copyright 2018 The Lighthouse Authors. All Rights Reserved. -class I18n { - supportedLocales; - localeData = new Map(); - defaultLocale; - constructor(supportedLocales, defaultLocale) { - this.defaultLocale = defaultLocale; - this.supportedLocales = new Set(supportedLocales); - } - registerLocaleData(locale, messages) { - this.localeData.set(locale, messages); - } - hasLocaleDataForTest(locale) { - return this.localeData.has(locale); - } - resetLocaleDataForTest() { - this.localeData.clear(); - } - registerFileStrings(filename, stringStructure) { - return new RegisteredFileStrings(filename, stringStructure, this.localeData); - } - lookupClosestSupportedLocale(locale) { - const canonicalLocale = Intl.getCanonicalLocales(locale)[0]; - const localeParts = canonicalLocale.split('-'); - while (localeParts.length) { - const candidate = localeParts.join('-'); - if (this.supportedLocales.has(candidate)) { - return candidate; - } - localeParts.pop(); - } - return this.defaultLocale; - } -} - -const LOCALES = [ - 'en-US', -]; -const DEFAULT_LOCALE = 'en-US'; -const LOCAL_FETCH_PATTERN = './locales/@LOCALE@.json'; - -// Copyright 2020 The Chromium Authors -const i18nInstance = new I18n(LOCALES, DEFAULT_LOCALE); -function lookupClosestSupportedDevToolsLocale(locale) { - return i18nInstance.lookupClosestSupportedLocale(locale); -} -function getAllSupportedDevToolsLocales() { - return [...i18nInstance.supportedLocales]; -} -function getLocaleFetchUrl(locale, location) { - undefined(location); - const path = LOCAL_FETCH_PATTERN.replace('@LOCALE@', locale); - return new URL(path, import.meta.url).toString(); -} -async function fetchAndRegisterLocaleData(locale, location = self.location.toString()) { - const localeDataTextPromise = fetch(getLocaleFetchUrl(locale, location)).then(result => result.json()); - const timeoutPromise = new Promise((_, reject) => window.setTimeout(() => reject(new Error('timed out fetching locale')), 5000)); - const localeData = await Promise.race([timeoutPromise, localeDataTextPromise]); - i18nInstance.registerLocaleData(locale, localeData); -} -function hasLocaleDataForTest(locale) { - return i18nInstance.hasLocaleDataForTest(locale); -} -function resetLocaleDataForTest() { - i18nInstance.resetLocaleDataForTest(); -} -function registerLocaleDataForTest(locale, messages) { - i18nInstance.registerLocaleData(locale, messages); -} -function getLazilyComputedLocalizedString(registeredStrings, id, values = {}) { - return () => getLocalizedString(registeredStrings, id, values); -} -function getLocalizedString(registeredStrings, id, values = {}) { - return registeredStrings.getLocalizedStringSetFor(DevToolsLocale.instance().locale).getLocalizedString(id, values); -} -function registerUIStrings(path, stringStructure) { - return i18nInstance.registerFileStrings(path, stringStructure); -} -function serializeUIString(string, values = {}) { - const serializedMessage = { string, values }; - return JSON.stringify(serializedMessage); -} -function deserializeUIString(serializedMessage) { - if (!serializedMessage) { - return { string: '', values: {} }; - } - return JSON.parse(serializedMessage); -} -function lockedString(str) { - return str; -} -function lockedLazyString(str) { - return () => str; -} -function getLocalizedLanguageRegion(localeString, devtoolsLocale) { - const locale = new Intl.Locale(localeString); - const { language, baseName } = locale; - const devtoolsLoc = new Intl.Locale(devtoolsLocale.locale); - const targetLanguage = language === devtoolsLoc.language ? 'en' : baseName; - const languageInCurrentLocale = new Intl.DisplayNames([devtoolsLocale.locale], { type: 'language' }).of(language); - const languageInTargetLocale = new Intl.DisplayNames([targetLanguage], { type: 'language' }).of(language); - let wrappedRegionInCurrentLocale = ''; - let wrappedRegionInTargetLocale = ''; - if (locale.region) { - const regionInCurrentLocale = new Intl.DisplayNames([devtoolsLocale.locale], { type: 'region', style: 'short' }).of(locale.region); - const regionInTargetLocale = new Intl.DisplayNames([targetLanguage], { type: 'region', style: 'short' }).of(locale.region); - wrappedRegionInCurrentLocale = ` (${regionInCurrentLocale})`; - wrappedRegionInTargetLocale = ` (${regionInTargetLocale})`; - } - return `${languageInCurrentLocale}${wrappedRegionInCurrentLocale} - ${languageInTargetLocale}${wrappedRegionInTargetLocale}`; -} - -var i18nImpl = /*#__PURE__*/Object.freeze({ - __proto__: null, - deserializeUIString: deserializeUIString, - fetchAndRegisterLocaleData: fetchAndRegisterLocaleData, - getAllSupportedDevToolsLocales: getAllSupportedDevToolsLocales, - getLazilyComputedLocalizedString: getLazilyComputedLocalizedString, - getLocalizedLanguageRegion: getLocalizedLanguageRegion, - getLocalizedString: getLocalizedString, - hasLocaleDataForTest: hasLocaleDataForTest, - lockedLazyString: lockedLazyString, - lockedString: lockedString, - lookupClosestSupportedDevToolsLocale: lookupClosestSupportedDevToolsLocale, - registerLocaleDataForTest: registerLocaleDataForTest, - registerUIStrings: registerUIStrings, - resetLocaleDataForTest: resetLocaleDataForTest, - serializeUIString: serializeUIString -}); - -// Copyright 2021 The Chromium Authors -const narrowMillisecondsInteger = defineFormatter({ - style: 'unit', - unit: 'millisecond', - unitDisplay: 'narrow', - minimumFractionDigits: 0, - maximumFractionDigits: 0, -}); -const longMilliseconds = defineFormatter({ - style: 'unit', - unit: 'millisecond', - unitDisplay: 'long', - minimumFractionDigits: 0, - maximumFractionDigits: 0, -}); -const narrowMicrosecondsInteger = defineFormatter({ - style: 'unit', - unit: 'microsecond', - unitDisplay: 'narrow', - minimumFractionDigits: 0, - maximumFractionDigits: 0, -}); -const narrowMillisecondsDecimal = defineFormatter({ - style: 'unit', - unit: 'millisecond', - unitDisplay: 'narrow', - minimumFractionDigits: 2, - maximumFractionDigits: 2, -}); -const narrowSecondsDecimal = defineFormatter({ - style: 'unit', - unit: 'second', - unitDisplay: 'narrow', - minimumFractionDigits: 2, - maximumFractionDigits: 2, -}); -const shortMinutesDecimal = defineFormatter({ - style: 'unit', - unit: 'minute', - unitDisplay: 'short', - minimumFractionDigits: 0, - maximumFractionDigits: 1, -}); -const shortHoursDecimal = defineFormatter({ - style: 'unit', - unit: 'hour', - unitDisplay: 'short', - minimumFractionDigits: 0, - maximumFractionDigits: 1, -}); -const longDaysDecimal = defineFormatter({ - style: 'unit', - unit: 'day', - unitDisplay: 'long', - minimumFractionDigits: 0, - maximumFractionDigits: 1, -}); -function formatMicroSecondsTime(time) { - return millisToString(microSecondsToMilliSeconds(time), true); -} -function formatMicroSecondsAsSeconds(time) { - const milliseconds = microSecondsToMilliSeconds(time); - const seconds = milliSecondsToSeconds(milliseconds); - return narrowSecondsDecimal.format(seconds); -} -function formatMicroSecondsAsMillisFixed(time) { - const milliseconds = microSecondsToMilliSeconds(time); - return narrowMillisecondsInteger.format(milliseconds); -} -function formatMicroSecondsAsMillisFixedExpanded(time) { - const milliseconds = microSecondsToMilliSeconds(time); - return longMilliseconds.format(milliseconds); -} -function millisToString(ms, higherResolution) { - if (!isFinite(ms)) { - return '-'; - } - if (higherResolution && ms < 0.1) { - return narrowMicrosecondsInteger.format(ms * 1000); - } - if (higherResolution && ms < 1000) { - return narrowMillisecondsDecimal.format(ms); - } - if (ms < 1000) { - return narrowMillisecondsInteger.format(ms); - } - const seconds = ms / 1000; - if (seconds < 60) { - return narrowSecondsDecimal.format(seconds); - } - const minutes = seconds / 60; - if (minutes < 60) { - return shortMinutesDecimal.format(minutes); - } - const hours = minutes / 60; - if (hours < 24) { - return shortHoursDecimal.format(hours); - } - const days = hours / 24; - return longDaysDecimal.format(days); -} -const preciseMillisToStringFormattersCache = new Map(); -function preciseMillisToString(ms, precision = 0, separator) { - let formatter = preciseMillisToStringFormattersCache.get(precision); - if (!formatter) { - formatter = defineFormatter({ - style: 'unit', - unit: 'millisecond', - unitDisplay: 'narrow', - minimumFractionDigits: precision, - maximumFractionDigits: precision, - }); - preciseMillisToStringFormattersCache.set(precision, formatter); - } - return formatter.format(ms, separator); -} -const preciseSecondsToStringFormattersCache = new Map(); -function preciseSecondsToString(ms, precision = 0) { - let formatter = preciseSecondsToStringFormattersCache.get(precision); - if (!formatter) { - formatter = defineFormatter({ - style: 'unit', - unit: 'second', - unitDisplay: 'narrow', - minimumFractionDigits: precision, - maximumFractionDigits: precision, - }); - preciseSecondsToStringFormattersCache.set(precision, formatter); - } - return formatter.format(ms); -} -function secondsToString(seconds, higherResolution) { - if (!isFinite(seconds)) { - return '-'; - } - return millisToString(seconds * 1000, higherResolution); -} - -var timeUtilities = /*#__PURE__*/Object.freeze({ - __proto__: null, - formatMicroSecondsAsMillisFixed: formatMicroSecondsAsMillisFixed, - formatMicroSecondsAsMillisFixedExpanded: formatMicroSecondsAsMillisFixedExpanded, - formatMicroSecondsAsSeconds: formatMicroSecondsAsSeconds, - formatMicroSecondsTime: formatMicroSecondsTime, - millisToString: millisToString, - preciseMillisToString: preciseMillisToString, - preciseSecondsToString: preciseSecondsToString, - secondsToString: secondsToString -}); - -// Copyright 2020 The Chromium Authors - -var i18n = /*#__PURE__*/Object.freeze({ - __proto__: null, - ByteUtilities: ByteUtilities, - DevToolsLocale: DevToolsLocale$1, - NumberFormatter: NumberFormatter, - TimeUtilities: timeUtilities, - i18n: i18nImpl -}); - -// Copyright 2014 The Chromium Authors -const UIStrings$1c = { - elementsPanel: 'Elements panel', - stylesSidebar: 'styles sidebar', - changesDrawer: 'Changes drawer', - issuesView: 'Issues view', - networkPanel: 'Network panel', - requestConditionsDrawer: 'Request conditions drawer', - applicationPanel: 'Application panel', - sourcesPanel: 'Sources panel', - timelinePanel: 'Performance panel', - memoryInspectorPanel: 'Memory inspector panel', - developerResourcesPanel: 'Developer Resources panel', - animationsPanel: 'Animations panel', -}; -const str_$1b = registerUIStrings('core/common/Revealer.ts', UIStrings$1c); -const i18nLazyString$h = getLazilyComputedLocalizedString.bind(undefined, str_$1b); -let revealerRegistry; -class RevealerRegistry { - registeredRevealers = []; - static instance() { - if (revealerRegistry === undefined) { - revealerRegistry = new RevealerRegistry(); - } - return revealerRegistry; - } - static removeInstance() { - revealerRegistry = undefined; - } - register(registration) { - this.registeredRevealers.push(registration); - } - async reveal(revealable, omitFocus) { - const revealers = await Promise.all(this.getApplicableRegisteredRevealers(revealable).map(registration => registration.loadRevealer())); - if (revealers.length < 1) { - throw new Error(`No revealers found for ${revealable}`); - } - if (revealers.length > 1) { - throw new Error(`Conflicting reveals found for ${revealable}`); - } - return await revealers[0].reveal(revealable, omitFocus); - } - getApplicableRegisteredRevealers(revealable) { - return this.registeredRevealers.filter(registration => { - for (const contextType of registration.contextTypes()) { - if (revealable instanceof contextType) { - return true; - } - } - return false; - }); - } -} -function revealDestination(revealable) { - const revealers = RevealerRegistry.instance().getApplicableRegisteredRevealers(revealable); - for (const { destination } of revealers) { - if (destination) { - return destination(); - } - } - return null; -} -function registerRevealer(registration) { - RevealerRegistry.instance().register(registration); -} -async function reveal(revealable, omitFocus = false) { - await RevealerRegistry.instance().reveal(revealable, omitFocus); -} -const RevealerDestination = { - DEVELOPER_RESOURCES_PANEL: i18nLazyString$h(UIStrings$1c.developerResourcesPanel), - ELEMENTS_PANEL: i18nLazyString$h(UIStrings$1c.elementsPanel), - STYLES_SIDEBAR: i18nLazyString$h(UIStrings$1c.stylesSidebar), - CHANGES_DRAWER: i18nLazyString$h(UIStrings$1c.changesDrawer), - ISSUES_VIEW: i18nLazyString$h(UIStrings$1c.issuesView), - NETWORK_PANEL: i18nLazyString$h(UIStrings$1c.networkPanel), - REQUEST_CONDITIONS_DRAWER: i18nLazyString$h(UIStrings$1c.requestConditionsDrawer), - TIMELINE_PANEL: i18nLazyString$h(UIStrings$1c.timelinePanel), - APPLICATION_PANEL: i18nLazyString$h(UIStrings$1c.applicationPanel), - SOURCES_PANEL: i18nLazyString$h(UIStrings$1c.sourcesPanel), - MEMORY_INSPECTOR_PANEL: i18nLazyString$h(UIStrings$1c.memoryInspectorPanel), - ANIMATIONS_PANEL: i18nLazyString$h(UIStrings$1c.animationsPanel), -}; - -var Revealer = /*#__PURE__*/Object.freeze({ - __proto__: null, - RevealerDestination: RevealerDestination, - RevealerRegistry: RevealerRegistry, - registerRevealer: registerRevealer, - reveal: reveal, - revealDestination: revealDestination -}); - -// Copyright 2014 The Chromium Authors -class Console extends ObjectWrapper { - #messages = []; - static instance(opts) { - if (!globalInstance().has(Console) || opts?.forceNew) { - globalInstance().set(Console, new Console()); - } - return globalInstance().get(Console); - } - static removeInstance() { - globalInstance().delete(Console); - } - addMessage(text, level = "info" , show = false, source) { - const message = new Message$1(text, level, Date.now(), show, source); - this.#messages.push(message); - this.dispatchEventToListeners("messageAdded" , message); - } - log(text) { - this.addMessage(text, "info" ); - } - warn(text, source) { - this.addMessage(text, "warning" , undefined, source); - } - error(text, show = true) { - this.addMessage(text, "error" , show); - } - messages() { - return this.#messages; - } - show() { - void this.showPromise(); - } - showPromise() { - return reveal(this); - } -} -var FrontendMessageSource; -(function (FrontendMessageSource) { - FrontendMessageSource["CSS"] = "css"; - FrontendMessageSource["ConsoleAPI"] = "console-api"; - FrontendMessageSource["ISSUE_PANEL"] = "issue-panel"; - FrontendMessageSource["SELF_XSS"] = "self-xss"; -})(FrontendMessageSource || (FrontendMessageSource = {})); -let Message$1 = class Message { - text; - level; - timestamp; - show; - source; - constructor(text, level, timestamp, show, source) { - this.text = text; - this.level = level; - this.timestamp = (typeof timestamp === 'number') ? timestamp : Date.now(); - this.show = show; - if (source) { - this.source = source; - } - } -}; - -var Console$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Console: Console, - get FrontendMessageSource () { return FrontendMessageSource; }, - Message: Message$1 -}); - -// Copyright 2020 The Chromium Authors -const debounce = function (func, delay) { - let timer; - const debounced = (...args) => { - clearTimeout(timer); - timer = setTimeout(() => func(...args), testDebounceOverride ? 0 : delay); - }; - return debounced; -}; -let testDebounceOverride = false; -function enableTestOverride() { - testDebounceOverride = true; -} -function disableTestOverride() { - testDebounceOverride = false; -} - -var Debouncer = /*#__PURE__*/Object.freeze({ - __proto__: null, - debounce: debounce, - disableTestOverride: disableTestOverride, - enableTestOverride: enableTestOverride -}); - -// Copyright 2021 The Chromium Authors -function removeEventListeners(eventList) { - for (const eventInfo of eventList) { - eventInfo.eventTarget.removeEventListener(eventInfo.eventType, eventInfo.listener, eventInfo.thisObject); - } - eventList.splice(0); -} -function fireEvent(name, detail = {}, target = window) { - const evt = new CustomEvent(name, { bubbles: true, cancelable: true, detail }); - target.dispatchEvent(evt); -} - -var EventTarget$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - fireEvent: fireEvent, - removeEventListeners: removeEventListeners -}); - -// Copyright 2025 The Chromium Authors -function isGzip(ab) { - const buf = new Uint8Array(ab); - if (!buf || buf.length < 3) { - return false; - } - return buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x08; -} -async function arrayBufferToString(ab) { - if (isGzip(ab)) { - return await decompress(ab); - } - const str = new TextDecoder('utf-8').decode(ab); - return str; -} -async function fileToString(file) { - let stream = file.stream(); - if (file.type.endsWith('gzip')) { - stream = decompressStream(stream); - } - const arrayBuffer = await new Response(stream).arrayBuffer(); - const str = new TextDecoder('utf-8').decode(arrayBuffer); - return str; -} -async function decompress(gzippedBuffer, charset = 'utf-8') { - const buffer = await gzipCodec(gzippedBuffer, new DecompressionStream('gzip')); - const str = new TextDecoder(charset).decode(buffer); - return str; -} -async function decompressDeflate(buffer, charset = 'utf-8') { - let decompressedBuffer; - try { - decompressedBuffer = await gzipCodec(buffer, new DecompressionStream('deflate')); - } - catch { - decompressedBuffer = await gzipCodec(buffer, new DecompressionStream('deflate-raw')); - } - return new TextDecoder(charset).decode(decompressedBuffer); -} -async function compress(str) { - const encoded = new TextEncoder().encode(str); - const buffer = await gzipCodec(encoded, new CompressionStream('gzip')); - return buffer; -} -async function gzipCodec(buffer, codecStream) { - const readable = new ReadableStream({ - start(controller) { - controller.enqueue(buffer instanceof ArrayBuffer ? new Uint8Array(buffer) : buffer); - controller.close(); - } - }); - const codecReadable = readable.pipeThrough(codecStream); - return await new Response(codecReadable).arrayBuffer(); -} -function decompressStream(stream) { - const ds = new DecompressionStream('gzip'); - return stream.pipeThrough(ds); -} -function compressStream(stream) { - const cs = new CompressionStream('gzip'); - return stream.pipeThrough(cs); -} -function createMonitoredStream(stream, onProgress) { - let bytesRead = 0; - const progressTransformer = new TransformStream({ - transform(chunk, controller) { - bytesRead += chunk.byteLength; - onProgress(bytesRead); - controller.enqueue(chunk); - } - }); - return stream.pipeThrough(progressTransformer); -} - -var Gzip = /*#__PURE__*/Object.freeze({ - __proto__: null, - arrayBufferToString: arrayBufferToString, - compress: compress, - compressStream: compressStream, - createMonitoredStream: createMonitoredStream, - decompress: decompress, - decompressDeflate: decompressDeflate, - decompressStream: decompressStream, - fileToString: fileToString, - isGzip: isGzip -}); - -// Copyright 2019 The Chromium Authors - -var JavaScriptMetaData = /*#__PURE__*/Object.freeze({ - __proto__: null -}); - -// Copyright 2020 The Chromium Authors -const UNINITIALIZED = Symbol('uninitialized'); -const ERROR_STATE = Symbol('error'); -function lazy(producer) { - let value = UNINITIALIZED; - let error = new Error('Initial'); - return () => { - if (value === ERROR_STATE) { - throw error; - } - else if (value !== UNINITIALIZED) { - return value; - } - try { - value = producer(); - return value; - } - catch (err) { - error = err instanceof Error ? err : new Error(err); - value = ERROR_STATE; - throw error; - } - }; -} - -var Lazy = /*#__PURE__*/Object.freeze({ - __proto__: null, - lazy: lazy -}); - -// Copyright 2024 The Chromium Authors -class MapWithDefault extends Map { - getOrInsert(key, defaultValue) { - if (!this.has(key)) { - this.set(key, defaultValue); - } - return this.get(key); - } - getOrInsertComputed(key, callbackFunction) { - if (!this.has(key)) { - this.set(key, callbackFunction(key)); - } - return this.get(key); - } -} - -var MapWithDefault$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - MapWithDefault: MapWithDefault -}); - -// Copyright 2022 The Chromium Authors -class Mutex { - #locked = false; - #acquirers = []; - acquire() { - const state = { resolved: false }; - if (this.#locked) { - return new Promise(resolve => { - this.#acquirers.push(() => resolve(this.#release.bind(this, state))); - }); - } - this.#locked = true; - return Promise.resolve(this.#release.bind(this, state)); - } - #release(state) { - if (state.resolved) { - throw new Error('Cannot release more than once.'); - } - state.resolved = true; - const resolve = this.#acquirers.shift(); - if (!resolve) { - this.#locked = false; - return; - } - resolve(); - } - async run(action) { - const release = await this.acquire(); - try { - const result = await action(); - return result; - } - finally { - release(); - } - } -} - -var Mutex$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Mutex: Mutex -}); - -// Copyright 2012 The Chromium Authors -function normalizePath(path) { - if (path.indexOf('..') === -1 && path.indexOf('.') === -1) { - return path; - } - const segments = (path[0] === '/' ? path.substring(1) : path).split('/'); - const normalizedSegments = []; - for (const segment of segments) { - if (segment === '.') { - continue; - } - else if (segment === '..') { - normalizedSegments.pop(); - } - else { - normalizedSegments.push(segment); - } - } - let normalizedPath = normalizedSegments.join('/'); - if (path[0] === '/' && normalizedPath) { - normalizedPath = '/' + normalizedPath; - } - if (normalizedPath[normalizedPath.length - 1] !== '/' && - ((path[path.length - 1] === '/') || (segments[segments.length - 1] === '.') || - (segments[segments.length - 1] === '..'))) { - normalizedPath = normalizedPath + '/'; - } - return normalizedPath; -} -function schemeIs(url, scheme) { - try { - return (new URL(url)).protocol === scheme; - } - catch { - return false; - } -} -class ParsedURL { - isValid = false; - url; - scheme = ''; - user = ''; - host = ''; - port = ''; - path = ''; - queryParams = ''; - fragment = ''; - folderPathComponents = ''; - lastPathComponent = ''; - blobInnerScheme; - #displayName; - #dataURLDisplayName; - constructor(url) { - this.url = url; - const isBlobUrl = this.url.startsWith('blob:'); - const urlToMatch = isBlobUrl ? url.substring(5) : url; - const match = urlToMatch.match(ParsedURL.urlRegex()); - if (match) { - this.isValid = true; - if (isBlobUrl) { - this.blobInnerScheme = match[2].toLowerCase(); - this.scheme = 'blob'; - } - else { - this.scheme = match[2].toLowerCase(); - } - this.user = match[3] ?? ''; - this.host = match[4] ?? ''; - this.port = match[5] ?? ''; - this.path = match[6] ?? '/'; - this.queryParams = match[7] ?? ''; - this.fragment = match[8] ?? ''; - } - else { - if (this.url.startsWith('data:')) { - this.scheme = 'data'; - return; - } - if (this.url.startsWith('blob:')) { - this.scheme = 'blob'; - return; - } - if (this.url === 'about:blank') { - this.scheme = 'about'; - return; - } - this.path = this.url; - } - const lastSlashExceptTrailingIndex = this.path.lastIndexOf('/', this.path.length - 2); - if (lastSlashExceptTrailingIndex !== -1) { - this.lastPathComponent = this.path.substring(lastSlashExceptTrailingIndex + 1); - } - else { - this.lastPathComponent = this.path; - } - const lastSlashIndex = this.path.lastIndexOf('/'); - if (lastSlashIndex !== -1) { - this.folderPathComponents = this.path.substring(0, lastSlashIndex); - } - } - static fromString(string) { - const parsedURL = new ParsedURL(string.toString()); - if (parsedURL.isValid) { - return parsedURL; - } - return null; - } - static preEncodeSpecialCharactersInPath(path) { - for (const specialChar of ['%', ';', '#', '?', ' ']) { - (path) = path.replaceAll(specialChar, encodeURIComponent(specialChar)); - } - return path; - } - static rawPathToEncodedPathString(path) { - const partiallyEncoded = ParsedURL.preEncodeSpecialCharactersInPath(path); - if (path.startsWith('/')) { - return new URL(partiallyEncoded, 'file:///').pathname; - } - return new URL('/' + partiallyEncoded, 'file:///').pathname.substr(1); - } - static encodedFromParentPathAndName(parentPath, name) { - return ParsedURL.concatenate(parentPath, '/', ParsedURL.preEncodeSpecialCharactersInPath(name)); - } - static urlFromParentUrlAndName(parentUrl, name) { - return ParsedURL.concatenate(parentUrl, '/', ParsedURL.preEncodeSpecialCharactersInPath(name)); - } - static encodedPathToRawPathString(encPath) { - return decodeURIComponent(encPath); - } - static rawPathToUrlString(fileSystemPath) { - let preEncodedPath = ParsedURL.preEncodeSpecialCharactersInPath(fileSystemPath.replace(/\\/g, '/')); - preEncodedPath = preEncodedPath.replace(/\\/g, '/'); - if (!preEncodedPath.startsWith('file://')) { - if (preEncodedPath.startsWith('/')) { - preEncodedPath = 'file://' + preEncodedPath; - } - else { - preEncodedPath = 'file:///' + preEncodedPath; - } - } - return new URL(preEncodedPath).toString(); - } - static relativePathToUrlString(relativePath, baseURL) { - const preEncodedPath = ParsedURL.preEncodeSpecialCharactersInPath(relativePath.replace(/\\/g, '/')); - return new URL(preEncodedPath, baseURL).toString(); - } - static urlToRawPathString(fileURL, isWindows) { - console.assert(fileURL.startsWith('file://'), 'This must be a file URL.'); - const decodedFileURL = decodeURIComponent(fileURL); - if (isWindows) { - return decodedFileURL.substr('file:///'.length).replace(/\//g, '\\'); - } - return decodedFileURL.substr('file://'.length); - } - static sliceUrlToEncodedPathString(url, start) { - return url.substring(start); - } - static substr(devToolsPath, from, length) { - return devToolsPath.substr(from, length); - } - static substring(devToolsPath, start, end) { - return devToolsPath.substring(start, end); - } - static prepend(prefix, devToolsPath) { - return prefix + devToolsPath; - } - static concatenate(devToolsPath, ...appendage) { - return devToolsPath.concat(...appendage); - } - static trim(devToolsPath) { - return devToolsPath.trim(); - } - static slice(devToolsPath, start, end) { - return devToolsPath.slice(start, end); - } - static join(devToolsPaths, separator) { - return devToolsPaths.join(separator); - } - static split(devToolsPath, separator, limit) { - return devToolsPath.split(separator, limit); - } - static toLowerCase(devToolsPath) { - return devToolsPath.toLowerCase(); - } - static isValidUrlString(str) { - return new ParsedURL(str).isValid; - } - static urlWithoutHash(url) { - const hashIndex = url.indexOf('#'); - if (hashIndex !== -1) { - return url.substr(0, hashIndex); - } - return url; - } - static urlRegex() { - if (ParsedURL.urlRegexInstance) { - return ParsedURL.urlRegexInstance; - } - const schemeRegex = /([A-Za-z][A-Za-z0-9+.-]*):\/\//; - const userRegex = /(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/; - const hostRegex = /((?:\[::\d?\])|(?:[^\s\/:]*))/; - const portRegex = /(?::([\d]+))?/; - const pathRegex = /(\/[^#?]*)?/; - const queryRegex = /(?:\?([^#]*))?/; - const fragmentRegex = /(?:#(.*))?/; - ParsedURL.urlRegexInstance = new RegExp('^(' + schemeRegex.source + userRegex.source + hostRegex.source + portRegex.source + ')' + pathRegex.source + - queryRegex.source + fragmentRegex.source + '$'); - return ParsedURL.urlRegexInstance; - } - static extractPath(url) { - const parsedURL = this.fromString(url); - return (parsedURL ? parsedURL.path : ''); - } - static extractOrigin(url) { - const parsedURL = this.fromString(url); - return parsedURL ? parsedURL.securityOrigin() : EmptyUrlString; - } - static extractExtension(url) { - url = ParsedURL.urlWithoutHash(url); - const indexOfQuestionMark = url.indexOf('?'); - if (indexOfQuestionMark !== -1) { - url = url.substr(0, indexOfQuestionMark); - } - const lastIndexOfSlash = url.lastIndexOf('/'); - if (lastIndexOfSlash !== -1) { - url = url.substr(lastIndexOfSlash + 1); - } - const lastIndexOfDot = url.lastIndexOf('.'); - if (lastIndexOfDot !== -1) { - url = url.substr(lastIndexOfDot + 1); - const lastIndexOfPercent = url.indexOf('%'); - if (lastIndexOfPercent !== -1) { - return url.substr(0, lastIndexOfPercent); - } - return url; - } - return ''; - } - static extractName(url) { - if (url.endsWith('/')) { - url = url.slice(0, -1); - } - let index = url.lastIndexOf('/'); - const pathAndQuery = index !== -1 ? url.substr(index + 1) : url; - index = pathAndQuery.indexOf('?'); - return index < 0 ? pathAndQuery : pathAndQuery.substr(0, index); - } - static completeURL(baseURL, href) { - if (href.startsWith('data:') || href.startsWith('blob:') || href.startsWith('javascript:') || - href.startsWith('mailto:')) { - return href; - } - const trimmedHref = href.trim(); - const parsedHref = this.fromString(trimmedHref); - if (parsedHref?.scheme) { - const securityOrigin = parsedHref.securityOrigin(); - const pathText = normalizePath(parsedHref.path); - const queryText = parsedHref.queryParams && `?${parsedHref.queryParams}`; - const fragmentText = parsedHref.fragment && `#${parsedHref.fragment}`; - return securityOrigin + pathText + queryText + fragmentText; - } - const parsedURL = this.fromString(baseURL); - if (!parsedURL) { - return null; - } - if (parsedURL.isDataURL()) { - return href; - } - if (href.length > 1 && href.charAt(0) === '/' && href.charAt(1) === '/') { - return parsedURL.scheme + ':' + href; - } - const securityOrigin = parsedURL.securityOrigin(); - const pathText = parsedURL.path; - const queryText = parsedURL.queryParams ? '?' + parsedURL.queryParams : ''; - if (!href.length) { - return securityOrigin + pathText + queryText; - } - if (href.charAt(0) === '#') { - return securityOrigin + pathText + queryText + href; - } - if (href.charAt(0) === '?') { - return securityOrigin + pathText + href; - } - const hrefMatches = href.match(/^[^#?]*/); - if (!hrefMatches || !href.length) { - throw new Error('Invalid href'); - } - let hrefPath = hrefMatches[0]; - const hrefSuffix = href.substring(hrefPath.length); - if (hrefPath.charAt(0) !== '/') { - hrefPath = parsedURL.folderPathComponents + '/' + hrefPath; - } - return securityOrigin + normalizePath(hrefPath) + hrefSuffix; - } - static splitLineAndColumn(string) { - const beforePathMatch = string.match(ParsedURL.urlRegex()); - let beforePath = ''; - let pathAndAfter = string; - if (beforePathMatch) { - beforePath = beforePathMatch[1]; - pathAndAfter = string.substring(beforePathMatch[1].length); - } - const lineColumnRegEx = /(?::(\d+))?(?::(\d+))?$/; - const lineColumnMatch = lineColumnRegEx.exec(pathAndAfter); - let lineNumber; - let columnNumber; - console.assert(Boolean(lineColumnMatch)); - if (!lineColumnMatch) { - return { url: string, lineNumber: 0, columnNumber: 0 }; - } - if (typeof (lineColumnMatch[1]) === 'string') { - lineNumber = parseInt(lineColumnMatch[1], 10); - lineNumber = isNaN(lineNumber) ? undefined : lineNumber - 1; - } - if (typeof (lineColumnMatch[2]) === 'string') { - columnNumber = parseInt(lineColumnMatch[2], 10); - columnNumber = isNaN(columnNumber) ? undefined : columnNumber - 1; - } - let url = beforePath + pathAndAfter.substring(0, pathAndAfter.length - lineColumnMatch[0].length); - if (lineColumnMatch[1] === undefined && lineColumnMatch[2] === undefined) { - const wasmCodeOffsetRegex = /wasm-function\[\d+\]:0x([a-z0-9]+)$/g; - const wasmCodeOffsetMatch = wasmCodeOffsetRegex.exec(pathAndAfter); - if (wasmCodeOffsetMatch && typeof (wasmCodeOffsetMatch[1]) === 'string') { - url = ParsedURL.removeWasmFunctionInfoFromURL(url); - columnNumber = parseInt(wasmCodeOffsetMatch[1], 16); - columnNumber = isNaN(columnNumber) ? undefined : columnNumber; - } - } - return { url, lineNumber, columnNumber }; - } - static removeWasmFunctionInfoFromURL(url) { - const wasmFunctionRegEx = /:wasm-function\[\d+\]/; - const wasmFunctionIndex = url.search(wasmFunctionRegEx); - if (wasmFunctionIndex === -1) { - return url; - } - return ParsedURL.substring(url, 0, wasmFunctionIndex); - } - static beginsWithWindowsDriveLetter(url) { - return /^[A-Za-z]:/.test(url); - } - static beginsWithScheme(url) { - return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(url); - } - static isRelativeURL(url) { - return !this.beginsWithScheme(url) || this.beginsWithWindowsDriveLetter(url); - } - get displayName() { - if (this.#displayName) { - return this.#displayName; - } - if (this.isDataURL()) { - return this.dataURLDisplayName(); - } - if (this.isBlobURL()) { - return this.url; - } - if (this.isAboutBlank()) { - return this.url; - } - this.#displayName = this.lastPathComponent; - if (!this.#displayName) { - this.#displayName = (this.host || '') + '/'; - } - if (this.#displayName === '/') { - this.#displayName = this.url; - } - return this.#displayName; - } - dataURLDisplayName() { - if (this.#dataURLDisplayName) { - return this.#dataURLDisplayName; - } - if (!this.isDataURL()) { - return ''; - } - this.#dataURLDisplayName = trimEndWithMaxLength(this.url, 20); - return this.#dataURLDisplayName; - } - isAboutBlank() { - return this.url === 'about:blank'; - } - isDataURL() { - return this.scheme === 'data'; - } - extractDataUrlMimeType() { - const regexp = /^data:((?\w+)\/(?\w+))?(;base64)?,/; - const match = this.url.match(regexp); - return { - type: match?.groups?.type, - subtype: match?.groups?.subtype, - }; - } - isBlobURL() { - return this.url.startsWith('blob:'); - } - lastPathComponentWithFragment() { - return this.lastPathComponent + (this.fragment ? '#' + this.fragment : ''); - } - domain() { - if (this.isDataURL()) { - return 'data:'; - } - return this.host + (this.port ? ':' + this.port : ''); - } - securityOrigin() { - if (this.isDataURL()) { - return 'data:'; - } - const scheme = this.isBlobURL() ? this.blobInnerScheme : this.scheme; - return scheme + '://' + this.domain(); - } - urlWithoutScheme() { - if (this.scheme && this.url.startsWith(this.scheme + '://')) { - return this.url.substring(this.scheme.length + 3); - } - return this.url; - } - static urlRegexInstance = null; -} - -var ParsedURL$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - ParsedURL: ParsedURL, - normalizePath: normalizePath, - schemeIs: schemeIs -}); - -// Copyright 2012 The Chromium Authors -class Progress { - totalWork = 0; - worked = 0; - title; - canceled = false; - done = false; -} -class CompositeProgress { - parent; - #children; - #childrenDone; - constructor(parent) { - this.parent = parent; - this.#children = []; - this.#childrenDone = 0; - this.parent.totalWork = 1; - this.parent.worked = 0; - } - childDone() { - if (++this.#childrenDone !== this.#children.length) { - return; - } - this.parent.done = true; - } - createSubProgress(weight) { - const child = new SubProgress(this, weight); - this.#children.push(child); - return child; - } - update() { - let totalWeights = 0; - let done = 0; - for (let i = 0; i < this.#children.length; ++i) { - const child = this.#children[i]; - if (child.totalWork) { - done += child.weight * child.worked / child.totalWork; - } - totalWeights += child.weight; - } - this.parent.worked = done / totalWeights; - } -} -class SubProgress { - #composite; - #weight; - #worked; - #totalWork; - constructor(composite, weight) { - this.#composite = composite; - this.#weight = weight || 1; - this.#worked = 0; - this.#totalWork = 0; - } - get canceled() { - return this.#composite.parent.canceled; - } - set title(title) { - this.#composite.parent.title = title; - } - set done(done) { - if (!done) { - return; - } - this.worked = this.#totalWork; - this.#composite.childDone(); - } - set totalWork(totalWork) { - this.#totalWork = totalWork; - this.#composite.update(); - } - set worked(worked) { - this.#worked = worked; - this.#composite.update(); - } - get weight() { - return this.#weight; - } - get worked() { - return this.#worked; - } - get totalWork() { - return this.#totalWork; - } -} -class ProgressProxy { - #delegate; - #doneCallback; - #updateCallback; - constructor(delegate, doneCallback, updateCallback) { - this.#delegate = delegate; - this.#doneCallback = doneCallback; - this.#updateCallback = updateCallback; - } - get canceled() { - return this.#delegate ? this.#delegate.canceled : false; - } - set title(title) { - if (this.#delegate) { - this.#delegate.title = title; - } - if (this.#updateCallback) { - this.#updateCallback(); - } - } - get title() { - return this.#delegate?.title ?? ''; - } - set done(done) { - if (this.#delegate) { - this.#delegate.done = done; - } - if (done && this.#doneCallback) { - this.#doneCallback(); - } - } - get done() { - return this.#delegate ? this.#delegate.done : false; - } - set totalWork(totalWork) { - if (this.#delegate) { - this.#delegate.totalWork = totalWork; - } - if (this.#updateCallback) { - this.#updateCallback(); - } - } - get totalWork() { - return this.#delegate ? this.#delegate.totalWork : 0; - } - set worked(worked) { - if (this.#delegate) { - this.#delegate.worked = worked; - } - if (this.#updateCallback) { - this.#updateCallback?.(); - } - } - get worked() { - return this.#delegate ? this.#delegate.worked : 0; - } -} - -var Progress$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - CompositeProgress: CompositeProgress, - Progress: Progress, - ProgressProxy: ProgressProxy, - SubProgress: SubProgress -}); - -// Copyright 2021 The Chromium Authors -class ResolverBase { - #unresolvedIds = new Map(); - async waitFor(id) { - const obj = this.getForId(id); - if (!obj) { - return await this.getOrCreatePromise(id); - } - return obj; - } - tryGet(id, callback) { - const obj = this.getForId(id); - if (!obj) { - const swallowTheError = () => { }; - void this.getOrCreatePromise(id).catch(swallowTheError).then(obj => { - if (obj) { - callback(obj); - } - }); - return null; - } - return obj; - } - clear() { - this.stopListening(); - for (const [id, { reject }] of this.#unresolvedIds.entries()) { - reject(new Error(`Object with ${id} never resolved.`)); - } - this.#unresolvedIds.clear(); - } - getOrCreatePromise(id) { - const promiseInfo = this.#unresolvedIds.get(id); - if (promiseInfo) { - return promiseInfo.promise; - } - const { resolve, reject, promise } = Promise.withResolvers(); - this.#unresolvedIds.set(id, { promise, resolve, reject }); - this.startListening(); - return promise; - } - onResolve(id, t) { - const promiseInfo = this.#unresolvedIds.get(id); - this.#unresolvedIds.delete(id); - if (this.#unresolvedIds.size === 0) { - this.stopListening(); - } - promiseInfo?.resolve(t); - } -} - -var ResolverBase$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - ResolverBase: ResolverBase -}); - -// Copyright 2021 The Chromium Authors -/* - * Copyright (C) 2012 Google Inc. All rights reserved. - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -const UIStrings$1b = { - fetchAndXHR: '`Fetch` and `XHR`', - javascript: 'JavaScript', - js: 'JS', - css: 'CSS', - img: 'Img', - media: 'Media', - font: 'Font', - doc: 'Doc', - socketShort: 'Socket', - webassembly: 'WebAssembly', - wasm: 'Wasm', - manifest: 'Manifest', - other: 'Other', - document: 'Document', - stylesheet: 'Stylesheet', - image: 'Image', - script: 'Script', - texttrack: 'TextTrack', - fetch: 'Fetch', - eventsource: 'EventSource', - websocket: 'WebSocket', - webtransport: 'WebTransport', - directsocket: 'DirectSocket', - signedexchange: 'SignedExchange', - ping: 'Ping', - cspviolationreport: 'CSPViolationReport', - preflight: 'Preflight', - fedcm: 'FedCM', -}; -const str_$1a = registerUIStrings('core/common/ResourceType.ts', UIStrings$1b); -const i18nLazyString$g = getLazilyComputedLocalizedString.bind(undefined, str_$1a); -class ResourceType { - #name; - #title; - #category; - #isTextType; - constructor(name, title, category, isTextType) { - this.#name = name; - this.#title = title; - this.#category = category; - this.#isTextType = isTextType; - } - static fromMimeType(mimeType) { - if (!mimeType) { - return resourceTypes.Other; - } - if (mimeType.startsWith('text/html')) { - return resourceTypes.Document; - } - if (mimeType.startsWith('text/css')) { - return resourceTypes.Stylesheet; - } - if (mimeType.startsWith('image/')) { - return resourceTypes.Image; - } - if (mimeType.startsWith('text/')) { - return resourceTypes.Script; - } - if (mimeType.includes('font')) { - return resourceTypes.Font; - } - if (mimeType.includes('script')) { - return resourceTypes.Script; - } - if (mimeType.includes('octet')) { - return resourceTypes.Other; - } - if (mimeType.includes('application')) { - return resourceTypes.Script; - } - return resourceTypes.Other; - } - static fromMimeTypeOverride(mimeType) { - if (mimeType === 'application/manifest+json') { - return resourceTypes.Manifest; - } - if (mimeType === 'application/wasm') { - return resourceTypes.Wasm; - } - return null; - } - static fromURL(url) { - return resourceTypeByExtension.get(ParsedURL.extractExtension(url)) || null; - } - static fromName(name) { - for (const resourceType of Object.values(resourceTypes)) { - if (resourceType.name() === name) { - return resourceType; - } - } - return null; - } - static mimeFromURL(url) { - if (url.startsWith('snippet://') || url.startsWith('debugger://')) { - return 'text/javascript'; - } - const name = ParsedURL.extractName(url); - if (mimeTypeByName.has(name)) { - return mimeTypeByName.get(name); - } - let ext = ParsedURL.extractExtension(url).toLowerCase(); - if (ext === 'html' && name.endsWith('.component.html')) { - ext = 'component.html'; - } - return mimeTypeByExtension.get(ext); - } - static mimeFromExtension(ext) { - return mimeTypeByExtension.get(ext); - } - static simplifyContentType(contentType) { - const regex = new RegExp('^application(.*json$|\/json\+.*)'); - return regex.test(contentType) ? 'application/json' : contentType; - } - static isJavaScriptMimeType(mimeType) { - return mimeType === 'application/javascript' || mimeType === 'text/javascript'; - } - static mediaTypeForMetrics(mimeType, isFromSourceMap, isMinified, isSnippet, isDebugger) { - if (mimeType !== 'text/javascript') { - return mimeType; - } - if (isFromSourceMap) { - return 'text/javascript+sourcemapped'; - } - if (isMinified) { - return 'text/javascript+minified'; - } - if (isSnippet) { - return 'text/javascript+snippet'; - } - if (isDebugger) { - return 'text/javascript+eval'; - } - return 'text/javascript+plain'; - } - name() { - return this.#name; - } - title() { - return this.#title(); - } - category() { - return this.#category; - } - isTextType() { - return this.#isTextType; - } - isScript() { - return this.#name === 'script' || this.#name === 'sm-script'; - } - hasScripts() { - return this.isScript() || this.isDocument(); - } - isStyleSheet() { - return this.#name === 'stylesheet' || this.#name === 'sm-stylesheet'; - } - hasStyleSheets() { - return this.isStyleSheet() || this.isDocument(); - } - isDocument() { - return this.#name === 'document'; - } - isDocumentOrScriptOrStyleSheet() { - return this.isDocument() || this.isScript() || this.isStyleSheet(); - } - isFont() { - return this.#name === 'font'; - } - isImage() { - return this.#name === 'image'; - } - isFromSourceMap() { - return this.#name.startsWith('sm-'); - } - toString() { - return this.#name; - } - canonicalMimeType() { - if (this.isDocument()) { - return 'text/html'; - } - if (this.isScript()) { - return 'text/javascript'; - } - if (this.isStyleSheet()) { - return 'text/css'; - } - return ''; - } -} -class ResourceCategory { - name; - title; - shortTitle; - constructor(name, title, shortTitle) { - this.name = name; - this.title = title; - this.shortTitle = shortTitle; - } -} -const resourceCategories = { - XHR: new ResourceCategory('Fetch and XHR', i18nLazyString$g(UIStrings$1b.fetchAndXHR), lockedLazyString('Fetch/XHR')), - Document: new ResourceCategory(UIStrings$1b.document, i18nLazyString$g(UIStrings$1b.document), i18nLazyString$g(UIStrings$1b.doc)), - Stylesheet: new ResourceCategory(UIStrings$1b.css, i18nLazyString$g(UIStrings$1b.css), i18nLazyString$g(UIStrings$1b.css)), - Script: new ResourceCategory(UIStrings$1b.javascript, i18nLazyString$g(UIStrings$1b.javascript), i18nLazyString$g(UIStrings$1b.js)), - Font: new ResourceCategory(UIStrings$1b.font, i18nLazyString$g(UIStrings$1b.font), i18nLazyString$g(UIStrings$1b.font)), - Image: new ResourceCategory(UIStrings$1b.image, i18nLazyString$g(UIStrings$1b.image), i18nLazyString$g(UIStrings$1b.img)), - Media: new ResourceCategory(UIStrings$1b.media, i18nLazyString$g(UIStrings$1b.media), i18nLazyString$g(UIStrings$1b.media)), - Manifest: new ResourceCategory(UIStrings$1b.manifest, i18nLazyString$g(UIStrings$1b.manifest), i18nLazyString$g(UIStrings$1b.manifest)), - Socket: new ResourceCategory('Socket', lockedLazyString('WebSocket | WebTransport | DirectSocket'), i18nLazyString$g(UIStrings$1b.socketShort)), - Wasm: new ResourceCategory(UIStrings$1b.webassembly, i18nLazyString$g(UIStrings$1b.webassembly), i18nLazyString$g(UIStrings$1b.wasm)), - Other: new ResourceCategory(UIStrings$1b.other, i18nLazyString$g(UIStrings$1b.other), i18nLazyString$g(UIStrings$1b.other)), -}; -const resourceTypes = { - Document: new ResourceType('document', i18nLazyString$g(UIStrings$1b.document), resourceCategories.Document, true), - Stylesheet: new ResourceType('stylesheet', i18nLazyString$g(UIStrings$1b.stylesheet), resourceCategories.Stylesheet, true), - Image: new ResourceType('image', i18nLazyString$g(UIStrings$1b.image), resourceCategories.Image, false), - Media: new ResourceType('media', i18nLazyString$g(UIStrings$1b.media), resourceCategories.Media, false), - Font: new ResourceType('font', i18nLazyString$g(UIStrings$1b.font), resourceCategories.Font, false), - Script: new ResourceType('script', i18nLazyString$g(UIStrings$1b.script), resourceCategories.Script, true), - TextTrack: new ResourceType('texttrack', i18nLazyString$g(UIStrings$1b.texttrack), resourceCategories.Other, true), - XHR: new ResourceType('xhr', lockedLazyString('XHR'), resourceCategories.XHR, true), - Fetch: new ResourceType('fetch', i18nLazyString$g(UIStrings$1b.fetch), resourceCategories.XHR, true), - Prefetch: new ResourceType('prefetch', lockedLazyString('Prefetch'), resourceCategories.Document, true), - EventSource: new ResourceType('eventsource', i18nLazyString$g(UIStrings$1b.eventsource), resourceCategories.XHR, true), - WebSocket: new ResourceType('websocket', i18nLazyString$g(UIStrings$1b.websocket), resourceCategories.Socket, false), - WebTransport: new ResourceType('webtransport', i18nLazyString$g(UIStrings$1b.webtransport), resourceCategories.Socket, false), - DirectSocket: new ResourceType('directsocket', i18nLazyString$g(UIStrings$1b.directsocket), resourceCategories.Socket, false), - Wasm: new ResourceType('wasm', i18nLazyString$g(UIStrings$1b.wasm), resourceCategories.Wasm, false), - Manifest: new ResourceType('manifest', i18nLazyString$g(UIStrings$1b.manifest), resourceCategories.Manifest, true), - SignedExchange: new ResourceType('signed-exchange', i18nLazyString$g(UIStrings$1b.signedexchange), resourceCategories.Other, false), - Ping: new ResourceType('ping', i18nLazyString$g(UIStrings$1b.ping), resourceCategories.Other, false), - CSPViolationReport: new ResourceType('csp-violation-report', i18nLazyString$g(UIStrings$1b.cspviolationreport), resourceCategories.Other, false), - Other: new ResourceType('other', i18nLazyString$g(UIStrings$1b.other), resourceCategories.Other, false), - Preflight: new ResourceType('preflight', i18nLazyString$g(UIStrings$1b.preflight), resourceCategories.Other, true), - SourceMapScript: new ResourceType('sm-script', i18nLazyString$g(UIStrings$1b.script), resourceCategories.Script, true), - SourceMapStyleSheet: new ResourceType('sm-stylesheet', i18nLazyString$g(UIStrings$1b.stylesheet), resourceCategories.Stylesheet, true), - FedCM: new ResourceType('fedcm', i18nLazyString$g(UIStrings$1b.fedcm), resourceCategories.Other, false), -}; -const mimeTypeByName = new Map([ - ['Cakefile', 'text/x-coffeescript'], -]); -const resourceTypeByExtension = new Map([ - ['js', resourceTypes.Script], - ['mjs', resourceTypes.Script], - ['css', resourceTypes.Stylesheet], - ['xsl', resourceTypes.Stylesheet], - ['avif', resourceTypes.Image], - ['bmp', resourceTypes.Image], - ['gif', resourceTypes.Image], - ['ico', resourceTypes.Image], - ['jpeg', resourceTypes.Image], - ['jpg', resourceTypes.Image], - ['jxl', resourceTypes.Image], - ['png', resourceTypes.Image], - ['svg', resourceTypes.Image], - ['tif', resourceTypes.Image], - ['tiff', resourceTypes.Image], - ['vue', resourceTypes.Document], - ['webmanifest', resourceTypes.Manifest], - ['webp', resourceTypes.Media], - ['otf', resourceTypes.Font], - ['ttc', resourceTypes.Font], - ['ttf', resourceTypes.Font], - ['woff', resourceTypes.Font], - ['woff2', resourceTypes.Font], - ['wasm', resourceTypes.Wasm], -]); -const mimeTypeByExtension = new Map([ - ['js', 'text/javascript'], - ['mjs', 'text/javascript'], - ['css', 'text/css'], - ['html', 'text/html'], - ['htm', 'text/html'], - ['xml', 'application/xml'], - ['xsl', 'application/xml'], - ['wasm', 'application/wasm'], - ['webmanifest', 'application/manifest+json'], - ['asp', 'application/x-aspx'], - ['aspx', 'application/x-aspx'], - ['jsp', 'application/x-jsp'], - ['c', 'text/x-c++src'], - ['cc', 'text/x-c++src'], - ['cpp', 'text/x-c++src'], - ['h', 'text/x-c++src'], - ['m', 'text/x-c++src'], - ['mm', 'text/x-c++src'], - ['coffee', 'text/x-coffeescript'], - ['dart', 'application/vnd.dart'], - ['ts', 'text/typescript'], - ['tsx', 'text/typescript-jsx'], - ['json', 'application/json'], - ['gyp', 'application/json'], - ['gypi', 'application/json'], - ['map', 'application/json'], - ['cs', 'text/x-csharp'], - ['go', 'text/x-go'], - ['java', 'text/x-java'], - ['kt', 'text/x-kotlin'], - ['scala', 'text/x-scala'], - ['less', 'text/x-less'], - ['php', 'application/x-httpd-php'], - ['phtml', 'application/x-httpd-php'], - ['py', 'text/x-python'], - ['sh', 'text/x-sh'], - ['gss', 'text/x-gss'], - ['sass', 'text/x-sass'], - ['scss', 'text/x-scss'], - ['vtt', 'text/vtt'], - ['ls', 'text/x-livescript'], - ['md', 'text/markdown'], - ['cljs', 'text/x-clojure'], - ['cljc', 'text/x-clojure'], - ['cljx', 'text/x-clojure'], - ['styl', 'text/x-styl'], - ['jsx', 'text/jsx'], - ['avif', 'image/avif'], - ['bmp', 'image/bmp'], - ['gif', 'image/gif'], - ['ico', 'image/ico'], - ['jpeg', 'image/jpeg'], - ['jpg', 'image/jpeg'], - ['jxl', 'image/jxl'], - ['png', 'image/png'], - ['svg', 'image/svg+xml'], - ['tif', 'image/tif'], - ['tiff', 'image/tiff'], - ['webp', 'image/webp'], - ['otf', 'font/otf'], - ['ttc', 'font/collection'], - ['ttf', 'font/ttf'], - ['woff', 'font/woff'], - ['woff2', 'font/woff2'], - ['component.html', 'text/x.angular'], - ['svelte', 'text/x.svelte'], - ['vue', 'text/x.vue'], -]); - -var ResourceType$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - ResourceCategory: ResourceCategory, - ResourceType: ResourceType, - mimeTypeByExtension: mimeTypeByExtension, - resourceCategories: resourceCategories, - resourceTypeByExtension: resourceTypeByExtension, - resourceTypes: resourceTypes -}); - -// Copyright 2025 The Chromium Authors -class ReturnToPanelFlavor { - viewId; - constructor(viewId) { - this.viewId = viewId; - } -} - -var ReturnToPanel = /*#__PURE__*/Object.freeze({ - __proto__: null, - ReturnToPanelFlavor: ReturnToPanelFlavor -}); - -// Copyright 2019 The Chromium Authors -const registeredLateInitializationRunnables = new Map(); -function registerLateInitializationRunnable(setting) { - const { id, loadRunnable } = setting; - if (registeredLateInitializationRunnables.has(id)) { - throw new Error(`Duplicate late Initializable runnable id '${id}'`); - } - registeredLateInitializationRunnables.set(id, loadRunnable); -} -function maybeRemoveLateInitializationRunnable(runnableId) { - return registeredLateInitializationRunnables.delete(runnableId); -} -function lateInitializationRunnables() { - return [...registeredLateInitializationRunnables.values()]; -} -const registeredEarlyInitializationRunnables = []; -function registerEarlyInitializationRunnable(runnable) { - registeredEarlyInitializationRunnables.push(runnable); -} -function earlyInitializationRunnables() { - return registeredEarlyInitializationRunnables; -} - -var Runnable = /*#__PURE__*/Object.freeze({ - __proto__: null, - earlyInitializationRunnables: earlyInitializationRunnables, - lateInitializationRunnables: lateInitializationRunnables, - maybeRemoveLateInitializationRunnable: maybeRemoveLateInitializationRunnable, - registerEarlyInitializationRunnable: registerEarlyInitializationRunnable, - registerLateInitializationRunnable: registerLateInitializationRunnable -}); - -// Copyright 2016 The Chromium Authors -class Segment { - begin; - end; - data; - constructor(begin, end, data) { - if (begin > end) { - throw new Error('Invalid segment'); - } - this.begin = begin; - this.end = end; - this.data = data; - } - intersects(that) { - return this.begin < that.end && that.begin < this.end; - } -} -class SegmentedRange { - #segments = []; - #mergeCallback; - constructor(mergeCallback) { - this.#mergeCallback = mergeCallback; - } - append(newSegment) { - let startIndex = lowerBound(this.#segments, newSegment, (a, b) => a.begin - b.begin); - let endIndex = startIndex; - let merged = null; - if (startIndex > 0) { - const precedingSegment = this.#segments[startIndex - 1]; - merged = this.tryMerge(precedingSegment, newSegment); - if (merged) { - --startIndex; - newSegment = merged; - } - else if (this.#segments[startIndex - 1].end >= newSegment.begin) { - if (newSegment.end < precedingSegment.end) { - this.#segments.splice(startIndex, 0, new Segment(newSegment.end, precedingSegment.end, precedingSegment.data)); - } - precedingSegment.end = newSegment.begin; - } - } - while (endIndex < this.#segments.length && this.#segments[endIndex].end <= newSegment.end) { - ++endIndex; - } - if (endIndex < this.#segments.length) { - merged = this.tryMerge(newSegment, this.#segments[endIndex]); - if (merged) { - endIndex++; - newSegment = merged; - } - else if (newSegment.intersects(this.#segments[endIndex])) { - this.#segments[endIndex].begin = newSegment.end; - } - } - this.#segments.splice(startIndex, endIndex - startIndex, newSegment); - } - segments() { - return this.#segments; - } - tryMerge(first, second) { - const merged = this.#mergeCallback && this.#mergeCallback(first, second); - if (!merged) { - return null; - } - merged.begin = first.begin; - merged.end = Math.max(first.end, second.end); - return merged; - } -} - -var SegmentedRange$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Segment: Segment, - SegmentedRange: SegmentedRange -}); - -// Copyright 2020 The Chromium Authors -const UIStrings$1a = { - elements: 'Elements', - ai: 'AI', - appearance: 'Appearance', - sources: 'Sources', - network: 'Network', - performance: 'Performance', - console: 'Console', - persistence: 'Persistence', - debugger: 'Debugger', - global: 'Global', - rendering: 'Rendering', - grid: 'Grid', - mobile: 'Mobile', - memory: 'Memory', - extension: 'Extension', - adorner: 'Adorner', - account: 'Account', - privacy: 'Privacy', -}; -const str_$19 = registerUIStrings('core/common/SettingRegistration.ts', UIStrings$1a); -const i18nString$S = getLocalizedString.bind(undefined, str_$19); -let registeredSettings = []; -const settingNameSet = new Set(); -function registerSettingExtension(registration) { - const settingName = registration.settingName; - if (settingNameSet.has(settingName)) { - throw new Error(`Duplicate setting name '${settingName}'`); - } - settingNameSet.add(settingName); - registeredSettings.push(registration); -} -function getRegisteredSettings() { - return registeredSettings.filter(setting => Runtime.isDescriptorEnabled(setting)); -} -function registerSettingsForTest(settings, forceReset = false) { - if (registeredSettings.length === 0 || forceReset) { - registeredSettings = settings; - settingNameSet.clear(); - for (const setting of settings) { - const settingName = setting.settingName; - if (settingNameSet.has(settingName)) { - throw new Error(`Duplicate setting name '${settingName}'`); - } - settingNameSet.add(settingName); - } - } -} -function resetSettings() { - registeredSettings = []; - settingNameSet.clear(); -} -function maybeRemoveSettingExtension(settingName) { - const settingIndex = registeredSettings.findIndex(setting => setting.settingName === settingName); - if (settingIndex < 0 || !settingNameSet.delete(settingName)) { - return false; - } - registeredSettings.splice(settingIndex, 1); - return true; -} -function getLocalizedSettingsCategory(category) { - switch (category) { - case "ELEMENTS" : - return i18nString$S(UIStrings$1a.elements); - case "AI" : - return i18nString$S(UIStrings$1a.ai); - case "APPEARANCE" : - return i18nString$S(UIStrings$1a.appearance); - case "SOURCES" : - return i18nString$S(UIStrings$1a.sources); - case "NETWORK" : - return i18nString$S(UIStrings$1a.network); - case "PERFORMANCE" : - return i18nString$S(UIStrings$1a.performance); - case "CONSOLE" : - return i18nString$S(UIStrings$1a.console); - case "PERSISTENCE" : - return i18nString$S(UIStrings$1a.persistence); - case "DEBUGGER" : - return i18nString$S(UIStrings$1a.debugger); - case "GLOBAL" : - return i18nString$S(UIStrings$1a.global); - case "RENDERING" : - return i18nString$S(UIStrings$1a.rendering); - case "GRID" : - return i18nString$S(UIStrings$1a.grid); - case "MOBILE" : - return i18nString$S(UIStrings$1a.mobile); - case "EMULATION" : - return i18nString$S(UIStrings$1a.console); - case "MEMORY" : - return i18nString$S(UIStrings$1a.memory); - case "EXTENSIONS" : - return i18nString$S(UIStrings$1a.extension); - case "ADORNER" : - return i18nString$S(UIStrings$1a.adorner); - case "" : - return lockedString(''); - case "ACCOUNT" : - return i18nString$S(UIStrings$1a.account); - case "PRIVACY" : - return i18nString$S(UIStrings$1a.privacy); - } -} - -var SettingRegistration = /*#__PURE__*/Object.freeze({ - __proto__: null, - getLocalizedSettingsCategory: getLocalizedSettingsCategory, - getRegisteredSettings: getRegisteredSettings, - maybeRemoveSettingExtension: maybeRemoveSettingExtension, - registerSettingExtension: registerSettingExtension, - registerSettingsForTest: registerSettingsForTest, - resetSettings: resetSettings -}); - -// Copyright 2009 The Chromium Authors -class Settings { - syncedStorage; - globalStorage; - localStorage; - #settingRegistrations; - #sessionStorage = new SettingsStorage({}); - settingNameSet = new Set(); - orderValuesBySettingCategory = new Map(); - #eventSupport = new ObjectWrapper(); - #registry = new Map(); - moduleSettings = new Map(); - #logSettingAccess; - constructor({ syncedStorage, globalStorage, localStorage, settingRegistrations, logSettingAccess, runSettingsMigration }) { - this.syncedStorage = syncedStorage; - this.globalStorage = globalStorage; - this.localStorage = localStorage; - this.#settingRegistrations = settingRegistrations; - this.#logSettingAccess = logSettingAccess; - for (const registration of this.#settingRegistrations) { - const { settingName, defaultValue, storageType } = registration; - const isRegex = registration.settingType === "regex" ; - const evaluatedDefaultValue = typeof defaultValue === 'function' ? defaultValue(hostConfig) : defaultValue; - const setting = isRegex && typeof evaluatedDefaultValue === 'string' ? - this.createRegExpSetting(settingName, evaluatedDefaultValue, undefined, storageType) : - this.createSetting(settingName, evaluatedDefaultValue, storageType); - setting.setTitleFunction(registration.title); - if (registration.userActionCondition) { - setting.setRequiresUserAction(Boolean(Runtime.queryParam(registration.userActionCondition))); - } - setting.setRegistration(registration); - this.registerModuleSetting(setting); - } - if (runSettingsMigration) { - new VersionController(this).updateVersion(); - } - } - getRegisteredSettings() { - return this.#settingRegistrations; - } - static hasInstance() { - return globalInstance().has(Settings); - } - static instance(opts = { forceNew: null, syncedStorage: null, globalStorage: null, localStorage: null, settingRegistrations: null }) { - const { forceNew, syncedStorage, globalStorage, localStorage, settingRegistrations, logSettingAccess, runSettingsMigration } = opts; - if (!globalInstance().has(Settings) || forceNew) { - if (!syncedStorage || !globalStorage || !localStorage || !settingRegistrations) { - throw new Error(`Unable to create settings: global and local storage must be provided: ${new Error().stack}`); - } - globalInstance().set(Settings, new Settings({ - syncedStorage, - globalStorage, - localStorage, - settingRegistrations, - logSettingAccess, - runSettingsMigration - })); - } - return globalInstance().get(Settings); - } - static removeInstance() { - globalInstance().delete(Settings); - } - registerModuleSetting(setting) { - const settingName = setting.name; - const category = setting.category(); - const order = setting.order(); - if (this.settingNameSet.has(settingName)) { - throw new Error(`Duplicate Setting name '${settingName}'`); - } - if (category && order) { - const orderValues = this.orderValuesBySettingCategory.get(category) || new Set(); - if (orderValues.has(order)) { - throw new Error(`Duplicate order value '${order}' for settings category '${category}'`); - } - orderValues.add(order); - this.orderValuesBySettingCategory.set(category, orderValues); - } - this.settingNameSet.add(settingName); - this.moduleSettings.set(setting.name, setting); - } - static normalizeSettingName(name) { - if ([ - VersionController.GLOBAL_VERSION_SETTING_NAME, - VersionController.SYNCED_VERSION_SETTING_NAME, - VersionController.LOCAL_VERSION_SETTING_NAME, - 'currentDockState', - 'isUnderTest', - ].includes(name)) { - return name; - } - return toKebabCase(name); - } - moduleSetting(settingName) { - const setting = this.moduleSettings.get(settingName); - if (!setting) { - throw new Error('No setting registered: ' + settingName); - } - return setting; - } - settingForTest(settingName) { - const setting = this.#registry.get(settingName); - if (!setting) { - throw new Error('No setting registered: ' + settingName); - } - return setting; - } - createSetting(key, defaultValue, storageType) { - const storage = this.storageFromType(storageType); - let setting = this.#registry.get(key); - if (!setting) { - setting = new Setting(key, defaultValue, this.#eventSupport, storage, this.#logSettingAccess); - this.#registry.set(key, setting); - } - return setting; - } - createLocalSetting(key, defaultValue) { - return this.createSetting(key, defaultValue, "Local" ); - } - createRegExpSetting(key, defaultValue, regexFlags, storageType) { - if (!this.#registry.get(key)) { - this.#registry.set(key, new RegExpSetting(key, defaultValue, this.#eventSupport, this.storageFromType(storageType), regexFlags, this.#logSettingAccess)); - } - return this.#registry.get(key); - } - clearAll() { - this.globalStorage.removeAll(); - this.syncedStorage.removeAll(); - this.localStorage.removeAll(); - new VersionController(this).resetToCurrent(); - } - storageFromType(storageType) { - switch (storageType) { - case "Local" : - return this.localStorage; - case "Session" : - return this.#sessionStorage; - case "Global" : - return this.globalStorage; - case "Synced" : - return this.syncedStorage; - } - return this.globalStorage; - } - getRegistry() { - return this.#registry; - } -} -class InMemoryStorage { - #store = new Map(); - register(_setting) { - } - set(key, value) { - this.#store.set(key, value); - } - get(key) { - return this.#store.get(key); - } - remove(key) { - this.#store.delete(key); - } - clear() { - this.#store.clear(); - } -} -class SettingsStorage { - object; - backingStore; - storagePrefix; - constructor(object, backingStore = new InMemoryStorage(), storagePrefix = '') { - this.object = object; - this.backingStore = backingStore; - this.storagePrefix = storagePrefix; - } - register(name) { - name = this.storagePrefix + name; - this.backingStore.register(name); - } - set(name, value) { - name = this.storagePrefix + name; - this.object[name] = value; - this.backingStore.set(name, value); - } - has(name) { - name = this.storagePrefix + name; - return name in this.object; - } - get(name) { - name = this.storagePrefix + name; - return this.object[name]; - } - async forceGet(originalName) { - const name = this.storagePrefix + originalName; - const value = await this.backingStore.get(name); - if (value && value !== this.object[name]) { - this.set(originalName, value); - } - else if (!value) { - this.remove(originalName); - } - return value; - } - remove(name) { - name = this.storagePrefix + name; - delete this.object[name]; - this.backingStore.remove(name); - } - removeAll() { - this.object = {}; - this.backingStore.clear(); - } - keys() { - return Object.keys(this.object); - } - dumpSizes() { - Console.instance().log('Ten largest settings: '); - const sizes = { __proto__: null }; - for (const key in this.object) { - sizes[key] = this.object[key].length; - } - const keys = Object.keys(sizes); - function comparator(key1, key2) { - return sizes[key2] - sizes[key1]; - } - keys.sort(comparator); - for (let i = 0; i < 10 && i < keys.length; ++i) { - Console.instance().log('Setting: \'' + keys[i] + '\', size: ' + sizes[keys[i]]); - } - } -} -class Deprecation { - disabled; - warning; - experiment; - constructor({ deprecationNotice }) { - if (!deprecationNotice) { - throw new Error('Cannot create deprecation info for a non-deprecated setting'); - } - this.disabled = deprecationNotice.disabled; - this.warning = deprecationNotice.warning(); - this.experiment = deprecationNotice.experiment ? - experiments.allConfigurableExperiments().find(e => e.name === deprecationNotice.experiment) : - undefined; - } -} -class Setting { - name; - defaultValue; - eventSupport; - storage; - #titleFunction; - #title; - #registration = null; - #requiresUserAction; - #value; - #serializer = JSON; - #hadUserAction; - #disabled; - #deprecation = null; - #loggedInitialAccess = false; - #logSettingAccess; - constructor(name, defaultValue, eventSupport, storage, logSettingAccess) { - this.name = name; - this.defaultValue = defaultValue; - this.eventSupport = eventSupport; - this.storage = storage; - storage.register(this.name); - this.#logSettingAccess = logSettingAccess; - } - setSerializer(serializer) { - this.#serializer = serializer; - } - addChangeListener(listener, thisObject) { - return this.eventSupport.addEventListener(this.name, listener, thisObject); - } - removeChangeListener(listener, thisObject) { - this.eventSupport.removeEventListener(this.name, listener, thisObject); - } - title() { - if (this.#title) { - return this.#title; - } - if (this.#titleFunction) { - return this.#titleFunction(); - } - return ''; - } - setTitleFunction(titleFunction) { - if (titleFunction) { - this.#titleFunction = titleFunction; - } - } - setTitle(title) { - this.#title = title; - } - setRequiresUserAction(requiresUserAction) { - this.#requiresUserAction = requiresUserAction; - } - disabled() { - if (this.#registration?.disabledCondition) { - const { disabled } = this.#registration.disabledCondition(hostConfig); - if (disabled) { - return true; - } - } - return this.#disabled || false; - } - disabledReasons() { - if (this.#registration?.disabledCondition) { - const result = this.#registration.disabledCondition(hostConfig); - if (result.disabled) { - return result.reasons; - } - } - return []; - } - setDisabled(disabled) { - this.#disabled = disabled; - this.eventSupport.dispatchEventToListeners(this.name); - } - #maybeLogAccess(value) { - try { - const valueToLog = typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' ? - value : - this.#serializer?.stringify(value); - if (valueToLog !== undefined && this.#logSettingAccess) { - void this.#logSettingAccess(this.name, valueToLog); - } - } - catch { - } - } - #maybeLogInitialAccess(value) { - if (!this.#loggedInitialAccess) { - this.#maybeLogAccess(value); - this.#loggedInitialAccess = true; - } - } - get() { - if (this.#requiresUserAction && !this.#hadUserAction) { - this.#maybeLogInitialAccess(this.defaultValue); - return this.defaultValue; - } - if (typeof this.#value !== 'undefined') { - this.#maybeLogInitialAccess(this.#value); - return this.#value; - } - this.#value = this.defaultValue; - if (this.storage.has(this.name)) { - try { - this.#value = this.#serializer.parse(this.storage.get(this.name)); - } - catch { - this.storage.remove(this.name); - } - } - this.#maybeLogInitialAccess(this.#value); - return this.#value; - } - getIfNotDisabled() { - if (this.disabled()) { - return; - } - return this.get(); - } - async forceGet() { - const name = this.name; - const oldValue = this.storage.get(name); - const value = await this.storage.forceGet(name); - this.#value = this.defaultValue; - if (value) { - try { - this.#value = this.#serializer.parse(value); - } - catch { - this.storage.remove(this.name); - } - } - if (oldValue !== value) { - this.eventSupport.dispatchEventToListeners(this.name, this.#value); - } - this.#maybeLogInitialAccess(this.#value); - return this.#value; - } - set(value) { - this.#maybeLogAccess(value); - this.#hadUserAction = true; - this.#value = value; - try { - const settingString = this.#serializer.stringify(value); - try { - this.storage.set(this.name, settingString); - } - catch (e) { - this.printSettingsSavingError(e.message, settingString); - } - } - catch (e) { - Console.instance().error('Cannot stringify setting with name: ' + this.name + ', error: ' + e.message); - } - this.eventSupport.dispatchEventToListeners(this.name, value); - } - setRegistration(registration) { - this.#registration = registration; - const { deprecationNotice } = registration; - if (deprecationNotice?.disabled) { - const experiment = deprecationNotice.experiment ? - experiments.allConfigurableExperiments().find(e => e.name === deprecationNotice.experiment) : - undefined; - if ((!experiment || experiment.isEnabled())) { - this.set(this.defaultValue); - this.setDisabled(true); - } - } - } - type() { - if (this.#registration) { - return this.#registration.settingType; - } - return null; - } - options() { - if (this.#registration && this.#registration.options) { - return this.#registration.options.map(opt => { - const { value, title, text, raw } = opt; - return { - value, - title: title(), - text: typeof text === 'function' ? text() : text, - raw, - }; - }); - } - return []; - } - reloadRequired() { - if (this.#registration) { - return this.#registration.reloadRequired || null; - } - return null; - } - category() { - if (this.#registration) { - return this.#registration.category || null; - } - return null; - } - tags() { - if (this.#registration && this.#registration.tags) { - return this.#registration.tags.map(tag => tag()).join('\0'); - } - return null; - } - order() { - if (this.#registration) { - return this.#registration.order || null; - } - return null; - } - learnMore() { - return this.#registration?.learnMore ?? null; - } - get deprecation() { - if (!this.#registration || !this.#registration.deprecationNotice) { - return null; - } - if (!this.#deprecation) { - this.#deprecation = new Deprecation(this.#registration); - } - return this.#deprecation; - } - printSettingsSavingError(message, value) { - const errorMessage = 'Error saving setting with name: ' + this.name + ', value length: ' + value.length + '. Error: ' + message; - console.error(errorMessage); - Console.instance().error(errorMessage); - this.storage.dumpSizes(); - } -} -class RegExpSetting extends Setting { - #regexFlags; - #regex; - constructor(name, defaultValue, eventSupport, storage, regexFlags, logSettingAccess) { - super(name, defaultValue ? [{ pattern: defaultValue }] : [], eventSupport, storage, logSettingAccess); - this.#regexFlags = regexFlags; - } - get() { - const result = []; - const items = this.getAsArray(); - for (let i = 0; i < items.length; ++i) { - const item = items[i]; - if (item.pattern && !item.disabled) { - result.push(item.pattern); - } - } - return result.join('|'); - } - getAsArray() { - return super.get(); - } - set(value) { - this.setAsArray([{ pattern: value, disabled: false }]); - } - setAsArray(value) { - this.#regex = undefined; - super.set(value); - } - asRegExp() { - if (typeof this.#regex !== 'undefined') { - return this.#regex; - } - this.#regex = null; - try { - const pattern = this.get(); - if (pattern) { - this.#regex = new RegExp(pattern, this.#regexFlags || ''); - } - } - catch { - } - return this.#regex; - } -} -class VersionController { - static GLOBAL_VERSION_SETTING_NAME = 'inspectorVersion'; - static SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion'; - static LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion'; - static CURRENT_VERSION = 42; - #settings; - #globalVersionSetting; - #syncedVersionSetting; - #localVersionSetting; - constructor(settings) { - this.#settings = settings; - this.#globalVersionSetting = this.#settings.createSetting(VersionController.GLOBAL_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, "Global" ); - this.#syncedVersionSetting = this.#settings.createSetting(VersionController.SYNCED_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, "Synced" ); - this.#localVersionSetting = this.#settings.createSetting(VersionController.LOCAL_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, "Local" ); - } - resetToCurrent() { - this.#globalVersionSetting.set(VersionController.CURRENT_VERSION); - this.#syncedVersionSetting.set(VersionController.CURRENT_VERSION); - this.#localVersionSetting.set(VersionController.CURRENT_VERSION); - } - #removeSetting(setting) { - const name = setting.name; - this.#settings.getRegistry().delete(name); - this.#settings.moduleSettings.delete(name); - setting.storage.remove(name); - } - updateVersion() { - const currentVersion = VersionController.CURRENT_VERSION; - const minimumVersion = Math.min(this.#globalVersionSetting.get(), this.#syncedVersionSetting.get(), this.#localVersionSetting.get()); - const methodsToRun = this.methodsToRunToUpdateVersion(minimumVersion, currentVersion); - console.assert( - this[`updateVersionFrom${currentVersion}To${currentVersion + 1}`] === undefined, 'Unexpected migration method found. Increment CURRENT_VERSION or remove the method.'); - for (const method of methodsToRun) { - this[method].call(this); - } - this.resetToCurrent(); - } - methodsToRunToUpdateVersion(oldVersion, currentVersion) { - const result = []; - for (let i = oldVersion; i < currentVersion; ++i) { - result.push('updateVersionFrom' + i + 'To' + (i + 1)); - } - return result; - } - updateVersionFrom0To1() { - this.clearBreakpointsWhenTooMany(this.#settings.createLocalSetting('breakpoints', []), 500000); - } - updateVersionFrom1To2() { - this.#settings.createSetting('previouslyViewedFiles', []).set([]); - } - updateVersionFrom2To3() { - this.#settings.createSetting('fileSystemMapping', {}).set({}); - this.#removeSetting(this.#settings.createSetting('fileMappingEntries', [])); - } - updateVersionFrom3To4() { - const advancedMode = this.#settings.createSetting('showHeaSnapshotObjectsHiddenProperties', false); - this.#settings.moduleSetting('showAdvancedHeapSnapshotProperties').set(advancedMode.get()); - this.#removeSetting(advancedMode); - } - updateVersionFrom4To5() { - const settingNames = { - FileSystemViewSidebarWidth: 'fileSystemViewSplitViewState', - elementsSidebarWidth: 'elementsPanelSplitViewState', - StylesPaneSplitRatio: 'stylesPaneSplitViewState', - heapSnapshotRetainersViewSize: 'heapSnapshotSplitViewState', - 'InspectorView.splitView': 'InspectorView.splitViewState', - 'InspectorView.screencastSplitView': 'InspectorView.screencastSplitViewState', - 'Inspector.drawerSplitView': 'Inspector.drawerSplitViewState', - layerDetailsSplitView: 'layerDetailsSplitViewState', - networkSidebarWidth: 'networkPanelSplitViewState', - sourcesSidebarWidth: 'sourcesPanelSplitViewState', - scriptsPanelNavigatorSidebarWidth: 'sourcesPanelNavigatorSplitViewState', - sourcesPanelSplitSidebarRatio: 'sourcesPanelDebuggerSidebarSplitViewState', - 'timeline-details': 'timelinePanelDetailsSplitViewState', - 'timeline-split': 'timelinePanelRecorsSplitViewState', - 'timeline-view': 'timelinePanelTimelineStackSplitViewState', - auditsSidebarWidth: 'auditsPanelSplitViewState', - layersSidebarWidth: 'layersPanelSplitViewState', - profilesSidebarWidth: 'profilesPanelSplitViewState', - resourcesSidebarWidth: 'resourcesPanelSplitViewState', - }; - const empty = {}; - for (const oldName in settingNames) { - const newName = settingNames[oldName]; - const oldNameH = oldName + 'H'; - let newValue = null; - const oldSetting = this.#settings.createSetting(oldName, empty); - if (oldSetting.get() !== empty) { - newValue = newValue || {}; - newValue.vertical = {}; - newValue.vertical.size = oldSetting.get(); - this.#removeSetting(oldSetting); - } - const oldSettingH = this.#settings.createSetting(oldNameH, empty); - if (oldSettingH.get() !== empty) { - newValue = newValue || {}; - newValue.horizontal = {}; - newValue.horizontal.size = oldSettingH.get(); - this.#removeSetting(oldSettingH); - } - if (newValue) { - this.#settings.createSetting(newName, {}).set(newValue); - } - } - } - updateVersionFrom5To6() { - const settingNames = { - debuggerSidebarHidden: 'sourcesPanelSplitViewState', - navigatorHidden: 'sourcesPanelNavigatorSplitViewState', - 'WebInspector.Drawer.showOnLoad': 'Inspector.drawerSplitViewState', - }; - for (const oldName in settingNames) { - const oldSetting = this.#settings.createSetting(oldName, null); - if (oldSetting.get() === null) { - this.#removeSetting(oldSetting); - continue; - } - const newName = settingNames[oldName]; - const invert = oldName === 'WebInspector.Drawer.showOnLoad'; - const hidden = oldSetting.get() !== invert; - this.#removeSetting(oldSetting); - const showMode = hidden ? 'OnlyMain' : 'Both'; - const newSetting = this.#settings.createSetting(newName, {}); - const newValue = newSetting.get() || {}; - newValue.vertical = newValue.vertical || {}; - newValue.vertical.showMode = showMode; - newValue.horizontal = newValue.horizontal || {}; - newValue.horizontal.showMode = showMode; - newSetting.set(newValue); - } - } - updateVersionFrom6To7() { - const settingNames = { - sourcesPanelNavigatorSplitViewState: 'sourcesPanelNavigatorSplitViewState', - elementsPanelSplitViewState: 'elementsPanelSplitViewState', - stylesPaneSplitViewState: 'stylesPaneSplitViewState', - sourcesPanelDebuggerSidebarSplitViewState: 'sourcesPanelDebuggerSidebarSplitViewState', - }; - const empty = {}; - for (const name in settingNames) { - const setting = this.#settings.createSetting(name, empty); - const value = setting.get(); - if (value === empty) { - continue; - } - if (value.vertical?.size && value.vertical.size < 1) { - value.vertical.size = 0; - } - if (value.horizontal?.size && value.horizontal.size < 1) { - value.horizontal.size = 0; - } - setting.set(value); - } - } - updateVersionFrom7To8() { - } - updateVersionFrom8To9() { - const settingNames = ['skipStackFramesPattern', 'workspaceFolderExcludePattern']; - for (let i = 0; i < settingNames.length; ++i) { - const setting = this.#settings.createSetting(settingNames[i], ''); - let value = setting.get(); - if (!value) { - return; - } - if (typeof value === 'string') { - value = [value]; - } - for (let j = 0; j < value.length; ++j) { - if (typeof value[j] === 'string') { - value[j] = { pattern: value[j] }; - } - } - setting.set(value); - } - } - updateVersionFrom9To10() { - if (!window.localStorage) { - return; - } - for (const key in window.localStorage) { - if (key.startsWith('revision-history')) { - window.localStorage.removeItem(key); - } - } - } - updateVersionFrom10To11() { - const oldSettingName = 'customDevicePresets'; - const newSettingName = 'customEmulatedDeviceList'; - const oldSetting = this.#settings.createSetting(oldSettingName, undefined); - const list = oldSetting.get(); - if (!Array.isArray(list)) { - return; - } - const newList = []; - for (let i = 0; i < list.length; ++i) { - const value = list[i]; - const device = {}; - device['title'] = value['title']; - device['type'] = 'unknown'; - device['user-agent'] = value['userAgent']; - device['capabilities'] = []; - if (value['touch']) { - device['capabilities'].push('touch'); - } - if (value['mobile']) { - device['capabilities'].push('mobile'); - } - device['screen'] = {}; - device['screen']['vertical'] = { width: value['width'], height: value['height'] }; - device['screen']['horizontal'] = { width: value['height'], height: value['width'] }; - device['screen']['device-pixel-ratio'] = value['deviceScaleFactor']; - device['modes'] = []; - device['show-by-default'] = true; - device['show'] = 'Default'; - newList.push(device); - } - if (newList.length) { - this.#settings.createSetting(newSettingName, []).set(newList); - } - this.#removeSetting(oldSetting); - } - updateVersionFrom11To12() { - this.migrateSettingsFromLocalStorage(); - } - updateVersionFrom12To13() { - this.migrateSettingsFromLocalStorage(); - this.#removeSetting(this.#settings.createSetting('timelineOverviewMode', '')); - } - updateVersionFrom13To14() { - const defaultValue = { throughput: -1, latency: 0 }; - this.#settings.createSetting('networkConditions', defaultValue).set(defaultValue); - } - updateVersionFrom14To15() { - const setting = this.#settings.createLocalSetting('workspaceExcludedFolders', {}); - const oldValue = setting.get(); - const newValue = {}; - for (const fileSystemPath in oldValue) { - newValue[fileSystemPath] = []; - for (const entry of oldValue[fileSystemPath]) { - newValue[fileSystemPath].push(entry.path); - } - } - setting.set(newValue); - } - updateVersionFrom15To16() { - const setting = this.#settings.createSetting('InspectorView.panelOrder', {}); - const tabOrders = setting.get(); - for (const key of Object.keys(tabOrders)) { - tabOrders[key] = (tabOrders[key] + 1) * 10; - } - setting.set(tabOrders); - } - updateVersionFrom16To17() { - const setting = this.#settings.createSetting('networkConditionsCustomProfiles', []); - const oldValue = setting.get(); - const newValue = []; - if (Array.isArray(oldValue)) { - for (const preset of oldValue) { - if (typeof preset.title === 'string' && typeof preset.value === 'object' && - typeof preset.value.throughput === 'number' && typeof preset.value.latency === 'number') { - newValue.push({ - title: preset.title, - value: { download: preset.value.throughput, upload: preset.value.throughput, latency: preset.value.latency }, - }); - } - } - } - setting.set(newValue); - } - updateVersionFrom17To18() { - const setting = this.#settings.createLocalSetting('workspaceExcludedFolders', {}); - const oldValue = setting.get(); - const newValue = {}; - for (const oldKey in oldValue) { - let newKey = oldKey.replace(/\\/g, '/'); - if (!newKey.startsWith('file://')) { - if (newKey.startsWith('/')) { - newKey = 'file://' + newKey; - } - else { - newKey = 'file:///' + newKey; - } - } - newValue[newKey] = oldValue[oldKey]; - } - setting.set(newValue); - } - updateVersionFrom18To19() { - const defaultColumns = { status: true, type: true, initiator: true, size: true, time: true }; - const visibleColumnSettings = this.#settings.createSetting('networkLogColumnsVisibility', defaultColumns); - const visibleColumns = visibleColumnSettings.get(); - visibleColumns.name = true; - visibleColumns.timeline = true; - const configs = {}; - for (const columnId in visibleColumns) { - if (!visibleColumns.hasOwnProperty(columnId)) { - continue; - } - configs[columnId.toLowerCase()] = { visible: visibleColumns[columnId] }; - } - const newSetting = this.#settings.createSetting('networkLogColumns', {}); - newSetting.set(configs); - this.#removeSetting(visibleColumnSettings); - } - updateVersionFrom19To20() { - const oldSetting = this.#settings.createSetting('InspectorView.panelOrder', {}); - const newSetting = this.#settings.createSetting('panel-tabOrder', {}); - newSetting.set(oldSetting.get()); - this.#removeSetting(oldSetting); - } - updateVersionFrom20To21() { - const networkColumns = this.#settings.createSetting('networkLogColumns', {}); - const columns = networkColumns.get(); - delete columns['timeline']; - delete columns['waterfall']; - networkColumns.set(columns); - } - updateVersionFrom21To22() { - const breakpointsSetting = this.#settings.createLocalSetting('breakpoints', []); - const breakpoints = breakpointsSetting.get(); - for (const breakpoint of breakpoints) { - breakpoint['url'] = breakpoint['sourceFileId']; - delete breakpoint['sourceFileId']; - } - breakpointsSetting.set(breakpoints); - } - updateVersionFrom22To23() { - } - updateVersionFrom23To24() { - const oldSetting = this.#settings.createSetting('searchInContentScripts', false); - const newSetting = this.#settings.createSetting('searchInAnonymousAndContentScripts', false); - newSetting.set(oldSetting.get()); - this.#removeSetting(oldSetting); - } - updateVersionFrom24To25() { - const defaultColumns = { status: true, type: true, initiator: true, size: true, time: true }; - const networkLogColumnsSetting = this.#settings.createSetting('networkLogColumns', defaultColumns); - const columns = networkLogColumnsSetting.get(); - delete columns.product; - networkLogColumnsSetting.set(columns); - } - updateVersionFrom25To26() { - const oldSetting = this.#settings.createSetting('messageURLFilters', {}); - const urls = Object.keys(oldSetting.get()); - const textFilter = urls.map(url => `-url:${url}`).join(' '); - if (textFilter) { - const textFilterSetting = this.#settings.createSetting('console.textFilter', ''); - const suffix = textFilterSetting.get() ? ` ${textFilterSetting.get()}` : ''; - textFilterSetting.set(`${textFilter}${suffix}`); - } - this.#removeSetting(oldSetting); - } - updateVersionFrom26To27() { - const settings = this.#settings; - function renameKeyInObjectSetting(settingName, from, to) { - const setting = settings.createSetting(settingName, {}); - const value = setting.get(); - if (from in value) { - value[to] = value[from]; - delete value[from]; - setting.set(value); - } - } - function renameInStringSetting(settingName, from, to) { - const setting = settings.createSetting(settingName, ''); - const value = setting.get(); - if (value === from) { - setting.set(to); - } - } - renameKeyInObjectSetting('panel-tabOrder', 'audits2', 'audits'); - renameKeyInObjectSetting('panel-closeableTabs', 'audits2', 'audits'); - renameInStringSetting('panel-selectedTab', 'audits2', 'audits'); - } - updateVersionFrom27To28() { - const setting = this.#settings.createSetting('uiTheme', 'systemPreferred'); - if (setting.get() === 'default') { - setting.set('systemPreferred'); - } - } - updateVersionFrom28To29() { - const settings = this.#settings; - function renameKeyInObjectSetting(settingName, from, to) { - const setting = settings.createSetting(settingName, {}); - const value = setting.get(); - if (from in value) { - value[to] = value[from]; - delete value[from]; - setting.set(value); - } - } - function renameInStringSetting(settingName, from, to) { - const setting = settings.createSetting(settingName, ''); - const value = setting.get(); - if (value === from) { - setting.set(to); - } - } - renameKeyInObjectSetting('panel-tabOrder', 'audits', 'lighthouse'); - renameKeyInObjectSetting('panel-closeableTabs', 'audits', 'lighthouse'); - renameInStringSetting('panel-selectedTab', 'audits', 'lighthouse'); - } - updateVersionFrom29To30() { - const closeableTabSetting = this.#settings.createSetting('closeableTabs', {}); - const panelCloseableTabSetting = this.#settings.createSetting('panel-closeableTabs', {}); - const drawerCloseableTabSetting = this.#settings.createSetting('drawer-view-closeableTabs', {}); - const openTabsInPanel = panelCloseableTabSetting.get(); - const openTabsInDrawer = panelCloseableTabSetting.get(); - const newValue = Object.assign(openTabsInDrawer, openTabsInPanel); - closeableTabSetting.set(newValue); - this.#removeSetting(panelCloseableTabSetting); - this.#removeSetting(drawerCloseableTabSetting); - } - updateVersionFrom30To31() { - const recordingsSetting = this.#settings.createSetting('recorder_recordings', []); - this.#removeSetting(recordingsSetting); - } - updateVersionFrom31To32() { - const breakpointsSetting = this.#settings.createLocalSetting('breakpoints', []); - const breakpoints = breakpointsSetting.get(); - for (const breakpoint of breakpoints) { - breakpoint['resourceTypeName'] = 'script'; - } - breakpointsSetting.set(breakpoints); - } - updateVersionFrom32To33() { - const previouslyViewedFilesSetting = this.#settings.createLocalSetting('previouslyViewedFiles', []); - let previouslyViewedFiles = previouslyViewedFilesSetting.get(); - previouslyViewedFiles = previouslyViewedFiles.filter((previouslyViewedFile) => 'url' in previouslyViewedFile); - for (const previouslyViewedFile of previouslyViewedFiles) { - previouslyViewedFile['resourceTypeName'] = 'script'; - } - previouslyViewedFilesSetting.set(previouslyViewedFiles); - } - updateVersionFrom33To34() { - const logpointPrefix = '/** DEVTOOLS_LOGPOINT */ console.log('; - const logpointSuffix = ')'; - const breakpointsSetting = this.#settings.createLocalSetting('breakpoints', []); - const breakpoints = breakpointsSetting.get(); - for (const breakpoint of breakpoints) { - const isLogpoint = breakpoint.condition.startsWith(logpointPrefix) && breakpoint.condition.endsWith(logpointSuffix); - breakpoint['isLogpoint'] = isLogpoint; - } - breakpointsSetting.set(breakpoints); - } - updateVersionFrom34To35() { - const logpointPrefix = '/** DEVTOOLS_LOGPOINT */ console.log('; - const logpointSuffix = ')'; - const breakpointsSetting = this.#settings.createLocalSetting('breakpoints', []); - const breakpoints = breakpointsSetting.get(); - for (const breakpoint of breakpoints) { - const { condition, isLogpoint } = breakpoint; - if (isLogpoint) { - breakpoint.condition = condition.slice(logpointPrefix.length, condition.length - logpointSuffix.length); - } - } - breakpointsSetting.set(breakpoints); - } - updateVersionFrom35To36() { - this.#settings.createSetting('showThirdPartyIssues', true).set(true); - } - updateVersionFrom36To37() { - const updateStorage = (storage) => { - for (const key of storage.keys()) { - const normalizedKey = Settings.normalizeSettingName(key); - if (normalizedKey !== key) { - const value = storage.get(key); - this.#removeSetting({ name: key, storage }); - storage.set(normalizedKey, value); - } - } - }; - updateStorage(this.#settings.globalStorage); - updateStorage(this.#settings.syncedStorage); - updateStorage(this.#settings.localStorage); - for (const key of this.#settings.globalStorage.keys()) { - if ((key.startsWith('data-grid-') && key.endsWith('-column-weights')) || key.endsWith('-tab-order') || - key === 'views-location-override' || key === 'closeable-tabs') { - const setting = this.#settings.createSetting(key, {}); - setting.set(toKebabCaseKeys(setting.get())); - } - if (key.endsWith('-selected-tab')) { - const setting = this.#settings.createSetting(key, ''); - setting.set(toKebabCase(setting.get())); - } - } - } - updateVersionFrom37To38() { - const getConsoleInsightsEnabledSetting = () => { - try { - return this.#settings.moduleSetting('console-insights-enabled'); - } - catch { - return; - } - }; - const consoleInsightsEnabled = getConsoleInsightsEnabledSetting(); - const onboardingFinished = this.#settings.createLocalSetting('console-insights-onboarding-finished', false); - if (consoleInsightsEnabled && consoleInsightsEnabled.get() === true && onboardingFinished.get() === false) { - consoleInsightsEnabled.set(false); - } - if (consoleInsightsEnabled && consoleInsightsEnabled.get() === false) { - onboardingFinished.set(false); - } - } - updateVersionFrom38To39() { - const PREFERRED_NETWORK_COND = 'preferred-network-condition'; - const setting = this.#settings.globalStorage.get(PREFERRED_NETWORK_COND); - if (!setting) { - return; - } - try { - const networkSetting = JSON.parse(setting); - if (networkSetting.title === 'Slow 3G') { - networkSetting.title = '3G'; - networkSetting.i18nTitleKey = '3G'; - this.#settings.globalStorage.set(PREFERRED_NETWORK_COND, JSON.stringify(networkSetting)); - } - else if (networkSetting.title === 'Fast 3G') { - networkSetting.title = 'Slow 4G'; - networkSetting.i18nTitleKey = 'Slow 4G'; - this.#settings.globalStorage.set(PREFERRED_NETWORK_COND, JSON.stringify(networkSetting)); - } - } - catch { - this.#settings.globalStorage.remove(PREFERRED_NETWORK_COND); - } - } - updateVersionFrom39To40() { - const hasCustomNetworkConditionsSetting = () => { - try { - this.#settings.moduleSetting('custom-network-conditions'); - return true; - } - catch { - return false; - } - }; - if (hasCustomNetworkConditionsSetting()) { - const conditionsSetting = this.#settings.moduleSetting('custom-network-conditions'); - const customConditions = conditionsSetting.get(); - if (customConditions?.length > 0) { - customConditions.forEach((condition, i) => { - if (condition.key) { - return; - } - condition.key = `USER_CUSTOM_SETTING_${i + 1}`; - }); - conditionsSetting.set(customConditions); - } - } - const PREFERRED_NETWORK_COND_SETTING = 'preferred-network-condition'; - const setting = this.#settings.globalStorage.get(PREFERRED_NETWORK_COND_SETTING); - if (!setting) { - return; - } - const UI_STRING_TO_NEW_KEY = { - 'Fast 4G': 'SPEED_FAST_4G', - 'Slow 4G': 'SPEED_SLOW_4G', - '3G': 'SPEED_3G', - 'No throttling': 'NO_THROTTLING', - Offline: 'OFFLINE' - }; - try { - const networkSetting = JSON.parse(setting); - if (networkSetting.i18nTitleKey && UI_STRING_TO_NEW_KEY.hasOwnProperty(networkSetting.i18nTitleKey)) { - const key = UI_STRING_TO_NEW_KEY[networkSetting.i18nTitleKey]; - const newSetting = this.#settings.createSetting('active-network-condition-key', 'NO_THROTTLING'); - newSetting.set(key); - } - } - finally { - this.#settings.globalStorage.remove(PREFERRED_NETWORK_COND_SETTING); - } - } - updateVersionFrom40To41() { - if (this.#settings.syncedStorage.has('hide-network-messages')) { - const oldNetworkSetting = this.#settings.createSetting('hide-network-messages', false, "Synced" ); - if (!this.#settings.syncedStorage.has('network-messages')) { - const newNetworkSetting = this.#settings.createSetting('network-messages', true, "Synced" ); - newNetworkSetting.set(!oldNetworkSetting.get()); - } - this.#removeSetting(oldNetworkSetting); - } - if (this.#settings.syncedStorage.has('frame-viewer-hide-chrome-window')) { - const oldChromeFrameSetting = this.#settings.createSetting('frame-viewer-hide-chrome-window', false, "Synced" ); - if (!this.#settings.syncedStorage.has('frame-viewer-chrome-window')) { - const newChromeFrameSetting = this.#settings.createSetting('frame-viewer-chrome-window', true, "Synced" ); - newChromeFrameSetting.set(!oldChromeFrameSetting.get()); - } - this.#removeSetting(oldChromeFrameSetting); - } - } - updateVersionFrom41To42() { - const recordingsSetting = this.#settings.createSetting('recorder-recordings-ng', []); - const recordings = recordingsSetting.get(); - if (recordings.length === 0) { - return; - } - for (const recording of recordings) { - recording.flow.title = trimEndWithMaxLength(recording.flow.title, 300); - recording.flow.steps = recording.flow.steps.slice(0, 4096); - } - recordingsSetting.set(recordings); - } - migrateSettingsFromLocalStorage() { - const localSettings = new Set([ - 'advancedSearchConfig', - 'breakpoints', - 'consoleHistory', - 'domBreakpoints', - 'eventListenerBreakpoints', - 'fileSystemMapping', - 'lastSelectedSourcesSidebarPaneTab', - 'previouslyViewedFiles', - 'savedURLs', - 'watchExpressions', - 'workspaceExcludedFolders', - 'xhrBreakpoints', - ]); - if (!window.localStorage) { - return; - } - for (const key in window.localStorage) { - if (localSettings.has(key)) { - continue; - } - const value = window.localStorage[key]; - window.localStorage.removeItem(key); - this.#settings.globalStorage.set(key, value); - } - } - clearBreakpointsWhenTooMany(breakpointsSetting, maxBreakpointsCount) { - if (breakpointsSetting.get().length > maxBreakpointsCount) { - breakpointsSetting.set([]); - } - } -} -function moduleSetting(settingName) { - return Settings.instance().moduleSetting(settingName); -} -function settingForTest(settingName) { - return Settings.instance().settingForTest(settingName); -} - -var Settings$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Deprecation: Deprecation, - InMemoryStorage: InMemoryStorage, - RegExpSetting: RegExpSetting, - Setting: Setting, - Settings: Settings, - SettingsStorage: SettingsStorage, - VersionController: VersionController, - getLocalizedSettingsCategory: getLocalizedSettingsCategory, - maybeRemoveSettingExtension: maybeRemoveSettingExtension, - moduleSetting: moduleSetting, - registerSettingExtension: registerSettingExtension, - registerSettingsForTest: registerSettingsForTest, - resetSettings: resetSettings, - settingForTest: settingForTest -}); - -// Copyright 2014 The Chromium Authors -class SimpleHistoryManager { - #entries; - #activeEntryIndex; - #coalescingReadonly; - #historyDepth; - constructor(historyDepth) { - this.#entries = []; - this.#activeEntryIndex = -1; - this.#coalescingReadonly = 0; - this.#historyDepth = historyDepth; - } - readOnlyLock() { - ++this.#coalescingReadonly; - } - releaseReadOnlyLock() { - --this.#coalescingReadonly; - } - getPreviousValidIndex() { - if (this.empty()) { - return -1; - } - let revealIndex = this.#activeEntryIndex - 1; - while (revealIndex >= 0 && !this.#entries[revealIndex].valid()) { - --revealIndex; - } - if (revealIndex < 0) { - return -1; - } - return revealIndex; - } - getNextValidIndex() { - let revealIndex = this.#activeEntryIndex + 1; - while (revealIndex < this.#entries.length && !this.#entries[revealIndex].valid()) { - ++revealIndex; - } - if (revealIndex >= this.#entries.length) { - return -1; - } - return revealIndex; - } - readOnly() { - return Boolean(this.#coalescingReadonly); - } - empty() { - return !this.#entries.length; - } - active() { - return this.empty() ? null : this.#entries[this.#activeEntryIndex]; - } - push(entry) { - if (this.readOnly()) { - return; - } - if (!this.empty()) { - this.#entries.splice(this.#activeEntryIndex + 1); - } - this.#entries.push(entry); - if (this.#entries.length > this.#historyDepth) { - this.#entries.shift(); - } - this.#activeEntryIndex = this.#entries.length - 1; - } - canRollback() { - return this.getPreviousValidIndex() >= 0; - } - canRollover() { - return this.getNextValidIndex() >= 0; - } - rollback() { - const revealIndex = this.getPreviousValidIndex(); - if (revealIndex === -1) { - return false; - } - this.readOnlyLock(); - this.#activeEntryIndex = revealIndex; - this.#entries[revealIndex].reveal(); - this.releaseReadOnlyLock(); - return true; - } - rollover() { - const revealIndex = this.getNextValidIndex(); - if (revealIndex === -1) { - return false; - } - this.readOnlyLock(); - this.#activeEntryIndex = revealIndex; - this.#entries[revealIndex].reveal(); - this.releaseReadOnlyLock(); - return true; - } -} - -var SimpleHistoryManager$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - SimpleHistoryManager: SimpleHistoryManager -}); - -// Copyright 2026 The Chromium Authors -function parseSrcset(value) { - const result = []; - let i = 0; - while (value.length) { - if (i++ > 0) { - result.push({ value: ' ', type: 0 }); - } - value = value.trim(); - let url = ''; - let descriptor = ''; - const indexOfSpace = value.search(/\s/); - if (indexOfSpace === -1) { - url = value; - } - else if (indexOfSpace > 0 && value[indexOfSpace - 1] === ',') { - url = value.substring(0, indexOfSpace); - } - else { - url = value.substring(0, indexOfSpace); - const indexOfComma = value.indexOf(',', indexOfSpace); - if (indexOfComma !== -1) { - descriptor = value.substring(indexOfSpace, indexOfComma + 1); - } - else { - descriptor = value.substring(indexOfSpace); - } - } - if (url) { - if (url.endsWith(',')) { - result.push({ value: url.substring(0, url.length - 1), type: 1 }); - result.push({ type: 0 , value: ',' }); - } - else { - result.push({ value: url, type: 1 }); - } - } - if (descriptor) { - result.push({ type: 0 , value: descriptor }); - } - value = value.substring(url.length + descriptor.length); - } - return result; -} - -var Srcset = /*#__PURE__*/Object.freeze({ - __proto__: null, - parseSrcset: parseSrcset -}); - -// Copyright 2015 The Chromium Authors -class StringOutputStream { - #data = ''; - async write(chunk) { - this.#data += chunk; - } - async close() { - } - data() { - return this.#data; - } -} - -var StringOutputStream$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - StringOutputStream: StringOutputStream -}); - -// Copyright 2016 The Chromium Authors -let Trie$1 = class Trie { - #size; - #root; - #edges; - #isWord; - #wordsInSubtree; - #freeNodes; - #traitImpl; - constructor(traitImpl) { - this.#root = 0; - this.#traitImpl = traitImpl; - this.clear(); - } - static newStringTrie() { - return new Trie({ - empty: () => '', - append: (base, appendage) => base + appendage, - slice: (base, start, end) => base.slice(start, end), - }); - } - static newArrayTrie() { - return new Trie({ - empty: () => [], - append: (base, appendage) => base.concat([appendage]), - slice: (base, start, end) => base.slice(start, end), - }); - } - add(word) { - let node = this.#root; - ++this.#wordsInSubtree[this.#root]; - for (let i = 0; i < word.length; ++i) { - const edge = word[i]; - let next = this.#edges[node].get(edge); - if (!next) { - if (this.#freeNodes.length) { - next = this.#freeNodes.pop(); - } - else { - next = this.#size++; - this.#isWord.push(false); - this.#wordsInSubtree.push(0); - this.#edges.push(new Map()); - } - this.#edges[node].set(edge, next); - } - ++this.#wordsInSubtree[next]; - node = next; - } - this.#isWord[node] = true; - } - remove(word) { - if (!this.has(word)) { - return false; - } - let node = this.#root; - --this.#wordsInSubtree[this.#root]; - for (let i = 0; i < word.length; ++i) { - const edge = word[i]; - const next = this.#edges[node].get(edge); - if (!--this.#wordsInSubtree[next]) { - this.#edges[node].delete(edge); - this.#freeNodes.push(next); - } - node = next; - } - this.#isWord[node] = false; - return true; - } - has(word) { - let node = this.#root; - for (let i = 0; i < word.length; ++i) { - node = this.#edges[node].get(word[i]); - if (!node) { - return false; - } - } - return this.#isWord[node]; - } - words(prefix) { - prefix = prefix ?? this.#traitImpl.empty(); - let node = this.#root; - for (let i = 0; i < prefix.length; ++i) { - node = this.#edges[node].get(prefix[i]); - if (!node) { - return []; - } - } - const results = []; - this.dfs(node, prefix, results); - return results; - } - dfs(node, prefix, results) { - if (this.#isWord[node]) { - results.push(prefix); - } - const edges = this.#edges[node]; - for (const [edge, node] of edges) { - const newPrefix = this.#traitImpl.append(prefix, edge); - this.dfs(node, newPrefix, results); - } - } - longestPrefix(word, fullWordOnly) { - let node = this.#root; - let wordIndex = 0; - for (let i = 0; i < word.length; ++i) { - node = this.#edges[node].get(word[i]); - if (!node) { - break; - } - if (!fullWordOnly || this.#isWord[node]) { - wordIndex = i + 1; - } - } - return this.#traitImpl.slice(word, 0, wordIndex); - } - clear() { - this.#size = 1; - this.#root = 0; - this.#edges = [new Map()]; - this.#isWord = [false]; - this.#wordsInSubtree = [0]; - this.#freeNodes = []; - } -}; - -var Trie$2 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Trie: Trie$1 -}); - -// Copyright 2013 The Chromium Authors -class TextDictionary { - words = new Map(); - index = Trie$1.newStringTrie(); - addWord(word) { - let count = this.words.get(word) || 0; - ++count; - this.words.set(word, count); - this.index.add(word); - } - removeWord(word) { - let count = this.words.get(word) || 0; - if (!count) { - return; - } - if (count === 1) { - this.words.delete(word); - this.index.remove(word); - return; - } - --count; - this.words.set(word, count); - } - wordsWithPrefix(prefix) { - return this.index.words(prefix); - } - hasWord(word) { - return this.words.has(word); - } - wordCount(word) { - return this.words.get(word) || 0; - } - reset() { - this.words.clear(); - this.index.clear(); - } -} - -var TextDictionary$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - TextDictionary: TextDictionary -}); - -// Copyright 2014 The Chromium Authors -class Throttler { - #timeout; - #isRunningProcess; - #asSoonAsPossible; - #process; - #lastCompleteTime; - #scheduler = Promise.withResolvers(); - #processTimeout; - constructor(timeout) { - this.#timeout = timeout; - this.#isRunningProcess = false; - this.#asSoonAsPossible = false; - this.#process = null; - this.#lastCompleteTime = 0; - } - #processCompleted() { - this.#lastCompleteTime = this.#getTime(); - this.#isRunningProcess = false; - if (this.#process) { - this.#schedule(false); - } - } - get process() { - return this.#process; - } - get processCompleted() { - return this.#process ? this.#scheduler.promise : null; - } - #onTimeout() { - this.#processTimeout = undefined; - this.#asSoonAsPossible = false; - this.#isRunningProcess = true; - void Promise.resolve() - .then(this.#process) - .catch(console.error.bind(console)) - .then(this.#processCompleted.bind(this)) - .then(this.#scheduler.resolve); - this.#scheduler = Promise.withResolvers(); - this.#process = null; - } - async schedule(process, scheduling = "Default" ) { - this.#process = process; - const hasScheduledTasks = Boolean(this.#processTimeout) || this.#isRunningProcess; - const okToFire = this.#getTime() - this.#lastCompleteTime > this.#timeout; - const asSoonAsPossible = scheduling === "AsSoonAsPossible" || - (scheduling === "Default" && !hasScheduledTasks && okToFire); - const forceTimerUpdate = asSoonAsPossible && !this.#asSoonAsPossible; - this.#asSoonAsPossible = this.#asSoonAsPossible || asSoonAsPossible; - this.#schedule(forceTimerUpdate); - await this.#scheduler.promise; - } - #schedule(forceTimerUpdate) { - if (this.#isRunningProcess) { - return; - } - if (this.#processTimeout && !forceTimerUpdate) { - return; - } - clearTimeout(this.#processTimeout); - const timeout = this.#asSoonAsPossible ? 0 : this.#timeout; - this.#processTimeout = setTimeout(this.#onTimeout.bind(this), timeout); - } - #getTime() { - return performance.now(); - } -} - -var Throttler$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Throttler: Throttler -}); - -// Copyright 2019 The Chromium Authors - -var common = /*#__PURE__*/Object.freeze({ - __proto__: null, - App: App, - AppProvider: AppProvider, - Base64: Base64, - CharacterIdMap: CharacterIdMap$1, - Color: Color, - ColorConverter: ColorConverter$1, - ColorUtils: ColorUtils, - Console: Console$1, - Debouncer: Debouncer, - EventTarget: EventTarget$1, - Gzip: Gzip, - JavaScriptMetaData: JavaScriptMetaData, - Lazy: Lazy, - MapWithDefault: MapWithDefault$1, - Mutex: Mutex$1, - ObjectWrapper: Object$1, - ParsedURL: ParsedURL$1, - Progress: Progress$1, - ResolverBase: ResolverBase$1, - ResourceType: ResourceType$1, - ReturnToPanel: ReturnToPanel, - Revealer: Revealer, - Runnable: Runnable, - SegmentedRange: SegmentedRange$1, - SettingRegistration: SettingRegistration, - Settings: Settings$1, - SimpleHistoryManager: SimpleHistoryManager$1, - Srcset: Srcset, - StringOutputStream: StringOutputStream$1, - TextDictionary: TextDictionary$1, - Throttler: Throttler$1, - Trie: Trie$2, - UIString: UIString -}); - -// Copyright 2020 The Chromium Authors -const UIStrings$19 = { - preserveLogUponNavigation: 'Preserve log upon navigation', - doNotPreserveLogUponNavigation: 'Do not preserve log upon navigation', - pauseOnExceptions: 'Pause on exceptions', - doNotPauseOnExceptions: 'Do not pause on exceptions', - disableJavascript: 'Disable JavaScript', - enableJavascript: 'Enable JavaScript', - disableAsyncStackTraces: 'Disable async stack traces', - doNotCaptureAsyncStackTraces: 'Do not capture async stack traces', - captureAsyncStackTraces: 'Capture async stack traces', - rulersOnHover: 'Rulers on hover', - showRulersOnHover: 'Show rulers on hover', - doNotShowRulersOnHover: 'Don\'t show rulers on hover', - showAreaNames: 'Show area names', - showGridNamedAreas: 'Show grid named areas', - doNotShowGridNamedAreas: 'Do not show grid named areas', - showTrackSizes: 'Show track sizes', - showGridTrackSizes: 'Show grid track sizes', - doNotShowGridTrackSizes: 'Do not show grid track sizes', - extendGridLines: 'Extend grid lines', - doNotExtendGridLines: 'Do not extend grid lines', - showLineLabels: 'Show line labels', - hideLineLabels: 'Hide line labels', - showLineNumbers: 'Show line numbers', - showLineNames: 'Show line names', - showPaintFlashingRectangles: 'Show paint flashing rectangles', - hidePaintFlashingRectangles: 'Hide paint flashing rectangles', - showLayoutShiftRegions: 'Show layout shift regions', - hideLayoutShiftRegions: 'Hide layout shift regions', - highlightAdFrames: 'Highlight ad frames', - doNotHighlightAdFrames: 'Do not highlight ad frames', - showLayerBorders: 'Show layer borders', - hideLayerBorders: 'Hide layer borders', - showFramesPerSecondFpsMeter: 'Show frames per second (FPS) meter', - hideFramesPerSecondFpsMeter: 'Hide frames per second (FPS) meter', - showScrollPerformanceBottlenecks: 'Show scroll performance bottlenecks', - hideScrollPerformanceBottlenecks: 'Hide scroll performance bottlenecks', - emulateAFocusedPage: 'Emulate a focused page', - doNotEmulateAFocusedPage: 'Do not emulate a focused page', - doNotEmulateCssMediaType: 'Do not emulate CSS media type', - noEmulation: 'No emulation', - emulateCssPrintMediaType: 'Emulate CSS print media type', - print: 'print', - emulateCssScreenMediaType: 'Emulate CSS screen media type', - screen: 'screen', - query: 'query', - emulateCssMediaType: 'Emulate CSS media type', - doNotEmulateCss: 'Do not emulate CSS {PH1}', - emulateCss: 'Emulate CSS {PH1}', - emulateCssMediaFeature: 'Emulate CSS media feature {PH1}', - doNotEmulateAnyVisionDeficiency: 'Do not emulate any vision deficiency', - emulateBlurredVision: 'Emulate blurred vision', - emulateReducedContrast: 'Emulate reduced contrast', - blurredVision: 'Blurred vision', - reducedContrast: 'Reduced contrast', - emulateProtanopia: 'Emulate protanopia (no red)', - protanopia: 'Protanopia (no red)', - emulateDeuteranopia: 'Emulate deuteranopia (no green)', - deuteranopia: 'Deuteranopia (no green)', - emulateTritanopia: 'Emulate tritanopia (no blue)', - tritanopia: 'Tritanopia (no blue)', - emulateAchromatopsia: 'Emulate achromatopsia (no color)', - achromatopsia: 'Achromatopsia (no color)', - emulateVisionDeficiencies: 'Emulate vision deficiencies', - emulateOsTextScale: 'Emulate OS text scale', - doNotEmulateOsTextScale: 'Do not emulate OS text scale', - osTextScaleEmulationNone: 'No emulation', - osTextScaleEmulation85: '85%', - osTextScaleEmulation100: '100% (default)', - osTextScaleEmulation115: '115%', - osTextScaleEmulation130: '130%', - osTextScaleEmulation150: '150%', - osTextScaleEmulation180: '180%', - osTextScaleEmulation200: '200%', - disableLocalFonts: 'Disable local fonts', - enableLocalFonts: 'Enable local fonts', - disableAvifFormat: 'Disable `AVIF` format', - enableAvifFormat: 'Enable `AVIF` format', - disableJpegXlFormat: 'Disable `JPEG XL` format', - enableJpegXlFormat: 'Enable `JPEG XL` format', - disableWebpFormat: 'Disable `WebP` format', - enableWebpFormat: 'Enable `WebP` format', - customFormatters: 'Custom formatters', - networkRequestBlocking: 'Network request blocking', - enableNetworkRequestBlocking: 'Enable network request blocking', - disableNetworkRequestBlocking: 'Disable network request blocking', - enableCache: 'Enable cache', - disableCache: 'Disable cache while DevTools is open', - emulateAutoDarkMode: 'Emulate auto dark mode', - enableRemoteFileLoading: 'Allow loading remote file path resources in DevTools', - remoteFileLoadingInfo: 'Example resource are source maps. Disabled by default for security reasons.', - networkCacheExplanation: 'Disabling the network cache will simulate a network experience similar to a first time visitor.', - javaScriptSourceMaps: 'JavaScript source maps', - enableJavaScriptSourceMaps: 'Enable JavaScript source maps', - disableJavaScriptSourceMaps: 'Disable JavaScript source maps', - cssSourceMaps: 'CSS source maps', - enableCssSourceMaps: 'Enable CSS source maps', - disableCssSourceMaps: 'Disable CSS source maps', - logXmlhttprequests: 'Log XMLHttpRequests', -}; -const str_$18 = registerUIStrings('core/sdk/sdk-meta.ts', UIStrings$19); -const i18nLazyString$f = getLazilyComputedLocalizedString.bind(undefined, str_$18); -registerSettingExtension({ - category: "CONSOLE" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.preserveLogUponNavigation), - settingName: 'preserve-console-log', - settingType: "boolean" , - defaultValue: false, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.preserveLogUponNavigation), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotPreserveLogUponNavigation), - }, - ], -}); -registerSettingExtension({ - category: "DEBUGGER" , - settingName: 'pause-on-exception-enabled', - settingType: "boolean" , - defaultValue: false, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.pauseOnExceptions), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotPauseOnExceptions), - }, - ], -}); -registerSettingExtension({ - settingName: 'pause-on-caught-exception', - settingType: "boolean" , - defaultValue: false, -}); -registerSettingExtension({ - settingName: 'pause-on-uncaught-exception', - settingType: "boolean" , - defaultValue: false, -}); -registerSettingExtension({ - category: "DEBUGGER" , - title: i18nLazyString$f(UIStrings$19.disableJavascript), - settingName: 'java-script-disabled', - settingType: "boolean" , - storageType: "Session" , - order: 1, - defaultValue: false, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.disableJavascript), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.enableJavascript), - }, - ], -}); -registerSettingExtension({ - category: "DEBUGGER" , - title: i18nLazyString$f(UIStrings$19.disableAsyncStackTraces), - settingName: 'disable-async-stack-traces', - settingType: "boolean" , - defaultValue: false, - order: 2, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.doNotCaptureAsyncStackTraces), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.captureAsyncStackTraces), - }, - ], -}); -registerSettingExtension({ - category: "DEBUGGER" , - settingName: 'breakpoints-active', - settingType: "boolean" , - storageType: "Session" , - defaultValue: true, -}); -registerSettingExtension({ - category: "ELEMENTS" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.rulersOnHover), - settingName: 'show-metrics-rulers', - settingType: "boolean" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showRulersOnHover), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotShowRulersOnHover), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "GRID" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.showAreaNames), - settingName: 'show-grid-areas', - settingType: "boolean" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showGridNamedAreas), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotShowGridNamedAreas), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "GRID" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.showTrackSizes), - settingName: 'show-grid-track-sizes', - settingType: "boolean" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showGridTrackSizes), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotShowGridTrackSizes), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "GRID" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.extendGridLines), - settingName: 'extend-grid-lines', - settingType: "boolean" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.extendGridLines), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotExtendGridLines), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "GRID" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.showLineLabels), - settingName: 'show-grid-line-labels', - settingType: "enum" , - options: [ - { - title: i18nLazyString$f(UIStrings$19.hideLineLabels), - text: i18nLazyString$f(UIStrings$19.hideLineLabels), - value: 'none', - }, - { - title: i18nLazyString$f(UIStrings$19.showLineNumbers), - text: i18nLazyString$f(UIStrings$19.showLineNumbers), - value: 'lineNumbers', - }, - { - title: i18nLazyString$f(UIStrings$19.showLineNames), - text: i18nLazyString$f(UIStrings$19.showLineNames), - value: 'lineNames', - }, - ], - defaultValue: 'lineNumbers', -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'show-paint-rects', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showPaintFlashingRectangles), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.hidePaintFlashingRectangles), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'show-layout-shift-regions', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showLayoutShiftRegions), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.hideLayoutShiftRegions), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'show-ad-highlights', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.highlightAdFrames), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotHighlightAdFrames), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'show-debug-borders', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showLayerBorders), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.hideLayerBorders), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'show-fps-counter', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showFramesPerSecondFpsMeter), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.hideFramesPerSecondFpsMeter), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'show-scroll-bottleneck-rects', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.showScrollPerformanceBottlenecks), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.hideScrollPerformanceBottlenecks), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - title: i18nLazyString$f(UIStrings$19.emulateAFocusedPage), - settingName: 'emulate-page-focus', - settingType: "boolean" , - storageType: "Local" , - defaultValue: false, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.emulateAFocusedPage), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.doNotEmulateAFocusedPage), - }, - ], -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'emulated-css-media', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCssMediaType), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCssPrintMediaType), - text: i18nLazyString$f(UIStrings$19.print), - value: 'print', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCssScreenMediaType), - text: i18nLazyString$f(UIStrings$19.screen), - value: 'screen', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaType), -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'emulated-css-media-feature-prefers-color-scheme', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'prefers-color-scheme' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-color-scheme: light' }), - text: lockedLazyString('prefers-color-scheme: light'), - value: 'light', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-color-scheme: dark' }), - text: lockedLazyString('prefers-color-scheme: dark'), - value: 'dark', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'prefers-color-scheme' }), -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'emulated-css-media-feature-forced-colors', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'forced-colors' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'forced-colors: active' }), - text: lockedLazyString('forced-colors: active'), - value: 'active', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'forced-colors: none' }), - text: lockedLazyString('forced-colors: none'), - value: 'none', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'forced-colors' }), -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'emulated-css-media-feature-prefers-reduced-motion', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'prefers-reduced-motion' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-reduced-motion: reduce' }), - text: lockedLazyString('prefers-reduced-motion: reduce'), - value: 'reduce', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'prefers-reduced-motion' }), -}); -registerSettingExtension({ - settingName: 'emulated-css-media-feature-prefers-contrast', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'prefers-contrast' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-contrast: more' }), - text: lockedLazyString('prefers-contrast: more'), - value: 'more', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-contrast: less' }), - text: lockedLazyString('prefers-contrast: less'), - value: 'less', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-contrast: custom' }), - text: lockedLazyString('prefers-contrast: custom'), - value: 'custom', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'prefers-contrast' }), -}); -registerSettingExtension({ - settingName: 'emulated-css-media-feature-prefers-reduced-data', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'prefers-reduced-data' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-reduced-data: reduce' }), - text: lockedLazyString('prefers-reduced-data: reduce'), - value: 'reduce', - }, - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'prefers-reduced-data' }), -}); -registerSettingExtension({ - settingName: 'emulated-css-media-feature-prefers-reduced-transparency', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'prefers-reduced-transparency' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'prefers-reduced-transparency: reduce' }), - text: lockedLazyString('prefers-reduced-transparency: reduce'), - value: 'reduce', - }, - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'prefers-reduced-transparency' }), -}); -registerSettingExtension({ - settingName: 'emulated-css-media-feature-color-gamut', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateCss, { PH1: 'color-gamut' }), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'color-gamut: srgb' }), - text: lockedLazyString('color-gamut: srgb'), - value: 'srgb', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'color-gamut: p3' }), - text: lockedLazyString('color-gamut: p3'), - value: 'p3', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateCss, { PH1: 'color-gamut: rec2020' }), - text: lockedLazyString('color-gamut: rec2020'), - value: 'rec2020', - }, - ], - title: i18nLazyString$f(UIStrings$19.emulateCssMediaFeature, { PH1: 'color-gamut' }), -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'emulated-vision-deficiency', - settingType: "enum" , - storageType: "Session" , - defaultValue: 'none', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateAnyVisionDeficiency), - text: i18nLazyString$f(UIStrings$19.noEmulation), - value: 'none', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateBlurredVision), - text: i18nLazyString$f(UIStrings$19.blurredVision), - value: 'blurredVision', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateReducedContrast), - text: i18nLazyString$f(UIStrings$19.reducedContrast), - value: 'reducedContrast', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateProtanopia), - text: i18nLazyString$f(UIStrings$19.protanopia), - value: 'protanopia', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateDeuteranopia), - text: i18nLazyString$f(UIStrings$19.deuteranopia), - value: 'deuteranopia', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateTritanopia), - text: i18nLazyString$f(UIStrings$19.tritanopia), - value: 'tritanopia', - }, - { - title: i18nLazyString$f(UIStrings$19.emulateAchromatopsia), - text: i18nLazyString$f(UIStrings$19.achromatopsia), - value: 'achromatopsia', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateVisionDeficiencies), -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'emulated-os-text-scale', - settingType: "enum" , - storageType: "Session" , - defaultValue: '', - options: [ - { - title: i18nLazyString$f(UIStrings$19.doNotEmulateOsTextScale), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulationNone), - value: '', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation85), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation85), - value: '0.85', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation100), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation100), - value: '1', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation115), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation115), - value: '1.15', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation130), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation130), - value: '1.3', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation150), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation150), - value: '1.5', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation180), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation180), - value: '1.8', - }, - { - title: i18nLazyString$f(UIStrings$19.osTextScaleEmulation200), - text: i18nLazyString$f(UIStrings$19.osTextScaleEmulation200), - value: '2', - }, - ], - tags: [ - i18nLazyString$f(UIStrings$19.query), - ], - title: i18nLazyString$f(UIStrings$19.emulateOsTextScale), -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'local-fonts-disabled', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.disableLocalFonts), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.enableLocalFonts), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'avif-format-disabled', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.disableAvifFormat), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.enableAvifFormat), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'jpeg-xl-format-disabled', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.disableJpegXlFormat), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.enableJpegXlFormat), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "RENDERING" , - settingName: 'webp-format-disabled', - settingType: "boolean" , - storageType: "Session" , - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.disableWebpFormat), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.enableWebpFormat), - }, - ], - defaultValue: false, -}); -registerSettingExtension({ - category: "CONSOLE" , - title: i18nLazyString$f(UIStrings$19.customFormatters), - settingName: 'custom-formatters', - settingType: "boolean" , - defaultValue: false, -}); -registerSettingExtension({ - category: "NETWORK" , - title: i18nLazyString$f(UIStrings$19.networkRequestBlocking), - settingName: 'request-blocking-enabled', - settingType: "boolean" , - storageType: "Local" , - defaultValue: false, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.enableNetworkRequestBlocking), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.disableNetworkRequestBlocking), - }, - ], -}); -registerSettingExtension({ - category: "NETWORK" , - title: i18nLazyString$f(UIStrings$19.disableCache), - settingName: 'cache-disabled', - settingType: "boolean" , - order: 0, - defaultValue: false, - userActionCondition: 'hasOtherClients', - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.disableCache), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.enableCache), - }, - ], - learnMore: { - tooltip: i18nLazyString$f(UIStrings$19.networkCacheExplanation), - }, -}); -registerSettingExtension({ - category: "RENDERING" , - title: i18nLazyString$f(UIStrings$19.emulateAutoDarkMode), - settingName: 'emulate-auto-dark-mode', - settingType: "boolean" , - storageType: "Session" , - defaultValue: false, -}); -registerSettingExtension({ - category: "SOURCES" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.enableRemoteFileLoading), - settingName: 'network.enable-remote-file-loading', - settingType: "boolean" , - defaultValue: false, - learnMore: { - tooltip: i18nLazyString$f(UIStrings$19.remoteFileLoadingInfo), - } -}); -registerSettingExtension({ - category: "SOURCES" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.javaScriptSourceMaps), - settingName: 'js-source-maps-enabled', - settingType: "boolean" , - defaultValue: true, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.enableJavaScriptSourceMaps), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.disableJavaScriptSourceMaps), - }, - ], -}); -registerSettingExtension({ - category: "SOURCES" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.cssSourceMaps), - settingName: 'css-source-maps-enabled', - settingType: "boolean" , - defaultValue: true, - options: [ - { - value: true, - title: i18nLazyString$f(UIStrings$19.enableCssSourceMaps), - }, - { - value: false, - title: i18nLazyString$f(UIStrings$19.disableCssSourceMaps), - }, - ], -}); -registerSettingExtension({ - category: "CONSOLE" , - storageType: "Synced" , - title: i18nLazyString$f(UIStrings$19.logXmlhttprequests), - settingName: 'monitoring-xhr-enabled', - settingType: "boolean" , - defaultValue: false, -}); - -// Copyright 2025 The Chromium Authors -registerSettingExtension({ - storageType: "Synced" , - settingName: 'skip-stack-frames-pattern', - settingType: "regex" , - defaultValue: '/node_modules/|^node:', -}); -registerSettingExtension({ - storageType: "Synced" , - settingName: 'skip-content-scripts', - settingType: "boolean" , - defaultValue: true, -}); -registerSettingExtension({ - storageType: "Synced" , - settingName: 'automatically-ignore-list-known-third-party-scripts', - settingType: "boolean" , - defaultValue: true, -}); -registerSettingExtension({ - storageType: "Synced" , - settingName: 'skip-anonymous-scripts', - settingType: "boolean" , - defaultValue: false, -}); -registerSettingExtension({ - storageType: "Synced" , - settingName: 'enable-ignore-listing', - settingType: "boolean" , - defaultValue: true, -}); - -// Copyright 2015 The Chromium Authors -var Events$e; -(function (Events) { - Events["AppendedToURL"] = "appendedToURL"; - Events["CanceledSaveURL"] = "canceledSaveURL"; - Events["ColorThemeChanged"] = "colorThemeChanged"; - Events["ContextMenuCleared"] = "contextMenuCleared"; - Events["ContextMenuItemSelected"] = "contextMenuItemSelected"; - Events["DeviceCountUpdated"] = "deviceCountUpdated"; - Events["DevicesDiscoveryConfigChanged"] = "devicesDiscoveryConfigChanged"; - Events["DevicesPortForwardingStatusChanged"] = "devicesPortForwardingStatusChanged"; - Events["DevicesUpdated"] = "devicesUpdated"; - Events["DispatchMessage"] = "dispatchMessage"; - Events["DispatchMessageChunk"] = "dispatchMessageChunk"; - Events["EnterInspectElementMode"] = "enterInspectElementMode"; - Events["EyeDropperPickedColor"] = "eyeDropperPickedColor"; - Events["FileSystemsLoaded"] = "fileSystemsLoaded"; - Events["FileSystemRemoved"] = "fileSystemRemoved"; - Events["FileSystemAdded"] = "fileSystemAdded"; - Events["FileSystemFilesChangedAddedRemoved"] = "fileSystemFilesChangedAddedRemoved"; - Events["IndexingTotalWorkCalculated"] = "indexingTotalWorkCalculated"; - Events["IndexingWorked"] = "indexingWorked"; - Events["IndexingDone"] = "indexingDone"; - Events["KeyEventUnhandled"] = "keyEventUnhandled"; - Events["ReloadInspectedPage"] = "reloadInspectedPage"; - Events["RevealSourceLine"] = "revealSourceLine"; - Events["SavedURL"] = "savedURL"; - Events["SearchCompleted"] = "searchCompleted"; - Events["SetInspectedTabId"] = "setInspectedTabId"; - Events["SetUseSoftMenu"] = "setUseSoftMenu"; - Events["ShowPanel"] = "showPanel"; -})(Events$e || (Events$e = {})); -const EventDescriptors = [ - [Events$e.AppendedToURL, ['url']], - [Events$e.CanceledSaveURL, ['url']], - [Events$e.ColorThemeChanged, []], - [Events$e.ContextMenuCleared, []], - [Events$e.ContextMenuItemSelected, ['id']], - [Events$e.DeviceCountUpdated, ['count']], - [Events$e.DevicesDiscoveryConfigChanged, ['config']], - [Events$e.DevicesPortForwardingStatusChanged, ['status']], - [Events$e.DevicesUpdated, ['devices']], - [Events$e.DispatchMessage, ['messageObject']], - [Events$e.DispatchMessageChunk, ['messageChunk', 'messageSize']], - [Events$e.EnterInspectElementMode, []], - [Events$e.EyeDropperPickedColor, ['color']], - [Events$e.FileSystemsLoaded, ['fileSystems']], - [Events$e.FileSystemRemoved, ['fileSystemPath']], - [Events$e.FileSystemAdded, ['errorMessage', 'fileSystem']], - [Events$e.FileSystemFilesChangedAddedRemoved, ['changed', 'added', 'removed']], - [Events$e.IndexingTotalWorkCalculated, , ['requestId', 'fileSystemPath', 'totalWork']], - [Events$e.IndexingWorked, ['requestId', 'fileSystemPath', 'worked']], - [Events$e.IndexingDone, ['requestId', 'fileSystemPath']], - [Events$e.KeyEventUnhandled, ['event']], - [Events$e.ReloadInspectedPage, ['hard']], - [Events$e.RevealSourceLine, ['url', 'lineNumber', 'columnNumber']], - [Events$e.SavedURL, ['url', 'fileSystemPath']], - [Events$e.SearchCompleted, ['requestId', 'fileSystemPath', 'files']], - [Events$e.SetInspectedTabId, ['tabId']], - [Events$e.SetUseSoftMenu, ['useSoftMenu']], - [Events$e.ShowPanel, ['panelName']], -]; - -// Copyright 2015 The Chromium Authors -const UIStrings$18 = { - systemError: 'System error', - connectionError: 'Connection error', - certificateError: 'Certificate error', - httpError: 'HTTP error', - cacheError: 'Cache error', - signedExchangeError: 'Signed Exchange error', - ftpError: 'FTP error', - certificateManagerError: 'Certificate manager error', - dnsResolverError: 'DNS resolver error', - unknownError: 'Unknown error', - httpErrorStatusCodeSS: 'HTTP error: status code {PH1}, {PH2}', - invalidUrl: 'Invalid URL', - decodingDataUrlFailed: 'Decoding Data URL failed', -}; -const str_$17 = registerUIStrings('core/host/ResourceLoader.ts', UIStrings$18); -const i18nString$R = getLocalizedString.bind(undefined, str_$17); -let _lastStreamId = 0; -const _boundStreams = {}; -const bindOutputStream = function (stream) { - _boundStreams[++_lastStreamId] = stream; - return _lastStreamId; -}; -const discardOutputStream = function (id) { - void _boundStreams[id].close(); - delete _boundStreams[id]; -}; -const streamWrite = function (id, chunk) { - void _boundStreams[id].write(chunk); -}; -const load = function (url, headers, callback, allowRemoteFilePaths) { - const stream = new StringOutputStream(); - loadAsStream(url, headers, stream, mycallback, allowRemoteFilePaths); - function mycallback(success, headers, errorDescription) { - callback(success, headers, stream.data(), errorDescription); - } -}; -function getNetErrorCategory(netError) { - if (netError > -100) { - return i18nString$R(UIStrings$18.systemError); - } - if (netError > -200) { - return i18nString$R(UIStrings$18.connectionError); - } - if (netError > -300) { - return i18nString$R(UIStrings$18.certificateError); - } - if (netError > -400) { - return i18nString$R(UIStrings$18.httpError); - } - if (netError > -500) { - return i18nString$R(UIStrings$18.cacheError); - } - if (netError > -600) { - return i18nString$R(UIStrings$18.signedExchangeError); - } - if (netError > -700) { - return i18nString$R(UIStrings$18.ftpError); - } - if (netError > -800) { - return i18nString$R(UIStrings$18.certificateManagerError); - } - if (netError > -900) { - return i18nString$R(UIStrings$18.dnsResolverError); - } - return i18nString$R(UIStrings$18.unknownError); -} -function isHTTPError(netError) { - return netError <= -300 && netError > -400; -} -function netErrorToMessage(netError, httpStatusCode, netErrorName) { - if (netError === undefined || netErrorName === undefined) { - return null; - } - if (netError !== 0) { - if (isHTTPError(netError)) { - return i18nString$R(UIStrings$18.httpErrorStatusCodeSS, { PH1: String(httpStatusCode), PH2: netErrorName }); - } - const errorCategory = getNetErrorCategory(netError); - return `${errorCategory}: ${netErrorName}`; - } - return null; -} -function createErrorMessageFromResponse(response) { - const { statusCode, netError, netErrorName, urlValid, messageOverride } = response; - let message = ''; - const success = statusCode >= 200 && statusCode < 300; - if (typeof messageOverride === 'string') { - message = messageOverride; - } - else if (!success) { - if (typeof netError === 'undefined') { - if (urlValid === false) { - message = i18nString$R(UIStrings$18.invalidUrl); - } - else { - message = i18nString$R(UIStrings$18.unknownError); - } - } - else { - const maybeMessage = netErrorToMessage(netError, statusCode, netErrorName); - if (maybeMessage) { - message = maybeMessage; - } - } - } - console.assert(success === (message.length === 0)); - return { success, description: { statusCode, netError, netErrorName, urlValid, message } }; -} -async function fetchToString(url) { - try { - const response = await fetch(url); - return await response.text(); - } - catch (cause) { - throw new Error(`Failed to fetch ${url}`, { cause }); - } -} -function canBeRemoteFilePath(url) { - try { - const urlObject = new URL(new URL(url).toString()); - return urlObject.protocol === 'file:' && urlObject.host !== ''; - } - catch { - return false; - } -} -const loadAsStream = function (url, headers, stream, callback, allowRemoteFilePaths) { - const streamId = bindOutputStream(stream); - const parsedURL = new ParsedURL(url); - if (parsedURL.isDataURL()) { - fetchToString(url).then(dataURLDecodeSuccessful).catch(dataURLDecodeFailed); - return; - } - if (!allowRemoteFilePaths && canBeRemoteFilePath(url)) { - if (callback) { - callback( false, {}, { - statusCode: 400, - netError: -20, - netErrorName: 'net::BLOCKED_BY_CLIENT', - message: 'Loading from a remote file path is prohibited for security reasons.', - }); - } - return; - } - const rawHeaders = []; - if (headers) { - for (const key in headers) { - rawHeaders.push(key + ': ' + headers[key]); - } - } - InspectorFrontendHostInstance.loadNetworkResource(url, rawHeaders.join('\r\n'), streamId, finishedCallback); - function finishedCallback(response) { - if (callback) { - const { success, description } = createErrorMessageFromResponse(response); - callback(success, response.headers || {}, description); - } - discardOutputStream(streamId); - } - function dataURLDecodeSuccessful(text) { - streamWrite(streamId, text); - finishedCallback(({ statusCode: 200 })); - } - function dataURLDecodeFailed(_xhrStatus) { - const messageOverride = i18nString$R(UIStrings$18.decodingDataUrlFailed); - finishedCallback(({ statusCode: 404, messageOverride })); - } -}; - -// Copyright 2025 The Chromium Authors -const UIStrings$17 = { - devtoolsS: 'DevTools - {PH1}', -}; -const str_$16 = registerUIStrings('core/host/InspectorFrontendHostStub.ts', UIStrings$17); -const i18nString$Q = getLocalizedString.bind(undefined, str_$16); -const MAX_RECORDED_HISTOGRAMS_SIZE = 100; -const OVERRIDES_FILE_SYSTEM_PATH = '/overrides'; -class InspectorFrontendHostStub { - #urlsBeingSaved = new Map(); - #fileSystem = null; - recordedCountHistograms = []; - recordedEnumeratedHistograms = []; - recordedPerformanceHistograms = []; - constructor() { - if (typeof document === 'undefined') { - return; - } - function stopEventPropagation(event) { - const zoomModifier = this.platform() === 'mac' ? event.metaKey : event.ctrlKey; - if (zoomModifier && (event.key === '+' || event.key === '-')) { - event.stopPropagation(); - } - } - document.addEventListener('keydown', event => { - stopEventPropagation.call(this, (event)); - }, true); - } - platform() { - const userAgent = navigator.userAgent; - if (userAgent.includes('Windows NT')) { - return 'windows'; - } - if (userAgent.includes('Mac OS X')) { - return 'mac'; - } - return 'linux'; - } - loadCompleted() { - } - bringToFront() { - } - closeWindow() { - } - setIsDocked(_isDocked, callback) { - window.setTimeout(callback, 0); - } - showSurvey(_trigger, callback) { - window.setTimeout(() => callback({ surveyShown: false }), 0); - } - canShowSurvey(_trigger, callback) { - window.setTimeout(() => callback({ canShowSurvey: false }), 0); - } - setInspectedPageBounds(_bounds) { - } - inspectElementCompleted() { - } - setInjectedScriptForOrigin(_origin, _script) { - } - inspectedURLChanged(url) { - if (!('document' in globalThis)) { - return; - } - document.title = i18nString$Q(UIStrings$17.devtoolsS, { PH1: url.replace(/^https?:\/\//, '') }); - } - copyText(text) { - if (text === undefined || text === null) { - return; - } - void navigator.clipboard.writeText(text); - } - openInNewTab(url) { - if (schemeIs(url, 'javascript:')) { - return; - } - window.open(url, '_blank'); - } - openSearchResultsInNewTab(_query) { - Console.instance().error('Search is not enabled in hosted mode. Please inspect using chrome://inspect'); - } - showItemInFolder(_fileSystemPath) { - Console.instance().error('Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect'); - } - save(url, content, _forceSaveAs, isBase64) { - let buffer = this.#urlsBeingSaved.get(url)?.buffer; - if (!buffer) { - buffer = []; - this.#urlsBeingSaved.set(url, { isBase64, buffer }); - } - buffer.push(content); - this.events.dispatchEventToListeners(Events$e.SavedURL, { url, fileSystemPath: url }); - } - append(url, content) { - const buffer = this.#urlsBeingSaved.get(url)?.buffer; - if (buffer) { - buffer.push(content); - this.events.dispatchEventToListeners(Events$e.AppendedToURL, url); - } - } - close(url) { - const { isBase64, buffer } = this.#urlsBeingSaved.get(url) || { isBase64: false, buffer: [] }; - this.#urlsBeingSaved.delete(url); - let fileName = ''; - if (url) { - try { - const trimmed = trimURL(url); - fileName = removeURLFragment(trimmed); - } - catch { - fileName = url; - } - } - const link = document.createElement('a'); - link.download = fileName; - let blob; - if (isBase64) { - const bytes = decode$1(buffer.join('')); - blob = new Blob([bytes], { type: 'application/gzip' }); - } - else { - blob = new Blob(buffer, { type: 'text/plain' }); - } - const blobUrl = URL.createObjectURL(blob); - link.href = blobUrl; - link.click(); - URL.revokeObjectURL(blobUrl); - } - sendMessageToBackend(_message) { - } - recordCountHistogram(histogramName, sample, min, exclusiveMax, bucketSize) { - if (this.recordedCountHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) { - this.recordedCountHistograms.shift(); - } - this.recordedCountHistograms.push({ histogramName, sample, min, exclusiveMax, bucketSize }); - } - recordEnumeratedHistogram(actionName, actionCode, _bucketSize) { - if (this.recordedEnumeratedHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) { - this.recordedEnumeratedHistograms.shift(); - } - this.recordedEnumeratedHistograms.push({ actionName, actionCode }); - } - recordPerformanceHistogram(histogramName, duration) { - if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) { - this.recordedPerformanceHistograms.shift(); - } - this.recordedPerformanceHistograms.push({ histogramName, duration }); - } - recordPerformanceHistogramMedium(histogramName, duration) { - if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) { - this.recordedPerformanceHistograms.shift(); - } - this.recordedPerformanceHistograms.push({ histogramName, duration }); - } - recordUserMetricsAction(_umaName) { - } - recordNewBadgeUsage(_featureName) { - } - connectAutomaticFileSystem(_fileSystemPath, _fileSystemUUID, _addIfMissing, callback) { - queueMicrotask(() => callback({ success: false })); - } - disconnectAutomaticFileSystem(_fileSystemPath) { - } - requestFileSystems() { - this.events.dispatchEventToListeners(Events$e.FileSystemsLoaded, []); - } - addFileSystem(_type) { - const onFileSystem = (fs) => { - this.#fileSystem = fs; - const fileSystem = { - fileSystemName: 'sandboxedRequestedFileSystem', - fileSystemPath: OVERRIDES_FILE_SYSTEM_PATH, - rootURL: 'filesystem:devtools://devtools/isolated/', - type: 'overrides', - }; - this.events.dispatchEventToListeners(Events$e.FileSystemAdded, { fileSystem }); - }; - window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024, onFileSystem); - } - removeFileSystem(_fileSystemPath) { - const removalCallback = (entries) => { - entries.forEach(entry => { - if (entry.isDirectory) { - entry.removeRecursively(() => { }); - } - else if (entry.isFile) { - entry.remove(() => { }); - } - }); - }; - if (this.#fileSystem) { - this.#fileSystem.root.createReader().readEntries(removalCallback); - } - this.#fileSystem = null; - this.events.dispatchEventToListeners(Events$e.FileSystemRemoved, OVERRIDES_FILE_SYSTEM_PATH); - } - isolatedFileSystem(_fileSystemId, _registeredName) { - return this.#fileSystem; - } - loadNetworkResource(url, _headers, streamId, callback) { - fetch(url) - .then(async (result) => { - const respBuffer = await result.arrayBuffer(); - const text = await arrayBufferToString(respBuffer); - return text; - }) - .then(function (text) { - streamWrite(streamId, text); - callback({ - statusCode: 200, - }); - }) - .catch(function () { - callback({ - statusCode: 404, - }); - }); - } - registerPreference(_name, _options) { - } - getPreferences(callback) { - const prefs = {}; - for (const name in window.localStorage) { - prefs[name] = window.localStorage[name]; - } - callback(prefs); - } - getPreference(name, callback) { - callback(window.localStorage[name]); - } - setPreference(name, value) { - window.localStorage[name] = value; - } - removePreference(name) { - delete window.localStorage[name]; - } - clearPreferences() { - window.localStorage.clear(); - } - getSyncInformation(callback) { - if ('getSyncInformationForTesting' in globalThis) { - return callback(globalThis.getSyncInformationForTesting()); - } - callback({ - isSyncActive: false, - arePreferencesSynced: false, - }); - } - getHostConfig(callback) { - const hostConfigForHostedMode = { - devToolsVeLogging: { - enabled: true, - }, - devToolsFlexibleLayout: { - verticalDrawerEnabled: true, - }, - }; - if ('hostConfigForTesting' in globalThis) { - const { hostConfigForTesting } = globalThis; - for (const key of Object.keys(hostConfigForTesting)) { - const mergeEntry = (key) => { - if (typeof hostConfigForHostedMode[key] === 'object' && typeof hostConfigForTesting[key] === 'object') { - hostConfigForHostedMode[key] = { ...hostConfigForHostedMode[key], ...hostConfigForTesting[key] }; - } - else { - hostConfigForHostedMode[key] = hostConfigForTesting[key] ?? hostConfigForHostedMode[key]; - } - }; - mergeEntry(key); - } - } - callback(hostConfigForHostedMode); - } - upgradeDraggedFileSystemPermissions(_fileSystem) { - } - indexPath(_requestId, _fileSystemPath, _excludedFolders) { - } - stopIndexing(_requestId) { - } - searchInPath(_requestId, _fileSystemPath, _query) { - } - zoomFactor() { - return 1; - } - zoomIn() { - } - zoomOut() { - } - resetZoom() { - } - setWhitelistedShortcuts(_shortcuts) { - } - setEyeDropperActive(_active) { - } - showCertificateViewer(_certChain) { - } - reattach(_callback) { - } - readyForTest() { - } - connectionReady() { - } - setOpenNewWindowForPopups(_value) { - } - setDevicesDiscoveryConfig(_config) { - } - setDevicesUpdatesEnabled(_enabled) { - } - openRemotePage(_browserId, _url) { - } - openNodeFrontend() { - } - showContextMenuAtPoint(_x, _y, _items, _document) { - throw new Error('Soft context menu should be used'); - } - isHostedMode() { - return true; - } - setAddExtensionCallback(_callback) { - } - async initialTargetId() { - return null; - } - doAidaConversation(_request, _streamId, callback) { - callback({ - error: 'Not implemented', - }); - } - registerAidaClientEvent(_request, callback) { - callback({ - error: 'Not implemented', - }); - } - aidaCodeComplete(_request, callback) { - callback({ - error: 'Not implemented', - }); - } - dispatchHttpRequest(_request, callback) { - callback({ error: 'Not implemented' }); - } - recordImpression(_event) { - } - recordResize(_event) { - } - recordClick(_event) { - } - recordHover(_event) { - } - recordDrag(_event) { - } - recordChange(_event) { - } - recordKeyDown(_event) { - } - recordSettingAccess(_event) { - } - recordFunctionCall(_event) { - } - setChromeFlag(_flagName, _value) { - } - requestRestart() { - } -} - -// Copyright 2009 The Chromium Authors -let InspectorFrontendHostInstance; -class InspectorFrontendAPIImpl { - constructor() { - for (const descriptor of EventDescriptors) { - this[descriptor[0]] = this.dispatch.bind(this, descriptor[0], descriptor[1], descriptor[2]); - } - } - dispatch(name, signature, _runOnceLoaded, ...params) { - if (signature.length < 2) { - try { - InspectorFrontendHostInstance.events.dispatchEventToListeners(name, params[0]); - } - catch (error) { - console.error(error + ' ' + error.stack); - } - return; - } - const data = {}; - for (let i = 0; i < signature.length; ++i) { - data[signature[i]] = params[i]; - } - try { - InspectorFrontendHostInstance.events.dispatchEventToListeners(name, data); - } - catch (error) { - console.error(error + ' ' + error.stack); - } - } - streamWrite(id, chunk) { - streamWrite(id, chunk); - } -} -function installInspectorFrontendHost(instance) { - globalThis.InspectorFrontendHost = InspectorFrontendHostInstance = instance; - if (!(instance instanceof InspectorFrontendHostStub)) { - const proto = InspectorFrontendHostStub.prototype; - for (const name of Object.getOwnPropertyNames(proto)) { - const stub = proto[name]; - if (typeof stub !== 'function' || InspectorFrontendHostInstance[name]) { - continue; - } - console.error(`Incompatible embedder: method Host.InspectorFrontendHost.${name} is missing. Using stub instead.`); - InspectorFrontendHostInstance[name] = stub; - } - } - InspectorFrontendHostInstance.events = new ObjectWrapper(); -} -(function () { - installInspectorFrontendHost(globalThis.InspectorFrontendHost ?? new InspectorFrontendHostStub()); - globalThis.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); -})(); -function isUnderTest(prefs) { - return Settings.hasInstance() && - Settings.instance().createSetting('isUnderTest', false).get(); -} - -// Copyright 2025 The Chromium Authors -class McpHostBindings { - connectAutomaticFileSystem() { - } - disconnectAutomaticFileSystem() { - } - addFileSystem() { - } - loadCompleted() { - } - indexPath() { - } - setInspectedPageBounds() { - } - showCertificateViewer() { - } - setWhitelistedShortcuts() { - } - setEyeDropperActive() { - } - inspectElementCompleted() { - } - openInNewTab() { - } - openSearchResultsInNewTab() { - } - showItemInFolder() { - } - removeFileSystem() { - } - requestFileSystems() { - } - save() { - } - append() { - } - close() { - } - searchInPath() { - } - stopIndexing() { - } - bringToFront() { - } - closeWindow() { - } - copyText() { - } - inspectedURLChanged() { - } - isolatedFileSystem() { - return null; - } - loadNetworkResource(urlString, _headers, streamId, callback) { - let url; - try { - url = new URL$1(urlString); - } - catch { - callback({ - statusCode: 404, - urlValid: false, - }); - return; - } - let contentPromise; - if (url.protocol === 'file:') { - contentPromise = readFile(url, { encoding: 'utf8' }); - } - else if (url.protocol === 'http:' || url.protocol === 'https:') { - contentPromise = fetch(url).then(response => { - if (!response.ok) { - throw new Error('Fetch failed'); - } - return response.text(); - }); - } - else { - callback({ - statusCode: 404, - urlValid: false, - }); - return; - } - contentPromise - .then(content => { - streamWrite(streamId, content); - callback({ statusCode: 200 }); - }) - .catch(() => { - callback({ statusCode: 404 }); - }); - } - registerPreference() { - } - getPreferences() { - } - getPreference() { - } - setPreference() { - } - removePreference() { - } - clearPreferences() { - } - getSyncInformation() { - } - getHostConfig() { - } - upgradeDraggedFileSystemPermissions() { - } - platform() { - switch (process.platform) { - case 'darwin': - return 'mac'; - case 'win32': - return 'windows'; - default: - return 'linux'; - } - } - recordCountHistogram() { - } - recordEnumeratedHistogram() { - } - recordPerformanceHistogram() { - } - recordPerformanceHistogramMedium() { - } - recordUserMetricsAction() { - } - recordNewBadgeUsage() { - } - sendMessageToBackend() { - } - setDevicesDiscoveryConfig() { - } - setDevicesUpdatesEnabled() { - } - openRemotePage() { - } - openNodeFrontend() { - } - setInjectedScriptForOrigin() { - } - setIsDocked() { - } - showSurvey() { - } - canShowSurvey() { - } - zoomFactor() { - return 1; - } - zoomIn() { - } - zoomOut() { - } - resetZoom() { - } - showContextMenuAtPoint() { - } - reattach() { - } - readyForTest() { - } - connectionReady() { - } - setOpenNewWindowForPopups() { - } - isHostedMode() { - return true; - } - setAddExtensionCallback() { - } - initialTargetId() { - return Promise.resolve(null); - } - doAidaConversation(_request, _streamId, cb) { - cb({ - error: 'Not implemented', - }); - } - registerAidaClientEvent(_request, cb) { - cb({ - error: 'Not implemented', - }); - } - aidaCodeComplete(_request, cb) { - cb({ - error: 'Not implemented', - }); - } - dispatchHttpRequest(_request, cb) { - cb({ - error: 'Not implemented', - }); - } - recordImpression() { - } - recordResize() { - } - recordClick() { - } - recordHover() { - } - recordDrag() { - } - recordChange() { - } - recordKeyDown() { - } - recordSettingAccess() { - } - recordFunctionCall() { - } - setChromeFlag() { - } - requestRestart() { - } -} - -// Copyright 2025 The Chromium Authors -let connectionFactory; -class ConnectionTransport { - static setFactory(factory) { - connectionFactory = factory; - } - static getFactory() { - return connectionFactory; - } -} - -var ConnectionTransport$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - ConnectionTransport: ConnectionTransport -}); - -// Copyright 2025 The Chromium Authors -var CDPErrorStatus; -(function (CDPErrorStatus) { - CDPErrorStatus[CDPErrorStatus["PARSE_ERROR"] = -32700] = "PARSE_ERROR"; - CDPErrorStatus[CDPErrorStatus["INVALID_REQUEST"] = -32600] = "INVALID_REQUEST"; - CDPErrorStatus[CDPErrorStatus["METHOD_NOT_FOUND"] = -32601] = "METHOD_NOT_FOUND"; - CDPErrorStatus[CDPErrorStatus["INVALID_PARAMS"] = -32602] = "INVALID_PARAMS"; - CDPErrorStatus[CDPErrorStatus["INTERNAL_ERROR"] = -32603] = "INTERNAL_ERROR"; - CDPErrorStatus[CDPErrorStatus["SERVER_ERROR"] = -32e3] = "SERVER_ERROR"; - CDPErrorStatus[CDPErrorStatus["SESSION_NOT_FOUND"] = -32001] = "SESSION_NOT_FOUND"; - CDPErrorStatus[CDPErrorStatus["DEVTOOLS_STUB_ERROR"] = -32015] = "DEVTOOLS_STUB_ERROR"; - CDPErrorStatus[CDPErrorStatus["DEVTOOLS_REHYDRATION_ERROR"] = -32016] = "DEVTOOLS_REHYDRATION_ERROR"; -})(CDPErrorStatus || (CDPErrorStatus = {})); - -var CDPConnection = /*#__PURE__*/Object.freeze({ - __proto__: null, - get CDPErrorStatus () { return CDPErrorStatus; } -}); - -// Copyright 2020 The Chromium Authors -function registerCommands(inspectorBackend) { - inspectorBackend.registerEnum("Accessibility.AXValueType", { Boolean: "boolean", Tristate: "tristate", BooleanOrUndefined: "booleanOrUndefined", Idref: "idref", IdrefList: "idrefList", Integer: "integer", Node: "node", NodeList: "nodeList", Number: "number", String: "string", ComputedString: "computedString", Token: "token", TokenList: "tokenList", DomRelation: "domRelation", Role: "role", InternalRole: "internalRole", ValueUndefined: "valueUndefined" }); - inspectorBackend.registerEnum("Accessibility.AXValueSourceType", { Attribute: "attribute", Implicit: "implicit", Style: "style", Contents: "contents", Placeholder: "placeholder", RelatedElement: "relatedElement" }); - inspectorBackend.registerEnum("Accessibility.AXValueNativeSourceType", { Description: "description", Figcaption: "figcaption", Label: "label", Labelfor: "labelfor", Labelwrapped: "labelwrapped", Legend: "legend", Rubyannotation: "rubyannotation", Tablecaption: "tablecaption", Title: "title", Other: "other" }); - inspectorBackend.registerEnum("Accessibility.AXPropertyName", { Actions: "actions", Busy: "busy", Disabled: "disabled", Editable: "editable", Focusable: "focusable", Focused: "focused", Hidden: "hidden", HiddenRoot: "hiddenRoot", Invalid: "invalid", Keyshortcuts: "keyshortcuts", Settable: "settable", Roledescription: "roledescription", Live: "live", Atomic: "atomic", Relevant: "relevant", Root: "root", Autocomplete: "autocomplete", HasPopup: "hasPopup", Level: "level", Multiselectable: "multiselectable", Orientation: "orientation", Multiline: "multiline", Readonly: "readonly", Required: "required", Valuemin: "valuemin", Valuemax: "valuemax", Valuetext: "valuetext", Checked: "checked", Expanded: "expanded", Modal: "modal", Pressed: "pressed", Selected: "selected", Activedescendant: "activedescendant", Controls: "controls", Describedby: "describedby", Details: "details", Errormessage: "errormessage", Flowto: "flowto", Labelledby: "labelledby", Owns: "owns", Url: "url", ActiveFullscreenElement: "activeFullscreenElement", ActiveModalDialog: "activeModalDialog", ActiveAriaModalDialog: "activeAriaModalDialog", AriaHiddenElement: "ariaHiddenElement", AriaHiddenSubtree: "ariaHiddenSubtree", EmptyAlt: "emptyAlt", EmptyText: "emptyText", InertElement: "inertElement", InertSubtree: "inertSubtree", LabelContainer: "labelContainer", LabelFor: "labelFor", NotRendered: "notRendered", NotVisible: "notVisible", PresentationalRole: "presentationalRole", ProbablyPresentational: "probablyPresentational", InactiveCarouselTabContent: "inactiveCarouselTabContent", Uninteresting: "uninteresting" }); - inspectorBackend.registerEvent("Accessibility.loadComplete", ["root"]); - inspectorBackend.registerEvent("Accessibility.nodesUpdated", ["nodes"]); - inspectorBackend.registerCommand("Accessibility.disable", [], [], "Disables the accessibility domain."); - inspectorBackend.registerCommand("Accessibility.enable", [], [], "Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. This turns on accessibility for the page, which can impact performance until accessibility is disabled."); - inspectorBackend.registerCommand("Accessibility.getPartialAXTree", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to get the partial accessibility tree for.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to get the partial accessibility tree for.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper to get the partial accessibility tree for.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "fetchRelatives", "type": "boolean", "optional": true, "description": "Whether to fetch this node's ancestors, siblings and children. Defaults to true.", "typeRef": null }], ["nodes"], "Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists."); - inspectorBackend.registerCommand("Accessibility.getFullAXTree", [{ "name": "depth", "type": "number", "optional": true, "description": "The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.", "typeRef": null }, { "name": "frameId", "type": "string", "optional": true, "description": "The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.", "typeRef": "Page.FrameId" }], ["nodes"], "Fetches the entire accessibility tree for the root Document"); - inspectorBackend.registerCommand("Accessibility.getRootAXNode", [{ "name": "frameId", "type": "string", "optional": true, "description": "The frame in whose document the node resides. If omitted, the root frame is used.", "typeRef": "Page.FrameId" }], ["node"], "Fetches the root node. Requires `enable()` to have been called previously."); - inspectorBackend.registerCommand("Accessibility.getAXNodeAndAncestors", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node to get.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node to get.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper to get.", "typeRef": "Runtime.RemoteObjectId" }], ["nodes"], "Fetches a node and all ancestors up to and including the root. Requires `enable()` to have been called previously."); - inspectorBackend.registerCommand("Accessibility.getChildAXNodes", [{ "name": "id", "type": "string", "optional": false, "description": "", "typeRef": "Accessibility.AXNodeId" }, { "name": "frameId", "type": "string", "optional": true, "description": "The frame in whose document the node resides. If omitted, the root frame is used.", "typeRef": "Page.FrameId" }], ["nodes"], "Fetches a particular accessibility node by AXNodeId. Requires `enable()` to have been called previously."); - inspectorBackend.registerCommand("Accessibility.queryAXTree", [{ "name": "nodeId", "type": "number", "optional": true, "description": "Identifier of the node for the root to query.", "typeRef": "DOM.NodeId" }, { "name": "backendNodeId", "type": "number", "optional": true, "description": "Identifier of the backend node for the root to query.", "typeRef": "DOM.BackendNodeId" }, { "name": "objectId", "type": "string", "optional": true, "description": "JavaScript object id of the node wrapper for the root to query.", "typeRef": "Runtime.RemoteObjectId" }, { "name": "accessibleName", "type": "string", "optional": true, "description": "Find nodes with this computed name.", "typeRef": null }, { "name": "role", "type": "string", "optional": true, "description": "Find nodes with this computed role.", "typeRef": null }], ["nodes"], "Query a DOM node's accessibility subtree for accessible name and role. This command computes the name and role for all nodes in the subtree, including those that are ignored for accessibility, and returns those that match the specified name and role. If no DOM node is specified, or the DOM node does not exist, the command returns an error. If neither `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree."); - inspectorBackend.registerType("Accessibility.AXValueSource", [{ "name": "type", "type": "string", "optional": false, "description": "What type of source this is.", "typeRef": "Accessibility.AXValueSourceType" }, { "name": "value", "type": "object", "optional": true, "description": "The value of this property source.", "typeRef": "Accessibility.AXValue" }, { "name": "attribute", "type": "string", "optional": true, "description": "The name of the relevant attribute, if any.", "typeRef": null }, { "name": "attributeValue", "type": "object", "optional": true, "description": "The value of the relevant attribute, if any.", "typeRef": "Accessibility.AXValue" }, { "name": "superseded", "type": "boolean", "optional": true, "description": "Whether this source is superseded by a higher priority source.", "typeRef": null }, { "name": "nativeSource", "type": "string", "optional": true, "description": "The native markup source for this value, e.g. a `