From ede74de199ad3a3719ad9db54532aa6b8efb3254 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:57:08 -0700 Subject: [PATCH] Bump @aws-sdk/client-marketplace-catalog from 3.511.0 to 3.545.0 (#257) * Bump @aws-sdk/client-marketplace-catalog from 3.511.0 to 3.545.0 Bumps [@aws-sdk/client-marketplace-catalog](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-marketplace-catalog) from 3.511.0 to 3.545.0. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-marketplace-catalog/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.545.0/clients/client-marketplace-catalog) --- updated-dependencies: - dependency-name: "@aws-sdk/client-marketplace-catalog" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update dist/ after build --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- dist/index.js | 13198 +++++++++++++++++++++++++------------------- dist/index.js.map | 2 +- dist/licenses.txt | 204 - package-lock.json | 1233 +++-- package.json | 2 +- 5 files changed, 8032 insertions(+), 6607 deletions(-) diff --git a/dist/index.js b/dist/index.js index 1ea4c49..445cf77 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2442,6 +2442,61 @@ function uint32ArrayFrom(a_lookUpTable) { exports.uint32ArrayFrom = uint32ArrayFrom; //# sourceMappingURL=uint32ArrayFrom.js.map +/***/ }), + +/***/ 9221: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultMarketplaceCatalogHttpAuthSchemeProvider = exports.defaultMarketplaceCatalogHttpAuthSchemeParametersProvider = void 0; +const core_1 = __nccwpck_require__(9963); +const util_middleware_1 = __nccwpck_require__(2390); +const defaultMarketplaceCatalogHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultMarketplaceCatalogHttpAuthSchemeParametersProvider = defaultMarketplaceCatalogHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "aws-marketplace", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +const defaultMarketplaceCatalogHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultMarketplaceCatalogHttpAuthSchemeProvider = defaultMarketplaceCatalogHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + /***/ }), /***/ 3211: @@ -2451,15 +2506,17 @@ exports.uint32ArrayFrom = uint32ArrayFrom; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(5473); +const util_endpoints_1 = __nccwpck_require__(3350); +const util_endpoints_2 = __nccwpck_require__(5473); const ruleset_1 = __nccwpck_require__(2510); const defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams: endpointParams, logger: context.logger, }); }; exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; /***/ }), @@ -2523,6 +2580,7 @@ __export(src_exports, { EntityTypeSort: () => EntityTypeSort, FailureCode: () => FailureCode, GetResourcePolicyCommand: () => GetResourcePolicyCommand, + Intent: () => Intent, InternalServiceException: () => InternalServiceException, ListChangeSetsCommand: () => ListChangeSetsCommand, ListEntitiesCommand: () => ListEntitiesCommand, @@ -2559,13 +2617,14 @@ module.exports = __toCommonJS(src_exports); var import_middleware_host_header = __nccwpck_require__(2545); var import_middleware_logger = __nccwpck_require__(14); var import_middleware_recursion_detection = __nccwpck_require__(5525); -var import_middleware_signing = __nccwpck_require__(4935); var import_middleware_user_agent = __nccwpck_require__(4688); var import_config_resolver = __nccwpck_require__(3098); +var import_core = __nccwpck_require__(5829); var import_middleware_content_length = __nccwpck_require__(2800); var import_middleware_endpoint = __nccwpck_require__(2918); var import_middleware_retry = __nccwpck_require__(6039); +var import_httpAuthSchemeProvider = __nccwpck_require__(9221); // src/endpoint/EndpointParameters.ts var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { @@ -2590,19 +2649,62 @@ var import_runtimeConfig = __nccwpck_require__(4506); var import_region_config_resolver = __nccwpck_require__(8156); var import_protocol_http = __nccwpck_require__(4418); var import_smithy_client = __nccwpck_require__(3570); + +// src/auth/httpAuthExtensionConfiguration.ts +var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}, "getHttpAuthExtensionConfiguration"); +var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}, "resolveHttpAuthRuntimeConfig"); + +// src/runtimeExtensions.ts var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { const extensionConfiguration = { ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)) + ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) }; extensions.forEach((extension) => extension.configure(extensionConfiguration)); return { ...runtimeConfig, ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration) + ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) }; }, "resolveRuntimeExtensions"); @@ -2615,8 +2717,8 @@ var _MarketplaceCatalogClient = class _MarketplaceCatalogClient extends import_s const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2); const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5); - const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6); + const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); super(_config_8); this.config = _config_8; @@ -2625,8 +2727,14 @@ var _MarketplaceCatalogClient = class _MarketplaceCatalogClient extends import_s this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider() + }) + ); + this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); } /** * Destroy underlying resources, like sockets. It's usually not necessary to do this. @@ -2636,6 +2744,14 @@ var _MarketplaceCatalogClient = class _MarketplaceCatalogClient extends import_s destroy() { super.destroy(); } + getDefaultHttpAuthSchemeParametersProvider() { + return import_httpAuthSchemeProvider.defaultMarketplaceCatalogHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new import_core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }); + } }; __name(_MarketplaceCatalogClient, "MarketplaceCatalogClient"); var MarketplaceCatalogClient = _MarketplaceCatalogClient; @@ -2650,9 +2766,10 @@ var import_middleware_serde = __nccwpck_require__(1238); var import_types = __nccwpck_require__(5756); // src/protocols/Aws_restJson1.ts -var import_core = __nccwpck_require__(5829); +var import_core2 = __nccwpck_require__(9963); + -var import_uuid = __nccwpck_require__(5840); +var import_uuid = __nccwpck_require__(1286); // src/models/MarketplaceCatalogServiceException.ts @@ -2797,6 +2914,10 @@ var FailureCode = { ClientError: "CLIENT_ERROR", ServerFault: "SERVER_FAULT" }; +var Intent = { + APPLY: "APPLY", + VALIDATE: "VALIDATE" +}; var ChangeStatus = { APPLYING: "APPLYING", CANCELLED: "CANCELLED", @@ -2894,6 +3015,7 @@ var OfferSortBy = { Name: "Name", ProductId: "ProductId", ReleaseDate: "ReleaseDate", + ResaleAuthorizationId: "ResaleAuthorizationId", State: "State", Targeting: "Targeting" }; @@ -3119,7 +3241,8 @@ var se_StartChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => ChangeSet: (_) => se_RequestedChangeList(_, context), ChangeSetName: [], ChangeSetTags: (_) => (0, import_smithy_client._json)(_), - ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()] + ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()], + Intent: [] }) ); b.m("POST").h(headers).b(body); @@ -3164,7 +3287,7 @@ var de_BatchDescribeEntitiesCommand = /* @__PURE__ */ __name(async (output, cont const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { EntityDetails: (_) => de_EntityDetails(_, context), Errors: import_smithy_client._json @@ -3179,7 +3302,7 @@ var de_CancelChangeSetCommand = /* @__PURE__ */ __name(async (output, context) = const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { ChangeSetArn: import_smithy_client.expectString, ChangeSetId: import_smithy_client.expectString @@ -3204,7 +3327,7 @@ var de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { ChangeSet: (_) => de_ChangeSetDescription(_, context), ChangeSetArn: import_smithy_client.expectString, @@ -3213,6 +3336,7 @@ var de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) EndTime: import_smithy_client.expectString, FailureCode: import_smithy_client.expectString, FailureDescription: import_smithy_client.expectString, + Intent: import_smithy_client.expectString, StartTime: import_smithy_client.expectString, Status: import_smithy_client.expectString }); @@ -3226,7 +3350,7 @@ var de_DescribeEntityCommand = /* @__PURE__ */ __name(async (output, context) => const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { Details: import_smithy_client.expectString, DetailsDocument: (_) => de_JsonDocumentType(_, context), @@ -3245,7 +3369,7 @@ var de_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { Policy: import_smithy_client.expectString }); @@ -3259,7 +3383,7 @@ var de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { ChangeSetSummaryList: import_smithy_client._json, NextToken: import_smithy_client.expectString @@ -3274,7 +3398,7 @@ var de_ListEntitiesCommand = /* @__PURE__ */ __name(async (output, context) => { const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { EntitySummaryList: import_smithy_client._json, NextToken: import_smithy_client.expectString @@ -3289,7 +3413,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { ResourceArn: import_smithy_client.expectString, Tags: import_smithy_client._json @@ -3314,7 +3438,7 @@ var de_StartChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { ChangeSetArn: import_smithy_client.expectString, ChangeSetId: import_smithy_client.expectString @@ -3345,9 +3469,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, - body: await parseErrorBody(output.body, context) + body: await (0, import_core2.parseJsonErrorBody)(output.body, context) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); switch (errorCode) { case "AccessDeniedException": case "com.amazonaws.marketplacecatalog#AccessDeniedException": @@ -3548,7 +3672,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ extendedRequestId: output.headers["x-amz-id-2"], cfId: output.headers["x-amz-cf-id"] }), "deserializeMetadata"); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); var _C = "Catalog"; var _CSI = "ChangeSetId"; var _EI = "EntityId"; @@ -3557,46 +3680,6 @@ var _c = "catalog"; var _cSI = "changeSetId"; var _eI = "entityId"; var _rA = "resourceArn"; -var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - return JSON.parse(encoded); - } - return {}; -}), "parseBody"); -var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}, "parseErrorBody"); -var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { - const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); - const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; - } - return cleanValue; - }, "sanitizeErrorCode"); - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); - } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); - } -}, "loadRestJsonErrorCode"); // src/commands/BatchDescribeEntitiesCommand.ts var _BatchDescribeEntitiesCommand = class _BatchDescribeEntitiesCommand extends import_smithy_client.Command.classBuilder().ep({ @@ -3844,9 +3927,6 @@ var paginateListChangeSets = (0, import_core.createPaginator)(MarketplaceCatalog // src/pagination/ListEntitiesPaginator.ts var paginateListEntities = (0, import_core.createPaginator)(MarketplaceCatalogClient, ListEntitiesCommand, "NextToken", "NextToken", "MaxResults"); - -// src/index.ts -var import_util_endpoints = __nccwpck_require__(3350); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -3895,7 +3975,7 @@ const getRuntimeConfig = (config) => { (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, @@ -3919,10 +3999,12 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +const core_1 = __nccwpck_require__(9963); const smithy_client_1 = __nccwpck_require__(3570); const url_parser_1 = __nccwpck_require__(4681); const util_base64_1 = __nccwpck_require__(5600); const util_utf8_1 = __nccwpck_require__(1895); +const httpAuthSchemeProvider_1 = __nccwpck_require__(9221); const endpointResolver_1 = __nccwpck_require__(3211); const getRuntimeConfig = (config) => { return { @@ -3932,6 +4014,14 @@ const getRuntimeConfig = (config) => { disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultMarketplaceCatalogHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + ], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "Marketplace Catalog", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -3944,244 +4034,1058 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 118: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 1286: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__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]; + +Object.defineProperty(exports, "__esModule", ({ + value: true })); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultProvider = void 0; -exports.defaultProvider = ((input) => { - return () => Promise.resolve().then(() => __importStar(__nccwpck_require__(5531))).then(({ defaultProvider }) => defaultProvider(input)()); -}); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(3802)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(9450)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(6475)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(959)); +var _nil = _interopRequireDefault(__nccwpck_require__(4021)); + +var _version = _interopRequireDefault(__nccwpck_require__(5943)); + +var _validate = _interopRequireDefault(__nccwpck_require__(722)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(3659)); + +var _parse = _interopRequireDefault(__nccwpck_require__(887)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 7604: +/***/ 5359: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(5473); -const ruleset_1 = __nccwpck_require__(1756); -const defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { - endpointParams: endpointParams, - logger: context.logger, - }); -}; -exports.defaultEndpointResolver = defaultEndpointResolver; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -/***/ }), +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); -/***/ 1756: -/***/ ((__unused_webpack_module, exports) => { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -"use strict"; +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ruleSet = void 0; -const u = "required", v = "fn", w = "argv", x = "ref"; -const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; -const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; -exports.ruleSet = _data; + return _crypto.default.createHash('md5').update(bytes).digest(); +} +var _default = md5; +exports["default"] = _default; /***/ }), -/***/ 4527: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 3671: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AccessDeniedException: () => AccessDeniedException, - AuthorizationPendingException: () => AuthorizationPendingException, - CreateTokenCommand: () => CreateTokenCommand, - CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, - CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, - CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand, - CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog, - CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog, - ExpiredTokenException: () => ExpiredTokenException, - InternalServerException: () => InternalServerException, - InvalidClientException: () => InvalidClientException, - InvalidClientMetadataException: () => InvalidClientMetadataException, - InvalidGrantException: () => InvalidGrantException, - InvalidRequestException: () => InvalidRequestException, - InvalidRequestRegionException: () => InvalidRequestRegionException, - InvalidScopeException: () => InvalidScopeException, - RegisterClientCommand: () => RegisterClientCommand, - RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog, - SSOOIDC: () => SSOOIDC, - SSOOIDCClient: () => SSOOIDCClient, - SSOOIDCServiceException: () => SSOOIDCServiceException, - SlowDownException: () => SlowDownException, - StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand, - StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog, - UnauthorizedClientException: () => UnauthorizedClientException, - UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, - __Client: () => import_smithy_client.Client -}); -module.exports = __toCommonJS(src_exports); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -// src/SSOOIDCClient.ts -var import_middleware_host_header = __nccwpck_require__(2545); -var import_middleware_logger = __nccwpck_require__(14); -var import_middleware_recursion_detection = __nccwpck_require__(5525); -var import_middleware_signing = __nccwpck_require__(4935); -var import_middleware_user_agent = __nccwpck_require__(4688); -var import_config_resolver = __nccwpck_require__(3098); -var import_middleware_content_length = __nccwpck_require__(2800); -var import_middleware_endpoint = __nccwpck_require__(2918); -var import_middleware_retry = __nccwpck_require__(6039); +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// src/endpoint/EndpointParameters.ts -var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { - return { - ...options, - useDualstackEndpoint: options.useDualstackEndpoint ?? false, - useFipsEndpoint: options.useFipsEndpoint ?? false, - defaultSigningName: "sso-oauth" - }; -}, "resolveClientEndpointParameters"); -var commonParams = { - UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, - Endpoint: { type: "builtInParams", name: "endpoint" }, - Region: { type: "builtInParams", name: "region" }, - UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +var _default = { + randomUUID: _crypto.default.randomUUID }; +exports["default"] = _default; -// src/SSOOIDCClient.ts -var import_runtimeConfig = __nccwpck_require__(5524); +/***/ }), -// src/runtimeExtensions.ts -var import_region_config_resolver = __nccwpck_require__(8156); -var import_protocol_http = __nccwpck_require__(4418); -var import_smithy_client = __nccwpck_require__(3570); -var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); -var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { - const extensionConfiguration = { - ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)) - }; - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return { - ...runtimeConfig, - ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration) - }; -}, "resolveRuntimeExtensions"); +/***/ 4021: +/***/ ((__unused_webpack_module, exports) => { -// src/SSOOIDCClient.ts -var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client { - constructor(...[configuration]) { - const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); - const _config_1 = resolveClientEndpointParameters(_config_0); - const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1); - const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2); - const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); - const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); - const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5); - const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); - super(_config_8); - this.config = _config_8; - this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); - this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 887: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(722)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); } - /** - * Destroy underlying resources, like sockets. It's usually not necessary to do this. - * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. - * Otherwise, sockets might stay open for quite a long time before the server terminates them. - */ - destroy() { - super.destroy(); + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 9135: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 5446: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; } -}; -__name(_SSOOIDCClient, "SSOOIDCClient"); -var SSOOIDCClient = _SSOOIDCClient; -// src/SSOOIDC.ts + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +/***/ }), -// src/commands/CreateTokenCommand.ts +/***/ 5889: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var import_middleware_serde = __nccwpck_require__(1238); +"use strict"; -var import_types = __nccwpck_require__(5756); -// src/models/models_0.ts +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); -// src/models/SSOOIDCServiceException.ts +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client.ServiceException { - /** - * @internal - */ - constructor(options) { - super(options); - Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); } -}; -__name(_SSOOIDCServiceException, "SSOOIDCServiceException"); -var SSOOIDCServiceException = _SSOOIDCServiceException; + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 3659: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; + +var _validate = _interopRequireDefault(__nccwpck_require__(722)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} + +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 3802: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(5446)); + +var _stringify = __nccwpck_require__(3659); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.unsafeStringify)(b); +} + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 9450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(3383)); + +var _md = _interopRequireDefault(__nccwpck_require__(5359)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 3383: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; + +var _stringify = __nccwpck_require__(3659); + +var _parse = _interopRequireDefault(__nccwpck_require__(887)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + +/***/ 6475: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _native = _interopRequireDefault(__nccwpck_require__(3671)); + +var _rng = _interopRequireDefault(__nccwpck_require__(5446)); + +var _stringify = __nccwpck_require__(3659); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); + } + + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.unsafeStringify)(rnds); +} + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(3383)); + +var _sha = _interopRequireDefault(__nccwpck_require__(5889)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 722: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(9135)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 5943: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(722)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.slice(14, 15), 16); +} + +var _default = version; +exports["default"] = _default; + +/***/ }), + +/***/ 6948: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0; +const core_1 = __nccwpck_require__(9963); +const util_middleware_1 = __nccwpck_require__(2390); +const defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sso-oauth", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateToken": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "RegisterClient": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "StartDeviceAuthorization": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + +/***/ }), + +/***/ 118: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__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 = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultProvider = void 0; +exports.defaultProvider = ((input) => { + return () => Promise.resolve().then(() => __importStar(__nccwpck_require__(5531))).then(({ defaultProvider }) => defaultProvider(input)()); +}); + + +/***/ }), + +/***/ 7604: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __nccwpck_require__(3350); +const util_endpoints_2 = __nccwpck_require__(5473); +const ruleset_1 = __nccwpck_require__(1756); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + + +/***/ }), + +/***/ 1756: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; + + +/***/ }), + +/***/ 4527: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AccessDeniedException: () => AccessDeniedException, + AuthorizationPendingException: () => AuthorizationPendingException, + CreateTokenCommand: () => CreateTokenCommand, + CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog, + CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog, + CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand, + CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog, + CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog, + ExpiredTokenException: () => ExpiredTokenException, + InternalServerException: () => InternalServerException, + InvalidClientException: () => InvalidClientException, + InvalidClientMetadataException: () => InvalidClientMetadataException, + InvalidGrantException: () => InvalidGrantException, + InvalidRequestException: () => InvalidRequestException, + InvalidRequestRegionException: () => InvalidRequestRegionException, + InvalidScopeException: () => InvalidScopeException, + RegisterClientCommand: () => RegisterClientCommand, + RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog, + SSOOIDC: () => SSOOIDC, + SSOOIDCClient: () => SSOOIDCClient, + SSOOIDCServiceException: () => SSOOIDCServiceException, + SlowDownException: () => SlowDownException, + StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand, + StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog, + UnauthorizedClientException: () => UnauthorizedClientException, + UnsupportedGrantTypeException: () => UnsupportedGrantTypeException, + __Client: () => import_smithy_client.Client +}); +module.exports = __toCommonJS(src_exports); + +// src/SSOOIDCClient.ts +var import_middleware_host_header = __nccwpck_require__(2545); +var import_middleware_logger = __nccwpck_require__(14); +var import_middleware_recursion_detection = __nccwpck_require__(5525); +var import_middleware_user_agent = __nccwpck_require__(4688); +var import_config_resolver = __nccwpck_require__(3098); +var import_core = __nccwpck_require__(5829); +var import_middleware_content_length = __nccwpck_require__(2800); +var import_middleware_endpoint = __nccwpck_require__(2918); +var import_middleware_retry = __nccwpck_require__(6039); + +var import_httpAuthSchemeProvider = __nccwpck_require__(6948); + +// src/endpoint/EndpointParameters.ts +var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "sso-oauth" + }; +}, "resolveClientEndpointParameters"); +var commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" } +}; + +// src/SSOOIDCClient.ts +var import_runtimeConfig = __nccwpck_require__(5524); + +// src/runtimeExtensions.ts +var import_region_config_resolver = __nccwpck_require__(8156); +var import_protocol_http = __nccwpck_require__(4418); +var import_smithy_client = __nccwpck_require__(3570); + +// src/auth/httpAuthExtensionConfiguration.ts +var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}, "getHttpAuthExtensionConfiguration"); +var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}, "resolveHttpAuthRuntimeConfig"); + +// src/runtimeExtensions.ts +var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); +var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) + }; +}, "resolveRuntimeExtensions"); + +// src/SSOOIDCClient.ts +var _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client { + constructor(...[configuration]) { + const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1); + const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2); + const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); + const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider() + }) + ); + this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); + } + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy() { + super.destroy(); + } + getDefaultHttpAuthSchemeParametersProvider() { + return import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new import_core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }); + } +}; +__name(_SSOOIDCClient, "SSOOIDCClient"); +var SSOOIDCClient = _SSOOIDCClient; + +// src/SSOOIDC.ts + + +// src/commands/CreateTokenCommand.ts + +var import_middleware_serde = __nccwpck_require__(1238); + +var import_types = __nccwpck_require__(5756); + +// src/models/models_0.ts + + +// src/models/SSOOIDCServiceException.ts + +var _SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client.ServiceException { + /** + * @internal + */ + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); + } +}; +__name(_SSOOIDCServiceException, "SSOOIDCServiceException"); +var SSOOIDCServiceException = _SSOOIDCServiceException; // src/models/models_0.ts var _AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { @@ -4466,7 +5370,8 @@ var StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name(( }), "StartDeviceAuthorizationRequestFilterSensitiveLog"); // src/protocols/Aws_restJson1.ts -var import_core = __nccwpck_require__(5829); +var import_core2 = __nccwpck_require__(9963); + var se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => { const b = (0, import_core.requestBuilder)(input, context); @@ -4558,7 +5463,7 @@ var de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => { const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { accessToken: import_smithy_client.expectString, expiresIn: import_smithy_client.expectInt32, @@ -4576,7 +5481,7 @@ var de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { accessToken: import_smithy_client.expectString, expiresIn: import_smithy_client.expectInt32, @@ -4596,7 +5501,7 @@ var de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { authorizationEndpoint: import_smithy_client.expectString, clientId: import_smithy_client.expectString, @@ -4615,7 +5520,7 @@ var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, c const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { deviceCode: import_smithy_client.expectString, expiresIn: import_smithy_client.expectInt32, @@ -4630,9 +5535,9 @@ var de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, c var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, - body: await parseErrorBody(output.body, context) + body: await (0, import_core2.parseJsonErrorBody)(output.body, context) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); switch (errorCode) { case "AccessDeniedException": case "com.amazonaws.ssooidc#AccessDeniedException": @@ -4873,48 +5778,7 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ extendedRequestId: output.headers["x-amz-id-2"], cfId: output.headers["x-amz-cf-id"] }), "deserializeMetadata"); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); var _ai = "aws_iam"; -var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - return JSON.parse(encoded); - } - return {}; -}), "parseBody"); -var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}, "parseErrorBody"); -var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { - const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); - const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; - } - return cleanValue; - }, "sanitizeErrorCode"); - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); - } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); - } -}, "loadRestJsonErrorCode"); // src/commands/CreateTokenCommand.ts var _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client.Command.classBuilder().ep({ @@ -4934,14 +5798,12 @@ var CreateTokenCommand = _CreateTokenCommand; - var _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client.Command.classBuilder().ep({ ...commonParams }).m(function(Command, cs, config, o) { return [ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()), - (0, import_middleware_signing.getAwsAuthPlugin)(config) + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) ]; }).s("AWSSSOOIDCService", "CreateTokenWithIAM", {}).n("SSOOIDCClient", "CreateTokenWithIAMCommand").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() { }; @@ -4994,9 +5856,6 @@ var _SSOOIDC = class _SSOOIDC extends SSOOIDCClient { __name(_SSOOIDC, "SSOOIDC"); var SSOOIDC = _SSOOIDC; (0, import_smithy_client.createAggregatedClient)(commands, SSOOIDC); - -// src/index.ts -var import_util_endpoints = __nccwpck_require__(3350); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -5045,7 +5904,7 @@ const getRuntimeConfig = (config) => { (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, @@ -5069,10 +5928,13 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +const core_1 = __nccwpck_require__(9963); +const core_2 = __nccwpck_require__(5829); const smithy_client_1 = __nccwpck_require__(3570); const url_parser_1 = __nccwpck_require__(4681); const util_base64_1 = __nccwpck_require__(5600); const util_utf8_1 = __nccwpck_require__(1895); +const httpAuthSchemeProvider_1 = __nccwpck_require__(6948); const endpointResolver_1 = __nccwpck_require__(7604); const getRuntimeConfig = (config) => { return { @@ -5082,6 +5944,19 @@ const getRuntimeConfig = (config) => { disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "SSO OIDC", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -5092,6 +5967,82 @@ const getRuntimeConfig = (config) => { exports.getRuntimeConfig = getRuntimeConfig; +/***/ }), + +/***/ 9344: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0; +const core_1 = __nccwpck_require__(9963); +const util_middleware_1 = __nccwpck_require__(2390); +const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "awsssoportal", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSSOHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "GetRoleCredentials": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccountRoles": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "ListAccounts": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "Logout": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return { + ...config_0, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + /***/ }), /***/ 898: @@ -5101,15 +6052,17 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(5473); +const util_endpoints_1 = __nccwpck_require__(3350); +const util_endpoints_2 = __nccwpck_require__(5473); const ruleset_1 = __nccwpck_require__(3341); const defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams: endpointParams, logger: context.logger, }); }; exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; /***/ }), @@ -5185,10 +6138,12 @@ var import_middleware_logger = __nccwpck_require__(14); var import_middleware_recursion_detection = __nccwpck_require__(5525); var import_middleware_user_agent = __nccwpck_require__(4688); var import_config_resolver = __nccwpck_require__(3098); +var import_core = __nccwpck_require__(5829); var import_middleware_content_length = __nccwpck_require__(2800); var import_middleware_endpoint = __nccwpck_require__(2918); var import_middleware_retry = __nccwpck_require__(6039); +var import_httpAuthSchemeProvider = __nccwpck_require__(9344); // src/endpoint/EndpointParameters.ts var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => { @@ -5213,19 +6168,62 @@ var import_runtimeConfig = __nccwpck_require__(9756); var import_region_config_resolver = __nccwpck_require__(8156); var import_protocol_http = __nccwpck_require__(4418); var import_smithy_client = __nccwpck_require__(3570); + +// src/auth/httpAuthExtensionConfiguration.ts +var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + } + }; +}, "getHttpAuthExtensionConfiguration"); +var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials() + }; +}, "resolveHttpAuthRuntimeConfig"); + +// src/runtimeExtensions.ts var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial"); var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => { const extensionConfiguration = { ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)), ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)) + ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)) }; extensions.forEach((extension) => extension.configure(extensionConfiguration)); return { ...runtimeConfig, ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration) + ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration) }; }, "resolveRuntimeExtensions"); @@ -5239,15 +6237,23 @@ var _SSOClient = class _SSOClient extends import_smithy_client.Client { const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3); const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4); const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5); - const _config_7 = resolveRuntimeExtensions(_config_6, (configuration == null ? void 0 : configuration.extensions) || []); - super(_config_7); - this.config = _config_7; + const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []); + super(_config_8); + this.config = _config_8; this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config)); + this.middlewareStack.use( + (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider() + }) + ); + this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config)); } /** * Destroy underlying resources, like sockets. It's usually not necessary to do this. @@ -5257,6 +6263,14 @@ var _SSOClient = class _SSOClient extends import_smithy_client.Client { destroy() { super.destroy(); } + getDefaultHttpAuthSchemeParametersProvider() { + return import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new import_core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials + }); + } }; __name(_SSOClient, "SSOClient"); var SSOClient = _SSOClient; @@ -5383,7 +6397,8 @@ var LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({ }), "LogoutRequestFilterSensitiveLog"); // src/protocols/Aws_restJson1.ts -var import_core = __nccwpck_require__(5829); +var import_core2 = __nccwpck_require__(9963); + var se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => { const b = (0, import_core.requestBuilder)(input, context); @@ -5445,7 +6460,7 @@ var de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { roleCredentials: import_smithy_client._json }); @@ -5459,7 +6474,7 @@ var de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { nextToken: import_smithy_client.expectString, roleList: import_smithy_client._json @@ -5474,7 +6489,7 @@ var de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => { const contents = (0, import_smithy_client.map)({ $metadata: deserializeMetadata(output) }); - const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body"); + const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body"); const doc = (0, import_smithy_client.take)(data, { accountList: import_smithy_client._json, nextToken: import_smithy_client.expectString @@ -5495,9 +6510,9 @@ var de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => { var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, - body: await parseErrorBody(output.body, context) + body: await (0, import_core2.parseJsonErrorBody)(output.body, context) }; - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body); switch (errorCode) { case "InvalidRequestException": case "com.amazonaws.sso#InvalidRequestException": @@ -5579,7 +6594,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ extendedRequestId: output.headers["x-amz-id-2"], cfId: output.headers["x-amz-cf-id"] }), "deserializeMetadata"); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); var isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue"); var _aI = "accountId"; var _aT = "accessToken"; @@ -5591,46 +6605,6 @@ var _nt = "next_token"; var _rN = "roleName"; var _rn = "role_name"; var _xasbt = "x-amz-sso_bearer_token"; -var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - return JSON.parse(encoded); - } - return {}; -}), "parseBody"); -var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}, "parseErrorBody"); -var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { - const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); - const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; - } - return cleanValue; - }, "sanitizeErrorCode"); - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== void 0) { - return sanitizeErrorCode(output.headers[headerKey]); - } - if (data.code !== void 0) { - return sanitizeErrorCode(data.code); - } - if (data["__type"] !== void 0) { - return sanitizeErrorCode(data["__type"]); - } -}, "loadRestJsonErrorCode"); // src/commands/GetRoleCredentialsCommand.ts var _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends import_smithy_client.Command.classBuilder().ep({ @@ -5716,9 +6690,6 @@ var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListA // src/pagination/ListAccountsPaginator.ts var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); - -// src/index.ts -var import_util_endpoints = __nccwpck_require__(3350); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -5765,7 +6736,7 @@ const getRuntimeConfig = (config) => { (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, @@ -5789,10 +6760,13 @@ exports.getRuntimeConfig = getRuntimeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +const core_1 = __nccwpck_require__(9963); +const core_2 = __nccwpck_require__(5829); const smithy_client_1 = __nccwpck_require__(3570); const url_parser_1 = __nccwpck_require__(4681); const util_base64_1 = __nccwpck_require__(5600); const util_utf8_1 = __nccwpck_require__(1895); +const httpAuthSchemeProvider_1 = __nccwpck_require__(9344); const endpointResolver_1 = __nccwpck_require__(898); const getRuntimeConfig = (config) => { return { @@ -5802,6 +6776,19 @@ const getRuntimeConfig = (config) => { disableHostPrefix: config?.disableHostPrefix ?? false, endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), serviceId: config?.serviceId ?? "SSO", urlParser: config?.urlParser ?? url_parser_1.parseUrl, @@ -6076,15 +7063,17 @@ exports.commonParams = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __nccwpck_require__(5473); +const util_endpoints_1 = __nccwpck_require__(3350); +const util_endpoints_2 = __nccwpck_require__(5473); const ruleset_1 = __nccwpck_require__(6882); const defaultEndpointResolver = (endpointParams, context = {}) => { - return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { endpointParams: endpointParams, logger: context.logger, }); }; exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; /***/ }), @@ -6365,9 +7354,9 @@ var GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => }), "GetSessionTokenResponseFilterSensitiveLog"); // src/protocols/Aws_query.ts +var import_core = __nccwpck_require__(9963); var import_protocol_http = __nccwpck_require__(4418); -var import_fast_xml_parser = __nccwpck_require__(2603); var se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => { const headers = SHARED_HEADERS; let body; @@ -6452,7 +7441,7 @@ var de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => { if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); const response = { @@ -6465,7 +7454,7 @@ var de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); const response = { @@ -6478,7 +7467,7 @@ var de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); const response = { @@ -6491,7 +7480,7 @@ var de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); const response = { @@ -6504,7 +7493,7 @@ var de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); const response = { @@ -6517,7 +7506,7 @@ var de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); const response = { @@ -6530,7 +7519,7 @@ var de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); const response = { @@ -6543,7 +7532,7 @@ var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) = if (output.statusCode >= 300) { return de_CommandError(output, context); } - const data = await parseBody(output.body, context); + const data = await (0, import_core.parseXmlBody)(output.body, context); let contents = {}; contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); const response = { @@ -6555,7 +7544,7 @@ var de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) = var de_CommandError = /* @__PURE__ */ __name(async (output, context) => { const parsedOutput = { ...output, - body: await parseErrorBody(output.body, context) + body: await (0, import_core.parseXmlErrorBody)(output.body, context) }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { @@ -6699,549 +7688,1371 @@ var se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => { entries[loc] = value; }); } - if (input[_TTK] != null) { - const memberEntries = se_tagKeyListType(input[_TTK], context); - if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) { - entries.TransitiveTagKeys = []; + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) { + entries.TransitiveTagKeys = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TransitiveTagKeys.${key}`; + entries[loc] = value; + }); + } + if (input[_EI] != null) { + entries[_EI] = input[_EI]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); + } + return entries; +}, "se_AssumeRoleRequest"); +var se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; + } + if (input[_SAMLA] != null) { + entries[_SAMLA] = input[_SAMLA]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}, "se_AssumeRoleWithSAMLRequest"); +var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { + var _a2; + const entries = {}; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; + } + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; + } + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; + } + if (input[_PI] != null) { + entries[_PI] = input[_PI]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + return entries; +}, "se_AssumeRoleWithWebIdentityRequest"); +var se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_EM] != null) { + entries[_EM] = input[_EM]; + } + return entries; +}, "se_DecodeAuthorizationMessageRequest"); +var se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_AKI] != null) { + entries[_AKI] = input[_AKI]; + } + return entries; +}, "se_GetAccessKeyInfoRequest"); +var se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + return entries; +}, "se_GetCallerIdentityRequest"); +var se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => { + var _a2, _b; + const entries = {}; + if (input[_N] != null) { + entries[_N] = input[_N]; + } + if (input[_P] != null) { + entries[_P] = input[_P]; + } + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { + entries.PolicyArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `PolicyArns.${key}`; + entries[loc] = value; + }); + } + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { + entries.Tags = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tags.${key}`; + entries[loc] = value; + }); + } + return entries; +}, "se_GetFederationTokenRequest"); +var se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; + } + if (input[_SN] != null) { + entries[_SN] = input[_SN]; + } + if (input[_TC] != null) { + entries[_TC] = input[_TC]; + } + return entries; +}, "se_GetSessionTokenRequest"); +var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; } + const memberEntries = se_PolicyDescriptorType(entry, context); Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TransitiveTagKeys.${key}`; - entries[loc] = value; + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}, "se_policyDescriptorListType"); +var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; +}, "se_PolicyDescriptorType"); +var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_PAro] != null) { + entries[_PAro] = input[_PAro]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; +}, "se_ProvidedContext"); +var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}, "se_ProvidedContextsListType"); +var se_Tag = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + if (input[_K] != null) { + entries[_K] = input[_K]; + } + if (input[_Va] != null) { + entries[_Va] = input[_Va]; + } + return entries; +}, "se_Tag"); +var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}, "se_tagKeyListType"); +var se_tagListType = /* @__PURE__ */ __name((input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_Tag(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; }); + counter++; + } + return entries; +}, "se_tagListType"); +var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]); + } + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); + } + return contents; +}, "de_AssumedRoleUser"); +var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); + } + return contents; +}, "de_AssumeRoleResponse"); +var de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + } + if (output[_S] != null) { + contents[_S] = (0, import_smithy_client.expectString)(output[_S]); + } + if (output[_ST] != null) { + contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]); + } + if (output[_I] != null) { + contents[_I] = (0, import_smithy_client.expectString)(output[_I]); + } + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]); + } + if (output[_NQ] != null) { + contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]); + } + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); + } + return contents; +}, "de_AssumeRoleWithSAMLResponse"); +var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); + } + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]); + } + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); + } + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); } - if (input[_EI] != null) { - entries[_EI] = input[_EI]; + if (output[_Pr] != null) { + contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]); } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; + if (output[_Au] != null) { + contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]); } - if (input[_TC] != null) { - entries[_TC] = input[_TC]; + if (output[_SI] != null) { + contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); } - if (input[_SI] != null) { - entries[_SI] = input[_SI]; + return contents; +}, "de_AssumeRoleWithWebIdentityResponse"); +var de_Credentials = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]); } - if (input[_PC] != null) { - const memberEntries = se_ProvidedContextsListType(input[_PC], context); - if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) { - entries.ProvidedContexts = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ProvidedContexts.${key}`; - entries[loc] = value; - }); + if (output[_SAK] != null) { + contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]); } - return entries; -}, "se_AssumeRoleRequest"); -var se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => { - var _a2; - const entries = {}; - if (input[_RA] != null) { - entries[_RA] = input[_RA]; + if (output[_STe] != null) { + contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]); } - if (input[_PAr] != null) { - entries[_PAr] = input[_PAr]; + if (output[_E] != null) { + contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E])); } - if (input[_SAMLA] != null) { - entries[_SAMLA] = input[_SAMLA]; + return contents; +}, "de_Credentials"); +var de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_DM] != null) { + contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]); } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); + return contents; +}, "de_DecodeAuthorizationMessageResponse"); +var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - if (input[_P] != null) { - entries[_P] = input[_P]; + return contents; +}, "de_ExpiredTokenException"); +var de_FederatedUser = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_FUI] != null) { + contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]); } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); } - return entries; -}, "se_AssumeRoleWithSAMLRequest"); -var se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => { - var _a2; - const entries = {}; - if (input[_RA] != null) { - entries[_RA] = input[_RA]; + return contents; +}, "de_FederatedUser"); +var de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); } - if (input[_RSN] != null) { - entries[_RSN] = input[_RSN]; + return contents; +}, "de_GetAccessKeyInfoResponse"); +var de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]); } - if (input[_WIT] != null) { - entries[_WIT] = input[_WIT]; + if (output[_Ac] != null) { + contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); } - if (input[_PI] != null) { - entries[_PI] = input[_PI]; + if (output[_Ar] != null) { + contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); + return contents; +}, "de_GetCallerIdentityResponse"); +var de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } - if (input[_P] != null) { - entries[_P] = input[_P]; + if (output[_FU] != null) { + contents[_FU] = de_FederatedUser(output[_FU], context); } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; + if (output[_PPS] != null) { + contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); } - return entries; -}, "se_AssumeRoleWithWebIdentityRequest"); -var se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_EM] != null) { - entries[_EM] = input[_EM]; + return contents; +}, "de_GetFederationTokenResponse"); +var de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } - return entries; -}, "se_DecodeAuthorizationMessageRequest"); -var se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_AKI] != null) { - entries[_AKI] = input[_AKI]; + return contents; +}, "de_GetSessionTokenResponse"); +var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - return entries; -}, "se_GetAccessKeyInfoRequest"); -var se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - return entries; -}, "se_GetCallerIdentityRequest"); -var se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => { - var _a2, _b; - const entries = {}; - if (input[_N] != null) { - entries[_N] = input[_N]; + return contents; +}, "de_IDPCommunicationErrorException"); +var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - if (input[_P] != null) { - entries[_P] = input[_P]; + return contents; +}, "de_IDPRejectedClaimException"); +var de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - if (input[_PA] != null) { - const memberEntries = se_policyDescriptorListType(input[_PA], context); - if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) { - entries.PolicyArns = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `PolicyArns.${key}`; - entries[loc] = value; - }); + return contents; +}, "de_InvalidAuthorizationMessageException"); +var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - if (input[_DS] != null) { - entries[_DS] = input[_DS]; + return contents; +}, "de_InvalidIdentityTokenException"); +var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - if (input[_T] != null) { - const memberEntries = se_tagListType(input[_T], context); - if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) { - entries.Tags = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tags.${key}`; - entries[loc] = value; - }); + return contents; +}, "de_MalformedPolicyDocumentException"); +var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); } - return entries; -}, "se_GetFederationTokenRequest"); -var se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_DS] != null) { - entries[_DS] = input[_DS]; + return contents; +}, "de_PackedPolicyTooLargeException"); +var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + } + return contents; +}, "de_RegionDisabledException"); +var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"] +}), "deserializeMetadata"); +var throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException); +var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; } - if (input[_SN] != null) { - entries[_SN] = input[_SN]; + return new import_protocol_http.HttpRequest(contents); +}, "buildHttpRpcRequest"); +var SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded" +}; +var _ = "2011-06-15"; +var _A = "Action"; +var _AKI = "AccessKeyId"; +var _AR = "AssumeRole"; +var _ARI = "AssumedRoleId"; +var _ARU = "AssumedRoleUser"; +var _ARWSAML = "AssumeRoleWithSAML"; +var _ARWWI = "AssumeRoleWithWebIdentity"; +var _Ac = "Account"; +var _Ar = "Arn"; +var _Au = "Audience"; +var _C = "Credentials"; +var _CA = "ContextAssertion"; +var _DAM = "DecodeAuthorizationMessage"; +var _DM = "DecodedMessage"; +var _DS = "DurationSeconds"; +var _E = "Expiration"; +var _EI = "ExternalId"; +var _EM = "EncodedMessage"; +var _FU = "FederatedUser"; +var _FUI = "FederatedUserId"; +var _GAKI = "GetAccessKeyInfo"; +var _GCI = "GetCallerIdentity"; +var _GFT = "GetFederationToken"; +var _GST = "GetSessionToken"; +var _I = "Issuer"; +var _K = "Key"; +var _N = "Name"; +var _NQ = "NameQualifier"; +var _P = "Policy"; +var _PA = "PolicyArns"; +var _PAr = "PrincipalArn"; +var _PAro = "ProviderArn"; +var _PC = "ProvidedContexts"; +var _PI = "ProviderId"; +var _PPS = "PackedPolicySize"; +var _Pr = "Provider"; +var _RA = "RoleArn"; +var _RSN = "RoleSessionName"; +var _S = "Subject"; +var _SAK = "SecretAccessKey"; +var _SAMLA = "SAMLAssertion"; +var _SFWIT = "SubjectFromWebIdentityToken"; +var _SI = "SourceIdentity"; +var _SN = "SerialNumber"; +var _ST = "SubjectType"; +var _STe = "SessionToken"; +var _T = "Tags"; +var _TC = "TokenCode"; +var _TTK = "TransitiveTagKeys"; +var _UI = "UserId"; +var _V = "Version"; +var _Va = "Value"; +var _WIT = "WebIdentityToken"; +var _a = "arn"; +var _m = "message"; +var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); +var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { + var _a2; + if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) { + return data.Error.Code; } - if (input[_TC] != null) { - entries[_TC] = input[_TC]; + if (output.statusCode == 404) { + return "NotFound"; } - return entries; -}, "se_GetSessionTokenRequest"); -var se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; +}, "loadQueryErrorCode"); + +// src/commands/AssumeRoleCommand.ts +var _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { +}; +__name(_AssumeRoleCommand, "AssumeRoleCommand"); +var AssumeRoleCommand = _AssumeRoleCommand; + +// src/commands/AssumeRoleWithSAMLCommand.ts + + + + +var import_EndpointParameters2 = __nccwpck_require__(510); +var _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters2.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() { +}; +__name(_AssumeRoleWithSAMLCommand, "AssumeRoleWithSAMLCommand"); +var AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand; + +// src/commands/AssumeRoleWithWebIdentityCommand.ts + + + + +var import_EndpointParameters3 = __nccwpck_require__(510); +var _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters3.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { +}; +__name(_AssumeRoleWithWebIdentityCommand, "AssumeRoleWithWebIdentityCommand"); +var AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand; + +// src/commands/DecodeAuthorizationMessageCommand.ts + + + + +var import_EndpointParameters4 = __nccwpck_require__(510); +var _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters4.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() { +}; +__name(_DecodeAuthorizationMessageCommand, "DecodeAuthorizationMessageCommand"); +var DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand; + +// src/commands/GetAccessKeyInfoCommand.ts + + + + +var import_EndpointParameters5 = __nccwpck_require__(510); +var _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters5.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() { +}; +__name(_GetAccessKeyInfoCommand, "GetAccessKeyInfoCommand"); +var GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand; + +// src/commands/GetCallerIdentityCommand.ts + + + + +var import_EndpointParameters6 = __nccwpck_require__(510); +var _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters6.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() { +}; +__name(_GetCallerIdentityCommand, "GetCallerIdentityCommand"); +var GetCallerIdentityCommand = _GetCallerIdentityCommand; + +// src/commands/GetFederationTokenCommand.ts + + + + +var import_EndpointParameters7 = __nccwpck_require__(510); +var _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters7.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() { +}; +__name(_GetFederationTokenCommand, "GetFederationTokenCommand"); +var GetFederationTokenCommand = _GetFederationTokenCommand; + +// src/commands/GetSessionTokenCommand.ts + + + + +var import_EndpointParameters8 = __nccwpck_require__(510); +var _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client.Command.classBuilder().ep({ + ...import_EndpointParameters8.commonParams +}).m(function(Command, cs, config, o) { + return [ + (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), + (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) + ]; +}).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() { +}; +__name(_GetSessionTokenCommand, "GetSessionTokenCommand"); +var GetSessionTokenCommand = _GetSessionTokenCommand; + +// src/STS.ts +var import_STSClient = __nccwpck_require__(4195); +var commands = { + AssumeRoleCommand, + AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand, + GetCallerIdentityCommand, + GetFederationTokenCommand, + GetSessionTokenCommand +}; +var _STS = class _STS extends import_STSClient.STSClient { +}; +__name(_STS, "STS"); +var STS = _STS; +(0, import_smithy_client.createAggregatedClient)(commands, STS); + +// src/index.ts +var import_EndpointParameters9 = __nccwpck_require__(510); +var import_runtimeExtensions = __nccwpck_require__(2053); + +// src/defaultStsRoleAssumers.ts +var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; +var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { + var _a2; + const region = typeof _region === "function" ? await _region() : _region; + const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; + (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call( + credentialProviderLogger, + "@aws-sdk/client-sts::resolveRegion", + "accepting first of:", + `${region} (provider)`, + `${parentRegion} (parent client)`, + `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` + ); + return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; +}, "resolveRegion"); +var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + let closureSourceCreds; + return async (sourceCreds, params) => { + var _a2, _b, _c; + closureSourceCreds = sourceCreds; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + stsClient = new stsClientCtor({ + // A hack to make sts client uses the credential in current closure. + credentialDefaultProvider: () => async () => closureSourceCreds, + region: resolvedRegion, + requestHandler, + logger + }); } - const memberEntries = se_PolicyDescriptorType(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_policyDescriptorListType"); -var se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_a] != null) { - entries[_a] = input[_a]; - } - return entries; -}, "se_PolicyDescriptorType"); -var se_ProvidedContext = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_PAro] != null) { - entries[_PAro] = input[_PAro]; - } - if (input[_CA] != null) { - entries[_CA] = input[_CA]; - } - return entries; -}, "se_ProvidedContext"); -var se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); } - const memberEntries = se_ProvidedContext(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_ProvidedContextsListType"); -var se_Tag = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - if (input[_K] != null) { - entries[_K] = input[_K]; - } - if (input[_Va] != null) { - entries[_Va] = input[_Va]; - } - return entries; -}, "se_Tag"); -var se_tagKeyListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + return { + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + credentialScope: Credentials2.CredentialScope + }; + }; +}, "getDefaultRoleAssumer"); +var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { + let stsClient; + return async (params) => { + var _a2, _b, _c; + if (!stsClient) { + const { + logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger, + region, + requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler, + credentialProviderLogger + } = stsOptions; + const resolvedRegion = await resolveRegion( + region, + (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region, + credentialProviderLogger + ); + stsClient = new stsClientCtor({ + region: resolvedRegion, + requestHandler, + logger + }); } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}, "se_tagKeyListType"); -var se_tagListType = /* @__PURE__ */ __name((input, context) => { - const entries = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; + const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); + if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { + throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); } - const memberEntries = se_Tag(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}, "se_tagListType"); -var de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_ARI] != null) { - contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]); - } - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); - } - return contents; -}, "de_AssumedRoleUser"); -var de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleResponse"); -var de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); - } - if (output[_S] != null) { - contents[_S] = (0, import_smithy_client.expectString)(output[_S]); - } - if (output[_ST] != null) { - contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]); - } - if (output[_I] != null) { - contents[_I] = (0, import_smithy_client.expectString)(output[_I]); - } - if (output[_Au] != null) { - contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]); - } - if (output[_NQ] != null) { - contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleWithSAMLResponse"); -var de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); - } - if (output[_SFWIT] != null) { - contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]); - } - if (output[_ARU] != null) { - contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); - } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); - } - if (output[_Pr] != null) { - contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]); - } - if (output[_Au] != null) { - contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]); - } - if (output[_SI] != null) { - contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]); - } - return contents; -}, "de_AssumeRoleWithWebIdentityResponse"); -var de_Credentials = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_AKI] != null) { - contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]); - } - if (output[_SAK] != null) { - contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]); - } - if (output[_STe] != null) { - contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]); + return { + accessKeyId: Credentials2.AccessKeyId, + secretAccessKey: Credentials2.SecretAccessKey, + sessionToken: Credentials2.SessionToken, + expiration: Credentials2.Expiration, + // TODO(credentialScope): access normally when shape is updated. + credentialScope: Credentials2.CredentialScope + }; + }; +}, "getDefaultRoleAssumerWithWebIdentity"); + +// src/defaultRoleAssumers.ts +var import_STSClient2 = __nccwpck_require__(4195); +var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { + var _a2; + if (!customizations) + return baseCtor; + else + return _a2 = class extends baseCtor { + constructor(config) { + super(config); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }, __name(_a2, "CustomizableSTSClient"), _a2; +}, "getCustomizableStsClientCtor"); +var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); +var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); +var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ + roleAssumer: getDefaultRoleAssumer2(input), + roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), + ...input +}), "decorateDefaultCredentialProvider"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + +/***/ }), + +/***/ 3405: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __nccwpck_require__(4351); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(7947)); +const credentialDefaultProvider_1 = __nccwpck_require__(4800); +const core_1 = __nccwpck_require__(9963); +const util_user_agent_node_1 = __nccwpck_require__(8095); +const config_resolver_1 = __nccwpck_require__(3098); +const core_2 = __nccwpck_require__(5829); +const hash_node_1 = __nccwpck_require__(3081); +const middleware_retry_1 = __nccwpck_require__(6039); +const node_config_provider_1 = __nccwpck_require__(3461); +const node_http_handler_1 = __nccwpck_require__(258); +const util_body_length_node_1 = __nccwpck_require__(8075); +const util_retry_1 = __nccwpck_require__(4902); +const runtimeConfig_shared_1 = __nccwpck_require__(2642); +const smithy_client_1 = __nccwpck_require__(3570); +const util_defaults_mode_node_1 = __nccwpck_require__(2429); +const smithy_client_2 = __nccwpck_require__(3570); +const getRuntimeConfig = (config) => { + (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || + (async (idProps) => await (0, credentialDefaultProvider_1.defaultProvider)(idProps?.__config || {})()), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 2642: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __nccwpck_require__(9963); +const core_2 = __nccwpck_require__(5829); +const smithy_client_1 = __nccwpck_require__(3570); +const url_parser_1 = __nccwpck_require__(4681); +const util_base64_1 = __nccwpck_require__(5600); +const util_utf8_1 = __nccwpck_require__(1895); +const httpAuthSchemeProvider_1 = __nccwpck_require__(7145); +const endpointResolver_1 = __nccwpck_require__(1203); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2011-06-15", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 2053: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRuntimeExtensions = void 0; +const region_config_resolver_1 = __nccwpck_require__(8156); +const protocol_http_1 = __nccwpck_require__(4418); +const smithy_client_1 = __nccwpck_require__(3570); +const httpAuthExtensionConfiguration_1 = __nccwpck_require__(8527); +const asPartial = (t) => t; +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration), + }; +}; +exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + + +/***/ }), + +/***/ 9963: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - if (output[_E] != null) { - contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E])); + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, + AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, + _toBool: () => _toBool, + _toNum: () => _toNum, + _toStr: () => _toStr, + awsExpectUnion: () => awsExpectUnion, + emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, + loadRestJsonErrorCode: () => loadRestJsonErrorCode, + loadRestXmlErrorCode: () => loadRestXmlErrorCode, + parseJsonBody: () => parseJsonBody, + parseJsonErrorBody: () => parseJsonErrorBody, + parseXmlBody: () => parseXmlBody, + parseXmlErrorBody: () => parseXmlErrorBody, + resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, + resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config +}); +module.exports = __toCommonJS(src_exports); + +// src/client/emitWarningIfUnsupportedVersion.ts +var warningEmitted = false; +var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + process.emitWarning( + `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 14.x on May 1, 2024. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to an active Node.js LTS version. + +More information can be found at: https://a.co/dzr2AJd` + ); } - return contents; -}, "de_Credentials"); -var de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_DM] != null) { - contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]); +}, "emitWarningIfUnsupportedVersion"); + +// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts + + +// src/httpAuthSchemes/utils/getDateHeader.ts +var import_protocol_http = __nccwpck_require__(4418); +var getDateHeader = /* @__PURE__ */ __name((response) => { + var _a, _b; + return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0; +}, "getDateHeader"); + +// src/httpAuthSchemes/utils/getSkewCorrectedDate.ts +var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); + +// src/httpAuthSchemes/utils/isClockSkewed.ts +var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); + +// src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts +var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); } - return contents; -}, "de_DecodeAuthorizationMessageResponse"); -var de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + return currentSystemClockOffset; +}, "getUpdatedSystemClockOffset"); + +// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts +var throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); } - return contents; -}, "de_ExpiredTokenException"); -var de_FederatedUser = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_FUI] != null) { - contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]); + return property; +}, "throwSigningPropertyError"); +var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { + var _a, _b, _c; + const context = throwSigningPropertyError( + "context", + signingProperties.context + ); + const config = throwSigningPropertyError("config", signingProperties.config); + const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0]; + const signerFunction = throwSigningPropertyError( + "signer", + config.signer + ); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion; + const signingName = signingProperties == null ? void 0 : signingProperties.signingName; + return { + config, + signer, + signingRegion, + signingName + }; +}, "validateSigningProperties"); +var _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!import_protocol_http.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties); + const signedRequest = await signer.sign(httpRequest, { + signingDate: getSkewCorrectedDate(config.systemClockOffset), + signingRegion, + signingService: signingName + }); + return signedRequest; } - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); + errorHandler(signingProperties) { + return (error) => { + const serverTime = error.ServerTime ?? getDateHeader(error.$response); + if (serverTime) { + const config = throwSigningPropertyError("config", signingProperties.config); + const initialSystemClockOffset = config.systemClockOffset; + config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); + const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset; + if (clockSkewCorrected && error.$metadata) { + error.$metadata.clockSkewCorrected = true; + } + } + throw error; + }; } - return contents; -}, "de_FederatedUser"); -var de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_Ac] != null) { - contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); + successHandler(httpResponse, signingProperties) { + const dateHeader = getDateHeader(httpResponse); + if (dateHeader) { + const config = throwSigningPropertyError("config", signingProperties.config); + config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); + } } - return contents; -}, "de_GetAccessKeyInfoResponse"); -var de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_UI] != null) { - contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]); +}; +__name(_AwsSdkSigV4Signer, "AwsSdkSigV4Signer"); +var AwsSdkSigV4Signer = _AwsSdkSigV4Signer; +var AWSSDKSigV4Signer = AwsSdkSigV4Signer; + +// src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts +var import_core = __nccwpck_require__(5829); +var import_signature_v4 = __nccwpck_require__(1528); +var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => { + let normalizedCreds; + if (config.credentials) { + normalizedCreds = (0, import_core.memoizeIdentityProvider)(config.credentials, import_core.isIdentityExpired, import_core.doesIdentityRequireRefresh); } - if (output[_Ac] != null) { - contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]); + if (!normalizedCreds) { + if (config.credentialDefaultProvider) { + normalizedCreds = (0, import_core.normalizeProvider)( + config.credentialDefaultProvider( + Object.assign({}, config, { + parentClientConfig: config + }) + ) + ); + } else { + normalizedCreds = /* @__PURE__ */ __name(async () => { + throw new Error("`credentials` is missing"); + }, "normalizedCreds"); + } } - if (output[_Ar] != null) { - contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]); + const { + // Default for signingEscapePath + signingEscapePath = true, + // Default for systemClockOffset + systemClockOffset = config.systemClockOffset || 0, + // No default for sha256 since it is platform dependent + sha256 + } = config; + let signer; + if (config.signer) { + signer = (0, import_core.normalizeProvider)(config.signer); + } else if (config.regionInfoProvider) { + signer = /* @__PURE__ */ __name(() => (0, import_core.normalizeProvider)(config.region)().then( + async (region) => [ + await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint() + }) || {}, + region + ] + ).then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }), "signer"); + } else { + signer = /* @__PURE__ */ __name(async (authScheme) => { + authScheme = Object.assign( + {}, + { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await (0, import_core.normalizeProvider)(config.region)(), + properties: {} + }, + authScheme + ); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath + }; + const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; + return new SignerCtor(params); + }, "signer"); } - return contents; -}, "de_GetCallerIdentityResponse"); -var de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer + }; +}, "resolveAwsSdkSigV4Config"); +var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + +// src/protocols/coercing-serializers.ts +var _toStr = /* @__PURE__ */ __name((val) => { + if (val == null) { + return val; } - if (output[_FU] != null) { - contents[_FU] = de_FederatedUser(output[_FU], context); + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); } - if (output[_PPS] != null) { - contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]); + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); } - return contents; -}, "de_GetFederationTokenResponse"); -var de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_C] != null) { - contents[_C] = de_Credentials(output[_C], context); + return val; +}, "_toStr"); +var _toBool = /* @__PURE__ */ __name((val) => { + if (val == null) { + return val; } - return contents; -}, "de_GetSessionTokenResponse"); -var de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + if (typeof val === "number") { } - return contents; -}, "de_IDPCommunicationErrorException"); -var de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; } - return contents; -}, "de_IDPRejectedClaimException"); -var de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + return val; +}, "_toBool"); +var _toNum = /* @__PURE__ */ __name((val) => { + if (val == null) { + return val; } - return contents; -}, "de_InvalidAuthorizationMessageException"); -var de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + if (typeof val === "boolean") { } - return contents; -}, "de_InvalidIdentityTokenException"); -var de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; } - return contents; -}, "de_MalformedPolicyDocumentException"); -var de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + return val; +}, "_toNum"); + +// src/protocols/json/awsExpectUnion.ts +var import_smithy_client = __nccwpck_require__(3570); +var awsExpectUnion = /* @__PURE__ */ __name((value) => { + if (value == null) { + return void 0; } - return contents; -}, "de_PackedPolicyTooLargeException"); -var de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => { - const contents = {}; - if (output[_m] != null) { - contents[_m] = (0, import_smithy_client.expectString)(output[_m]); + if (typeof value === "object" && "__type" in value) { + delete value.__type; } - return contents; -}, "de_RegionDisabledException"); -var deserializeMetadata = /* @__PURE__ */ __name((output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"] -}), "deserializeMetadata"); + return (0, import_smithy_client.expectUnion)(value); +}, "awsExpectUnion"); + +// src/protocols/common.ts + var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); -var throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException); -var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers - }; - if (resolvedHostname !== void 0) { - contents.hostname = resolvedHostname; + +// src/protocols/json/parseJsonBody.ts +var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + try { + return JSON.parse(encoded); + } catch (e) { + if ((e == null ? void 0 : e.name) === "SyntaxError") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } } - if (body !== void 0) { - contents.body = body; + return {}; +}), "parseJsonBody"); +var parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { + const value = await parseJsonBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}, "parseJsonErrorBody"); +var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => { + const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey"); + const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }, "sanitizeErrorCode"); + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); } - return new import_protocol_http.HttpRequest(contents); -}, "buildHttpRpcRequest"); -var SHARED_HEADERS = { - "content-type": "application/x-www-form-urlencoded" -}; -var _ = "2011-06-15"; -var _A = "Action"; -var _AKI = "AccessKeyId"; -var _AR = "AssumeRole"; -var _ARI = "AssumedRoleId"; -var _ARU = "AssumedRoleUser"; -var _ARWSAML = "AssumeRoleWithSAML"; -var _ARWWI = "AssumeRoleWithWebIdentity"; -var _Ac = "Account"; -var _Ar = "Arn"; -var _Au = "Audience"; -var _C = "Credentials"; -var _CA = "ContextAssertion"; -var _DAM = "DecodeAuthorizationMessage"; -var _DM = "DecodedMessage"; -var _DS = "DurationSeconds"; -var _E = "Expiration"; -var _EI = "ExternalId"; -var _EM = "EncodedMessage"; -var _FU = "FederatedUser"; -var _FUI = "FederatedUserId"; -var _GAKI = "GetAccessKeyInfo"; -var _GCI = "GetCallerIdentity"; -var _GFT = "GetFederationToken"; -var _GST = "GetSessionToken"; -var _I = "Issuer"; -var _K = "Key"; -var _N = "Name"; -var _NQ = "NameQualifier"; -var _P = "Policy"; -var _PA = "PolicyArns"; -var _PAr = "PrincipalArn"; -var _PAro = "ProviderArn"; -var _PC = "ProvidedContexts"; -var _PI = "ProviderId"; -var _PPS = "PackedPolicySize"; -var _Pr = "Provider"; -var _RA = "RoleArn"; -var _RSN = "RoleSessionName"; -var _S = "Subject"; -var _SAK = "SecretAccessKey"; -var _SAMLA = "SAMLAssertion"; -var _SFWIT = "SubjectFromWebIdentityToken"; -var _SI = "SourceIdentity"; -var _SN = "SerialNumber"; -var _ST = "SubjectType"; -var _STe = "SessionToken"; -var _T = "Tags"; -var _TC = "TokenCode"; -var _TTK = "TransitiveTagKeys"; -var _UI = "UserId"; -var _V = "Version"; -var _Va = "Value"; -var _WIT = "WebIdentityToken"; -var _a = "arn"; -var _m = "message"; -var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (data.code !== void 0) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); + } +}, "loadRestJsonErrorCode"); + +// src/protocols/xml/parseXmlBody.ts + +var import_fast_xml_parser = __nccwpck_require__(2603); +var parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { const parser = new import_fast_xml_parser.XMLParser({ attributeNamePrefix: "", @@ -7250,11 +9061,21 @@ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyStrin ignoreDeclaration: true, parseTagValue: false, trimValues: false, - tagValueProcessor: (_2, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 + tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : void 0 }); parser.addEntity("#xD", "\r"); parser.addEntity("#10", "\n"); - const parsedObj = parser.parse(encoded); + let parsedObj; + try { + parsedObj = parser.parse(encoded); + } catch (e) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: encoded + }); + } + throw e; + } const textNodeName = "#text"; const key = Object.keys(parsedObj)[0]; const parsedObjToReturn = parsedObj[key]; @@ -7265,473 +9086,347 @@ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyStrin return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn); } return {}; -}), "parseBody"); -var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { - const value = await parseBody(errorBody, context); +}), "parseXmlBody"); +var parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => { + const value = await parseXmlBody(errorBody, context); if (value.Error) { value.Error.message = value.Error.message ?? value.Error.Message; } return value; -}, "parseErrorBody"); -var buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString"); -var loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => { - var _a2; - if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) { +}, "parseXmlErrorBody"); +var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { + var _a; + if (((_a = data == null ? void 0 : data.Error) == null ? void 0 : _a.Code) !== void 0) { return data.Error.Code; } - if (output.statusCode == 404) { - return "NotFound"; + if ((data == null ? void 0 : data.Code) !== void 0) { + return data.Code; } -}, "loadQueryErrorCode"); - -// src/commands/AssumeRoleCommand.ts -var _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() { -}; -__name(_AssumeRoleCommand, "AssumeRoleCommand"); -var AssumeRoleCommand = _AssumeRoleCommand; - -// src/commands/AssumeRoleWithSAMLCommand.ts - - - - -var import_EndpointParameters2 = __nccwpck_require__(510); -var _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters2.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() { -}; -__name(_AssumeRoleWithSAMLCommand, "AssumeRoleWithSAMLCommand"); -var AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand; - -// src/commands/AssumeRoleWithWebIdentityCommand.ts - - - - -var import_EndpointParameters3 = __nccwpck_require__(510); -var _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters3.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() { -}; -__name(_AssumeRoleWithWebIdentityCommand, "AssumeRoleWithWebIdentityCommand"); -var AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand; - -// src/commands/DecodeAuthorizationMessageCommand.ts - - - - -var import_EndpointParameters4 = __nccwpck_require__(510); -var _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters4.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() { -}; -__name(_DecodeAuthorizationMessageCommand, "DecodeAuthorizationMessageCommand"); -var DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand; - -// src/commands/GetAccessKeyInfoCommand.ts - - - - -var import_EndpointParameters5 = __nccwpck_require__(510); -var _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters5.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() { -}; -__name(_GetAccessKeyInfoCommand, "GetAccessKeyInfoCommand"); -var GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand; - -// src/commands/GetCallerIdentityCommand.ts - - - - -var import_EndpointParameters6 = __nccwpck_require__(510); -var _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters6.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() { -}; -__name(_GetCallerIdentityCommand, "GetCallerIdentityCommand"); -var GetCallerIdentityCommand = _GetCallerIdentityCommand; + if (output.statusCode == 404) { + return "NotFound"; + } +}, "loadRestXmlErrorCode"); +// Annotate the CommonJS export names for ESM import in node: -// src/commands/GetFederationTokenCommand.ts +0 && (0); +/***/ }), -var import_EndpointParameters7 = __nccwpck_require__(510); -var _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters7.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() { +/***/ 5972: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -__name(_GetFederationTokenCommand, "GetFederationTokenCommand"); -var GetFederationTokenCommand = _GetFederationTokenCommand; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/commands/GetSessionTokenCommand.ts +// src/index.ts +var src_exports = {}; +__export(src_exports, { + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv +}); +module.exports = __toCommonJS(src_exports); +// src/fromEnv.ts +var import_property_provider = __nccwpck_require__(9721); +var ENV_KEY = "AWS_ACCESS_KEY_ID"; +var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +var ENV_SESSION = "AWS_SESSION_TOKEN"; +var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +var fromEnv = /* @__PURE__ */ __name((init) => async () => { + var _a; + (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-env", "fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + if (accessKeyId && secretAccessKey) { + return { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope } + }; + } + throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials."); +}, "fromEnv"); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -var import_EndpointParameters8 = __nccwpck_require__(510); -var _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client.Command.classBuilder().ep({ - ...import_EndpointParameters8.commonParams -}).m(function(Command, cs, config, o) { - return [ - (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize), - (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()) - ]; -}).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() { -}; -__name(_GetSessionTokenCommand, "GetSessionTokenCommand"); -var GetSessionTokenCommand = _GetSessionTokenCommand; -// src/STS.ts -var import_STSClient = __nccwpck_require__(4195); -var commands = { - AssumeRoleCommand, - AssumeRoleWithSAMLCommand, - AssumeRoleWithWebIdentityCommand, - DecodeAuthorizationMessageCommand, - GetAccessKeyInfoCommand, - GetCallerIdentityCommand, - GetFederationTokenCommand, - GetSessionTokenCommand -}; -var _STS = class _STS extends import_STSClient.STSClient { -}; -__name(_STS, "STS"); -var STS = _STS; -(0, import_smithy_client.createAggregatedClient)(commands, STS); +/***/ }), -// src/index.ts -var import_EndpointParameters9 = __nccwpck_require__(510); -var import_runtimeExtensions = __nccwpck_require__(2053); +/***/ 3757: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; -// src/defaultStsRoleAssumers.ts -var import_util_endpoints = __nccwpck_require__(3350); -var ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; -var resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => { - var _a2, _b; - const region = typeof _region === "function" ? await _region() : _region; - const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; - if (!parentRegion || (0, import_util_endpoints.partition)(parentRegion).name === "aws") { - (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call( - credentialProviderLogger, - "@aws-sdk/client-sts::resolveRegion", - "accepting first of:", - `${region} (provider)`, - `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` - ); - return region ?? ASSUME_ROLE_DEFAULT_REGION; - } else { - (_b = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _b.call( - credentialProviderLogger, - "@aws-sdk/client-sts::resolveRegion", - "accepting first of:", - `${region} (provider)`, - `${parentRegion} (parent client)`, - `${ASSUME_ROLE_DEFAULT_REGION} (STS default)` - ); - return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION; - } -}, "resolveRegion"); -var getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { - let stsClient; - let closureSourceCreds; - return async (sourceCreds, params) => { - var _a2; - closureSourceCreds = sourceCreds; - if (!stsClient) { - const { logger, region, requestHandler, credentialProviderLogger } = stsOptions; - const resolvedRegion = await resolveRegion( - region, - (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.region, - credentialProviderLogger - ); - stsClient = new stsClientCtor({ - logger, - // A hack to make sts client uses the credential in current closure. - credentialDefaultProvider: () => async () => closureSourceCreds, - region: resolvedRegion, - ...requestHandler ? { requestHandler } : {} - }); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkUrl = void 0; +const property_provider_1 = __nccwpck_require__(9721); +const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; +const LOOPBACK_CIDR_IPv6 = "::1/128"; +const ECS_CONTAINER_HOST = "169.254.170.2"; +const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; +const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; +const checkUrl = (url) => { + if (url.protocol === "https:") { + return; } - const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleCommand(params)); - if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`); + if (url.hostname === ECS_CONTAINER_HOST || + url.hostname === EKS_CONTAINER_HOST_IPv4 || + url.hostname === EKS_CONTAINER_HOST_IPv6) { + return; } - return { - accessKeyId: Credentials2.AccessKeyId, - secretAccessKey: Credentials2.SecretAccessKey, - sessionToken: Credentials2.SessionToken, - expiration: Credentials2.Expiration, - // TODO(credentialScope): access normally when shape is updated. - credentialScope: Credentials2.CredentialScope - }; - }; -}, "getDefaultRoleAssumer"); -var getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => { - let stsClient; - return async (params) => { - var _a2; - if (!stsClient) { - const { logger, region, requestHandler, credentialProviderLogger } = stsOptions; - const resolvedRegion = await resolveRegion( - region, - (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.region, - credentialProviderLogger - ); - stsClient = new stsClientCtor({ - logger, - region: resolvedRegion, - ...requestHandler ? { requestHandler } : {} - }); + if (url.hostname.includes("[")) { + if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { + return; + } } - const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params)); - if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) { - throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`); + else { + if (url.hostname === "localhost") { + return; + } + const ipComponents = url.hostname.split("."); + const inRange = (component) => { + const num = parseInt(component, 10); + return 0 <= num && num <= 255; + }; + if (ipComponents[0] === "127" && + inRange(ipComponents[1]) && + inRange(ipComponents[2]) && + inRange(ipComponents[3]) && + ipComponents.length === 4) { + return; + } } - return { - accessKeyId: Credentials2.AccessKeyId, - secretAccessKey: Credentials2.SecretAccessKey, - sessionToken: Credentials2.SessionToken, - expiration: Credentials2.Expiration, - // TODO(credentialScope): access normally when shape is updated. - credentialScope: Credentials2.CredentialScope - }; - }; -}, "getDefaultRoleAssumerWithWebIdentity"); + throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: + - loopback CIDR 127.0.0.0/8 or [::1/128] + - ECS container host 169.254.170.2 + - EKS container host 169.254.170.23 or [fd00:ec2::23]`); +}; +exports.checkUrl = checkUrl; -// src/defaultRoleAssumers.ts -var import_STSClient2 = __nccwpck_require__(4195); -var getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => { - var _a2; - if (!customizations) - return baseCtor; - else - return _a2 = class extends baseCtor { - constructor(config) { - super(config); - for (const customization of customizations) { - this.middlewareStack.use(customization); + +/***/ }), + +/***/ 6070: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromHttp = void 0; +const tslib_1 = __nccwpck_require__(4351); +const node_http_handler_1 = __nccwpck_require__(258); +const property_provider_1 = __nccwpck_require__(9721); +const promises_1 = tslib_1.__importDefault(__nccwpck_require__(3292)); +const checkUrl_1 = __nccwpck_require__(3757); +const requestHelpers_1 = __nccwpck_require__(9287); +const retry_wrapper_1 = __nccwpck_require__(9921); +const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; +const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; +const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +const fromHttp = (options) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-http", "fromHttp"); + let host; + const relative = (_b = options.awsContainerCredentialsRelativeUri) !== null && _b !== void 0 ? _b : process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; + const full = (_c = options.awsContainerCredentialsFullUri) !== null && _c !== void 0 ? _c : process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; + const token = (_d = options.awsContainerAuthorizationToken) !== null && _d !== void 0 ? _d : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; + const tokenFile = (_e = options.awsContainerAuthorizationTokenFile) !== null && _e !== void 0 ? _e : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; + if (relative && full) { + console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); + console.warn("awsContainerCredentialsFullUri will take precedence."); + } + if (token && tokenFile) { + console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); + console.warn("awsContainerAuthorizationToken will take precedence."); + } + if (full) { + host = full; + } + else if (relative) { + host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; + } + else { + throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. +Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`); + } + const url = new URL(host); + (0, checkUrl_1.checkUrl)(url); + const requestHandler = new node_http_handler_1.NodeHttpHandler({ + requestTimeout: (_f = options.timeout) !== null && _f !== void 0 ? _f : 1000, + connectionTimeout: (_g = options.timeout) !== null && _g !== void 0 ? _g : 1000, + }); + return (0, retry_wrapper_1.retryWrapper)(async () => { + const request = (0, requestHelpers_1.createGetRequest)(url); + if (token) { + request.headers.Authorization = token; } - } - }, __name(_a2, "CustomizableSTSClient"), _a2; -}, "getCustomizableStsClientCtor"); -var getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer"); -var getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity"); -var decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({ - roleAssumer: getDefaultRoleAssumer2(input), - roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input), - ...input -}), "decorateDefaultCredentialProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - + else if (tokenFile) { + request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); + } + try { + const result = await requestHandler.handle(request); + return (0, requestHelpers_1.getCredentials)(result.response); + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(String(e)); + } + }, (_h = options.maxRetries) !== null && _h !== void 0 ? _h : 3, (_j = options.timeout) !== null && _j !== void 0 ? _j : 1000); +}; +exports.fromHttp = fromHttp; /***/ }), -/***/ 3405: +/***/ 9287: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(4351); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(7947)); -const credentialDefaultProvider_1 = __nccwpck_require__(4800); -const core_1 = __nccwpck_require__(9963); -const util_user_agent_node_1 = __nccwpck_require__(8095); -const config_resolver_1 = __nccwpck_require__(3098); -const core_2 = __nccwpck_require__(5829); -const hash_node_1 = __nccwpck_require__(3081); -const middleware_retry_1 = __nccwpck_require__(6039); -const node_config_provider_1 = __nccwpck_require__(3461); -const node_http_handler_1 = __nccwpck_require__(258); -const util_body_length_node_1 = __nccwpck_require__(8075); -const util_retry_1 = __nccwpck_require__(4902); -const runtimeConfig_shared_1 = __nccwpck_require__(2642); +exports.getCredentials = exports.createGetRequest = void 0; +const property_provider_1 = __nccwpck_require__(9721); +const protocol_http_1 = __nccwpck_require__(4418); const smithy_client_1 = __nccwpck_require__(3570); -const util_defaults_mode_node_1 = __nccwpck_require__(2429); -const smithy_client_2 = __nccwpck_require__(3570); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || - (async (idProps) => await (0, credentialDefaultProvider_1.defaultProvider)(idProps?.__config || {})()), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; +const util_stream_1 = __nccwpck_require__(6607); +function createGetRequest(url) { + return new protocol_http_1.HttpRequest({ + protocol: url.protocol, + hostname: url.hostname, + port: Number(url.port), + path: url.pathname, + query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => { + acc[k] = v; + return acc; + }, {}), + fragment: url.hash, + }); +} +exports.createGetRequest = createGetRequest; +async function getCredentials(response) { + var _a, _b; + const contentType = (_b = (_a = response === null || response === void 0 ? void 0 : response.headers["content-type"]) !== null && _a !== void 0 ? _a : response === null || response === void 0 ? void 0 : response.headers["Content-Type"]) !== null && _b !== void 0 ? _b : ""; + if (!contentType.includes("json")) { + console.warn("HTTP credential provider response header content-type was not application/json. Observed: " + contentType + "."); + } + const stream = (0, util_stream_1.sdkStreamMixin)(response.body); + const str = await stream.transformToString(); + if (response.statusCode === 200) { + const parsed = JSON.parse(str); + if (typeof parsed.AccessKeyId !== "string" || + typeof parsed.SecretAccessKey !== "string" || + typeof parsed.Token !== "string" || + typeof parsed.Expiration !== "string") { + throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }"); + } + return { + accessKeyId: parsed.AccessKeyId, + secretAccessKey: parsed.SecretAccessKey, + sessionToken: parsed.Token, + expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration), + }; + } + if (response.statusCode >= 400 && response.statusCode < 500) { + let parsedBody = {}; + try { + parsedBody = JSON.parse(str); + } + catch (e) { } + throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`), { + Code: parsedBody.Code, + Message: parsedBody.Message, + }); + } + throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`); +} +exports.getCredentials = getCredentials; /***/ }), -/***/ 2642: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 9921: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(9963); -const core_2 = __nccwpck_require__(5829); -const smithy_client_1 = __nccwpck_require__(3570); -const url_parser_1 = __nccwpck_require__(4681); -const util_base64_1 = __nccwpck_require__(5600); -const util_utf8_1 = __nccwpck_require__(1895); -const httpAuthSchemeProvider_1 = __nccwpck_require__(7145); -const endpointResolver_1 = __nccwpck_require__(1203); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2011-06-15", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - serviceId: config?.serviceId ?? "STS", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, +exports.retryWrapper = void 0; +const retryWrapper = (toRetry, maxRetries, delayMs) => { + return async () => { + for (let i = 0; i < maxRetries; ++i) { + try { + return await toRetry(); + } + catch (e) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return await toRetry(); }; }; -exports.getRuntimeConfig = getRuntimeConfig; +exports.retryWrapper = retryWrapper; /***/ }), -/***/ 2053: +/***/ 7290: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveRuntimeExtensions = void 0; -const region_config_resolver_1 = __nccwpck_require__(8156); -const protocol_http_1 = __nccwpck_require__(4418); -const smithy_client_1 = __nccwpck_require__(3570); -const httpAuthExtensionConfiguration_1 = __nccwpck_require__(8527); -const asPartial = (t) => t; -const resolveRuntimeExtensions = (runtimeConfig, extensions) => { - const extensionConfiguration = { - ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), - ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)), - }; - extensions.forEach((extension) => extension.configure(extensionConfiguration)); - return { - ...runtimeConfig, - ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), - ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), - ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), - ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration), - }; -}; -exports.resolveRuntimeExtensions = resolveRuntimeExtensions; +exports.fromHttp = void 0; +var fromHttp_1 = __nccwpck_require__(6070); +Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); /***/ }), -/***/ 9963: +/***/ 4203: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); @@ -7744,297 +9439,317 @@ var __copyProps = (to, from, except, desc) => { } return to; }; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +// src/loadSts.ts +var loadSts_exports = {}; +__export(loadSts_exports, { + getDefaultRoleAssumer: () => import_client_sts.getDefaultRoleAssumer +}); +var import_client_sts; +var init_loadSts = __esm({ + "src/loadSts.ts"() { + import_client_sts = __nccwpck_require__(2209); + } +}); + // src/index.ts var src_exports = {}; __export(src_exports, { - AWSSDKSigV4Signer: () => AWSSDKSigV4Signer, - AwsSdkSigV4Signer: () => AwsSdkSigV4Signer, - _toBool: () => _toBool, - _toNum: () => _toNum, - _toStr: () => _toStr, - awsExpectUnion: () => awsExpectUnion, - emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion, - resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config, - resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config + fromIni: () => fromIni }); module.exports = __toCommonJS(src_exports); -// src/client/emitWarningIfUnsupportedVersion.ts -var warningEmitted = false; -var emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => { - if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { - warningEmitted = true; - process.emitWarning( - `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 14.x on May 1, 2024. - -To continue receiving updates to AWS services, bug fixes, and security -updates please upgrade to an active Node.js LTS version. - -More information can be found at: https://a.co/dzr2AJd` - ); - } -}, "emitWarningIfUnsupportedVersion"); - -// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts +// src/fromIni.ts -// src/httpAuthSchemes/utils/getDateHeader.ts -var import_protocol_http = __nccwpck_require__(4418); -var getDateHeader = /* @__PURE__ */ __name((response) => { - var _a, _b; - return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0; -}, "getDateHeader"); +// src/resolveProfileData.ts -// src/httpAuthSchemes/utils/getSkewCorrectedDate.ts -var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); -// src/httpAuthSchemes/utils/isClockSkewed.ts -var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); +// src/resolveAssumeRoleCredentials.ts -// src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts -var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { - const clockTimeInMs = Date.parse(clockTime); - if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { - return clockTimeInMs - Date.now(); - } - return currentSystemClockOffset; -}, "getUpdatedSystemClockOffset"); +var import_shared_ini_file_loader = __nccwpck_require__(3507); -// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts -var throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => { - if (!property) { - throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); - } - return property; -}, "throwSigningPropertyError"); -var validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => { - var _a, _b, _c; - const context = throwSigningPropertyError( - "context", - signingProperties.context - ); - const config = throwSigningPropertyError("config", signingProperties.config); - const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0]; - const signerFunction = throwSigningPropertyError( - "signer", - config.signer - ); - const signer = await signerFunction(authScheme); - const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion; - const signingName = signingProperties == null ? void 0 : signingProperties.signingName; - return { - config, - signer, - signingRegion, - signingName +// src/resolveCredentialSource.ts +var import_property_provider = __nccwpck_require__(9721); +var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => { + const sourceProvidersMap = { + EcsContainer: (options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))).then(({ fromContainerMetadata }) => fromContainerMetadata(options)), + Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)), + Environment: (options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(5972))).then(({ fromEnv }) => fromEnv(options)) }; -}, "validateSigningProperties"); -var _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer { - async sign(httpRequest, identity, signingProperties) { - if (!import_protocol_http.HttpRequest.isInstance(httpRequest)) { - throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); - } - const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties); - const signedRequest = await signer.sign(httpRequest, { - signingDate: getSkewCorrectedDate(config.systemClockOffset), - signingRegion, - signingService: signingName - }); - return signedRequest; - } - errorHandler(signingProperties) { - return (error) => { - const serverTime = error.ServerTime ?? getDateHeader(error.$response); - if (serverTime) { - const config = throwSigningPropertyError( - "config", - signingProperties.config - ); - config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset); - } - throw error; - }; - } - successHandler(httpResponse, signingProperties) { - const dateHeader = getDateHeader(httpResponse); - if (dateHeader) { - const config = throwSigningPropertyError( - "config", - signingProperties.config - ); - config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset); - } + if (credentialSource in sourceProvidersMap) { + return sourceProvidersMap[credentialSource]; + } else { + throw new import_property_provider.CredentialsProviderError( + `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.` + ); } -}; -__name(_AwsSdkSigV4Signer, "AwsSdkSigV4Signer"); -var AwsSdkSigV4Signer = _AwsSdkSigV4Signer; -var AWSSDKSigV4Signer = AwsSdkSigV4Signer; +}, "resolveCredentialSource"); -// src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts -var import_core = __nccwpck_require__(5829); -var import_signature_v4 = __nccwpck_require__(1528); -var resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => { - let normalizedCreds; - if (config.credentials) { - normalizedCreds = (0, import_core.memoizeIdentityProvider)(config.credentials, import_core.isIdentityExpired, import_core.doesIdentityRequireRefresh); - } - if (!normalizedCreds) { - if (config.credentialDefaultProvider) { - normalizedCreds = (0, import_core.normalizeProvider)( - config.credentialDefaultProvider( - Object.assign({}, config, { - parentClientConfig: config - }) - ) - ); - } else { - normalizedCreds = /* @__PURE__ */ __name(async () => { - throw new Error("`credentials` is missing"); - }, "normalizedCreds"); - } - } - const { - // Default for signingEscapePath - signingEscapePath = true, - // Default for systemClockOffset - systemClockOffset = config.systemClockOffset || 0, - // No default for sha256 since it is platform dependent - sha256 - } = config; - let signer; - if (config.signer) { - signer = (0, import_core.normalizeProvider)(config.signer); - } else if (config.regionInfoProvider) { - signer = /* @__PURE__ */ __name(() => (0, import_core.normalizeProvider)(config.region)().then( - async (region) => [ - await config.regionInfoProvider(region, { - useFipsEndpoint: await config.useFipsEndpoint(), - useDualstackEndpoint: await config.useDualstackEndpoint() - }) || {}, - region - ] - ).then(([regionInfo, region]) => { - const { signingRegion, signingService } = regionInfo; - config.signingRegion = config.signingRegion || signingRegion || region; - config.signingName = config.signingName || signingService || config.serviceId; - const params = { - ...config, - credentials: normalizedCreds, - region: config.signingRegion, - service: config.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }), "signer"); - } else { - signer = /* @__PURE__ */ __name(async (authScheme) => { - authScheme = Object.assign( - {}, - { - name: "sigv4", - signingName: config.signingName || config.defaultSigningName, - signingRegion: await (0, import_core.normalizeProvider)(config.region)(), - properties: {} - }, - authScheme - ); - const signingRegion = authScheme.signingRegion; - const signingService = authScheme.signingName; - config.signingRegion = config.signingRegion || signingRegion; - config.signingName = config.signingName || signingService || config.serviceId; - const params = { - ...config, - credentials: normalizedCreds, - region: config.signingRegion, - service: config.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }, "signer"); +// src/resolveAssumeRoleCredentials.ts +var isAssumeRoleProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), "isAssumeRoleProfile"); +var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined", "isAssumeRoleWithSourceProfile"); +var isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined", "isAssumeRoleWithProviderProfile"); +var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + var _a; + (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)"); + const data = profiles[profileName]; + if (!options.roleAssumer) { + const { getDefaultRoleAssumer: getDefaultRoleAssumer2 } = await Promise.resolve().then(() => (init_loadSts(), loadSts_exports)); + options.roleAssumer = getDefaultRoleAssumer2( + { + ...options.clientConfig, + credentialProviderLogger: options.logger, + parentClientConfig: options == null ? void 0 : options.parentClientConfig + }, + options.clientPlugins + ); } - return { - ...config, - systemClockOffset, - signingEscapePath, - credentials: normalizedCreds, - signer + const { source_profile } = data; + if (source_profile && source_profile in visitedProfiles) { + throw new import_property_provider.CredentialsProviderError( + `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), + false + ); + } + const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, { + ...visitedProfiles, + [source_profile]: true + }) : (await resolveCredentialSource(data.credential_source, profileName)(options))(); + const params = { + RoleArn: data.role_arn, + RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, + ExternalId: data.external_id, + DurationSeconds: parseInt(data.duration_seconds || "3600", 10) }; -}, "resolveAwsSdkSigV4Config"); -var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config; + const { mfa_serial } = data; + if (mfa_serial) { + if (!options.mfaCodeProvider) { + throw new import_property_provider.CredentialsProviderError( + `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, + false + ); + } + params.SerialNumber = mfa_serial; + params.TokenCode = await options.mfaCodeProvider(mfa_serial); + } + const sourceCreds = await sourceCredsProvider; + return options.roleAssumer(sourceCreds, params); +}, "resolveAssumeRoleCredentials"); -// src/protocols/coercing-serializers.ts -var _toStr = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; +// src/resolveProcessCredentials.ts +var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); +var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(__nccwpck_require__(9969))).then( + ({ fromProcess }) => fromProcess({ + ...options, + profile + })() +), "resolveProcessCredentials"); + +// src/resolveSsoCredentials.ts +var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => { + const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(6414))); + return fromSSO({ + profile, + logger: options.logger + })(); +}, "resolveSsoCredentials"); +var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); + +// src/resolveStaticCredentials.ts +var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile"); +var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => { + var _a; + (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveStaticCredentials"); + return Promise.resolve({ + accessKeyId: profile.aws_access_key_id, + secretAccessKey: profile.aws_secret_access_key, + sessionToken: profile.aws_session_token, + credentialScope: profile.aws_credential_scope + }); +}, "resolveStaticCredentials"); + +// src/resolveWebIdentityCredentials.ts +var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); +var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(5646))).then( + ({ fromTokenFile }) => fromTokenFile({ + webIdentityTokenFile: profile.web_identity_token_file, + roleArn: profile.role_arn, + roleSessionName: profile.role_session_name, + roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, + logger: options.logger, + parentClientConfig: options.parentClientConfig + })() +), "resolveWebIdentityCredentials"); + +// src/resolveProfileData.ts +var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { + const data = profiles[profileName]; + if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); } - if (typeof val === "number" || typeof val === "bigint") { - const warning = new Error(`Received number ${val} where a string was expected.`); - warning.name = "Warning"; - console.warn(warning); - return String(val); + if (isAssumeRoleProfile(data)) { + return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); } - if (typeof val === "boolean") { - const warning = new Error(`Received boolean ${val} where a string was expected.`); - warning.name = "Warning"; - console.warn(warning); - return String(val); + if (isStaticCredsProfile(data)) { + return resolveStaticCredentials(data, options); } - return val; -}, "_toStr"); -var _toBool = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; + if (isWebIdentityProfile(data)) { + return resolveWebIdentityCredentials(data, options); } - if (typeof val === "number") { + if (isProcessProfile(data)) { + return resolveProcessCredentials(options, profileName); } - if (typeof val === "string") { - const lowercase = val.toLowerCase(); - if (val !== "" && lowercase !== "false" && lowercase !== "true") { - const warning = new Error(`Received string "${val}" where a boolean was expected.`); - warning.name = "Warning"; - console.warn(warning); - } - return val !== "" && lowercase !== "false"; + if (isSsoProfile(data)) { + return await resolveSsoCredentials(profileName, options); } - return val; -}, "_toBool"); -var _toNum = /* @__PURE__ */ __name((val) => { - if (val == null) { - return val; + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`); +}, "resolveProfileData"); + +// src/fromIni.ts +var fromIni = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "fromIni"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init); +}, "fromIni"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + +/***/ }), + +/***/ 5531: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - if (typeof val === "boolean") { + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, + credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, + defaultProvider: () => defaultProvider +}); +module.exports = __toCommonJS(src_exports); + +// src/defaultProvider.ts + +var import_shared_ini_file_loader = __nccwpck_require__(3507); + +// src/remoteProvider.ts +var import_property_provider = __nccwpck_require__(9721); +var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +var remoteProvider = /* @__PURE__ */ __name(async (init) => { + var _a, _b; + const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))); + if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata"); + const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7290))); + return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init)); } - if (typeof val === "string") { - const num = Number(val); - if (num.toString() !== val) { - const warning = new Error(`Received string "${val}" where a number was expected.`); - warning.name = "Warning"; - console.warn(warning); - return val; + if (process.env[ENV_IMDS_DISABLED]) { + return async () => { + throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled"); + }; + } + (_b = init.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromInstanceMetadata"); + return fromInstanceMetadata(init); +}, "remoteProvider"); + +// src/defaultProvider.ts +var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( + (0, import_property_provider.chain)( + ...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [ + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromEnv"); + const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(5972))); + return fromEnv(init)(); + } + ], + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + throw new import_property_provider.CredentialsProviderError( + "Skipping SSO provider in default chain (inputs do not include SSO fields)." + ); + } + const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(6414))); + return fromSSO(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni"); + const { fromIni } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(4203))); + return fromIni(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess"); + const { fromProcess } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(9969))); + return fromProcess(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile"); + const { fromTokenFile } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(5646))); + return fromTokenFile(init)(); + }, + async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::remoteProvider"); + return (await remoteProvider(init))(); + }, + async () => { + throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", false); } - return num; - } - return val; -}, "_toNum"); - -// src/protocols/json/awsExpectUnion.ts -var import_smithy_client = __nccwpck_require__(3570); -var awsExpectUnion = /* @__PURE__ */ __name((value) => { - if (value == null) { - return void 0; - } - if (typeof value === "object" && "__type" in value) { - delete value.__type; - } - return (0, import_smithy_client.expectUnion)(value); -}, "awsExpectUnion"); + ), + credentialsTreatedAsExpired, + credentialsWillNeedRefresh +), "defaultProvider"); +var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, "credentialsWillNeedRefresh"); +var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -8043,7 +9758,7 @@ var awsExpectUnion = /* @__PURE__ */ __name((value) => { /***/ }), -/***/ 5972: +/***/ 9969: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -8068,489 +9783,403 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv + fromProcess: () => fromProcess }); module.exports = __toCommonJS(src_exports); -// src/fromEnv.ts -var import_property_provider = __nccwpck_require__(9721); -var ENV_KEY = "AWS_ACCESS_KEY_ID"; -var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -var ENV_SESSION = "AWS_SESSION_TOKEN"; -var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -var fromEnv = /* @__PURE__ */ __name((init) => async () => { - var _a; - (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-env", "fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - if (accessKeyId && secretAccessKey) { - return { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope } - }; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials."); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); +// src/fromProcess.ts +var import_shared_ini_file_loader = __nccwpck_require__(3507); +// src/resolveProcessCredentials.ts +var import_property_provider = __nccwpck_require__(9721); +var import_child_process = __nccwpck_require__(2081); +var import_util = __nccwpck_require__(3837); +// src/getValidatedProcessCredentials.ts +var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => { + if (data.Version !== 1) { + throw Error(`Profile ${profileName} credential_process did not return Version 1.`); + } + if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { + throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); + } + if (data.Expiration) { + const currentTime = /* @__PURE__ */ new Date(); + const expireTime = new Date(data.Expiration); + if (expireTime < currentTime) { + throw Error(`Profile ${profileName} credential_process returned expired credentials.`); + } + } + return { + accessKeyId: data.AccessKeyId, + secretAccessKey: data.SecretAccessKey, + ...data.SessionToken && { sessionToken: data.SessionToken }, + ...data.Expiration && { expiration: new Date(data.Expiration) }, + ...data.CredentialScope && { credentialScope: data.CredentialScope } + }; +}, "getValidatedProcessCredentials"); -/***/ }), +// src/resolveProcessCredentials.ts +var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => { + const profile = profiles[profileName]; + if (profiles[profileName]) { + const credentialProcess = profile["credential_process"]; + if (credentialProcess !== void 0) { + const execPromise = (0, import_util.promisify)(import_child_process.exec); + try { + const { stdout } = await execPromise(credentialProcess); + let data; + try { + data = JSON.parse(stdout.trim()); + } catch { + throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); + } + return getValidatedProcessCredentials(profileName, data); + } catch (error) { + throw new import_property_provider.CredentialsProviderError(error.message); + } + } else { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`); + } + } else { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`); + } +}, "resolveProcessCredentials"); -/***/ 3757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// src/fromProcess.ts +var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles); +}, "fromProcess"); +// Annotate the CommonJS export names for ESM import in node: -"use strict"; +0 && (0); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkUrl = void 0; -const property_provider_1 = __nccwpck_require__(9721); -const LOOPBACK_CIDR_IPv4 = "127.0.0.0/8"; -const LOOPBACK_CIDR_IPv6 = "::1/128"; -const ECS_CONTAINER_HOST = "169.254.170.2"; -const EKS_CONTAINER_HOST_IPv4 = "169.254.170.23"; -const EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]"; -const checkUrl = (url) => { - if (url.protocol === "https:") { - return; - } - if (url.hostname === ECS_CONTAINER_HOST || - url.hostname === EKS_CONTAINER_HOST_IPv4 || - url.hostname === EKS_CONTAINER_HOST_IPv6) { - return; - } - if (url.hostname.includes("[")) { - if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") { - return; - } - } - else { - if (url.hostname === "localhost") { - return; - } - const ipComponents = url.hostname.split("."); - const inRange = (component) => { - const num = parseInt(component, 10); - return 0 <= num && num <= 255; - }; - if (ipComponents[0] === "127" && - inRange(ipComponents[1]) && - inRange(ipComponents[2]) && - inRange(ipComponents[3]) && - ipComponents.length === 4) { - return; - } - } - throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following: - - loopback CIDR 127.0.0.0/8 or [::1/128] - - ECS container host 169.254.170.2 - - EKS container host 169.254.170.23 or [fd00:ec2::23]`); -}; -exports.checkUrl = checkUrl; /***/ }), -/***/ 6070: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 6414: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromHttp = void 0; -const tslib_1 = __nccwpck_require__(4351); -const node_http_handler_1 = __nccwpck_require__(258); -const property_provider_1 = __nccwpck_require__(9721); -const promises_1 = tslib_1.__importDefault(__nccwpck_require__(3292)); -const checkUrl_1 = __nccwpck_require__(3757); -const requestHelpers_1 = __nccwpck_require__(9287); -const retry_wrapper_1 = __nccwpck_require__(9921); -const AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; -const DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2"; -const AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; -const AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE"; -const AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; -const fromHttp = (options) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j; - (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-http", "fromHttp"); - let host; - const relative = (_b = options.awsContainerCredentialsRelativeUri) !== null && _b !== void 0 ? _b : process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI]; - const full = (_c = options.awsContainerCredentialsFullUri) !== null && _c !== void 0 ? _c : process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; - const token = (_d = options.awsContainerAuthorizationToken) !== null && _d !== void 0 ? _d : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; - const tokenFile = (_e = options.awsContainerAuthorizationTokenFile) !== null && _e !== void 0 ? _e : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; - if (relative && full) { - console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); - console.warn("awsContainerCredentialsFullUri will take precedence."); - } - if (token && tokenFile) { - console.warn("AWS SDK HTTP credentials provider:", "you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."); - console.warn("awsContainerAuthorizationToken will take precedence."); - } - if (full) { - host = full; - } - else if (relative) { - host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`; - } - else { - throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided. -Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`); - } - const url = new URL(host); - (0, checkUrl_1.checkUrl)(url); - const requestHandler = new node_http_handler_1.NodeHttpHandler({ - requestTimeout: (_f = options.timeout) !== null && _f !== void 0 ? _f : 1000, - connectionTimeout: (_g = options.timeout) !== null && _g !== void 0 ? _g : 1000, - }); - return (0, retry_wrapper_1.retryWrapper)(async () => { - const request = (0, requestHelpers_1.createGetRequest)(url); - if (token) { - request.headers.Authorization = token; - } - else if (tokenFile) { - request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString(); - } - try { - const result = await requestHandler.handle(request); - return (0, requestHelpers_1.getCredentials)(result.response); - } - catch (e) { - throw new property_provider_1.CredentialsProviderError(String(e)); - } - }, (_h = options.maxRetries) !== null && _h !== void 0 ? _h : 3, (_j = options.timeout) !== null && _j !== void 0 ? _j : 1000); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; -exports.fromHttp = fromHttp; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +// src/loadSso.ts +var loadSso_exports = {}; +__export(loadSso_exports, { + GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, + SSOClient: () => import_client_sso.SSOClient +}); +var import_client_sso; +var init_loadSso = __esm({ + "src/loadSso.ts"() { + import_client_sso = __nccwpck_require__(2666); + } +}); -/***/ }), +// src/index.ts +var src_exports = {}; +__export(src_exports, { + fromSSO: () => fromSSO, + isSsoProfile: () => isSsoProfile, + validateSsoProfile: () => validateSsoProfile +}); +module.exports = __toCommonJS(src_exports); -/***/ 9287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// src/fromSSO.ts -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCredentials = exports.createGetRequest = void 0; -const property_provider_1 = __nccwpck_require__(9721); -const protocol_http_1 = __nccwpck_require__(4418); -const smithy_client_1 = __nccwpck_require__(3570); -const util_stream_1 = __nccwpck_require__(6607); -function createGetRequest(url) { - return new protocol_http_1.HttpRequest({ - protocol: url.protocol, - hostname: url.hostname, - port: Number(url.port), - path: url.pathname, - query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => { - acc[k] = v; - return acc; - }, {}), - fragment: url.hash, - }); -} -exports.createGetRequest = createGetRequest; -async function getCredentials(response) { - var _a, _b; - const contentType = (_b = (_a = response === null || response === void 0 ? void 0 : response.headers["content-type"]) !== null && _a !== void 0 ? _a : response === null || response === void 0 ? void 0 : response.headers["Content-Type"]) !== null && _b !== void 0 ? _b : ""; - if (!contentType.includes("json")) { - console.warn("HTTP credential provider response header content-type was not application/json. Observed: " + contentType + "."); - } - const stream = (0, util_stream_1.sdkStreamMixin)(response.body); - const str = await stream.transformToString(); - if (response.statusCode === 200) { - const parsed = JSON.parse(str); - if (typeof parsed.AccessKeyId !== "string" || - typeof parsed.SecretAccessKey !== "string" || - typeof parsed.Token !== "string" || - typeof parsed.Expiration !== "string") { - throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + - "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }"); - } - return { - accessKeyId: parsed.AccessKeyId, - secretAccessKey: parsed.SecretAccessKey, - sessionToken: parsed.Token, - expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration), - }; - } - if (response.statusCode >= 400 && response.statusCode < 500) { - let parsedBody = {}; - try { - parsedBody = JSON.parse(str); - } - catch (e) { } - throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`), { - Code: parsedBody.Code, - Message: parsedBody.Message, - }); - } - throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`); -} -exports.getCredentials = getCredentials; +// src/isSsoProfile.ts +var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); -/***/ }), +// src/resolveSSOCredentials.ts +var import_token_providers = __nccwpck_require__(2843); +var import_property_provider = __nccwpck_require__(9721); +var import_shared_ini_file_loader = __nccwpck_require__(3507); +var SHOULD_FAIL_CREDENTIAL_CHAIN = false; +var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig, + profile +}) => { + let token; + const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; + if (ssoSession) { + try { + const _token = await (0, import_token_providers.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString() + }; + } catch (e) { + throw new import_property_provider.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + } else { + try { + token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); + } catch (e) { + throw new import_property_provider.CredentialsProviderError( + `The SSO session associated with this profile is invalid. ${refreshMessage}`, + SHOULD_FAIL_CREDENTIAL_CHAIN + ); + } + } + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { + throw new import_property_provider.CredentialsProviderError( + `The SSO session associated with this profile has expired. ${refreshMessage}`, + SHOULD_FAIL_CREDENTIAL_CHAIN + ); + } + const { accessToken } = token; + const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); + const sso = ssoClient || new SSOClient2( + Object.assign({}, clientConfig ?? {}, { + region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion + }) + ); + let ssoResp; + try { + ssoResp = await sso.send( + new GetRoleCredentialsCommand2({ + accountId: ssoAccountId, + roleName: ssoRoleName, + accessToken + }) + ); + } catch (e) { + throw import_property_provider.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN); + } + const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp; + if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { + throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); + } + return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope }; +}, "resolveSSOCredentials"); -/***/ 9921: -/***/ ((__unused_webpack_module, exports) => { +// src/validateSsoProfile.ts -"use strict"; +var validateSsoProfile = /* @__PURE__ */ __name((profile) => { + const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; + if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { + throw new import_property_provider.CredentialsProviderError( + `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( + ", " + )} +Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, + false + ); + } + return profile; +}, "validateSsoProfile"); + +// src/fromSSO.ts +var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso", "fromSSO"); + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; + const { ssoClient } = init; + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`); + } + if (!isSsoProfile(profile)) { + throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); + } + if (profile == null ? void 0 : profile.sso_session) { + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile); + return resolveSSOCredentials({ + ssoStartUrl: sso_start_url, + ssoSession: sso_session, + ssoAccountId: sso_account_id, + ssoRegion: sso_region, + ssoRoleName: sso_role_name, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { + throw new import_property_provider.CredentialsProviderError( + 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"' + ); + } else { + return resolveSSOCredentials({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + clientConfig: init.clientConfig, + profile: profileName + }); + } +}, "fromSSO"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryWrapper = void 0; -const retryWrapper = (toRetry, maxRetries, delayMs) => { - return async () => { - for (let i = 0; i < maxRetries; ++i) { - try { - return await toRetry(); - } - catch (e) { - await new Promise((resolve) => setTimeout(resolve, delayMs)); - } - } - return await toRetry(); - }; -}; -exports.retryWrapper = retryWrapper; /***/ }), -/***/ 7290: +/***/ 5614: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromHttp = void 0; -var fromHttp_1 = __nccwpck_require__(6070); -Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); +exports.fromTokenFile = void 0; +const property_provider_1 = __nccwpck_require__(9721); +const fs_1 = __nccwpck_require__(7147); +const fromWebToken_1 = __nccwpck_require__(7905); +const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; +const ENV_ROLE_ARN = "AWS_ROLE_ARN"; +const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; +const fromTokenFile = (init = {}) => async () => { + var _a, _b, _c, _d; + (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile"); + const webIdentityTokenFile = (_b = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _b !== void 0 ? _b : process.env[ENV_TOKEN_FILE]; + const roleArn = (_c = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_ARN]; + const roleSessionName = (_d = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _d !== void 0 ? _d : process.env[ENV_ROLE_SESSION_NAME]; + if (!webIdentityTokenFile || !roleArn) { + throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified"); + } + return (0, fromWebToken_1.fromWebToken)({ + ...init, + webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), + roleArn, + roleSessionName, + })(); +}; +exports.fromTokenFile = fromTokenFile; /***/ }), -/***/ 4203: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +/***/ 7905: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -// src/loadSts.ts -var loadSts_exports = {}; -__export(loadSts_exports, { - getDefaultRoleAssumer: () => import_client_sts.getDefaultRoleAssumer -}); -var import_client_sts; -var init_loadSts = __esm({ - "src/loadSts.ts"() { - import_client_sts = __nccwpck_require__(2209); - } -}); +"use strict"; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - fromIni: () => fromIni +var __createBinding = (this && this.__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 = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; }); -module.exports = __toCommonJS(src_exports); - -// src/fromIni.ts - - -// src/resolveProfileData.ts - - -// src/resolveAssumeRoleCredentials.ts - -var import_shared_ini_file_loader = __nccwpck_require__(3507); - -// src/resolveCredentialSource.ts -var import_property_provider = __nccwpck_require__(9721); -var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => { - const sourceProvidersMap = { - EcsContainer: (options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))).then(({ fromContainerMetadata }) => fromContainerMetadata(options)), - Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)), - Environment: (options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(5972))).then(({ fromEnv }) => fromEnv(options)) - }; - if (credentialSource in sourceProvidersMap) { - return sourceProvidersMap[credentialSource]; - } else { - throw new import_property_provider.CredentialsProviderError( - `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.` - ); - } -}, "resolveCredentialSource"); - -// src/resolveAssumeRoleCredentials.ts -var isAssumeRoleProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), "isAssumeRoleProfile"); -var isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined", "isAssumeRoleWithSourceProfile"); -var isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined", "isAssumeRoleWithProviderProfile"); -var resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { - var _a; - (_a = options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveAssumeRoleCredentials (STS)"); - const data = profiles[profileName]; - if (!options.roleAssumer) { - const { getDefaultRoleAssumer: getDefaultRoleAssumer2 } = await Promise.resolve().then(() => (init_loadSts(), loadSts_exports)); - options.roleAssumer = getDefaultRoleAssumer2( - { - ...options.clientConfig, - credentialProviderLogger: options.logger, - parentClientConfig: options == null ? void 0 : options.parentClientConfig - }, - options.clientPlugins - ); - } - const { source_profile } = data; - if (source_profile && source_profile in visitedProfiles) { - throw new import_property_provider.CredentialsProviderError( - `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), - false - ); - } - const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, { - ...visitedProfiles, - [source_profile]: true - }) : (await resolveCredentialSource(data.credential_source, profileName)(options))(); - const params = { - RoleArn: data.role_arn, - RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, - ExternalId: data.external_id, - DurationSeconds: parseInt(data.duration_seconds || "3600", 10) - }; - const { mfa_serial } = data; - if (mfa_serial) { - if (!options.mfaCodeProvider) { - throw new import_property_provider.CredentialsProviderError( - `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, - false - ); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromWebToken = void 0; +const fromWebToken = (init) => async () => { + var _a; + (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken"); + const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; + let { roleAssumerWithWebIdentity } = init; + if (!roleAssumerWithWebIdentity) { + const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(4999))); + roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ + ...init.clientConfig, + credentialProviderLogger: init.logger, + parentClientConfig: init.parentClientConfig, + }, init.clientPlugins); } - params.SerialNumber = mfa_serial; - params.TokenCode = await options.mfaCodeProvider(mfa_serial); - } - const sourceCreds = await sourceCredsProvider; - return options.roleAssumer(sourceCreds, params); -}, "resolveAssumeRoleCredentials"); - -// src/resolveProcessCredentials.ts -var isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile"); -var resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(__nccwpck_require__(9969))).then( - ({ fromProcess }) => fromProcess({ - ...options, - profile - })() -), "resolveProcessCredentials"); - -// src/resolveSsoCredentials.ts -var resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => { - const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(6414))); - return fromSSO({ - profile, - logger: options.logger - })(); -}, "resolveSsoCredentials"); -var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); - -// src/resolveStaticCredentials.ts -var isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile"); -var resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => { - var _a; - (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "resolveStaticCredentials"); - return Promise.resolve({ - accessKeyId: profile.aws_access_key_id, - secretAccessKey: profile.aws_secret_access_key, - sessionToken: profile.aws_session_token, - credentialScope: profile.aws_credential_scope - }); -}, "resolveStaticCredentials"); - -// src/resolveWebIdentityCredentials.ts -var isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile"); -var resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(__nccwpck_require__(5646))).then( - ({ fromTokenFile }) => fromTokenFile({ - webIdentityTokenFile: profile.web_identity_token_file, - roleArn: profile.role_arn, - roleSessionName: profile.role_session_name, - roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, - logger: options.logger, - parentClientConfig: options.parentClientConfig - })() -), "resolveWebIdentityCredentials"); + return roleAssumerWithWebIdentity({ + RoleArn: roleArn, + RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`, + WebIdentityToken: webIdentityToken, + ProviderId: providerId, + PolicyArns: policyArns, + Policy: policy, + DurationSeconds: durationSeconds, + }); +}; +exports.fromWebToken = fromWebToken; -// src/resolveProfileData.ts -var resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => { - const data = profiles[profileName]; - if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { - return resolveStaticCredentials(data, options); - } - if (isAssumeRoleProfile(data)) { - return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles); - } - if (isStaticCredsProfile(data)) { - return resolveStaticCredentials(data, options); - } - if (isWebIdentityProfile(data)) { - return resolveWebIdentityCredentials(data, options); - } - if (isProcessProfile(data)) { - return resolveProcessCredentials(options, profileName); - } - if (isSsoProfile(data)) { - return await resolveSsoCredentials(profileName, options); + +/***/ }), + +/***/ 5646: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`); -}, "resolveProfileData"); + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/fromIni.ts -var fromIni = /* @__PURE__ */ __name((init = {}) => async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-ini", "fromIni"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init); -}, "fromIni"); +// src/index.ts +var src_exports = {}; +module.exports = __toCommonJS(src_exports); +__reExport(src_exports, __nccwpck_require__(5614), module.exports); +__reExport(src_exports, __nccwpck_require__(7905), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -8559,14 +10188,25 @@ var fromIni = /* @__PURE__ */ __name((init = {}) => async () => { /***/ }), -/***/ 5531: +/***/ 4999: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDefaultRoleAssumerWithWebIdentity = void 0; +const client_sts_1 = __nccwpck_require__(2209); +Object.defineProperty(exports, "getDefaultRoleAssumerWithWebIdentity", ({ enumerable: true, get: function () { return client_sts_1.getDefaultRoleAssumerWithWebIdentity; } })); + + +/***/ }), + +/***/ 2545: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { @@ -8581,104 +10221,50 @@ var __copyProps = (to, from, except, desc) => { } return to; }; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { - credentialsTreatedAsExpired: () => credentialsTreatedAsExpired, - credentialsWillNeedRefresh: () => credentialsWillNeedRefresh, - defaultProvider: () => defaultProvider + getHostHeaderPlugin: () => getHostHeaderPlugin, + hostHeaderMiddleware: () => hostHeaderMiddleware, + hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, + resolveHostHeaderConfig: () => resolveHostHeaderConfig }); module.exports = __toCommonJS(src_exports); - -// src/defaultProvider.ts - -var import_shared_ini_file_loader = __nccwpck_require__(3507); - -// src/remoteProvider.ts -var import_property_provider = __nccwpck_require__(9721); -var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -var remoteProvider = /* @__PURE__ */ __name(async (init) => { - var _a, _b; - const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7477))); - if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) { - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromHttp/fromContainerMetadata"); - const { fromHttp } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7290))); - return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init)); +var import_protocol_http = __nccwpck_require__(4418); +function resolveHostHeaderConfig(input) { + return input; +} +__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); +var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) + return next(args); + const { request } = args; + const { handlerProtocol = "" } = options.requestHandler.metadata || {}; + if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { + delete request.headers["host"]; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); + } else if (!request.headers["host"]) { + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; } - if (process.env[ENV_IMDS_DISABLED]) { - return async () => { - throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled"); - }; + return next(args); +}, "hostHeaderMiddleware"); +var hostHeaderMiddlewareOptions = { + name: "hostHeaderMiddleware", + step: "build", + priority: "low", + tags: ["HOST"], + override: true +}; +var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); } - (_b = init.logger) == null ? void 0 : _b.debug("@aws-sdk/credential-provider-node", "remoteProvider::fromInstanceMetadata"); - return fromInstanceMetadata(init); -}, "remoteProvider"); - -// src/defaultProvider.ts -var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)( - ...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [ - async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromEnv"); - const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(5972))); - return fromEnv(init)(); - } - ], - async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromSSO"); - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - throw new import_property_provider.CredentialsProviderError( - "Skipping SSO provider in default chain (inputs do not include SSO fields)." - ); - } - const { fromSSO } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(6414))); - return fromSSO(init)(); - }, - async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromIni"); - const { fromIni } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(4203))); - return fromIni(init)(); - }, - async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromProcess"); - const { fromProcess } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(9969))); - return fromProcess(init)(); - }, - async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::fromTokenFile"); - const { fromTokenFile } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(5646))); - return fromTokenFile(init)(); - }, - async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-node", "defaultProvider::remoteProvider"); - return (await remoteProvider(init))(); - }, - async () => { - throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", false); - } - ), - credentialsTreatedAsExpired, - credentialsWillNeedRefresh -), "defaultProvider"); -var credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, "credentialsWillNeedRefresh"); -var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, "credentialsTreatedAsExpired"); +}), "getHostHeaderPlugin"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -8687,8 +10273,8 @@ var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (crede /***/ }), -/***/ 9969: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 14: +/***/ ((module) => { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -8712,76 +10298,55 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - fromProcess: () => fromProcess + getLoggerPlugin: () => getLoggerPlugin, + loggerMiddleware: () => loggerMiddleware, + loggerMiddlewareOptions: () => loggerMiddlewareOptions }); module.exports = __toCommonJS(src_exports); -// src/fromProcess.ts -var import_shared_ini_file_loader = __nccwpck_require__(3507); - -// src/resolveProcessCredentials.ts -var import_property_provider = __nccwpck_require__(9721); -var import_child_process = __nccwpck_require__(2081); -var import_util = __nccwpck_require__(3837); - -// src/getValidatedProcessCredentials.ts -var getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => { - if (data.Version !== 1) { - throw Error(`Profile ${profileName} credential_process did not return Version 1.`); - } - if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) { - throw Error(`Profile ${profileName} credential_process returned invalid credentials.`); - } - if (data.Expiration) { - const currentTime = /* @__PURE__ */ new Date(); - const expireTime = new Date(data.Expiration); - if (expireTime < currentTime) { - throw Error(`Profile ${profileName} credential_process returned expired credentials.`); - } +// src/loggerMiddleware.ts +var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { + var _a, _b; + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; + const { $metadata, ...outputWithoutMetadata } = response.output; + (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + output: outputFilterSensitiveLog(outputWithoutMetadata), + metadata: $metadata + }); + return response; + } catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; + (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata + }); + throw error; } - return { - accessKeyId: data.AccessKeyId, - secretAccessKey: data.SecretAccessKey, - ...data.SessionToken && { sessionToken: data.SessionToken }, - ...data.Expiration && { expiration: new Date(data.Expiration) }, - ...data.CredentialScope && { credentialScope: data.CredentialScope } - }; -}, "getValidatedProcessCredentials"); - -// src/resolveProcessCredentials.ts -var resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => { - const profile = profiles[profileName]; - if (profiles[profileName]) { - const credentialProcess = profile["credential_process"]; - if (credentialProcess !== void 0) { - const execPromise = (0, import_util.promisify)(import_child_process.exec); - try { - const { stdout } = await execPromise(credentialProcess); - let data; - try { - data = JSON.parse(stdout.trim()); - } catch { - throw Error(`Profile ${profileName} credential_process returned invalid JSON.`); - } - return getValidatedProcessCredentials(profileName, data); - } catch (error) { - throw new import_property_provider.CredentialsProviderError(error.message); - } - } else { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`); - } - } else { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`); +}, "loggerMiddleware"); +var loggerMiddlewareOptions = { + name: "loggerMiddleware", + tags: ["LOGGER"], + step: "initialize", + override: true +}; +var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); } -}, "resolveProcessCredentials"); - -// src/fromProcess.ts -var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-process", "fromProcess"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles); -}, "fromProcess"); +}), "getLoggerPlugin"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -8790,7 +10355,7 @@ var fromProcess = /* @__PURE__ */ __name((init = {}) => async () => { /***/ }), -/***/ 6414: +/***/ 5525: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -8798,9 +10363,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); @@ -8815,177 +10377,46 @@ var __copyProps = (to, from, except, desc) => { }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/loadSso.ts -var loadSso_exports = {}; -__export(loadSso_exports, { - GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand, - SSOClient: () => import_client_sso.SSOClient -}); -var import_client_sso; -var init_loadSso = __esm({ - "src/loadSso.ts"() { - import_client_sso = __nccwpck_require__(2666); - } -}); - // src/index.ts var src_exports = {}; __export(src_exports, { - fromSSO: () => fromSSO, - isSsoProfile: () => isSsoProfile, - validateSsoProfile: () => validateSsoProfile + addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, + getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, + recursionDetectionMiddleware: () => recursionDetectionMiddleware }); module.exports = __toCommonJS(src_exports); - -// src/fromSSO.ts - - - -// src/isSsoProfile.ts -var isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile"); - -// src/resolveSSOCredentials.ts -var import_token_providers = __nccwpck_require__(2843); -var import_property_provider = __nccwpck_require__(9721); -var import_shared_ini_file_loader = __nccwpck_require__(3507); -var SHOULD_FAIL_CREDENTIAL_CHAIN = false; -var resolveSSOCredentials = /* @__PURE__ */ __name(async ({ - ssoStartUrl, - ssoSession, - ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - clientConfig, - profile -}) => { - let token; - const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; - if (ssoSession) { - try { - const _token = await (0, import_token_providers.fromSso)({ profile })(); - token = { - accessToken: _token.token, - expiresAt: new Date(_token.expiration).toISOString() - }; - } catch (e) { - throw new import_property_provider.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN); - } - } else { - try { - token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl); - } catch (e) { - throw new import_property_provider.CredentialsProviderError( - `The SSO session associated with this profile is invalid. ${refreshMessage}`, - SHOULD_FAIL_CREDENTIAL_CHAIN - ); - } - } - if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { - throw new import_property_provider.CredentialsProviderError( - `The SSO session associated with this profile has expired. ${refreshMessage}`, - SHOULD_FAIL_CREDENTIAL_CHAIN - ); - } - const { accessToken } = token; - const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports)); - const sso = ssoClient || new SSOClient2( - Object.assign({}, clientConfig ?? {}, { - region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion - }) - ); - let ssoResp; - try { - ssoResp = await sso.send( - new GetRoleCredentialsCommand2({ - accountId: ssoAccountId, - roleName: ssoRoleName, - accessToken - }) - ); - } catch (e) { - throw import_property_provider.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN); - } - const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp; - if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) { - throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN); +var import_protocol_http = __nccwpck_require__(4418); +var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; +var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; +var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; +var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { + const { request } = args; + if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== "node" || request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { + return next(args); } - return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope }; -}, "resolveSSOCredentials"); - -// src/validateSsoProfile.ts - -var validateSsoProfile = /* @__PURE__ */ __name((profile) => { - const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; - if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { - throw new import_property_provider.CredentialsProviderError( - `Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join( - ", " - )} -Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, - false - ); + const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; + const traceId = process.env[ENV_TRACE_ID]; + const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString"); + if (nonEmptyString(functionName) && nonEmptyString(traceId)) { + request.headers[TRACE_ID_HEADER_NAME] = traceId; } - return profile; -}, "validateSsoProfile"); - -// src/fromSSO.ts -var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/credential-provider-sso", "fromSSO"); - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init; - const { ssoClient } = init; - const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - const profile = profiles[profileName]; - if (!profile) { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`); - } - if (!isSsoProfile(profile)) { - throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); - } - if (profile == null ? void 0 : profile.sso_session) { - const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); - const session = ssoSessions[profile.sso_session]; - const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; - if (ssoRegion && ssoRegion !== session.sso_region) { - throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false); - } - if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { - throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false); - } - profile.sso_region = session.sso_region; - profile.sso_start_url = session.sso_start_url; - } - const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile); - return resolveSSOCredentials({ - ssoStartUrl: sso_start_url, - ssoSession: sso_session, - ssoAccountId: sso_account_id, - ssoRegion: sso_region, - ssoRoleName: sso_role_name, - ssoClient, - clientConfig: init.clientConfig, - profile: profileName - }); - } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { - throw new import_property_provider.CredentialsProviderError( - 'Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"' - ); - } else { - return resolveSSOCredentials({ - ssoStartUrl, - ssoSession, - ssoAccountId, - ssoRegion, - ssoRoleName, - ssoClient, - clientConfig: init.clientConfig, - profile: profileName - }); + return next({ + ...args, + request + }); +}, "recursionDetectionMiddleware"); +var addRecursionDetectionMiddlewareOptions = { + step: "build", + tags: ["RECURSION_DETECTION"], + name: "recursionDetectionMiddleware", + override: true, + priority: "low" +}; +var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); } -}, "fromSSO"); +}), "getRecursionDetectionPlugin"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -8994,121 +10425,236 @@ var fromSSO = /* @__PURE__ */ __name((init = {}) => async () => { /***/ }), -/***/ 5614: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromTokenFile = void 0; -const property_provider_1 = __nccwpck_require__(9721); -const fs_1 = __nccwpck_require__(7147); -const fromWebToken_1 = __nccwpck_require__(7905); -const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; -const ENV_ROLE_ARN = "AWS_ROLE_ARN"; -const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; -const fromTokenFile = (init = {}) => async () => { - var _a, _b, _c, _d; - (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromTokenFile"); - const webIdentityTokenFile = (_b = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _b !== void 0 ? _b : process.env[ENV_TOKEN_FILE]; - const roleArn = (_c = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_ARN]; - const roleSessionName = (_d = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _d !== void 0 ? _d : process.env[ENV_ROLE_SESSION_NAME]; - if (!webIdentityTokenFile || !roleArn) { - throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified"); +// src/index.ts +var src_exports = {}; +__export(src_exports, { + getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, + getUserAgentPlugin: () => getUserAgentPlugin, + resolveUserAgentConfig: () => resolveUserAgentConfig, + userAgentMiddleware: () => userAgentMiddleware +}); +module.exports = __toCommonJS(src_exports); + +// src/configurations.ts +function resolveUserAgentConfig(input) { + return { + ...input, + customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent + }; +} +__name(resolveUserAgentConfig, "resolveUserAgentConfig"); + +// src/user-agent-middleware.ts +var import_util_endpoints = __nccwpck_require__(3350); +var import_protocol_http = __nccwpck_require__(4418); + +// src/constants.ts +var USER_AGENT = "user-agent"; +var X_AMZ_USER_AGENT = "x-amz-user-agent"; +var SPACE = " "; +var UA_NAME_SEPARATOR = "/"; +var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; +var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; +var UA_ESCAPE_CHAR = "-"; + +// src/user-agent-middleware.ts +var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a, _b; + const { request } = args; + if (!import_protocol_http.HttpRequest.isInstance(request)) + return next(args); + const { headers } = request; + const userAgent = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || []; + const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); + const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || []; + const prefix = (0, import_util_endpoints.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); + const normalUAValue = [ + ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), + ...customUserAgent + ].join(SPACE); + if (options.runtime !== "browser") { + if (normalUAValue) { + headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; } - return (0, fromWebToken_1.fromWebToken)({ - ...init, - webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }), - roleArn, - roleSessionName, - })(); + headers[USER_AGENT] = sdkUserAgentValue; + } else { + headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; + } + return next({ + ...args, + request + }); +}, "userAgentMiddleware"); +var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { + var _a; + const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); + const version = (_a = userAgentPair[1]) == null ? void 0 : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); + const prefix = name.substring(0, prefixSeparatorIndex); + let uaName = name.substring(prefixSeparatorIndex + 1); + if (prefix === "api") { + uaName = uaName.toLowerCase(); + } + return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); +}, "escapeUserAgent"); +var getUserAgentMiddlewareOptions = { + name: "getUserAgentMiddleware", + step: "build", + priority: "low", + tags: ["SET_USER_AGENT", "USER_AGENT"], + override: true }; -exports.fromTokenFile = fromTokenFile; +var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ + applyToStack: (clientStack) => { + clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); + } +}), "getUserAgentPlugin"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + /***/ }), -/***/ 7905: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 8156: +/***/ ((module) => { -"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __createBinding = (this && this.__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 = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; +// src/index.ts +var src_exports = {}; +__export(src_exports, { + NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + REGION_ENV_NAME: () => REGION_ENV_NAME, + REGION_INI_NAME: () => REGION_INI_NAME, + getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, + resolveRegionConfig: () => resolveRegionConfig }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromWebToken = void 0; -const fromWebToken = (init) => async () => { - var _a; - (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug("@aws-sdk/credential-provider-web-identity", "fromWebToken"); - const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init; - let { roleAssumerWithWebIdentity } = init; - if (!roleAssumerWithWebIdentity) { - const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(4999))); - roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({ - ...init.clientConfig, - credentialProviderLogger: init.logger, - parentClientConfig: init.parentClientConfig, - }, init.clientPlugins); +module.exports = __toCommonJS(src_exports); + +// src/extensions/index.ts +var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { + let runtimeConfigRegion = /* @__PURE__ */ __name(async () => { + if (runtimeConfig.region === void 0) { + throw new Error("Region is missing from runtimeConfig"); } - return roleAssumerWithWebIdentity({ - RoleArn: roleArn, - RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`, - WebIdentityToken: webIdentityToken, - ProviderId: providerId, - PolicyArns: policyArns, - Policy: policy, - DurationSeconds: durationSeconds, - }); + const region = runtimeConfig.region; + if (typeof region === "string") { + return region; + } + return region(); + }, "runtimeConfigRegion"); + return { + setRegion(region) { + runtimeConfigRegion = region; + }, + region() { + return runtimeConfigRegion; + } + }; +}, "getAwsRegionExtensionConfiguration"); +var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region() + }; +}, "resolveAwsRegionExtensionConfiguration"); + +// src/regionConfig/config.ts +var REGION_ENV_NAME = "AWS_REGION"; +var REGION_INI_NAME = "region"; +var NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[REGION_ENV_NAME], + configFileSelector: (profile) => profile[REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + } +}; +var NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials" }; -exports.fromWebToken = fromWebToken; - -/***/ }), +// src/regionConfig/isFipsRegion.ts +var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); -/***/ 5646: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// src/regionConfig/getRealRegion.ts +var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// src/regionConfig/resolveRegionConfig.ts +var resolveRegionConfig = /* @__PURE__ */ __name((input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(5614), module.exports); -__reExport(src_exports, __nccwpck_require__(7905), module.exports); + return { + ...input, + region: async () => { + if (typeof region === "string") { + return getRealRegion(region); + } + const providedRegion = await region(); + return getRealRegion(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if (isFipsRegion(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + } + }; +}, "resolveRegionConfig"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -9117,20 +10663,7 @@ __reExport(src_exports, __nccwpck_require__(7905), module.exports); /***/ }), -/***/ 4999: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getDefaultRoleAssumerWithWebIdentity = void 0; -const client_sts_1 = __nccwpck_require__(2209); -Object.defineProperty(exports, "getDefaultRoleAssumerWithWebIdentity", ({ enumerable: true, get: function () { return client_sts_1.getDefaultRoleAssumerWithWebIdentity; } })); - - -/***/ }), - -/***/ 2545: +/***/ 2843: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -9138,6 +10671,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); @@ -9152,130 +10688,190 @@ var __copyProps = (to, from, except, desc) => { }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +// src/loadSsoOidc.ts +var loadSsoOidc_exports = {}; +__export(loadSsoOidc_exports, { + CreateTokenCommand: () => import_client_sso_oidc.CreateTokenCommand, + SSOOIDCClient: () => import_client_sso_oidc.SSOOIDCClient +}); +var import_client_sso_oidc; +var init_loadSsoOidc = __esm({ + "src/loadSsoOidc.ts"() { + import_client_sso_oidc = __nccwpck_require__(4527); + } +}); + // src/index.ts var src_exports = {}; __export(src_exports, { - getHostHeaderPlugin: () => getHostHeaderPlugin, - hostHeaderMiddleware: () => hostHeaderMiddleware, - hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions, - resolveHostHeaderConfig: () => resolveHostHeaderConfig + fromSso: () => fromSso, + fromStatic: () => fromStatic, + nodeProvider: () => nodeProvider }); module.exports = __toCommonJS(src_exports); -var import_protocol_http = __nccwpck_require__(4418); -function resolveHostHeaderConfig(input) { - return input; -} -__name(resolveHostHeaderConfig, "resolveHostHeaderConfig"); -var hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) - return next(args); - const { request } = args; - const { handlerProtocol = "" } = options.requestHandler.metadata || {}; - if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { - delete request.headers["host"]; - request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); - } else if (!request.headers["host"]) { - let host = request.hostname; - if (request.port != null) - host += `:${request.port}`; - request.headers["host"] = host; + +// src/fromSso.ts + + + +// src/constants.ts +var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; +var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; + +// src/getSsoOidcClient.ts +var ssoOidcClientsHash = {}; +var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => { + const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports)); + if (ssoOidcClientsHash[ssoRegion]) { + return ssoOidcClientsHash[ssoRegion]; } - return next(args); -}, "hostHeaderMiddleware"); -var hostHeaderMiddlewareOptions = { - name: "hostHeaderMiddleware", - step: "build", - priority: "low", - tags: ["HOST"], - override: true -}; -var getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions); + const ssoOidcClient = new SSOOIDCClient2({ region: ssoRegion }); + ssoOidcClientsHash[ssoRegion] = ssoOidcClient; + return ssoOidcClient; +}, "getSsoOidcClient"); + +// src/getNewSsoOidcToken.ts +var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => { + const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports)); + const ssoOidcClient = await getSsoOidcClient(ssoRegion); + return ssoOidcClient.send( + new CreateTokenCommand2({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token" + }) + ); +}, "getNewSsoOidcToken"); + +// src/validateTokenExpiry.ts +var import_property_provider = __nccwpck_require__(9721); +var validateTokenExpiry = /* @__PURE__ */ __name((token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); } -}), "getHostHeaderPlugin"); -// Annotate the CommonJS export names for ESM import in node: +}, "validateTokenExpiry"); -0 && (0); +// src/validateTokenKey.ts +var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new import_property_provider.TokenProviderError( + `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, + false + ); + } +}, "validateTokenKey"); +// src/writeSSOTokenToFile.ts +var import_shared_ini_file_loader = __nccwpck_require__(3507); +var import_fs = __nccwpck_require__(7147); +var { writeFile } = import_fs.promises; +var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { + const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); +}, "writeSSOTokenToFile"); -/***/ }), +// src/fromSso.ts +var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); +var fromSso = /* @__PURE__ */ __name((init = {}) => async () => { + var _a; + (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers", "fromSso"); + const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); + const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } else if (!profile["sso_session"]) { + throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new import_property_provider.TokenProviderError( + `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, + false + ); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new import_property_provider.TokenProviderError( + `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, + false + ); + } + } + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); + } catch (e) { + throw new import_property_provider.TokenProviderError( + `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, + false + ); + } + validateTokenKey("accessToken", ssoToken.accessToken); + validateTokenKey("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { + validateTokenExpiry(existingToken); + return existingToken; + } + validateTokenKey("clientId", ssoToken.clientId, true); + validateTokenKey("clientSecret", ssoToken.clientSecret, true); + validateTokenKey("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion); + validateTokenKey("accessToken", newSsoOidcToken.accessToken); + validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + try { + await writeSSOTokenToFile(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken + }); + } catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration + }; + } catch (error) { + validateTokenExpiry(existingToken); + return existingToken; + } +}, "fromSso"); -/***/ 14: -/***/ ((module) => { +// src/fromStatic.ts -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { + logger == null ? void 0 : logger.debug("@aws-sdk/token-providers", "fromStatic"); + if (!token || !token.token) { + throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false); } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + return token; +}, "fromStatic"); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - getLoggerPlugin: () => getLoggerPlugin, - loggerMiddleware: () => loggerMiddleware, - loggerMiddlewareOptions: () => loggerMiddlewareOptions -}); -module.exports = __toCommonJS(src_exports); +// src/nodeProvider.ts -// src/loggerMiddleware.ts -var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => { - var _a, _b; - try { - const response = await next(args); - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog; - const { $metadata, ...outputWithoutMetadata } = response.output; - (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, { - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - output: outputFilterSensitiveLog(outputWithoutMetadata), - metadata: $metadata - }); - return response; - } catch (error) { - const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; - const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; - const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog; - (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, { - clientName, - commandName, - input: inputFilterSensitiveLog(args.input), - error, - metadata: error.$metadata - }); - throw error; - } -}, "loggerMiddleware"); -var loggerMiddlewareOptions = { - name: "loggerMiddleware", - tags: ["LOGGER"], - step: "initialize", - override: true -}; -var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(loggerMiddleware(), loggerMiddlewareOptions); - } -}), "getLoggerPlugin"); +var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( + (0, import_property_provider.chain)(fromSso(init), async () => { + throw new import_property_provider.TokenProviderError("Could not load token from any providers", false); + }), + (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, + (token) => token.expiration !== void 0 +), "nodeProvider"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -9284,7 +10880,7 @@ var getLoggerPlugin = /* @__PURE__ */ __name((options) => ({ /***/ }), -/***/ 5525: +/***/ 3350: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -9309,278 +10905,377 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions, - getRecursionDetectionPlugin: () => getRecursionDetectionPlugin, - recursionDetectionMiddleware: () => recursionDetectionMiddleware + ConditionObject: () => import_util_endpoints.ConditionObject, + DeprecatedObject: () => import_util_endpoints.DeprecatedObject, + EndpointError: () => import_util_endpoints.EndpointError, + EndpointObject: () => import_util_endpoints.EndpointObject, + EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, + EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, + EndpointParams: () => import_util_endpoints.EndpointParams, + EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, + EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, + ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, + EvaluateOptions: () => import_util_endpoints.EvaluateOptions, + Expression: () => import_util_endpoints.Expression, + FunctionArgv: () => import_util_endpoints.FunctionArgv, + FunctionObject: () => import_util_endpoints.FunctionObject, + FunctionReturn: () => import_util_endpoints.FunctionReturn, + ParameterObject: () => import_util_endpoints.ParameterObject, + ReferenceObject: () => import_util_endpoints.ReferenceObject, + ReferenceRecord: () => import_util_endpoints.ReferenceRecord, + RuleSetObject: () => import_util_endpoints.RuleSetObject, + RuleSetRules: () => import_util_endpoints.RuleSetRules, + TreeRuleObject: () => import_util_endpoints.TreeRuleObject, + awsEndpointFunctions: () => awsEndpointFunctions, + getUserAgentPrefix: () => getUserAgentPrefix, + isIpAddress: () => import_util_endpoints.isIpAddress, + partition: () => partition, + resolveEndpoint: () => import_util_endpoints.resolveEndpoint, + setPartitionInfo: () => setPartitionInfo, + useDefaultPartitionInfo: () => useDefaultPartitionInfo }); module.exports = __toCommonJS(src_exports); -var import_protocol_http = __nccwpck_require__(4418); -var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; -var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; -var ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; -var recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => { - const { request } = args; - if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== "node" || request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) { - return next(args); - } - const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME]; - const traceId = process.env[ENV_TRACE_ID]; - const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString"); - if (nonEmptyString(functionName) && nonEmptyString(traceId)) { - request.headers[TRACE_ID_HEADER_NAME] = traceId; - } - return next({ - ...args, - request - }); -}, "recursionDetectionMiddleware"); -var addRecursionDetectionMiddlewareOptions = { - step: "build", - tags: ["RECURSION_DETECTION"], - name: "recursionDetectionMiddleware", - override: true, - priority: "low" -}; -var getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions); - } -}), "getRecursionDetectionPlugin"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +// src/aws.ts +// src/lib/aws/isVirtualHostableS3Bucket.ts -/***/ }), -/***/ 4935: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// src/lib/isIpAddress.ts +var import_util_endpoints = __nccwpck_require__(5473); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// src/lib/aws/isVirtualHostableS3Bucket.ts +var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; } - return to; + if (!(0, import_util_endpoints.isValidHostLabel)(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if ((0, import_util_endpoints.isIpAddress)(value)) { + return false; + } + return true; +}, "isVirtualHostableS3Bucket"); + +// src/lib/aws/parseArn.ts +var parseArn = /* @__PURE__ */ __name((value) => { + const segments = value.split(":"); + if (segments.length < 6) + return null; + const [arn, partition2, service, region, accountId, ...resourceId] = segments; + if (arn !== "arn" || partition2 === "" || service === "" || resourceId[0] === "") + return null; + return { + partition: partition2, + service, + region, + accountId, + resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId + }; +}, "parseArn"); + +// src/lib/aws/partitions.json +var partitions_default = { + partitions: [{ + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "aws-global": { + description: "AWS Standard global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "AWS China global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "AWS GovCloud (US) global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + }, { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "c2s.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "AWS ISO (US) global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "sc2s.sgov.gov", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "AWS ISOB (US) global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + } + } + }, { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "cloud.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: {} + }, { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "csp.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: false, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: {} + }], + version: "1.1" }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - awsAuthMiddleware: () => awsAuthMiddleware, - awsAuthMiddlewareOptions: () => awsAuthMiddlewareOptions, - getAwsAuthPlugin: () => getAwsAuthPlugin, - getSigV4AuthPlugin: () => getSigV4AuthPlugin, - resolveAwsAuthConfig: () => resolveAwsAuthConfig, - resolveSigV4AuthConfig: () => resolveSigV4AuthConfig -}); -module.exports = __toCommonJS(src_exports); -// src/awsAuthConfiguration.ts -var import_property_provider = __nccwpck_require__(9721); -var import_signature_v4 = __nccwpck_require__(1528); -var import_util_middleware = __nccwpck_require__(2390); -var CREDENTIAL_EXPIRE_WINDOW = 3e5; -var resolveAwsAuthConfig = /* @__PURE__ */ __name((input) => { - const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider( - Object.assign({}, input, { - parentClientConfig: input - }) - ); - const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; - let signer; - if (input.signer) { - signer = (0, import_util_middleware.normalizeProvider)(input.signer); - } else if (input.regionInfoProvider) { - signer = /* @__PURE__ */ __name(() => (0, import_util_middleware.normalizeProvider)(input.region)().then( - async (region) => [ - await input.regionInfoProvider(region, { - useFipsEndpoint: await input.useFipsEndpoint(), - useDualstackEndpoint: await input.useDualstackEndpoint() - }) || {}, - region - ] - ).then(([regionInfo, region]) => { - const { signingRegion, signingService } = regionInfo; - input.signingRegion = input.signingRegion || signingRegion || region; - input.signingName = input.signingName || signingService || input.serviceId; - const params = { - ...input, - credentials: normalizedCreds, - region: input.signingRegion, - service: input.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = input.signerConstructor || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }), "signer"); - } else { - signer = /* @__PURE__ */ __name(async (authScheme) => { - authScheme = Object.assign( - {}, - { - name: "sigv4", - signingName: input.signingName || input.defaultSigningName, - signingRegion: await (0, import_util_middleware.normalizeProvider)(input.region)(), - properties: {} - }, - authScheme - ); - const signingRegion = authScheme.signingRegion; - const signingService = authScheme.signingName; - input.signingRegion = input.signingRegion || signingRegion; - input.signingName = input.signingName || signingService || input.serviceId; - const params = { - ...input, - credentials: normalizedCreds, - region: input.signingRegion, - service: input.signingName, - sha256, - uriEscapePath: signingEscapePath - }; - const SignerCtor = input.signerConstructor || import_signature_v4.SignatureV4; - return new SignerCtor(params); - }, "signer"); +// src/lib/aws/partition.ts +var selectedPartitionsInfo = partitions_default; +var selectedUserAgentPrefix = ""; +var partition = /* @__PURE__ */ __name((value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition2 of partitions) { + const { regions, outputs } = partition2; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData + }; + } + } } - return { - ...input, - systemClockOffset, - signingEscapePath, - credentials: normalizedCreds, - signer - }; -}, "resolveAwsAuthConfig"); -var resolveSigV4AuthConfig = /* @__PURE__ */ __name((input) => { - const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider( - Object.assign({}, input, { - parentClientConfig: input - }) - ); - const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; - let signer; - if (input.signer) { - signer = (0, import_util_middleware.normalizeProvider)(input.signer); - } else { - signer = (0, import_util_middleware.normalizeProvider)( - new import_signature_v4.SignatureV4({ - credentials: normalizedCreds, - region: input.region, - service: input.signingName, - sha256, - uriEscapePath: signingEscapePath - }) + for (const partition2 of partitions) { + const { regionRegex, outputs } = partition2; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error( + "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." ); } return { - ...input, - systemClockOffset, - signingEscapePath, - credentials: normalizedCreds, - signer + ...DEFAULT_PARTITION.outputs }; -}, "resolveSigV4AuthConfig"); -var normalizeCredentialProvider = /* @__PURE__ */ __name((credentials) => { - if (typeof credentials === "function") { - return (0, import_property_provider.memoize)( - credentials, - (credentials2) => credentials2.expiration !== void 0 && credentials2.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, - (credentials2) => credentials2.expiration !== void 0 - ); - } - return (0, import_util_middleware.normalizeProvider)(credentials); -}, "normalizeCredentialProvider"); +}, "partition"); +var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}, "setPartitionInfo"); +var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { + setPartitionInfo(partitions_default, ""); +}, "useDefaultPartitionInfo"); +var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); -// src/awsAuthMiddleware.ts -var import_protocol_http = __nccwpck_require__(4418); +// src/aws.ts +var awsEndpointFunctions = { + isVirtualHostableS3Bucket, + parseArn, + partition +}; +import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; -// src/utils/getSkewCorrectedDate.ts -var getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate"); +// src/resolveEndpoint.ts -// src/utils/isClockSkewed.ts -var isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, "isClockSkewed"); -// src/utils/getUpdatedSystemClockOffset.ts -var getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => { - const clockTimeInMs = Date.parse(clockTime); - if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { - return clockTimeInMs - Date.now(); - } - return currentSystemClockOffset; -}, "getUpdatedSystemClockOffset"); +// src/types/EndpointError.ts + + +// src/types/EndpointRuleObject.ts + + +// src/types/ErrorRuleObject.ts + + +// src/types/RuleSetObject.ts + + +// src/types/TreeRuleObject.ts + + +// src/types/shared.ts -// src/awsAuthMiddleware.ts -var awsAuthMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async function(args) { - var _a, _b, _c, _d; - if (!import_protocol_http.HttpRequest.isInstance(args.request)) - return next(args); - const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0]; - const multiRegionOverride = (authScheme == null ? void 0 : authScheme.name) === "sigv4a" ? (_d = authScheme == null ? void 0 : authScheme.signingRegionSet) == null ? void 0 : _d.join(",") : void 0; - const signer = await options.signer(authScheme); - let signedRequest; - const signingOptions = { - signingDate: getSkewCorrectedDate(options.systemClockOffset), - signingRegion: multiRegionOverride || context["signing_region"], - signingService: context["signing_service"] - }; - if (context.s3ExpressIdentity) { - const sigV4MultiRegion = signer; - signedRequest = await sigV4MultiRegion.signWithCredentials( - args.request, - context.s3ExpressIdentity, - signingOptions - ); - if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { - throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); - } - } else { - signedRequest = await signer.sign(args.request, signingOptions); - } - const output = await next({ - ...args, - request: signedRequest - }).catch((error) => { - const serverTime = error.ServerTime ?? getDateHeader(error.$response); - if (serverTime) { - options.systemClockOffset = getUpdatedSystemClockOffset(serverTime, options.systemClockOffset); - } - throw error; - }); - const dateHeader = getDateHeader(output.response); - if (dateHeader) { - options.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset); - } - return output; -}, "awsAuthMiddleware"); -var getDateHeader = /* @__PURE__ */ __name((response) => { - var _a, _b; - return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0; -}, "getDateHeader"); -var awsAuthMiddlewareOptions = { - name: "awsAuthMiddleware", - tags: ["SIGNATURE", "AWSAUTH"], - relation: "after", - toMiddleware: "retryMiddleware", - override: true -}; -var getAwsAuthPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(awsAuthMiddleware(options), awsAuthMiddlewareOptions); - } -}), "getAwsAuthPlugin"); -var getSigV4AuthPlugin = getAwsAuthPlugin; // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -9589,7 +11284,7 @@ var getSigV4AuthPlugin = getAwsAuthPlugin; /***/ }), -/***/ 4688: +/***/ 8095: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -9614,107 +11309,170 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions, - getUserAgentPlugin: () => getUserAgentPlugin, - resolveUserAgentConfig: () => resolveUserAgentConfig, - userAgentMiddleware: () => userAgentMiddleware + UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, + UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, + crtAvailability: () => crtAvailability, + defaultUserAgent: () => defaultUserAgent }); module.exports = __toCommonJS(src_exports); +var import_node_config_provider = __nccwpck_require__(3461); +var import_os = __nccwpck_require__(2037); +var import_process = __nccwpck_require__(7282); -// src/configurations.ts -function resolveUserAgentConfig(input) { - return { - ...input, - customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent - }; -} -__name(resolveUserAgentConfig, "resolveUserAgentConfig"); - -// src/user-agent-middleware.ts -var import_util_endpoints = __nccwpck_require__(3350); -var import_protocol_http = __nccwpck_require__(4418); +// src/crt-availability.ts +var crtAvailability = { + isCrtAvailable: false +}; -// src/constants.ts -var USER_AGENT = "user-agent"; -var X_AMZ_USER_AGENT = "x-amz-user-agent"; -var SPACE = " "; -var UA_NAME_SEPARATOR = "/"; -var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; -var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; -var UA_ESCAPE_CHAR = "-"; +// src/is-crt-available.ts +var isCrtAvailable = /* @__PURE__ */ __name(() => { + if (crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; + } + return null; +}, "isCrtAvailable"); -// src/user-agent-middleware.ts -var userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - var _a, _b; - const { request } = args; - if (!import_protocol_http.HttpRequest.isInstance(request)) - return next(args); - const { headers } = request; - const userAgent = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || []; - const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); - const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || []; - const prefix = (0, import_util_endpoints.getUserAgentPrefix)(); - const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE); - const normalUAValue = [ - ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), - ...customUserAgent - ].join(SPACE); - if (options.runtime !== "browser") { - if (normalUAValue) { - headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue; - } - headers[USER_AGENT] = sdkUserAgentValue; - } else { - headers[X_AMZ_USER_AGENT] = sdkUserAgentValue; +// src/index.ts +var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; +var UA_APP_ID_INI_NAME = "sdk-ua-app-id"; +var defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { + const sections = [ + // sdk-metadata + ["aws-sdk-js", clientVersion], + // ua-metadata + ["ua", "2.0"], + // os-metadata + [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], + // language-metadata + // ECMAScript edition doesn't matter in JS, so no version needed. + ["lang/js"], + ["md/nodejs", `${import_process.versions.node}`] + ]; + const crtAvailable = isCrtAvailable(); + if (crtAvailable) { + sections.push(crtAvailable); } - return next({ - ...args, - request - }); -}, "userAgentMiddleware"); -var escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => { - var _a; - const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR); - const version = (_a = userAgentPair[1]) == null ? void 0 : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR); - const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR); - const prefix = name.substring(0, prefixSeparatorIndex); - let uaName = name.substring(prefixSeparatorIndex + 1); - if (prefix === "api") { - uaName = uaName.toLowerCase(); + if (serviceId) { + sections.push([`api/${serviceId}`, clientVersion]); } - return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => { - switch (index) { - case 0: - return item; - case 1: - return `${acc}/${item}`; - default: - return `${acc}#${item}`; + if (import_process.env.AWS_EXECUTION_ENV) { + sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); + } + const appIdPromise = (0, import_node_config_provider.loadConfig)({ + environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], + configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME], + default: void 0 + })(); + let resolvedUserAgent = void 0; + return async () => { + if (!resolvedUserAgent) { + const appId = await appIdPromise; + resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; + } + return resolvedUserAgent; + }; +}, "defaultUserAgent"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + +/***/ }), + +/***/ 8172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toUtf8 = exports.fromUtf8 = void 0; +const pureJs_1 = __nccwpck_require__(1590); +const whatwgEncodingApi_1 = __nccwpck_require__(9215); +const fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input); +exports.fromUtf8 = fromUtf8; +const toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input); +exports.toUtf8 = toUtf8; + + +/***/ }), + +/***/ 1590: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toUtf8 = exports.fromUtf8 = void 0; +const fromUtf8 = (input) => { + const bytes = []; + for (let i = 0, len = input.length; i < len; i++) { + const value = input.charCodeAt(i); + if (value < 0x80) { + bytes.push(value); + } + else if (value < 0x800) { + bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000); + } + else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) { + const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111); + bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000); + } + else { + bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000); + } } - }, ""); -}, "escapeUserAgent"); -var getUserAgentMiddlewareOptions = { - name: "getUserAgentMiddleware", - step: "build", - priority: "low", - tags: ["SET_USER_AGENT", "USER_AGENT"], - override: true + return Uint8Array.from(bytes); }; -var getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: (clientStack) => { - clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions); - } -}), "getUserAgentPlugin"); -// Annotate the CommonJS export names for ESM import in node: +exports.fromUtf8 = fromUtf8; +const toUtf8 = (input) => { + let decoded = ""; + for (let i = 0, len = input.length; i < len; i++) { + const byte = input[i]; + if (byte < 0x80) { + decoded += String.fromCharCode(byte); + } + else if (0b11000000 <= byte && byte < 0b11100000) { + const nextByte = input[++i]; + decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111)); + } + else if (0b11110000 <= byte && byte < 0b101101101) { + const surrogatePair = [byte, input[++i], input[++i], input[++i]]; + const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%"); + decoded += decodeURIComponent(encoded); + } + else { + decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111)); + } + } + return decoded; +}; +exports.toUtf8 = toUtf8; -0 && (0); +/***/ }), + +/***/ 9215: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toUtf8 = exports.fromUtf8 = void 0; +function fromUtf8(input) { + return new TextEncoder().encode(input); +} +exports.fromUtf8 = fromUtf8; +function toUtf8(input) { + return new TextDecoder("utf-8").decode(input); +} +exports.toUtf8 = toUtf8; /***/ }), -/***/ 8156: -/***/ ((module) => { +/***/ 3098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -9738,42 +11496,92 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { + CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, + CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, + DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, + DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, + ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, + ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, REGION_ENV_NAME: () => REGION_ENV_NAME, REGION_INI_NAME: () => REGION_INI_NAME, - getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration, - resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration, + getRegionInfo: () => getRegionInfo, + resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, + resolveEndpointsConfig: () => resolveEndpointsConfig, resolveRegionConfig: () => resolveRegionConfig }); module.exports = __toCommonJS(src_exports); -// src/extensions/index.ts -var getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { - let runtimeConfigRegion = /* @__PURE__ */ __name(async () => { - if (runtimeConfig.region === void 0) { - throw new Error("Region is missing from runtimeConfig"); - } - const region = runtimeConfig.region; - if (typeof region === "string") { - return region; - } - return region(); - }, "runtimeConfigRegion"); +// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts +var import_util_config_provider = __nccwpck_require__(3375); +var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +var DEFAULT_USE_DUALSTACK_ENDPOINT = false; +var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false +}; + +// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts + +var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +var DEFAULT_USE_FIPS_ENDPOINT = false; +var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), + configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + default: false +}; + +// src/endpointsConfig/resolveCustomEndpointsConfig.ts +var import_util_middleware = __nccwpck_require__(2390); +var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { + const { endpoint, urlParser } = input; return { - setRegion(region) { - runtimeConfigRegion = region; - }, - region() { - return runtimeConfigRegion; - } + ...input, + tls: input.tls ?? true, + endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false) }; -}, "getAwsRegionExtensionConfiguration"); -var resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => { +}, "resolveCustomEndpointsConfig"); + +// src/endpointsConfig/resolveEndpointsConfig.ts + + +// src/endpointsConfig/utils/getEndpointFromRegion.ts +var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); +}, "getEndpointFromRegion"); + +// src/endpointsConfig/resolveEndpointsConfig.ts +var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { + const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false); + const { endpoint, useFipsEndpoint, urlParser } = input; return { - region: awsRegionExtensionConfiguration.region() + ...input, + tls: input.tls ?? true, + endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint }; -}, "resolveAwsRegionExtensionConfiguration"); +}, "resolveEndpointsConfig"); // src/regionConfig/config.ts var REGION_ENV_NAME = "AWS_REGION"; @@ -9819,6 +11627,67 @@ var resolveRegionConfig = /* @__PURE__ */ __name((input) => { } }; }, "resolveRegionConfig"); + +// src/regionInfo/getHostnameFromVariants.ts +var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { + var _a; + return (_a = variants.find( + ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") + )) == null ? void 0 : _a.hostname; +}, "getHostnameFromVariants"); + +// src/regionInfo/getResolvedHostname.ts +var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); + +// src/regionInfo/getResolvedPartition.ts +var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); + +// src/regionInfo/getResolvedSigningRegion.ts +var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } +}, "getResolvedSigningRegion"); + +// src/regionInfo/getRegionInfo.ts +var getRegionInfo = /* @__PURE__ */ __name((region, { + useFipsEndpoint = false, + useDualstackEndpoint = false, + signingService, + regionHash, + partitionHash +}) => { + var _a, _b, _c, _d, _e; + const partition = getResolvedPartition(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); + const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); + const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === void 0) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); + } + const signingRegion = getResolvedSigningRegion(hostname, { + signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint + }); + return { + partition, + signingService, + hostname, + ...signingRegion && { signingRegion }, + ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { + signingService: regionHash[resolvedRegion].signingService + } + }; +}, "getRegionInfo"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -9827,7 +11696,7 @@ var resolveRegionConfig = /* @__PURE__ */ __name((input) => { /***/ }), -/***/ 2843: +/***/ 5829: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -9835,9 +11704,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); @@ -9852,789 +11718,894 @@ var __copyProps = (to, from, except, desc) => { }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/loadSsoOidc.ts -var loadSsoOidc_exports = {}; -__export(loadSsoOidc_exports, { - CreateTokenCommand: () => import_client_sso_oidc.CreateTokenCommand, - SSOOIDCClient: () => import_client_sso_oidc.SSOOIDCClient -}); -var import_client_sso_oidc; -var init_loadSsoOidc = __esm({ - "src/loadSsoOidc.ts"() { - import_client_sso_oidc = __nccwpck_require__(4527); - } -}); - // src/index.ts var src_exports = {}; __export(src_exports, { - fromSso: () => fromSso, - fromStatic: () => fromStatic, - nodeProvider: () => nodeProvider + DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, + EXPIRATION_MS: () => EXPIRATION_MS, + HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, + HttpBearerAuthSigner: () => HttpBearerAuthSigner, + NoAuthSigner: () => NoAuthSigner, + RequestBuilder: () => RequestBuilder, + createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, + createPaginator: () => createPaginator, + doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, + getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, + getHttpSigningPlugin: () => getHttpSigningPlugin, + getSmithyContext: () => getSmithyContext3, + httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, + httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, + httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, + httpSigningMiddleware: () => httpSigningMiddleware, + httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, + isIdentityExpired: () => isIdentityExpired, + memoizeIdentityProvider: () => memoizeIdentityProvider, + normalizeProvider: () => normalizeProvider, + requestBuilder: () => requestBuilder }); module.exports = __toCommonJS(src_exports); -// src/fromSso.ts - - - -// src/constants.ts -var EXPIRE_WINDOW_MS = 5 * 60 * 1e3; -var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; - -// src/getSsoOidcClient.ts -var ssoOidcClientsHash = {}; -var getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => { - const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports)); - if (ssoOidcClientsHash[ssoRegion]) { - return ssoOidcClientsHash[ssoRegion]; +// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts +var import_util_middleware = __nccwpck_require__(2390); +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = /* @__PURE__ */ new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); } - const ssoOidcClient = new SSOOIDCClient2({ region: ssoRegion }); - ssoOidcClientsHash[ssoRegion] = ssoOidcClient; - return ssoOidcClient; -}, "getSsoOidcClient"); - -// src/getNewSsoOidcToken.ts -var getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => { - const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports)); - const ssoOidcClient = await getSsoOidcClient(ssoRegion); - return ssoOidcClient.send( - new CreateTokenCommand2({ - clientId: ssoToken.clientId, - clientSecret: ssoToken.clientSecret, - refreshToken: ssoToken.refreshToken, - grantType: "refresh_token" - }) + return map; +} +__name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); +var httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => { + var _a; + const options = config.httpAuthSchemeProvider( + await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input) ); -}, "getNewSsoOidcToken"); - -// src/validateTokenExpiry.ts -var import_property_provider = __nccwpck_require__(9721); -var validateTokenExpiry = /* @__PURE__ */ __name((token) => { - if (token.expiration && token.expiration.getTime() < Date.now()) { - throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const failureReasons = []; + for (const option of options) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) == null ? void 0 : _a.call(option, config, context)) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer + }; + break; } -}, "validateTokenExpiry"); + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); +}, "httpAuthSchemeMiddleware"); -// src/validateTokenKey.ts +// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts +var import_middleware_endpoint = __nccwpck_require__(2918); +var httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name +}; +var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider +}) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), + httpAuthSchemeEndpointRuleSetMiddlewareOptions + ); + } +}), "getHttpAuthSchemeEndpointRuleSetPlugin"); -var validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => { - if (typeof value === "undefined") { - throw new import_property_provider.TokenProviderError( - `Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, - false +// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts +var import_middleware_serde = __nccwpck_require__(1238); +var httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name +}; +var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider +}) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + httpAuthSchemeMiddleware(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider + }), + httpAuthSchemeMiddlewareOptions ); } -}, "validateTokenKey"); +}), "getHttpAuthSchemePlugin"); -// src/writeSSOTokenToFile.ts -var import_shared_ini_file_loader = __nccwpck_require__(3507); -var import_fs = __nccwpck_require__(7147); -var { writeFile } = import_fs.promises; -var writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => { - const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id); - const tokenString = JSON.stringify(ssoToken, null, 2); - return writeFile(tokenFilepath, tokenString); -}, "writeSSOTokenToFile"); +// src/middleware-http-signing/httpSigningMiddleware.ts +var import_protocol_http = __nccwpck_require__(4418); -// src/fromSso.ts -var lastRefreshAttemptTime = /* @__PURE__ */ new Date(0); -var fromSso = /* @__PURE__ */ __name((init = {}) => async () => { - var _a; - (_a = init.logger) == null ? void 0 : _a.debug("@aws-sdk/token-providers", "fromSso"); - const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init); - const profileName = (0, import_shared_ini_file_loader.getProfileName)(init); - const profile = profiles[profileName]; - if (!profile) { - throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); - } else if (!profile["sso_session"]) { - throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); +var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => { + throw error; +}, "defaultErrorHandler"); +var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { +}, "defaultSuccessHandler"); +var httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { + if (!import_protocol_http.HttpRequest.isInstance(args.request)) { + return next(args); } - const ssoSessionName = profile["sso_session"]; - const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init); - const ssoSession = ssoSessions[ssoSessionName]; - if (!ssoSession) { - throw new import_property_provider.TokenProviderError( - `Sso session '${ssoSessionName}' could not be found in shared credentials file.`, - false - ); + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); } - for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { - if (!ssoSession[ssoSessionRequiredKey]) { - throw new import_property_provider.TokenProviderError( - `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, - false + const { + httpAuthOption: { signingProperties = {} }, + identity, + signer + } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties) + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; +}, "httpSigningMiddleware"); + +// src/middleware-http-signing/getHttpSigningMiddleware.ts +var import_middleware_retry = __nccwpck_require__(6039); +var httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: import_middleware_retry.retryMiddlewareOptions.name +}; +var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); + } +}), "getHttpSigningPlugin"); + +// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts +var _DefaultIdentityProviderConfig = class _DefaultIdentityProviderConfig { + /** + * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. + * + * @param config scheme IDs and identity providers to configure + */ + constructor(config) { + this.authSchemes = /* @__PURE__ */ new Map(); + for (const [key, value] of Object.entries(config)) { + if (value !== void 0) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } +}; +__name(_DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig"); +var DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig; + +// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts +var import_types = __nccwpck_require__(5756); +var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error( + "request could not be signed with `apiKey` since the `name` and `in` signer properties are missing" + ); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = httpRequest.clone(); + if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; + } else { + throw new Error( + "request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`" ); } + return clonedRequest; } - const ssoStartUrl = ssoSession["sso_start_url"]; - const ssoRegion = ssoSession["sso_region"]; - let ssoToken; - try { - ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName); - } catch (e) { - throw new import_property_provider.TokenProviderError( - `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, - false - ); +}; +__name(_HttpApiKeyAuthSigner, "HttpApiKeyAuthSigner"); +var HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner; + +// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts +var _HttpBearerAuthSigner = class _HttpBearerAuthSigner { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = httpRequest.clone(); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; } - validateTokenKey("accessToken", ssoToken.accessToken); - validateTokenKey("expiresAt", ssoToken.expiresAt); - const { accessToken, expiresAt } = ssoToken; - const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; - if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) { - return existingToken; +}; +__name(_HttpBearerAuthSigner, "HttpBearerAuthSigner"); +var HttpBearerAuthSigner = _HttpBearerAuthSigner; + +// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts +var _NoAuthSigner = class _NoAuthSigner { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; } - if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) { - validateTokenExpiry(existingToken); - return existingToken; +}; +__name(_NoAuthSigner, "NoAuthSigner"); +var NoAuthSigner = _NoAuthSigner; + +// src/util-identity-and-auth/memoizeIdentityProvider.ts +var createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, "createIsIdentityExpiredFunction"); +var EXPIRATION_MS = 3e5; +var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); +var doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, "doesIdentityRequireRefresh"); +var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { + if (provider === void 0) { + return void 0; } - validateTokenKey("clientId", ssoToken.clientId, true); - validateTokenKey("clientSecret", ssoToken.clientSecret, true); - validateTokenKey("refreshToken", ssoToken.refreshToken, true); - try { - lastRefreshAttemptTime.setTime(Date.now()); - const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion); - validateTokenKey("accessToken", newSsoOidcToken.accessToken); - validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); - const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3); + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = /* @__PURE__ */ __name(async (options) => { + if (!pending) { + pending = normalizedProvider(options); + } try { - await writeSSOTokenToFile(ssoSessionName, { - ...ssoToken, - accessToken: newSsoOidcToken.accessToken, - expiresAt: newTokenExpiration.toISOString(), - refreshToken: newSsoOidcToken.refreshToken - }); - } catch (error) { + resolved = await pending; + hasResult = true; + isConstant = false; + } finally { + pending = void 0; } - return { - token: newSsoOidcToken.accessToken, - expiration: newTokenExpiration + return resolved; + }, "coalesceProvider"); + if (isExpired === void 0) { + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(options); + } + return resolved; }; - } catch (error) { - validateTokenExpiry(existingToken); - return existingToken; - } -}, "fromSso"); - -// src/fromStatic.ts - -var fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => { - logger == null ? void 0 : logger.debug("@aws-sdk/token-providers", "fromStatic"); - if (!token || !token.token) { - throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false); } - return token; -}, "fromStatic"); - -// src/nodeProvider.ts - -var nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)( - (0, import_property_provider.chain)(fromSso(init), async () => { - throw new import_property_provider.TokenProviderError("Could not load token from any providers", false); - }), - (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5, - (token) => token.expiration !== void 0 -), "nodeProvider"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); + return async (options) => { + if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; +}, "memoizeIdentityProvider"); +// src/getSmithyContext.ts +var getSmithyContext3 = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); -/***/ }), +// src/normalizeProvider.ts +var normalizeProvider = /* @__PURE__ */ __name((input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}, "normalizeProvider"); -/***/ 3350: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// src/protocols/requestBuilder.ts -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +var import_smithy_client = __nccwpck_require__(3570); +function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +__name(requestBuilder, "requestBuilder"); +var _RequestBuilder = class _RequestBuilder { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - ConditionObject: () => import_util_endpoints.ConditionObject, - DeprecatedObject: () => import_util_endpoints.DeprecatedObject, - EndpointError: () => import_util_endpoints.EndpointError, - EndpointObject: () => import_util_endpoints.EndpointObject, - EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders, - EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties, - EndpointParams: () => import_util_endpoints.EndpointParams, - EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions, - EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject, - ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject, - EvaluateOptions: () => import_util_endpoints.EvaluateOptions, - Expression: () => import_util_endpoints.Expression, - FunctionArgv: () => import_util_endpoints.FunctionArgv, - FunctionObject: () => import_util_endpoints.FunctionObject, - FunctionReturn: () => import_util_endpoints.FunctionReturn, - ParameterObject: () => import_util_endpoints.ParameterObject, - ReferenceObject: () => import_util_endpoints.ReferenceObject, - ReferenceRecord: () => import_util_endpoints.ReferenceRecord, - RuleSetObject: () => import_util_endpoints.RuleSetObject, - RuleSetRules: () => import_util_endpoints.RuleSetRules, - TreeRuleObject: () => import_util_endpoints.TreeRuleObject, - getUserAgentPrefix: () => getUserAgentPrefix, - isIpAddress: () => import_util_endpoints.isIpAddress, - partition: () => partition, - resolveEndpoint: () => import_util_endpoints.resolveEndpoint, - setPartitionInfo: () => setPartitionInfo, - useDefaultPartitionInfo: () => useDefaultPartitionInfo -}); -module.exports = __toCommonJS(src_exports); - -// src/aws.ts - - -// src/lib/aws/isVirtualHostableS3Bucket.ts - - -// src/lib/isIpAddress.ts -var import_util_endpoints = __nccwpck_require__(5473); - -// src/lib/aws/isVirtualHostableS3Bucket.ts -var isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => { - if (allowSubDomains) { - for (const label of value.split(".")) { - if (!isVirtualHostableS3Bucket(label)) { - return false; - } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); } - return true; + return new import_protocol_http.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers + }); } - if (!(0, import_util_endpoints.isValidHostLabel)(value)) { - return false; + /** + * Brevity setter for "hostname". + */ + hn(hostname) { + this.hostname = hostname; + return this; } - if (value.length < 3 || value.length > 63) { - return false; + /** + * Brevity initial builder for "basepath". + */ + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; } - if (value !== value.toLowerCase()) { - return false; + /** + * Brevity incremental builder for "path". + */ + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; } - if ((0, import_util_endpoints.isIpAddress)(value)) { - return false; + /** + * Brevity setter for "headers". + */ + h(headers) { + this.headers = headers; + return this; } - return true; -}, "isVirtualHostableS3Bucket"); - -// src/lib/aws/parseArn.ts -var parseArn = /* @__PURE__ */ __name((value) => { - const segments = value.split(":"); - if (segments.length < 6) - return null; - const [arn, partition2, service, region, accountId, ...resourceId] = segments; - if (arn !== "arn" || partition2 === "" || service === "" || resourceId[0] === "") - return null; - return { - partition: partition2, - service, - region, - accountId, - resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId - }; -}, "parseArn"); - -// src/lib/aws/partitions.json -var partitions_default = { - partitions: [{ - id: "aws", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-east-1", - name: "aws", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", - regions: { - "af-south-1": { - description: "Africa (Cape Town)" - }, - "ap-east-1": { - description: "Asia Pacific (Hong Kong)" - }, - "ap-northeast-1": { - description: "Asia Pacific (Tokyo)" - }, - "ap-northeast-2": { - description: "Asia Pacific (Seoul)" - }, - "ap-northeast-3": { - description: "Asia Pacific (Osaka)" - }, - "ap-south-1": { - description: "Asia Pacific (Mumbai)" - }, - "ap-south-2": { - description: "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1": { - description: "Asia Pacific (Singapore)" - }, - "ap-southeast-2": { - description: "Asia Pacific (Sydney)" - }, - "ap-southeast-3": { - description: "Asia Pacific (Jakarta)" - }, - "ap-southeast-4": { - description: "Asia Pacific (Melbourne)" - }, - "aws-global": { - description: "AWS Standard global region" - }, - "ca-central-1": { - description: "Canada (Central)" - }, - "ca-west-1": { - description: "Canada West (Calgary)" - }, - "eu-central-1": { - description: "Europe (Frankfurt)" - }, - "eu-central-2": { - description: "Europe (Zurich)" - }, - "eu-north-1": { - description: "Europe (Stockholm)" - }, - "eu-south-1": { - description: "Europe (Milan)" - }, - "eu-south-2": { - description: "Europe (Spain)" - }, - "eu-west-1": { - description: "Europe (Ireland)" - }, - "eu-west-2": { - description: "Europe (London)" - }, - "eu-west-3": { - description: "Europe (Paris)" - }, - "il-central-1": { - description: "Israel (Tel Aviv)" - }, - "me-central-1": { - description: "Middle East (UAE)" - }, - "me-south-1": { - description: "Middle East (Bahrain)" - }, - "sa-east-1": { - description: "South America (Sao Paulo)" - }, - "us-east-1": { - description: "US East (N. Virginia)" - }, - "us-east-2": { - description: "US East (Ohio)" - }, - "us-west-1": { - description: "US West (N. California)" - }, - "us-west-2": { - description: "US West (Oregon)" - } - } - }, { - id: "aws-cn", - outputs: { - dnsSuffix: "amazonaws.com.cn", - dualStackDnsSuffix: "api.amazonwebservices.com.cn", - implicitGlobalRegion: "cn-northwest-1", - name: "aws-cn", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^cn\\-\\w+\\-\\d+$", - regions: { - "aws-cn-global": { - description: "AWS China global region" - }, - "cn-north-1": { - description: "China (Beijing)" - }, - "cn-northwest-1": { - description: "China (Ningxia)" - } - } - }, { - id: "aws-us-gov", - outputs: { - dnsSuffix: "amazonaws.com", - dualStackDnsSuffix: "api.aws", - implicitGlobalRegion: "us-gov-west-1", - name: "aws-us-gov", - supportsDualStack: true, - supportsFIPS: true - }, - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - regions: { - "aws-us-gov-global": { - description: "AWS GovCloud (US) global region" - }, - "us-gov-east-1": { - description: "AWS GovCloud (US-East)" - }, - "us-gov-west-1": { - description: "AWS GovCloud (US-West)" - } - } - }, { - id: "aws-iso", - outputs: { - dnsSuffix: "c2s.ic.gov", - dualStackDnsSuffix: "c2s.ic.gov", - implicitGlobalRegion: "us-iso-east-1", - name: "aws-iso", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - regions: { - "aws-iso-global": { - description: "AWS ISO (US) global region" - }, - "us-iso-east-1": { - description: "US ISO East" - }, - "us-iso-west-1": { - description: "US ISO WEST" + /** + * Brevity setter for "query". + */ + q(query) { + this.query = query; + return this; + } + /** + * Brevity setter for "body". + */ + b(body) { + this.body = body; + return this; + } + /** + * Brevity setter for "method". + */ + m(method) { + this.method = method; + return this; + } +}; +__name(_RequestBuilder, "RequestBuilder"); +var RequestBuilder = _RequestBuilder; + +// src/pagination/createPaginator.ts +var makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, ...args) => { + return await client.send(new CommandCtor(input), ...args); +}, "makePagedClientRequest"); +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) { + let token = config.startingToken || void 0; + let hasNext = true; + let page; + while (hasNext) { + input[inputTokenName] = token; + if (pageSizeTokenName) { + input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize; } - } - }, { - id: "aws-iso-b", - outputs: { - dnsSuffix: "sc2s.sgov.gov", - dualStackDnsSuffix: "sc2s.sgov.gov", - implicitGlobalRegion: "us-isob-east-1", - name: "aws-iso-b", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - regions: { - "aws-iso-b-global": { - description: "AWS ISOB (US) global region" - }, - "us-isob-east-1": { - description: "US ISOB East (Ohio)" + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments); + } else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); } + yield page; + const prevToken = token; + token = get(page, outputTokenName); + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); } - }, { - id: "aws-iso-e", - outputs: { - dnsSuffix: "cloud.adc-e.uk", - dualStackDnsSuffix: "cloud.adc-e.uk", - implicitGlobalRegion: "eu-isoe-west-1", - name: "aws-iso-e", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - regions: {} - }, { - id: "aws-iso-f", - outputs: { - dnsSuffix: "csp.hci.ic.gov", - dualStackDnsSuffix: "csp.hci.ic.gov", - implicitGlobalRegion: "us-isof-south-1", - name: "aws-iso-f", - supportsDualStack: false, - supportsFIPS: true - }, - regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - regions: {} - }], - version: "1.1" + return void 0; + }, "paginateOperation"); +} +__name(createPaginator, "createPaginator"); +var get = /* @__PURE__ */ __name((fromObject, path) => { + let cursor = fromObject; + const pathComponents = path.split("."); + for (const step of pathComponents) { + if (!cursor || typeof cursor !== "object") { + return void 0; + } + cursor = cursor[step]; + } + return cursor; +}, "get"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + +/***/ }), + +/***/ 7477: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/lib/aws/partition.ts -var selectedPartitionsInfo = partitions_default; -var selectedUserAgentPrefix = ""; -var partition = /* @__PURE__ */ __name((value) => { - const { partitions } = selectedPartitionsInfo; - for (const partition2 of partitions) { - const { regions, outputs } = partition2; - for (const [region, regionData] of Object.entries(regions)) { - if (region === value) { - return { - ...outputs, - ...regionData - }; +// src/index.ts +var src_exports = {}; +__export(src_exports, { + DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, + DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, + ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, + ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, + ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, + Endpoint: () => Endpoint, + fromContainerMetadata: () => fromContainerMetadata, + fromInstanceMetadata: () => fromInstanceMetadata, + getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, + httpRequest: () => httpRequest, + providerConfigFromInit: () => providerConfigFromInit +}); +module.exports = __toCommonJS(src_exports); + +// src/fromContainerMetadata.ts + +var import_url = __nccwpck_require__(7310); + +// src/remoteProvider/httpRequest.ts +var import_property_provider = __nccwpck_require__(9721); +var import_buffer = __nccwpck_require__(4300); +var import_http = __nccwpck_require__(3685); +function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = (0, import_http.request)({ + method: "GET", + ...options, + // Node.js http module doesn't accept hostname with square brackets + // Refs: https://github.com/nodejs/node/issues/39738 + hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") + }); + req.on("error", (err) => { + reject(Object.assign(new import_property_provider.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new import_property_provider.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject( + Object.assign(new import_property_provider.ProviderError("Error response received from instance metadata service"), { statusCode }) + ); + req.destroy(); } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(import_buffer.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); +} +__name(httpRequest, "httpRequest"); + +// src/remoteProvider/ImdsCredentials.ts +var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); +var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration) +}), "fromImdsCredentials"); + +// src/remoteProvider/RemoteProviderInit.ts +var DEFAULT_TIMEOUT = 1e3; +var DEFAULT_MAX_RETRIES = 0; +var providerConfigFromInit = /* @__PURE__ */ __name(({ + maxRetries = DEFAULT_MAX_RETRIES, + timeout = DEFAULT_TIMEOUT +}) => ({ maxRetries, timeout }), "providerConfigFromInit"); + +// src/remoteProvider/retry.ts +var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); + } + return promise; +}, "retry"); + +// src/fromContainerMetadata.ts +var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { + const { timeout, maxRetries } = providerConfigFromInit(init); + return () => retry(async () => { + const requestOptions = await getCmdsUri(); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); } + return fromImdsCredentials(credsResponse); + }, maxRetries); +}, "fromContainerMetadata"); +var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { + if (process.env[ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[ENV_CMDS_AUTH_TOKEN] + }; + } + const buffer = await httpRequest({ + ...options, + timeout + }); + return buffer.toString(); +}, "requestFromEcsImds"); +var CMDS_IP = "169.254.170.2"; +var GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true +}; +var GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true +}; +var getCmdsUri = /* @__PURE__ */ __name(async () => { + if (process.env[ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[ENV_CMDS_RELATIVE_URI] + }; } - for (const partition2 of partitions) { - const { regionRegex, outputs } = partition2; - if (new RegExp(regionRegex).test(value)) { - return { - ...outputs - }; + if (process.env[ENV_CMDS_FULL_URI]) { + const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new import_property_provider.CredentialsProviderError( + `${parsed.hostname} is not a valid container metadata service hostname`, + false + ); } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new import_property_provider.CredentialsProviderError( + `${parsed.protocol} is not a valid container metadata service protocol`, + false + ); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : void 0 + }; } - const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws"); - if (!DEFAULT_PARTITION) { - throw new Error( - "Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist." - ); - } - return { - ...DEFAULT_PARTITION.outputs - }; -}, "partition"); -var setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = "") => { - selectedPartitionsInfo = partitionsInfo; - selectedUserAgentPrefix = userAgentPrefix; -}, "setPartitionInfo"); -var useDefaultPartitionInfo = /* @__PURE__ */ __name(() => { - setPartitionInfo(partitions_default, ""); -}, "useDefaultPartitionInfo"); -var getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, "getUserAgentPrefix"); - -// src/aws.ts -var awsEndpointFunctions = { - isVirtualHostableS3Bucket, - parseArn, - partition -}; -import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions; - -// src/resolveEndpoint.ts - - -// src/types/EndpointError.ts - - -// src/types/EndpointRuleObject.ts - - -// src/types/ErrorRuleObject.ts - - -// src/types/RuleSetObject.ts - - -// src/types/TreeRuleObject.ts - + throw new import_property_provider.CredentialsProviderError( + `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, + false + ); +}, "getCmdsUri"); -// src/types/shared.ts +// src/fromInstanceMetadata.ts -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +// src/error/InstanceMetadataV1FallbackError.ts +var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); + } +}; +__name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); +var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; -/***/ }), +// src/utils/getInstanceMetadataEndpoint.ts +var import_node_config_provider = __nccwpck_require__(3461); +var import_url_parser = __nccwpck_require__(4681); -/***/ 8095: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// src/config/Endpoint.ts +var Endpoint = /* @__PURE__ */ ((Endpoint2) => { + Endpoint2["IPv4"] = "http://169.254.169.254"; + Endpoint2["IPv6"] = "http://[fd00:ec2::254]"; + return Endpoint2; +})(Endpoint || {}); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +// src/config/EndpointConfigOptions.ts +var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +var ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + default: void 0 }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME, - UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME, - crtAvailability: () => crtAvailability, - defaultUserAgent: () => defaultUserAgent -}); -module.exports = __toCommonJS(src_exports); -var import_node_config_provider = __nccwpck_require__(3461); -var import_os = __nccwpck_require__(2037); -var import_process = __nccwpck_require__(7282); +// src/config/EndpointMode.ts +var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { + EndpointMode2["IPv4"] = "IPv4"; + EndpointMode2["IPv6"] = "IPv6"; + return EndpointMode2; +})(EndpointMode || {}); -// src/crt-availability.ts -var crtAvailability = { - isCrtAvailable: false +// src/config/EndpointModeConfigOptions.ts +var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +var ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + default: "IPv4" /* IPv4 */ }; -// src/is-crt-available.ts -var isCrtAvailable = /* @__PURE__ */ __name(() => { - if (crtAvailability.isCrtAvailable) { - return ["md/crt-avail"]; +// src/utils/getInstanceMetadataEndpoint.ts +var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); +var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); +var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { + const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case "IPv4" /* IPv4 */: + return "http://169.254.169.254" /* IPv4 */; + case "IPv6" /* IPv6 */: + return "http://[fd00:ec2::254]" /* IPv6 */; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); } - return null; -}, "isCrtAvailable"); +}, "getFromEndpointModeConfig"); -// src/index.ts -var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; -var UA_APP_ID_INI_NAME = "sdk-ua-app-id"; -var defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => { - const sections = [ - // sdk-metadata - ["aws-sdk-js", clientVersion], - // ua-metadata - ["ua", "2.0"], - // os-metadata - [`os/${(0, import_os.platform)()}`, (0, import_os.release)()], - // language-metadata - // ECMAScript edition doesn't matter in JS, so no version needed. - ["lang/js"], - ["md/nodejs", `${import_process.versions.node}`] - ]; - const crtAvailable = isCrtAvailable(); - if (crtAvailable) { - sections.push(crtAvailable); - } - if (serviceId) { - sections.push([`api/${serviceId}`, clientVersion]); - } - if (import_process.env.AWS_EXECUTION_ENV) { - sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]); - } - const appIdPromise = (0, import_node_config_provider.loadConfig)({ - environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME], - configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME], - default: void 0 - })(); - let resolvedUserAgent = void 0; - return async () => { - if (!resolvedUserAgent) { - const appId = await appIdPromise; - resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections]; - } - return resolvedUserAgent; +// src/utils/getExtendedInstanceMetadataCredentials.ts +var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; +var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; +var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; +var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1e3); + logger.warn( + `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}. +For more information, please visit: ` + STATIC_STABILITY_DOC_URL + ); + const originalExpiration = credentials.originalExpiration ?? credentials.expiration; + return { + ...credentials, + ...originalExpiration ? { originalExpiration } : {}, + expiration: newExpiration }; -}, "defaultUserAgent"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 8172: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toUtf8 = exports.fromUtf8 = void 0; -const pureJs_1 = __nccwpck_require__(1590); -const whatwgEncodingApi_1 = __nccwpck_require__(9215); -const fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input); -exports.fromUtf8 = fromUtf8; -const toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input); -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 1590: -/***/ ((__unused_webpack_module, exports) => { +}, "getExtendedInstanceMetadataCredentials"); -"use strict"; +// src/utils/staticStabilityProvider.ts +var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { + const logger = (options == null ? void 0 : options.logger) || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = getExtendedInstanceMetadataCredentials(credentials, logger); + } + } catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); + } else { + throw e; + } + } + pastCredentials = credentials; + return credentials; + }; +}, "staticStabilityProvider"); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toUtf8 = exports.fromUtf8 = void 0; -const fromUtf8 = (input) => { - const bytes = []; - for (let i = 0, len = input.length; i < len; i++) { - const value = input.charCodeAt(i); - if (value < 0x80) { - bytes.push(value); - } - else if (value < 0x800) { - bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000); - } - else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) { - const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111); - bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000); - } - else { - bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000); +// src/fromInstanceMetadata.ts +var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +var IMDS_TOKEN_PATH = "/latest/api/token"; +var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; +var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; +var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; +var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), "fromInstanceMetadata"); +var getInstanceImdsProvider = /* @__PURE__ */ __name((init) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = providerConfigFromInit(init); + const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { + var _a; + const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, import_node_config_provider.loadConfig)( + { + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === void 0) { + throw new import_property_provider.CredentialsProviderError( + `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.` + ); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile2) => { + const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false + }, + { + profile } + )(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError( + `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( + ", " + )}].` + ); + } } - return Uint8Array.from(bytes); -}; -exports.fromUtf8 = fromUtf8; -const toUtf8 = (input) => { - let decoded = ""; - for (let i = 0, len = input.length; i < len; i++) { - const byte = input[i]; - if (byte < 0x80) { - decoded += String.fromCharCode(byte); - } - else if (0b11000000 <= byte && byte < 0b11100000) { - const nextByte = input[++i]; - decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111)); + const imdsProfile = (await retry(async () => { + let profile2; + try { + profile2 = await getProfile(options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; } - else if (0b11110000 <= byte && byte < 0b101101101) { - const surrogatePair = [byte, input[++i], input[++i], input[++i]]; - const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%"); - decoded += decodeURIComponent(encoded); + throw err; + } + return profile2; + }, maxRetries2)).trim(); + return retry(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options); + } catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; } - else { - decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111)); + throw err; + } + return creds; + }, maxRetries2); + }, "getCredentials"); + return async () => { + const endpoint = await getInstanceMetadataEndpoint(); + if (disableFetchToken) { + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } catch (error) { + if ((error == null ? void 0 : error.statusCode) === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error" + }); + } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; } + logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token + }, + timeout + }); } - return decoded; -}; -exports.toUtf8 = toUtf8; - - -/***/ }), - -/***/ 9215: -/***/ ((__unused_webpack_module, exports) => { + }; +}, "getInstanceImdsProvider"); +var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600" + } +}), "getMetadataToken"); +var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); +var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) => { + const credsResponse = JSON.parse( + (await httpRequest({ + ...options, + path: IMDS_PATH + profile + })).toString() + ); + if (!isImdsCredentials(credsResponse)) { + throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); + } + return fromImdsCredentials(credsResponse); +}, "getCredentialsFromProfile"); +// Annotate the CommonJS export names for ESM import in node: -"use strict"; +0 && (0); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toUtf8 = exports.fromUtf8 = void 0; -function fromUtf8(input) { - return new TextEncoder().encode(input); -} -exports.fromUtf8 = fromUtf8; -function toUtf8(input) { - return new TextDecoder("utf-8").decode(input); -} -exports.toUtf8 = toUtf8; /***/ }), -/***/ 3098: +/***/ 6459: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -10659,675 +12630,548 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, - CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, - DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, - DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT, - ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT, - ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT, - NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS, - NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS, - NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, - NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, - REGION_ENV_NAME: () => REGION_ENV_NAME, - REGION_INI_NAME: () => REGION_INI_NAME, - getRegionInfo: () => getRegionInfo, - resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig, - resolveEndpointsConfig: () => resolveEndpointsConfig, - resolveRegionConfig: () => resolveRegionConfig -}); -module.exports = __toCommonJS(src_exports); - -// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts -var import_util_config_provider = __nccwpck_require__(3375); -var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; -var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; -var DEFAULT_USE_DUALSTACK_ENDPOINT = false; -var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), - default: false -}; - -// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts - -var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; -var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; -var DEFAULT_USE_FIPS_ENDPOINT = false; -var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), - default: false -}; - -// src/endpointsConfig/resolveCustomEndpointsConfig.ts -var import_util_middleware = __nccwpck_require__(2390); -var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => { - const { endpoint, urlParser } = input; - return { - ...input, - tls: input.tls ?? true, - endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), - isCustomEndpoint: true, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false) - }; -}, "resolveCustomEndpointsConfig"); + EventStreamCodec: () => EventStreamCodec, + HeaderMarshaller: () => HeaderMarshaller, + Int64: () => Int64, + MessageDecoderStream: () => MessageDecoderStream, + MessageEncoderStream: () => MessageEncoderStream, + SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, + SmithyMessageEncoderStream: () => SmithyMessageEncoderStream +}); +module.exports = __toCommonJS(src_exports); -// src/endpointsConfig/resolveEndpointsConfig.ts +// src/EventStreamCodec.ts +var import_crc322 = __nccwpck_require__(7327); +// src/HeaderMarshaller.ts -// src/endpointsConfig/utils/getEndpointFromRegion.ts -var getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => { - const { tls = true } = input; - const region = await input.region(); - const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); - if (!dnsHostRegex.test(region)) { - throw new Error("Invalid region in client config"); + +// src/Int64.ts +var import_util_hex_encoding = __nccwpck_require__(5364); +var _Int64 = class _Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } } - const useDualstackEndpoint = await input.useDualstackEndpoint(); - const useFipsEndpoint = await input.useFipsEndpoint(); - const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {}; - if (!hostname) { - throw new Error("Cannot resolve hostname from client config"); + static fromNumber(number) { + if (number > 9223372036854776e3 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new _Int64(bytes); } - return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); -}, "getEndpointFromRegion"); - -// src/endpointsConfig/resolveEndpointsConfig.ts -var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { - const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false); - const { endpoint, useFipsEndpoint, urlParser } = input; - return { - ...input, - tls: input.tls ?? true, - endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }), - isCustomEndpoint: !!endpoint, - useDualstackEndpoint - }; -}, "resolveEndpointsConfig"); - -// src/regionConfig/config.ts -var REGION_ENV_NAME = "AWS_REGION"; -var REGION_INI_NAME = "region"; -var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { - throw new Error("Region is missing"); + /** + * Called implicitly by infix arithmetic operators. + */ + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 128; + if (negative) { + negate(bytes); + } + return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); } }; -var NODE_REGION_CONFIG_FILE_OPTIONS = { - preferredFile: "credentials" -}; - -// src/regionConfig/isFipsRegion.ts -var isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion"); - -// src/regionConfig/getRealRegion.ts -var getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion"); +__name(_Int64, "Int64"); +var Int64 = _Int64; +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 255; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } +} +__name(negate, "negate"); -// src/regionConfig/resolveRegionConfig.ts -var resolveRegionConfig = /* @__PURE__ */ __name((input) => { - const { region, useFipsEndpoint } = input; - if (!region) { - throw new Error("Region is missing"); +// src/HeaderMarshaller.ts +var _HeaderMarshaller = class _HeaderMarshaller { + constructor(toUtf8, fromUtf8) { + this.toUtf8 = toUtf8; + this.fromUtf8 = fromUtf8; } - return { - ...input, - region: async () => { - if (typeof region === "string") { - return getRealRegion(region); - } - const providedRegion = await region(); - return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if (isFipsRegion(providedRegion)) { - return true; + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]); + case "byte": + return Uint8Array.from([2 /* byte */, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3 /* short */); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4 /* integer */); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5 /* long */; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6 /* byteArray */); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7 /* string */); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8 /* timestamp */; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9 /* uuid */; + uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0 /* boolTrue */: + out[name] = { + type: BOOLEAN_TAG, + value: true + }; + break; + case 1 /* boolFalse */: + out[name] = { + type: BOOLEAN_TAG, + value: false + }; + break; + case 2 /* byte */: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++) + }; + break; + case 3 /* short */: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false) + }; + position += 2; + break; + case 4 /* integer */: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false) + }; + position += 4; + break; + case 5 /* long */: + out[name] = { + type: LONG_TAG, + value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) + }; + position += 8; + break; + case 6 /* byteArray */: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) + }; + position += binaryLength; + break; + case 7 /* string */: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) + }; + position += stringLength; + break; + case 8 /* timestamp */: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) + }; + position += 8; + break; + case 9 /* uuid */: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)( + uuidBytes.subarray(6, 8) + )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}` + }; + break; + default: + throw new Error(`Unrecognized header type tag`); } - return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - } - }; -}, "resolveRegionConfig"); - -// src/regionInfo/getHostnameFromVariants.ts -var getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { - var _a; - return (_a = variants.find( - ({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack") - )) == null ? void 0 : _a.hostname; -}, "getHostnameFromVariants"); - -// src/regionInfo/getResolvedHostname.ts -var getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0, "getResolvedHostname"); - -// src/regionInfo/getResolvedPartition.ts -var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition"); - -// src/regionInfo/getResolvedSigningRegion.ts -var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { - if (signingRegion) { - return signingRegion; - } else if (useFipsEndpoint) { - const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); - const regionRegexmatchArray = hostname.match(regionRegexJs); - if (regionRegexmatchArray) { - return regionRegexmatchArray[0].slice(1, -1); - } - } -}, "getResolvedSigningRegion"); - -// src/regionInfo/getRegionInfo.ts -var getRegionInfo = /* @__PURE__ */ __name((region, { - useFipsEndpoint = false, - useDualstackEndpoint = false, - signingService, - regionHash, - partitionHash -}) => { - var _a, _b, _c, _d, _e; - const partition = getResolvedPartition(region, { partitionHash }); - const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region; - const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; - const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions); - const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions); - const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname }); - if (hostname === void 0) { - throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); - } - const signingRegion = getResolvedSigningRegion(hostname, { - signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion, - regionRegex: partitionHash[partition].regionRegex, - useFipsEndpoint - }); - return { - partition, - signingService, - hostname, - ...signingRegion && { signingRegion }, - ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && { - signingService: regionHash[resolvedRegion].signingService } - }; -}, "getRegionInfo"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - -/***/ }), - -/***/ 5829: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return out; } - return to; }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, - EXPIRATION_MS: () => EXPIRATION_MS, - HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, - HttpBearerAuthSigner: () => HttpBearerAuthSigner, - NoAuthSigner: () => NoAuthSigner, - RequestBuilder: () => RequestBuilder, - createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction, - createPaginator: () => createPaginator, - doesIdentityRequireRefresh: () => doesIdentityRequireRefresh, - getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin, - getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin, - getHttpSigningPlugin: () => getHttpSigningPlugin, - getSmithyContext: () => getSmithyContext3, - httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions, - httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware, - httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions, - httpSigningMiddleware: () => httpSigningMiddleware, - httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions, - isIdentityExpired: () => isIdentityExpired, - memoizeIdentityProvider: () => memoizeIdentityProvider, - normalizeProvider: () => normalizeProvider, - requestBuilder: () => requestBuilder -}); -module.exports = __toCommonJS(src_exports); +__name(_HeaderMarshaller, "HeaderMarshaller"); +var HeaderMarshaller = _HeaderMarshaller; +var BOOLEAN_TAG = "boolean"; +var BYTE_TAG = "byte"; +var SHORT_TAG = "short"; +var INT_TAG = "integer"; +var LONG_TAG = "long"; +var BINARY_TAG = "binary"; +var STRING_TAG = "string"; +var TIMESTAMP_TAG = "timestamp"; +var UUID_TAG = "uuid"; +var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; -// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts -var import_util_middleware = __nccwpck_require__(2390); -function convertHttpAuthSchemesToMap(httpAuthSchemes) { - const map = /* @__PURE__ */ new Map(); - for (const scheme of httpAuthSchemes) { - map.set(scheme.schemeId, scheme); - } - return map; -} -__name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap"); -var httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => { - var _a; - const options = config.httpAuthSchemeProvider( - await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input) - ); - const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const failureReasons = []; - for (const option of options) { - const scheme = authSchemes.get(option.schemeId); - if (!scheme) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); - continue; - } - const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); - if (!identityProvider) { - failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); - continue; - } - const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) == null ? void 0 : _a.call(option, config, context)) || {}; - option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); - option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); - smithyContext.selectedHttpAuthScheme = { - httpAuthOption: option, - identity: await identityProvider(option.identityProperties), - signer: scheme.signer - }; - break; - } - if (!smithyContext.selectedHttpAuthScheme) { - throw new Error(failureReasons.join("\n")); +// src/splitMessage.ts +var import_crc32 = __nccwpck_require__(7327); +var PRELUDE_MEMBER_LENGTH = 4; +var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; +var CHECKSUM_LENGTH = 4; +var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; +function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); } - return next(args); -}, "httpAuthSchemeMiddleware"); - -// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts -var import_middleware_endpoint = __nccwpck_require__(2918); -var httpAuthSchemeEndpointRuleSetMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name -}; -var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider -}) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), - httpAuthSchemeEndpointRuleSetMiddlewareOptions - ); + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); } -}), "getHttpAuthSchemeEndpointRuleSetPlugin"); - -// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts -var import_middleware_serde = __nccwpck_require__(1238); -var httpAuthSchemeMiddlewareOptions = { - step: "serialize", - tags: ["HTTP_AUTH_SCHEME"], - name: "httpAuthSchemeMiddleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name -}; -var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider -}) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - httpAuthSchemeMiddleware(config, { - httpAuthSchemeParametersProvider, - identityProviderConfigProvider - }), - httpAuthSchemeMiddlewareOptions + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error( + `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})` ); } -}), "getHttpAuthSchemePlugin"); - -// src/middleware-http-signing/httpSigningMiddleware.ts -var import_protocol_http = __nccwpck_require__(4418); + checksummer.update( + new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)) + ); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error( + `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}` + ); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array( + buffer, + byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, + messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH) + ) + }; +} +__name(splitMessage, "splitMessage"); -var defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => { - throw error; -}, "defaultErrorHandler"); -var defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => { -}, "defaultSuccessHandler"); -var httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => { - if (!import_protocol_http.HttpRequest.isInstance(args.request)) { - return next(args); +// src/EventStreamCodec.ts +var _EventStreamCodec = class _EventStreamCodec { + constructor(toUtf8, fromUtf8) { + this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); + this.messageBuffer = []; + this.isEndOfStream = false; } - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const scheme = smithyContext.selectedHttpAuthScheme; - if (!scheme) { - throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + feed(message) { + this.messageBuffer.push(this.decode(message)); } - const { - httpAuthOption: { signingProperties = {} }, - identity, - signer - } = scheme; - const output = await next({ - ...args, - request: await signer.sign(args.request, identity, signingProperties) - }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); - (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); - return output; -}, "httpSigningMiddleware"); - -// src/middleware-http-signing/getHttpSigningMiddleware.ts -var import_middleware_retry = __nccwpck_require__(6039); -var httpSigningMiddlewareOptions = { - step: "finalizeRequest", - tags: ["HTTP_SIGNING"], - name: "httpSigningMiddleware", - aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], - override: true, - relation: "after", - toMiddleware: import_middleware_retry.retryMiddlewareOptions.name -}; -var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + } + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + } + }; } -}), "getHttpSigningPlugin"); - -// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts -var _DefaultIdentityProviderConfig = class _DefaultIdentityProviderConfig { /** - * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers. - * - * @param config scheme IDs and identity providers to configure + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message. */ - constructor(config) { - this.authSchemes = /* @__PURE__ */ new Map(); - for (const [key, value] of Object.entries(config)) { - if (value !== void 0) { - this.authSchemes.set(key, value); - } - } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new import_crc322.Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; } - getIdentityProvider(schemeId) { - return this.authSchemes.get(schemeId); + /** + * Convert a binary event stream message into a JavaScript object with an + * opaque, binary body and tagged, parsed headers. + */ + decode(message) { + const { headers, body } = splitMessage(message); + return { headers: this.headerMarshaller.parse(headers), body }; } -}; -__name(_DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig"); -var DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig; - -// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts -var import_types = __nccwpck_require__(5756); -var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner { - async sign(httpRequest, identity, signingProperties) { - if (!signingProperties) { - throw new Error( - "request could not be signed with `apiKey` since the `name` and `in` signer properties are missing" - ); - } - if (!signingProperties.name) { - throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); - } - if (!signingProperties.in) { - throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); - } - if (!identity.apiKey) { - throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); - } - const clonedRequest = httpRequest.clone(); - if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) { - clonedRequest.query[signingProperties.name] = identity.apiKey; - } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) { - clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey; - } else { - throw new Error( - "request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`" - ); - } - return clonedRequest; + /** + * Convert a structured JavaScript object with tagged headers into a binary + * event stream message header. + */ + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); } }; -__name(_HttpApiKeyAuthSigner, "HttpApiKeyAuthSigner"); -var HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner; +__name(_EventStreamCodec, "EventStreamCodec"); +var EventStreamCodec = _EventStreamCodec; -// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts -var _HttpBearerAuthSigner = class _HttpBearerAuthSigner { - async sign(httpRequest, identity, signingProperties) { - const clonedRequest = httpRequest.clone(); - if (!identity.token) { - throw new Error("request could not be signed with `token` since the `token` is not defined"); - } - clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; - return clonedRequest; +// src/MessageDecoderStream.ts +var _MessageDecoderStream = class _MessageDecoderStream { + constructor(options) { + this.options = options; } -}; -__name(_HttpBearerAuthSigner, "HttpBearerAuthSigner"); -var HttpBearerAuthSigner = _HttpBearerAuthSigner; - -// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts -var _NoAuthSigner = class _NoAuthSigner { - async sign(httpRequest, identity, signingProperties) { - return httpRequest; + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } } }; -__name(_NoAuthSigner, "NoAuthSigner"); -var NoAuthSigner = _NoAuthSigner; +__name(_MessageDecoderStream, "MessageDecoderStream"); +var MessageDecoderStream = _MessageDecoderStream; -// src/util-identity-and-auth/memoizeIdentityProvider.ts -var createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, "createIsIdentityExpiredFunction"); -var EXPIRATION_MS = 3e5; -var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS); -var doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, "doesIdentityRequireRefresh"); -var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => { - if (provider === void 0) { - return void 0; +// src/MessageEncoderStream.ts +var _MessageEncoderStream = class _MessageEncoderStream { + constructor(options) { + this.options = options; } - const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = /* @__PURE__ */ __name(async (options) => { - if (!pending) { - pending = normalizedProvider(options); - } - try { - resolved = await pending; - hasResult = true; - isConstant = false; - } finally { - pending = void 0; - } - return resolved; - }, "coalesceProvider"); - if (isExpired === void 0) { - return async (options) => { - if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { - resolved = await coalesceProvider(options); - } - return resolved; - }; + [Symbol.asyncIterator]() { + return this.asyncIterator(); } - return async (options) => { - if (!hasResult || (options == null ? void 0 : options.forceRefresh)) { - resolved = await coalesceProvider(options); + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; } - if (isConstant) { - return resolved; + if (this.options.includeEndFrame) { + yield new Uint8Array(0); } - if (!requiresRefresh(resolved)) { - isConstant = true; - return resolved; + } +}; +__name(_MessageEncoderStream, "MessageEncoderStream"); +var MessageEncoderStream = _MessageEncoderStream; + +// src/SmithyMessageDecoderStream.ts +var _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === void 0) + continue; + yield deserialized; } - if (isExpired(resolved)) { - await coalesceProvider(options); - return resolved; + } +}; +__name(_SmithyMessageDecoderStream, "SmithyMessageDecoderStream"); +var SmithyMessageDecoderStream = _SmithyMessageDecoderStream; + +// src/SmithyMessageEncoderStream.ts +var _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; } - return resolved; - }; -}, "memoizeIdentityProvider"); + } +}; +__name(_SmithyMessageEncoderStream, "SmithyMessageEncoderStream"); +var SmithyMessageEncoderStream = _SmithyMessageEncoderStream; +// Annotate the CommonJS export names for ESM import in node: -// src/getSmithyContext.ts +0 && (0); -var getSmithyContext3 = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext"); -// src/normalizeProvider.ts -var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; -}, "normalizeProvider"); -// src/protocols/requestBuilder.ts +/***/ }), -var import_smithy_client = __nccwpck_require__(3570); -function requestBuilder(input, context) { - return new RequestBuilder(input, context); -} -__name(requestBuilder, "requestBuilder"); -var _RequestBuilder = class _RequestBuilder { - constructor(input, context) { - this.input = input; - this.context = context; - this.query = {}; - this.method = ""; - this.headers = {}; - this.path = ""; - this.body = null; - this.hostname = ""; - this.resolvePathStack = []; - } - async build() { - const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); - this.path = basePath; - for (const resolvePath of this.resolvePathStack) { - resolvePath(this.path); - } - return new import_protocol_http.HttpRequest({ - protocol, - hostname: this.hostname || hostname, - port, - method: this.method, - path: this.path, - query: this.query, - body: this.body, - headers: this.headers - }); +/***/ 3081: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - /** - * Brevity setter for "hostname". - */ - hn(hostname) { - this.hostname = hostname; - return this; + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + Hash: () => Hash +}); +module.exports = __toCommonJS(src_exports); +var import_util_buffer_from = __nccwpck_require__(1381); +var import_util_utf8 = __nccwpck_require__(1895); +var import_buffer = __nccwpck_require__(4300); +var import_crypto = __nccwpck_require__(6113); +var _Hash = class _Hash { + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); } - /** - * Brevity initial builder for "basepath". - */ - bp(uriLabel) { - this.resolvePathStack.push((basePath) => { - this.path = `${(basePath == null ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; - }); - return this; + update(toHash, encoding) { + this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); } - /** - * Brevity incremental builder for "path". - */ - p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { - this.resolvePathStack.push((path) => { - this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); - }); - return this; + digest() { + return Promise.resolve(this.hash.digest()); } - /** - * Brevity setter for "headers". - */ - h(headers) { - this.headers = headers; - return this; + reset() { + this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier); } - /** - * Brevity setter for "query". - */ - q(query) { - this.query = query; - return this; +}; +__name(_Hash, "Hash"); +var Hash = _Hash; +function castSourceData(toCast, encoding) { + if (import_buffer.Buffer.isBuffer(toCast)) { + return toCast; } - /** - * Brevity setter for "body". - */ - b(body) { - this.body = body; - return this; + if (typeof toCast === "string") { + return (0, import_util_buffer_from.fromString)(toCast, encoding); } - /** - * Brevity setter for "method". - */ - m(method) { - this.method = method; - return this; + if (ArrayBuffer.isView(toCast)) { + return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); } -}; -__name(_RequestBuilder, "RequestBuilder"); -var RequestBuilder = _RequestBuilder; - -// src/pagination/createPaginator.ts -var makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, ...args) => { - return await client.send(new CommandCtor(input), ...args); -}, "makePagedClientRequest"); -function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { - return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) { - let token = config.startingToken || void 0; - let hasNext = true; - let page; - while (hasNext) { - input[inputTokenName] = token; - if (pageSizeTokenName) { - input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize; - } - if (config.client instanceof ClientCtor) { - page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments); - } else { - throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); - } - yield page; - const prevToken = token; - token = get(page, outputTokenName); - hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); - } - return void 0; - }, "paginateOperation"); + return (0, import_util_buffer_from.fromArrayBuffer)(toCast); } -__name(createPaginator, "createPaginator"); -var get = /* @__PURE__ */ __name((fromObject, path) => { - let cursor = fromObject; - const pathComponents = path.split("."); - for (const step of pathComponents) { - if (!cursor || typeof cursor !== "object") { - return void 0; - } - cursor = cursor[step]; +__name(castSourceData, "castSourceData"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + +/***/ }), + +/***/ 780: +/***/ ((module) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - return cursor; -}, "get"); + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + isArrayBuffer: () => isArrayBuffer +}); +module.exports = __toCommonJS(src_exports); +var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -11336,7 +13180,7 @@ var get = /* @__PURE__ */ __name((fromObject, path) => { /***/ }), -/***/ 7477: +/***/ 2800: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -11361,396 +13205,358 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, - DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, - ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, - ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI, - ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI, - fromContainerMetadata: () => fromContainerMetadata, - fromInstanceMetadata: () => fromInstanceMetadata, - getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint, - httpRequest: () => httpRequest, - providerConfigFromInit: () => providerConfigFromInit + contentLengthMiddleware: () => contentLengthMiddleware, + contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, + getContentLengthPlugin: () => getContentLengthPlugin }); module.exports = __toCommonJS(src_exports); - -// src/fromContainerMetadata.ts - -var import_url = __nccwpck_require__(7310); - -// src/remoteProvider/httpRequest.ts -var import_property_provider = __nccwpck_require__(9721); -var import_buffer = __nccwpck_require__(4300); -var import_http = __nccwpck_require__(3685); -function httpRequest(options) { - return new Promise((resolve, reject) => { - var _a; - const req = (0, import_http.request)({ - method: "GET", - ...options, - // Node.js http module doesn't accept hostname with square brackets - // Refs: https://github.com/nodejs/node/issues/39738 - hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\[(.+)\]$/, "$1") - }); - req.on("error", (err) => { - reject(Object.assign(new import_property_provider.ProviderError("Unable to connect to instance metadata service"), err)); - req.destroy(); - }); - req.on("timeout", () => { - reject(new import_property_provider.ProviderError("TimeoutError from instance metadata service")); - req.destroy(); - }); - req.on("response", (res) => { - const { statusCode = 400 } = res; - if (statusCode < 200 || 300 <= statusCode) { - reject( - Object.assign(new import_property_provider.ProviderError("Error response received from instance metadata service"), { statusCode }) - ); - req.destroy(); +var import_protocol_http = __nccwpck_require__(4418); +var CONTENT_LENGTH_HEADER = "content-length"; +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (import_protocol_http.HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length) + }; + } catch (error) { + } } - const chunks = []; - res.on("data", (chunk) => { - chunks.push(chunk); - }); - res.on("end", () => { - resolve(import_buffer.Buffer.concat(chunks)); - req.destroy(); - }); + } + return next({ + ...args, + request }); - req.end(); - }); + }; } -__name(httpRequest, "httpRequest"); +__name(contentLengthMiddleware, "contentLengthMiddleware"); +var contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true +}; +var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + } +}), "getContentLengthPlugin"); +// Annotate the CommonJS export names for ESM import in node: -// src/remoteProvider/ImdsCredentials.ts -var isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials"); -var fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({ - accessKeyId: creds.AccessKeyId, - secretAccessKey: creds.SecretAccessKey, - sessionToken: creds.Token, - expiration: new Date(creds.Expiration) -}), "fromImdsCredentials"); +0 && (0); -// src/remoteProvider/RemoteProviderInit.ts -var DEFAULT_TIMEOUT = 1e3; -var DEFAULT_MAX_RETRIES = 0; -var providerConfigFromInit = /* @__PURE__ */ __name(({ - maxRetries = DEFAULT_MAX_RETRIES, - timeout = DEFAULT_TIMEOUT -}) => ({ maxRetries, timeout }), "providerConfigFromInit"); -// src/remoteProvider/retry.ts -var retry = /* @__PURE__ */ __name((toRetry, maxRetries) => { - let promise = toRetry(); - for (let i = 0; i < maxRetries; i++) { - promise = promise.catch(toRetry); - } - return promise; -}, "retry"); -// src/fromContainerMetadata.ts -var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; -var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; -var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; -var fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => { - const { timeout, maxRetries } = providerConfigFromInit(init); - return () => retry(async () => { - const requestOptions = await getCmdsUri(); - const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); - if (!isImdsCredentials(credsResponse)) { - throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); - } - return fromImdsCredentials(credsResponse); - }, maxRetries); -}, "fromContainerMetadata"); -var requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => { - if (process.env[ENV_CMDS_AUTH_TOKEN]) { - options.headers = { - ...options.headers, - Authorization: process.env[ENV_CMDS_AUTH_TOKEN] - }; - } - const buffer = await httpRequest({ - ...options, - timeout - }); - return buffer.toString(); -}, "requestFromEcsImds"); -var CMDS_IP = "169.254.170.2"; -var GREENGRASS_HOSTS = { - localhost: true, - "127.0.0.1": true -}; -var GREENGRASS_PROTOCOLS = { - "http:": true, - "https:": true -}; -var getCmdsUri = /* @__PURE__ */ __name(async () => { - if (process.env[ENV_CMDS_RELATIVE_URI]) { - return { - hostname: CMDS_IP, - path: process.env[ENV_CMDS_RELATIVE_URI] - }; - } - if (process.env[ENV_CMDS_FULL_URI]) { - const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]); - if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { - throw new import_property_provider.CredentialsProviderError( - `${parsed.hostname} is not a valid container metadata service hostname`, - false - ); - } - if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { - throw new import_property_provider.CredentialsProviderError( - `${parsed.protocol} is not a valid container metadata service protocol`, - false - ); - } - return { - ...parsed, - port: parsed.port ? parseInt(parsed.port, 10) : void 0 - }; - } - throw new import_property_provider.CredentialsProviderError( - `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, - false - ); -}, "getCmdsUri"); +/***/ }), -// src/fromInstanceMetadata.ts +/***/ 1518: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointFromConfig = void 0; +const node_config_provider_1 = __nccwpck_require__(3461); +const getEndpointUrlConfig_1 = __nccwpck_require__(7574); +const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))(); +exports.getEndpointFromConfig = getEndpointFromConfig; + + +/***/ }), + +/***/ 7574: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointUrlConfig = void 0; +const shared_ini_file_loader_1 = __nccwpck_require__(3507); +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +const getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, +}); +exports.getEndpointUrlConfig = getEndpointUrlConfig; +/***/ }), -// src/error/InstanceMetadataV1FallbackError.ts +/***/ 2918: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError { - constructor(message, tryNextLink = true) { - super(message, tryNextLink); - this.tryNextLink = tryNextLink; - this.name = "InstanceMetadataV1FallbackError"; - Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype); - } +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -__name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError"); -var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError; - -// src/utils/getInstanceMetadataEndpoint.ts -var import_node_config_provider = __nccwpck_require__(3461); -var import_url_parser = __nccwpck_require__(4681); - -// src/config/EndpointConfigOptions.ts -var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; -var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; -var ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], - default: void 0 +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/config/EndpointMode.ts -var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { - EndpointMode2["IPv4"] = "IPv4"; - EndpointMode2["IPv6"] = "IPv6"; - return EndpointMode2; -})(EndpointMode || {}); - -// src/config/EndpointModeConfigOptions.ts -var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; -var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; -var ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], - default: "IPv4" /* IPv4 */ -}; +// src/index.ts +var src_exports = {}; +__export(src_exports, { + endpointMiddleware: () => endpointMiddleware, + endpointMiddlewareOptions: () => endpointMiddlewareOptions, + getEndpointFromInstructions: () => getEndpointFromInstructions, + getEndpointPlugin: () => getEndpointPlugin, + resolveEndpointConfig: () => resolveEndpointConfig, + resolveParams: () => resolveParams, + toEndpointV1: () => toEndpointV1 +}); +module.exports = __toCommonJS(src_exports); -// src/utils/getInstanceMetadataEndpoint.ts -var getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint"); -var getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig"); -var getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => { - const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)(); - switch (endpointMode) { - case "IPv4" /* IPv4 */: - return "http://169.254.169.254" /* IPv4 */; - case "IPv6" /* IPv6 */: - return "http://[fd00:ec2::254]" /* IPv6 */; - default: - throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`); +// src/service-customizations/s3.ts +var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { + const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); } -}, "getFromEndpointModeConfig"); - -// src/utils/getExtendedInstanceMetadataCredentials.ts -var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; -var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; -var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; -var getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => { - const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); - const newExpiration = new Date(Date.now() + refreshInterval * 1e3); - logger.warn( - "Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: " + STATIC_STABILITY_DOC_URL - ); - const originalExpiration = credentials.originalExpiration ?? credentials.expiration; - return { - ...credentials, - ...originalExpiration ? { originalExpiration } : {}, - expiration: newExpiration - }; -}, "getExtendedInstanceMetadataCredentials"); - -// src/utils/staticStabilityProvider.ts -var staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => { - const logger = (options == null ? void 0 : options.logger) || console; - let pastCredentials; - return async () => { - let credentials; - try { - credentials = await provider(); - if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { - credentials = getExtendedInstanceMetadataCredentials(credentials, logger); - } - } catch (e) { - if (pastCredentials) { - logger.warn("Credential renew failed: ", e); - credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger); - } else { - throw e; - } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); } - pastCredentials = credentials; - return credentials; - }; -}, "staticStabilityProvider"); + } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; +}, "resolveParamsForS3"); +var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +var DOTS_PATTERN = /\.\./; +var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); +var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { + const [arn, partition, service, region, account, typeOrId] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5; + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return arn === "arn" && !!partition && !!service && !!account && !!typeOrId; +}, "isArnBucketName"); -// src/fromInstanceMetadata.ts -var IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; -var IMDS_TOKEN_PATH = "/latest/api/token"; -var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; -var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; -var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; -var fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), "fromInstanceMetadata"); -var getInstanceImdsProvider = /* @__PURE__ */ __name((init) => { - let disableFetchToken = false; - const { logger, profile } = init; - const { timeout, maxRetries } = providerConfigFromInit(init); - const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => { - var _a; - const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; - if (isImdsV1Fallback) { - let fallbackBlockedFromProfile = false; - let fallbackBlockedFromProcessEnv = false; - const configValue = await (0, import_node_config_provider.loadConfig)( - { - environmentVariableSelector: (env) => { - const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; - if (envValue === void 0) { - throw new import_property_provider.CredentialsProviderError( - `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.` - ); - } - return fallbackBlockedFromProcessEnv; - }, - configFileSelector: (profile2) => { - const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; - fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; - return fallbackBlockedFromProfile; - }, - default: false - }, - { - profile - } - )(); - if (init.ec2MetadataV1Disabled || configValue) { - const causes = []; - if (init.ec2MetadataV1Disabled) - causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); - if (fallbackBlockedFromProfile) - causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); - if (fallbackBlockedFromProcessEnv) - causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); - throw new InstanceMetadataV1FallbackError( - `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join( - ", " - )}].` - ); - } +// src/adaptors/createConfigValueProvider.ts +var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { + const configProvider = /* @__PURE__ */ __name(async () => { + const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); } - const imdsProfile = (await retry(async () => { - let profile2; - try { - profile2 = await getProfile(options); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; + return configValue; + }, "configProvider"); + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; } - throw err; - } - return profile2; - }, maxRetries2)).trim(); - return retry(async () => { - let creds; - try { - creds = await getCredentialsFromProfile(imdsProfile, options); - } catch (err) { - if (err.statusCode === 401) { - disableFetchToken = false; + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; } - throw err; } - return creds; - }, maxRetries2); - }, "getCredentials"); - return async () => { - const endpoint = await getInstanceMetadataEndpoint(); - if (disableFetchToken) { - logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); - } else { - let token; - try { - token = (await getMetadataToken({ ...endpoint, timeout })).toString(); - } catch (error) { - if ((error == null ? void 0 : error.statusCode) === 400) { - throw Object.assign(error, { - message: "EC2 Metadata token request returned error" - }); - } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { - disableFetchToken = true; + return endpoint; + }; + } + return configProvider; +}, "createConfigValueProvider"); + +// src/adaptors/getEndpointFromInstructions.ts +var import_getEndpointFromConfig = __nccwpck_require__(1518); + +// src/adaptors/toEndpointV1.ts +var import_url_parser = __nccwpck_require__(4681); +var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, import_url_parser.parseUrl)(endpoint.url); + } + return endpoint; + } + return (0, import_url_parser.parseUrl)(endpoint); +}, "toEndpointV1"); + +// src/adaptors/getEndpointFromInstructions.ts +var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || ""); + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; +}, "getEndpointFromInstructions"); +var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { + var _a; + const endpointParams = {}; + const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; +}, "resolveParams"); + +// src/endpointMiddleware.ts +var import_util_middleware = __nccwpck_require__(2390); +var endpointMiddleware = /* @__PURE__ */ __name(({ + config, + instructions +}) => { + return (next, context) => async (args) => { + var _a, _b, _c; + const endpoint = await getEndpointFromInstructions( + args.input, + { + getEndpointParameterInstructions() { + return instructions; } - logger == null ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); - return getCredentials(maxRetries, { ...endpoint, timeout }); + }, + { ...config }, + context + ); + context.endpointV2 = endpoint; + context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; + const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, import_util_middleware.getSmithyContext)(context); + const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign( + httpAuthOption.signingProperties || {}, + { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet + }, + authScheme.properties + ); } - return getCredentials(maxRetries, { - ...endpoint, - headers: { - [X_AWS_EC2_METADATA_TOKEN]: token - }, - timeout - }); } + return next({ + ...args + }); }; -}, "getInstanceImdsProvider"); -var getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({ - ...options, - path: IMDS_TOKEN_PATH, - method: "PUT", - headers: { - "x-aws-ec2-metadata-token-ttl-seconds": "21600" - } -}), "getMetadataToken"); -var getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile"); -var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) => { - const credsResponse = JSON.parse( - (await httpRequest({ - ...options, - path: IMDS_PATH + profile - })).toString() - ); - if (!isImdsCredentials(credsResponse)) { - throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service."); +}, "endpointMiddleware"); + +// src/getEndpointPlugin.ts +var import_middleware_serde = __nccwpck_require__(1238); +var endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: import_middleware_serde.serializerMiddlewareOption.name +}; +var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo( + endpointMiddleware({ + config, + instructions + }), + endpointMiddlewareOptions + ); } - return fromImdsCredentials(credsResponse); -}, "getCredentialsFromProfile"); +}), "getEndpointPlugin"); + +// src/resolveEndpointConfig.ts + +var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { + const tls = input.tls ?? true; + const { endpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0; + const isCustomEndpoint = !!endpoint; + return { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false), + useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false) + }; +}, "resolveEndpointConfig"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -11759,7 +13565,7 @@ var getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) /***/ }), -/***/ 6459: +/***/ 6039: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { var __defProp = Object.defineProperty; @@ -11784,1365 +13590,1087 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - EventStreamCodec: () => EventStreamCodec, - HeaderMarshaller: () => HeaderMarshaller, - Int64: () => Int64, - MessageDecoderStream: () => MessageDecoderStream, - MessageEncoderStream: () => MessageEncoderStream, - SmithyMessageDecoderStream: () => SmithyMessageDecoderStream, - SmithyMessageEncoderStream: () => SmithyMessageEncoderStream + AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, + CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, + CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, + ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, + ENV_RETRY_MODE: () => ENV_RETRY_MODE, + NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, + NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, + StandardRetryStrategy: () => StandardRetryStrategy, + defaultDelayDecider: () => defaultDelayDecider, + defaultRetryDecider: () => defaultRetryDecider, + getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, + getRetryAfterHint: () => getRetryAfterHint, + getRetryPlugin: () => getRetryPlugin, + omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, + omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, + resolveRetryConfig: () => resolveRetryConfig, + retryMiddleware: () => retryMiddleware, + retryMiddlewareOptions: () => retryMiddlewareOptions }); module.exports = __toCommonJS(src_exports); -// src/EventStreamCodec.ts -var import_crc322 = __nccwpck_require__(7327); +// src/AdaptiveRetryStrategy.ts + + +// src/StandardRetryStrategy.ts +var import_protocol_http = __nccwpck_require__(4418); + + +var import_uuid = __nccwpck_require__(7761); + +// src/defaultRetryQuota.ts +var import_util_retry = __nccwpck_require__(4902); +var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT; + const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST; + const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); + const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); + const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }, "retrieveRetryTokens"); + const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }, "releaseRetryTokens"); + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens + }); +}, "getDefaultRetryQuota"); + +// src/delayDecider.ts -// src/HeaderMarshaller.ts +var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); +// src/retryDecider.ts +var import_service_error_classification = __nccwpck_require__(6375); +var defaultRetryDecider = /* @__PURE__ */ __name((error) => { + if (!error) { + return false; + } + return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); +}, "defaultRetryDecider"); -// src/Int64.ts -var import_util_hex_encoding = __nccwpck_require__(5364); -var _Int64 = class _Int64 { - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } +// src/util.ts +var asSdkError = /* @__PURE__ */ __name((error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); +}, "asSdkError"); + +// src/StandardRetryStrategy.ts +var _StandardRetryStrategy = class _StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = import_util_retry.RETRY_MODES.STANDARD; + this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider; + this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider; + this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); } - static fromNumber(number) { - if (number > 9223372036854776e3 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { - bytes[i] = remaining; - } - if (number < 0) { - negate(bytes); - } - return new _Int64(bytes); + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); } - /** - * Called implicitly by infix arithmetic operators. - */ - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 128; - if (negative) { - negate(bytes); + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } catch (error) { + maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; } - return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1); - } - toString() { - return String(this.valueOf()); - } -}; -__name(_Int64, "Int64"); -var Int64 = _Int64; -function negate(bytes) { - for (let i = 0; i < 8; i++) { - bytes[i] ^= 255; - } - for (let i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) - break; - } -} -__name(negate, "negate"); - -// src/HeaderMarshaller.ts -var _HeaderMarshaller = class _HeaderMarshaller { - constructor(toUtf8, fromUtf8) { - this.toUtf8 = toUtf8; - this.fromUtf8 = fromUtf8; + return maxAttempts; } - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = this.fromUtf8(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (import_protocol_http.HttpRequest.isInstance(request)) { + request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); } - return out; - } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]); - case "byte": - return Uint8Array.from([2 /* byte */, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8(0, 3 /* short */); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8(0, 4 /* integer */); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5 /* long */; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8(0, 6 /* byteArray */); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = this.fromUtf8(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8(0, 7 /* string */); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8 /* timestamp */; - tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); + while (true) { + try { + if (import_protocol_http.HttpRequest.isInstance(request)) { + request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9 /* uuid */; - uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } - } - parse(headers) { - const out = {}; - let position = 0; - while (position < headers.byteLength) { - const nameLength = headers.getUint8(position++); - const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); - position += nameLength; - switch (headers.getUint8(position++)) { - case 0 /* boolTrue */: - out[name] = { - type: BOOLEAN_TAG, - value: true - }; - break; - case 1 /* boolFalse */: - out[name] = { - type: BOOLEAN_TAG, - value: false - }; - break; - case 2 /* byte */: - out[name] = { - type: BYTE_TAG, - value: headers.getInt8(position++) - }; - break; - case 3 /* short */: - out[name] = { - type: SHORT_TAG, - value: headers.getInt16(position, false) - }; - position += 2; - break; - case 4 /* integer */: - out[name] = { - type: INT_TAG, - value: headers.getInt32(position, false) - }; - position += 4; - break; - case 5 /* long */: - out[name] = { - type: LONG_TAG, - value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)) - }; - position += 8; - break; - case 6 /* byteArray */: - const binaryLength = headers.getUint16(position, false); - position += 2; - out[name] = { - type: BINARY_TAG, - value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength) - }; - position += binaryLength; - break; - case 7 /* string */: - const stringLength = headers.getUint16(position, false); - position += 2; - out[name] = { - type: STRING_TAG, - value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)) - }; - position += stringLength; - break; - case 8 /* timestamp */: - out[name] = { - type: TIMESTAMP_TAG, - value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()) - }; - position += 8; - break; - case 9 /* uuid */: - const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); - position += 16; - out[name] = { - type: UUID_TAG, - value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)( - uuidBytes.subarray(6, 8) - )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}` - }; - break; - default: - throw new Error(`Unrecognized header type tag`); + if (options == null ? void 0 : options.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options == null ? void 0 : options.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider( + (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, + attempts + ); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; } } - return out; } }; -__name(_HeaderMarshaller, "HeaderMarshaller"); -var HeaderMarshaller = _HeaderMarshaller; -var BOOLEAN_TAG = "boolean"; -var BYTE_TAG = "byte"; -var SHORT_TAG = "short"; -var INT_TAG = "integer"; -var LONG_TAG = "long"; -var BINARY_TAG = "binary"; -var STRING_TAG = "string"; -var TIMESTAMP_TAG = "timestamp"; -var UUID_TAG = "uuid"; -var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; +__name(_StandardRetryStrategy, "StandardRetryStrategy"); +var StandardRetryStrategy = _StandardRetryStrategy; +var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1e3; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); +}, "getDelayFromRetryAfterHeader"); -// src/splitMessage.ts -var import_crc32 = __nccwpck_require__(7327); -var PRELUDE_MEMBER_LENGTH = 4; -var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; -var CHECKSUM_LENGTH = 4; -var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; -function splitMessage({ byteLength, byteOffset, buffer }) { - if (byteLength < MINIMUM_MESSAGE_LENGTH) { - throw new Error("Provided message too short to accommodate event stream message overhead"); - } - const view = new DataView(buffer, byteOffset, byteLength); - const messageLength = view.getUint32(0, false); - if (byteLength !== messageLength) { - throw new Error("Reported message length does not match received message length"); - } - const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); - const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); - const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); - const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); - if (expectedPreludeChecksum !== checksummer.digest()) { - throw new Error( - `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})` - ); +// src/AdaptiveRetryStrategy.ts +var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); + this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; } - checksummer.update( - new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)) - ); - if (expectedMessageChecksum !== checksummer.digest()) { - throw new Error( - `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}` - ); + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + } + }); } +}; +__name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); +var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + +// src/configurations.ts +var import_util_middleware = __nccwpck_require__(2390); + +var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +var CONFIG_MAX_ATTEMPTS = "max_attempts"; +var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return void 0; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: import_util_retry.DEFAULT_MAX_ATTEMPTS +}; +var resolveRetryConfig = /* @__PURE__ */ __name((input) => { + const { retryStrategy } = input; + const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); return { - headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), - body: new Uint8Array( - buffer, - byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, - messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH) - ) + ...input, + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)(); + if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { + return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); + } + return new import_util_retry.StandardRetryStrategy(maxAttempts); + } }; -} -__name(splitMessage, "splitMessage"); +}, "resolveRetryConfig"); +var ENV_RETRY_MODE = "AWS_RETRY_MODE"; +var CONFIG_RETRY_MODE = "retry_mode"; +var NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: import_util_retry.DEFAULT_RETRY_MODE +}; -// src/EventStreamCodec.ts -var _EventStreamCodec = class _EventStreamCodec { - constructor(toUtf8, fromUtf8) { - this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8); - this.messageBuffer = []; - this.isEndOfStream = false; - } - feed(message) { - this.messageBuffer.push(this.decode(message)); - } - endOfStream() { - this.isEndOfStream = true; +// src/omitRetryHeadersMiddleware.ts + + +var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { + const { request } = args; + if (import_protocol_http.HttpRequest.isInstance(request)) { + delete request.headers[import_util_retry.INVOCATION_ID_HEADER]; + delete request.headers[import_util_retry.REQUEST_HEADER]; } - getMessage() { - const message = this.messageBuffer.pop(); - const isEndOfStream = this.isEndOfStream; - return { - getMessage() { - return message; - }, - isEndOfStream() { - return isEndOfStream; - } - }; + return next(args); +}, "omitRetryHeadersMiddleware"); +var omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true +}; +var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); } - getAvailableMessages() { - const messages = this.messageBuffer; - this.messageBuffer = []; - const isEndOfStream = this.isEndOfStream; - return { - getMessages() { - return messages; - }, - isEndOfStream() { - return isEndOfStream; +}), "getOmitRetryHeadersPlugin"); + +// src/retryMiddleware.ts + + +var import_smithy_client = __nccwpck_require__(3570); + + +var import_isStreamingPayload = __nccwpck_require__(8977); +var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { + var _a; + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = import_protocol_http.HttpRequest.isInstance(request); + if (isRequest) { + request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); + } + while (true) { + try { + if (isRequest) { + request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } catch (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = asSdkError(e); + if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) { + (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn( + "An error was encountered in a non-retryable streaming request." + ); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); } - }; - } - /** - * Convert a structured JavaScript object with tagged headers into a binary - * event stream message. - */ - encode({ headers: rawHeaders, body }) { - const headers = this.headerMarshaller.format(rawHeaders); - const length = headers.byteLength + body.byteLength + 16; - const out = new Uint8Array(length); - const view = new DataView(out.buffer, out.byteOffset, out.byteLength); - const checksum = new import_crc322.Crc32(); - view.setUint32(0, length, false); - view.setUint32(4, headers.byteLength, false); - view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); - out.set(headers, 12); - out.set(body, headers.byteLength + 12); - view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); - return out; - } - /** - * Convert a binary event stream message into a JavaScript object with an - * opaque, binary body and tagged, parsed headers. - */ - decode(message) { - const { headers, body } = splitMessage(message); - return { headers: this.headerMarshaller.parse(headers), body }; + } + } else { + retryStrategy = retryStrategy; + if (retryStrategy == null ? void 0 : retryStrategy.mode) + context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); } - /** - * Convert a structured JavaScript object with tagged headers into a binary - * event stream message header. - */ - formatHeaders(rawHeaders) { - return this.headerMarshaller.format(rawHeaders); +}, "retryMiddleware"); +var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); +var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error) + }; + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; } + return errorInfo; +}, "getRetryErrorInfo"); +var getRetryErrorType = /* @__PURE__ */ __name((error) => { + if ((0, import_service_error_classification.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) + return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; +}, "getRetryErrorType"); +var retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true }; -__name(_EventStreamCodec, "EventStreamCodec"); -var EventStreamCodec = _EventStreamCodec; - -// src/MessageDecoderStream.ts -var _MessageDecoderStream = class _MessageDecoderStream { - constructor(options) { - this.options = options; - } - [Symbol.asyncIterator]() { - return this.asyncIterator(); - } - async *asyncIterator() { - for await (const bytes of this.options.inputStream) { - const decoded = this.options.decoder.decode(bytes); - yield decoded; - } +var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ + applyToStack: (clientStack) => { + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); } -}; -__name(_MessageDecoderStream, "MessageDecoderStream"); -var MessageDecoderStream = _MessageDecoderStream; +}), "getRetryPlugin"); +var getRetryAfterHint = /* @__PURE__ */ __name((response) => { + if (!import_protocol_http.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1e3); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; +}, "getRetryAfterHint"); +// Annotate the CommonJS export names for ESM import in node: -// src/MessageEncoderStream.ts -var _MessageEncoderStream = class _MessageEncoderStream { - constructor(options) { - this.options = options; +0 && (0); + + + +/***/ }), + +/***/ 8977: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isStreamingPayload = void 0; +const stream_1 = __nccwpck_require__(2781); +const isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable || + (typeof ReadableStream !== "undefined" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream); +exports.isStreamingPayload = isStreamingPayload; + + +/***/ }), + +/***/ 7761: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; } - [Symbol.asyncIterator]() { - return this.asyncIterator(); +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; } - async *asyncIterator() { - for await (const msg of this.options.messageStream) { - const encoded = this.options.encoder.encode(msg); - yield encoded; - } - if (this.options.includeEndFrame) { - yield new Uint8Array(0); - } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; } -}; -__name(_MessageEncoderStream, "MessageEncoderStream"); -var MessageEncoderStream = _MessageEncoderStream; - -// src/SmithyMessageDecoderStream.ts -var _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream { - constructor(options) { - this.options = options; +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; } - [Symbol.asyncIterator]() { - return this.asyncIterator(); +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; } - async *asyncIterator() { - for await (const message of this.options.messageStream) { - const deserialized = await this.options.deserializer(message); - if (deserialized === void 0) - continue; - yield deserialized; - } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; } -}; -__name(_SmithyMessageDecoderStream, "SmithyMessageDecoderStream"); -var SmithyMessageDecoderStream = _SmithyMessageDecoderStream; - -// src/SmithyMessageEncoderStream.ts -var _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream { - constructor(options) { - this.options = options; +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; } - [Symbol.asyncIterator]() { - return this.asyncIterator(); +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; } - async *asyncIterator() { - for await (const chunk of this.options.inputStream) { - const payloadBuf = this.options.serializer(chunk); - yield payloadBuf; - } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; } -}; -__name(_SmithyMessageEncoderStream, "SmithyMessageEncoderStream"); -var SmithyMessageEncoderStream = _SmithyMessageEncoderStream; -// Annotate the CommonJS export names for ESM import in node: +})); -0 && (0); +var _v = _interopRequireDefault(__nccwpck_require__(6310)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(9465)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(6001)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(8310)); + +var _nil = _interopRequireDefault(__nccwpck_require__(3436)); + +var _version = _interopRequireDefault(__nccwpck_require__(7780)); + +var _validate = _interopRequireDefault(__nccwpck_require__(6992)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(9618)); +var _parse = _interopRequireDefault(__nccwpck_require__(86)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 3081: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 1380: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +"use strict"; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - Hash: () => Hash -}); -module.exports = __toCommonJS(src_exports); -var import_util_buffer_from = __nccwpck_require__(1381); -var import_util_utf8 = __nccwpck_require__(1895); -var import_buffer = __nccwpck_require__(4300); -var import_crypto = __nccwpck_require__(6113); -var _Hash = class _Hash { - constructor(algorithmIdentifier, secret) { - this.algorithmIdentifier = algorithmIdentifier; - this.secret = secret; - this.reset(); - } - update(toHash, encoding) { - this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding))); - } - digest() { - return Promise.resolve(this.hash.digest()); - } - reset() { - this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier); - } -}; -__name(_Hash, "Hash"); -var Hash = _Hash; -function castSourceData(toCast, encoding) { - if (import_buffer.Buffer.isBuffer(toCast)) { - return toCast; - } - if (typeof toCast === "string") { - return (0, import_util_buffer_from.fromString)(toCast, encoding); - } - if (ArrayBuffer.isView(toCast)) { - return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); } - return (0, import_util_buffer_from.fromArrayBuffer)(toCast); + + return _crypto.default.createHash('md5').update(bytes).digest(); } -__name(castSourceData, "castSourceData"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +var _default = md5; +exports["default"] = _default; +/***/ }), +/***/ 4672: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ }), +"use strict"; -/***/ 780: -/***/ ((module) => { -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _default = { + randomUUID: _crypto.default.randomUUID }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +exports["default"] = _default; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - isArrayBuffer: () => isArrayBuffer -}); -module.exports = __toCommonJS(src_exports); -var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); -// Annotate the CommonJS export names for ESM import in node: +/***/ }), -0 && (0); +/***/ 3436: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; /***/ }), -/***/ 2800: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 86: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6992)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - contentLengthMiddleware: () => contentLengthMiddleware, - contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, - getContentLengthPlugin: () => getContentLengthPlugin -}); -module.exports = __toCommonJS(src_exports); -var import_protocol_http = __nccwpck_require__(4418); -var CONTENT_LENGTH_HEADER = "content-length"; -function contentLengthMiddleware(bodyLengthChecker) { - return (next) => async (args) => { - const request = args.request; - if (import_protocol_http.HttpRequest.isInstance(request)) { - const { body, headers } = request; - if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) { - try { - const length = bodyLengthChecker(body); - request.headers = { - ...request.headers, - [CONTENT_LENGTH_HEADER]: String(length) - }; - } catch (error) { - } - } - } - return next({ - ...args, - request - }); - }; + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; } -__name(contentLengthMiddleware, "contentLengthMiddleware"); -var contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", - override: true -}; -var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); - } -}), "getContentLengthPlugin"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 3194: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 8136: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} /***/ }), -/***/ 1518: +/***/ 6679: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointFromConfig = void 0; -const node_config_provider_1 = __nccwpck_require__(3461); -const getEndpointUrlConfig_1 = __nccwpck_require__(7574); -const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))(); -exports.getEndpointFromConfig = getEndpointFromConfig; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; /***/ }), -/***/ 7574: +/***/ 9618: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointUrlConfig = void 0; -const shared_ini_file_loader_1 = __nccwpck_require__(3507); -const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; -const CONFIG_ENDPOINT_URL = "endpoint_url"; -const getEndpointUrlConfig = (serviceId) => ({ - environmentVariableSelector: (env) => { - const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); - const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; - if (serviceEndpointUrl) - return serviceEndpointUrl; - const endpointUrl = env[ENV_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl) - return endpointUrl; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - default: undefined, -}); -exports.getEndpointUrlConfig = getEndpointUrlConfig; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; -/***/ }), +var _validate = _interopRequireDefault(__nccwpck_require__(6992)); -/***/ 2918: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; -// src/index.ts -var src_exports = {}; -__export(src_exports, { - endpointMiddleware: () => endpointMiddleware, - endpointMiddlewareOptions: () => endpointMiddlewareOptions, - getEndpointFromInstructions: () => getEndpointFromInstructions, - getEndpointPlugin: () => getEndpointPlugin, - resolveEndpointConfig: () => resolveEndpointConfig, - resolveParams: () => resolveParams, - toEndpointV1: () => toEndpointV1 -}); -module.exports = __toCommonJS(src_exports); +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} -// src/service-customizations/s3.ts -var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { - const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || ""; - if (typeof endpointParams.Bucket === "string") { - endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); - } - if (isArnBucketName(bucket)) { - if (endpointParams.ForcePathStyle === true) { - throw new Error("Path-style addressing cannot be used with ARN buckets"); - } - } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) { - endpointParams.ForcePathStyle = true; - } - if (endpointParams.DisableMultiRegionAccessPoints) { - endpointParams.disableMultiRegionAccessPoints = true; - endpointParams.DisableMRAP = true; - } - return endpointParams; -}, "resolveParamsForS3"); -var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; -var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; -var DOTS_PATTERN = /\.\./; -var isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName"); -var isArnBucketName = /* @__PURE__ */ __name((bucketName) => { - const [arn, partition, service, region, account, typeOrId] = bucketName.split(":"); - const isArn = arn === "arn" && bucketName.split(":").length >= 6; - const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5; - if (isArn && !isValidArn) { - throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); - } - return arn === "arn" && !!partition && !!service && !!account && !!typeOrId; -}, "isArnBucketName"); +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} -// src/adaptors/createConfigValueProvider.ts -var createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => { - const configProvider = /* @__PURE__ */ __name(async () => { - const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; - if (typeof configValue === "function") { - return configValue(); - } - return configValue; - }, "configProvider"); - if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope); - return configValue; - }; - } - if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { - return async () => { - const endpoint = await configProvider(); - if (endpoint && typeof endpoint === "object") { - if ("url" in endpoint) { - return endpoint.url.href; - } - if ("hostname" in endpoint) { - const { protocol, hostname, port, path } = endpoint; - return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; - } - } - return endpoint; - }; +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); } - return configProvider; -}, "createConfigValueProvider"); -// src/adaptors/getEndpointFromInstructions.ts -var import_getEndpointFromConfig = __nccwpck_require__(1518); + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 6310: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(8136)); + +var _stringify = __nccwpck_require__(9618); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); -// src/adaptors/toEndpointV1.ts -var import_url_parser = __nccwpck_require__(4681); -var toEndpointV1 = /* @__PURE__ */ __name((endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return (0, import_url_parser.parseUrl)(endpoint.url); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } - return endpoint; - } - return (0, import_url_parser.parseUrl)(endpoint); -}, "toEndpointV1"); -// src/adaptors/getEndpointFromInstructions.ts -var getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.endpoint) { - const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || ""); - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - } - } - const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); - if (typeof clientConfig.endpointProvider !== "function") { - throw new Error("config.endpointProvider is not set."); - } - const endpoint = clientConfig.endpointProvider(endpointParams, context); - return endpoint; -}, "getEndpointFromInstructions"); -var resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => { - var _a; - const endpointParams = {}; - const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {}; - for (const [name, instruction] of Object.entries(instructions)) { - switch (instruction.type) { - case "staticContextParams": - endpointParams[name] = instruction.value; - break; - case "contextParams": - endpointParams[name] = commandInput[instruction.name]; - break; - case "clientContextParams": - case "builtInParams": - endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); - break; - default: - throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; } - } - if (Object.keys(instructions).length === 0) { - Object.assign(endpointParams, clientConfig); - } - if (String(clientConfig.serviceId).toLowerCase() === "s3") { - await resolveParamsForS3(endpointParams); - } - return endpointParams; -}, "resolveParams"); + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. -// src/endpointMiddleware.ts -var import_util_middleware = __nccwpck_require__(2390); -var endpointMiddleware = /* @__PURE__ */ __name(({ - config, - instructions -}) => { - return (next, context) => async (args) => { - var _a, _b, _c; - const endpoint = await getEndpointFromInstructions( - args.input, - { - getEndpointParameterInstructions() { - return instructions; - } - }, - { ...config }, - context - ); - context.endpointV2 = endpoint; - context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes; - const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0]; - if (authScheme) { - context["signing_region"] = authScheme.signingRegion; - context["signing_service"] = authScheme.signingName; - const smithyContext = (0, import_util_middleware.getSmithyContext)(context); - const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption; - if (httpAuthOption) { - httpAuthOption.signingProperties = Object.assign( - httpAuthOption.signingProperties || {}, - { - signing_region: authScheme.signingRegion, - signingRegion: authScheme.signingRegion, - signing_service: authScheme.signingName, - signingName: authScheme.signingName, - signingRegionSet: authScheme.signingRegionSet - }, - authScheme.properties - ); - } - } - return next({ - ...args - }); - }; -}, "endpointMiddleware"); -// src/getEndpointPlugin.ts -var import_middleware_serde = __nccwpck_require__(1238); -var endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: import_middleware_serde.serializerMiddlewareOption.name -}; -var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo( - endpointMiddleware({ - config, - instructions - }), - endpointMiddlewareOptions - ); + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } -}), "getEndpointPlugin"); -// src/resolveEndpointConfig.ts + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch -var resolveEndpointConfig = /* @__PURE__ */ __name((input) => { - const tls = input.tls ?? true; - const { endpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0; - const isCustomEndpoint = !!endpoint; - return { - ...input, - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false), - useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false) - }; -}, "resolveEndpointConfig"); -// Annotate the CommonJS export names for ESM import in node: + msecs += 12219292800000; // `time_low` -0 && (0); + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version -/***/ }), + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) -/***/ 6039: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, - CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, - CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, - ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS, - ENV_RETRY_MODE: () => ENV_RETRY_MODE, - NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS, - NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS, - StandardRetryStrategy: () => StandardRetryStrategy, - defaultDelayDecider: () => defaultDelayDecider, - defaultRetryDecider: () => defaultRetryDecider, - getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin, - getRetryAfterHint: () => getRetryAfterHint, - getRetryPlugin: () => getRetryPlugin, - omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware, - omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions, - resolveRetryConfig: () => resolveRetryConfig, - retryMiddleware: () => retryMiddleware, - retryMiddlewareOptions: () => retryMiddlewareOptions -}); -module.exports = __toCommonJS(src_exports); + return buf || (0, _stringify.unsafeStringify)(b); +} -// src/AdaptiveRetryStrategy.ts +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 9465: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(2568)); + +var _md = _interopRequireDefault(__nccwpck_require__(1380)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 2568: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -// src/StandardRetryStrategy.ts -var import_protocol_http = __nccwpck_require__(4418); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; +var _stringify = __nccwpck_require__(9618); -var import_uuid = __nccwpck_require__(5840); +var _parse = _interopRequireDefault(__nccwpck_require__(86)); -// src/defaultRetryQuota.ts -var import_util_retry = __nccwpck_require__(4902); -var getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => { - const MAX_CAPACITY = initialRetryTokens; - const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT; - const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST; - const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST; - let availableCapacity = initialRetryTokens; - const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount"); - const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens"); - const retrieveRetryTokens = /* @__PURE__ */ __name((error) => { - if (!hasRetryTokens(error)) { - throw new Error("No retry token available"); - } - const capacityAmount = getCapacityAmount(error); - availableCapacity -= capacityAmount; - return capacityAmount; - }, "retrieveRetryTokens"); - const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => { - availableCapacity += capacityReleaseAmount ?? noRetryIncrement; - availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); - }, "releaseRetryTokens"); - return Object.freeze({ - hasRetryTokens, - retrieveRetryTokens, - releaseRetryTokens - }); -}, "getDefaultRetryQuota"); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// src/delayDecider.ts +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape -var defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider"); + const bytes = []; -// src/retryDecider.ts -var import_service_error_classification = __nccwpck_require__(6375); -var defaultRetryDecider = /* @__PURE__ */ __name((error) => { - if (!error) { - return false; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); } - return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error); -}, "defaultRetryDecider"); -// src/util.ts -var asSdkError = /* @__PURE__ */ __name((error) => { - if (error instanceof Error) - return error; - if (error instanceof Object) - return Object.assign(new Error(), error); - if (typeof error === "string") - return new Error(error); - return new Error(`AWS SDK error wrapper for ${error}`); -}, "asSdkError"); + return bytes; +} -// src/StandardRetryStrategy.ts -var _StandardRetryStrategy = class _StandardRetryStrategy { - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.mode = import_util_retry.RETRY_MODES.STANDARD; - this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider; - this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider; - this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS); - } - shouldRetry(error, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); - } - async getMaxAttempts() { - let maxAttempts; - try { - maxAttempts = await this.maxAttemptsProvider(); - } catch (error) { - maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS; - } - return maxAttempts; - } - async retry(next, args, options) { - let retryTokenAmount; - let attempts = 0; - let totalDelay = 0; - const maxAttempts = await this.getMaxAttempts(); - const { request } = args; - if (import_protocol_http.HttpRequest.isInstance(request)) { - request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); } - while (true) { - try { - if (import_protocol_http.HttpRequest.isInstance(request)) { - request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - if (options == null ? void 0 : options.beforeRequest) { - await options.beforeRequest(); - } - const { response, output } = await next(args); - if (options == null ? void 0 : options.afterRequest) { - options.afterRequest(response); - } - this.retryQuota.releaseRetryTokens(retryTokenAmount); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalDelay; - return { response, output }; - } catch (e) { - const err = asSdkError(e); - attempts++; - if (this.shouldRetry(err, attempts, maxAttempts)) { - retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); - const delayFromDecider = this.delayDecider( - (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, - attempts - ); - const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); - const delay = Math.max(delayFromResponse || 0, delayFromDecider); - totalDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - continue; - } - if (!err.$metadata) { - err.$metadata = {}; - } - err.$metadata.attempts = attempts; - err.$metadata.totalRetryDelay = totalDelay; - throw err; - } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); } - } -}; -__name(_StandardRetryStrategy, "StandardRetryStrategy"); -var StandardRetryStrategy = _StandardRetryStrategy; -var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1e3; - const retryAfterDate = new Date(retryAfter); - return retryAfterDate.getTime() - Date.now(); -}, "getDelayFromRetryAfterHeader"); -// src/AdaptiveRetryStrategy.ts -var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy { - constructor(maxAttemptsProvider, options) { - const { rateLimiter, ...superOptions } = options ?? {}; - super(maxAttemptsProvider, superOptions); - this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter(); - this.mode = import_util_retry.RETRY_MODES.ADAPTIVE; - } - async retry(next, args) { - return super.retry(next, args, { - beforeRequest: async () => { - return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { - this.rateLimiter.updateClientSendingRate(response); - } - }); - } -}; -__name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy"); -var AdaptiveRetryStrategy = _AdaptiveRetryStrategy; + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` -// src/configurations.ts -var import_util_middleware = __nccwpck_require__(2390); -var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; -var CONFIG_MAX_ATTEMPTS = "max_attempts"; -var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - configFileSelector: (profile) => { - const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return void 0; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - default: import_util_retry.DEFAULT_MAX_ATTEMPTS -}; -var resolveRetryConfig = /* @__PURE__ */ __name((input) => { - const { retryStrategy } = input; - const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); - return { - ...input, - maxAttempts, - retryStrategy: async () => { - if (retryStrategy) { - return retryStrategy; - } - const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)(); - if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) { - return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; } - return new import_util_retry.StandardRetryStrategy(maxAttempts); + + return buf; } - }; -}, "resolveRetryConfig"); -var ENV_RETRY_MODE = "AWS_RETRY_MODE"; -var CONFIG_RETRY_MODE = "retry_mode"; -var NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], - default: import_util_retry.DEFAULT_RETRY_MODE -}; -// src/omitRetryHeadersMiddleware.ts + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), +/***/ 6001: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => { - const { request } = args; - if (import_protocol_http.HttpRequest.isInstance(request)) { - delete request.headers[import_util_retry.INVOCATION_ID_HEADER]; - delete request.headers[import_util_retry.REQUEST_HEADER]; - } - return next(args); -}, "omitRetryHeadersMiddleware"); -var omitRetryHeadersMiddlewareOptions = { - name: "omitRetryHeadersMiddleware", - tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], - relation: "before", - toMiddleware: "awsAuthMiddleware", - override: true -}; -var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _native = _interopRequireDefault(__nccwpck_require__(4672)); + +var _rng = _interopRequireDefault(__nccwpck_require__(8136)); + +var _stringify = __nccwpck_require__(9618); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); } -}), "getOmitRetryHeadersPlugin"); -// src/retryMiddleware.ts + options = options || {}; + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` -var import_smithy_client = __nccwpck_require__(3570); + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided -var import_isStreamingPayload = __nccwpck_require__(8977); -var retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => { - var _a; - let retryStrategy = await options.retryStrategy(); - const maxAttempts = await options.maxAttempts(); - if (isRetryStrategyV2(retryStrategy)) { - retryStrategy = retryStrategy; - let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); - let lastError = new Error(); - let attempts = 0; - let totalRetryDelay = 0; - const { request } = args; - const isRequest = import_protocol_http.HttpRequest.isInstance(request); - if (isRequest) { - request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)(); - } - while (true) { - try { - if (isRequest) { - request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - const { response, output } = await next(args); - retryStrategy.recordSuccess(retryToken); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalRetryDelay; - return { response, output }; - } catch (e) { - const retryErrorInfo = getRetryErrorInfo(e); - lastError = asSdkError(e); - if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) { - (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn( - "An error was encountered in a non-retryable streaming request." - ); - throw lastError; - } - try { - retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); - } catch (refreshError) { - if (!lastError.$metadata) { - lastError.$metadata = {}; - } - lastError.$metadata.attempts = attempts + 1; - lastError.$metadata.totalRetryDelay = totalRetryDelay; - throw lastError; - } - attempts = retryToken.getRetryCount(); - const delay = retryToken.getRetryDelay(); - totalRetryDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - } + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - } else { - retryStrategy = retryStrategy; - if (retryStrategy == null ? void 0 : retryStrategy.mode) - context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]]; - return retryStrategy.retry(next, args); - } -}, "retryMiddleware"); -var isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2"); -var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { - const errorInfo = { - errorType: getRetryErrorType(error) - }; - const retryAfterHint = getRetryAfterHint(error.$response); - if (retryAfterHint) { - errorInfo.retryAfterHint = retryAfterHint; - } - return errorInfo; -}, "getRetryErrorInfo"); -var getRetryErrorType = /* @__PURE__ */ __name((error) => { - if ((0, import_service_error_classification.isThrottlingError)(error)) - return "THROTTLING"; - if ((0, import_service_error_classification.isTransientError)(error)) - return "TRANSIENT"; - if ((0, import_service_error_classification.isServerError)(error)) - return "SERVER_ERROR"; - return "CLIENT_ERROR"; -}, "getRetryErrorType"); -var retryMiddlewareOptions = { - name: "retryMiddleware", - tags: ["RETRY"], - step: "finalizeRequest", - priority: "high", - override: true -}; -var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { - clientStack.add(retryMiddleware(options), retryMiddlewareOptions); + + return buf; } -}), "getRetryPlugin"); -var getRetryAfterHint = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return new Date(retryAfterSeconds * 1e3); - const retryAfterDate = new Date(retryAfter); - return retryAfterDate; -}, "getRetryAfterHint"); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); + return (0, _stringify.unsafeStringify)(rnds); +} + +var _default = v4; +exports["default"] = _default; +/***/ }), + +/***/ 8310: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(2568)); +var _sha = _interopRequireDefault(__nccwpck_require__(6679)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; /***/ }), -/***/ 8977: +/***/ 6992: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isStreamingPayload = void 0; -const stream_1 = __nccwpck_require__(2781); -const isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable || - (typeof ReadableStream !== "undefined" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream); -exports.isStreamingPayload = isStreamingPayload; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(3194)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 7780: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(6992)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.slice(14, 15), 16); +} + +var _default = version; +exports["default"] = _default; /***/ }), @@ -13195,6 +14723,11 @@ var deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => ( if (!("$metadata" in error)) { const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; error.message += "\n " + hint; + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } } throw error; } @@ -13796,11 +15329,22 @@ __name(writeRequestBody, "writeRequestBody"); function writeBody(httpRequest, body) { if (body instanceof import_stream.Readable) { body.pipe(httpRequest); - } else if (body) { + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; + } + const uint8 = body; + if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } httpRequest.end(Buffer.from(body)); - } else { - httpRequest.end(); + return; } + httpRequest.end(); } __name(writeBody, "writeBody"); @@ -13808,6 +15352,7 @@ __name(writeBody, "writeBody"); var DEFAULT_REQUEST_TIMEOUT = 0; var _NodeHttpHandler = class _NodeHttpHandler { constructor(options) { + this.socketWarningTimestamp = 0; // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286 this.metadata = { handlerProtocol: "http/1.1" }; this.configProvider = new Promise((resolve, reject) => { @@ -13830,6 +15375,39 @@ var _NodeHttpHandler = class _NodeHttpHandler { } return new _NodeHttpHandler(instanceOrOptions); } + /** + * @internal + * + * @param agent - http(s) agent in use by the NodeHttpHandler instance. + * @returns timestamp of last emitted warning. + */ + static checkSocketUsage(agent, socketWarningTimestamp) { + var _a, _b; + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15e3; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0; + const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + console.warn( + "@smithy/node-http-handler:WARN", + `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`, + "See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html", + "or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config." + ); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } resolveDefaultConfig(options) { const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; const keepAlive = true; @@ -13837,8 +15415,18 @@ var _NodeHttpHandler = class _NodeHttpHandler { return { connectionTimeout, requestTimeout: requestTimeout ?? socketTimeout, - httpAgent: httpAgent || new import_http.Agent({ keepAlive, maxSockets }), - httpsAgent: httpsAgent || new import_https.Agent({ keepAlive, maxSockets }) + httpAgent: (() => { + if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === "function") { + return httpAgent; + } + return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === "function") { + return httpsAgent; + } + return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })() }; } destroy() { @@ -13850,10 +15438,12 @@ var _NodeHttpHandler = class _NodeHttpHandler { if (!this.config) { this.config = await this.configProvider; } + let socketCheckTimeoutId; return new Promise((_resolve, _reject) => { let writeRequestBodyPromise = void 0; const resolve = /* @__PURE__ */ __name(async (arg) => { await writeRequestBodyPromise; + clearTimeout(socketCheckTimeoutId); _resolve(arg); }, "resolve"); const reject = /* @__PURE__ */ __name(async (arg) => { @@ -13870,6 +15460,10 @@ var _NodeHttpHandler = class _NodeHttpHandler { return; } const isSSL = request.protocol === "https:"; + const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent; + socketCheckTimeoutId = setTimeout(() => { + this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp); + }, this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)); const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {}); let auth = void 0; if (request.username != null || request.password != null) { @@ -13890,7 +15484,7 @@ var _NodeHttpHandler = class _NodeHttpHandler { method: request.method, path, port: request.port, - agent: isSSL ? this.config.httpsAgent : this.config.httpAgent, + agent, auth }; const requestFunc = isSSL ? import_https.request : import_http.request; @@ -14813,6 +16407,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { + isClockSkewCorrectedError: () => isClockSkewCorrectedError, isClockSkewError: () => isClockSkewError, isRetryableByTrait: () => isRetryableByTrait, isServerError: () => isServerError, @@ -14854,13 +16449,17 @@ var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMED // src/index.ts var isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, "isRetryableByTrait"); var isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError"); +var isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => { + var _a; + return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected; +}, "isClockSkewCorrectedError"); var isThrottlingError = /* @__PURE__ */ __name((error) => { var _a, _b; return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true; }, "isThrottlingError"); var isTransientError = /* @__PURE__ */ __name((error) => { var _a; - return TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); + return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0); }, "isTransientError"); var isServerError = /* @__PURE__ */ __name((error) => { var _a; @@ -15106,7 +16705,7 @@ var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => { // src/getSsoSessionData.ts -var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.split(CONFIG_PREFIX_SEPARATOR)[1]]: value }), {}), "getSsoSessionData"); +var getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), "getSsoSessionData"); // src/loadSsoSessionData.ts var import_slurpFile2 = __nccwpck_require__(9155); @@ -15920,9 +17519,8 @@ var _ClassBuilder = class _ClassBuilder { /** * @public */ - constructor(input) { + constructor(...[input]) { super(); - this.input = input; /** * @internal */ @@ -15933,6 +17531,7 @@ var _ClassBuilder = class _ClassBuilder { */ // @ts-ignore used in middlewareFn closure. this.deserialize = closure._deserializer; + this.input = input ?? {}; closure._init(this); } /** @@ -17092,7 +18691,20 @@ __reExport(src_exports, __nccwpck_require__(4730), module.exports); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toBase64 = void 0; const util_buffer_from_1 = __nccwpck_require__(1381); -const toBase64 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +const util_utf8_1 = __nccwpck_require__(1895); +const toBase64 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); + } + else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + } + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +}; exports.toBase64 = toBase64; @@ -17134,7 +18746,7 @@ var calculateBodyLength = /* @__PURE__ */ __name((body) => { return 0; } if (typeof body === "string") { - return Buffer.from(body).length; + return Buffer.byteLength(body); } else if (typeof body.byteLength === "number") { return body.byteLength; } else if (typeof body.size === "number") { @@ -18626,7 +20238,15 @@ var toUint8Array = /* @__PURE__ */ __name((data) => { // src/toUtf8.ts -var toUtf8 = /* @__PURE__ */ __name((input) => (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"), "toUtf8"); +var toUtf8 = /* @__PURE__ */ __name((input) => { + if (typeof input === "string") { + return input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array."); + } + return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +}, "toUtf8"); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -22228,7 +23848,7 @@ module.exports = require("util"); /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"@aws-sdk/client-marketplace-catalog","description":"AWS SDK for JavaScript Marketplace Catalog Client for Node.js, Browser and React Native","version":"3.511.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-marketplace-catalog","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo marketplace-catalog"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.511.0","@aws-sdk/core":"3.511.0","@aws-sdk/credential-provider-node":"3.511.0","@aws-sdk/middleware-host-header":"3.511.0","@aws-sdk/middleware-logger":"3.511.0","@aws-sdk/middleware-recursion-detection":"3.511.0","@aws-sdk/middleware-signing":"3.511.0","@aws-sdk/middleware-user-agent":"3.511.0","@aws-sdk/region-config-resolver":"3.511.0","@aws-sdk/types":"3.511.0","@aws-sdk/util-endpoints":"3.511.0","@aws-sdk/util-user-agent-browser":"3.511.0","@aws-sdk/util-user-agent-node":"3.511.0","@smithy/config-resolver":"^2.1.1","@smithy/core":"^1.3.1","@smithy/fetch-http-handler":"^2.4.1","@smithy/hash-node":"^2.1.1","@smithy/invalid-dependency":"^2.1.1","@smithy/middleware-content-length":"^2.1.1","@smithy/middleware-endpoint":"^2.4.1","@smithy/middleware-retry":"^2.1.1","@smithy/middleware-serde":"^2.1.1","@smithy/middleware-stack":"^2.1.1","@smithy/node-config-provider":"^2.2.1","@smithy/node-http-handler":"^2.3.1","@smithy/protocol-http":"^3.1.1","@smithy/smithy-client":"^2.3.1","@smithy/types":"^2.9.1","@smithy/url-parser":"^2.1.1","@smithy/util-base64":"^2.1.1","@smithy/util-body-length-browser":"^2.1.1","@smithy/util-body-length-node":"^2.2.1","@smithy/util-defaults-mode-browser":"^2.1.1","@smithy/util-defaults-mode-node":"^2.1.1","@smithy/util-endpoints":"^1.1.1","@smithy/util-retry":"^2.1.1","@smithy/util-utf8":"^2.1.1","tslib":"^2.5.0","uuid":"^8.3.2"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.1.1","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","@types/uuid":"^8.3.0","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-marketplace-catalog","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-marketplace-catalog"}}'); +module.exports = JSON.parse('{"name":"@aws-sdk/client-marketplace-catalog","description":"AWS SDK for JavaScript Marketplace Catalog Client for Node.js, Browser and React Native","version":"3.545.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-marketplace-catalog","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo marketplace-catalog"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.540.0","@aws-sdk/core":"3.535.0","@aws-sdk/credential-provider-node":"3.540.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.0","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.0","@smithy/middleware-retry":"^2.2.0","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.0","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.0","@smithy/util-defaults-mode-node":"^2.3.0","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0","tslib":"^2.6.2","uuid":"^9.0.1"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","@types/uuid":"^9.0.4","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-marketplace-catalog","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-marketplace-catalog"}}'); /***/ }), @@ -22236,7 +23856,7 @@ module.exports = JSON.parse('{"name":"@aws-sdk/client-marketplace-catalog","desc /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"@aws-sdk/client-sso-oidc","description":"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native","version":"3.511.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.511.0","@aws-sdk/core":"3.511.0","@aws-sdk/middleware-host-header":"3.511.0","@aws-sdk/middleware-logger":"3.511.0","@aws-sdk/middleware-recursion-detection":"3.511.0","@aws-sdk/middleware-signing":"3.511.0","@aws-sdk/middleware-user-agent":"3.511.0","@aws-sdk/region-config-resolver":"3.511.0","@aws-sdk/types":"3.511.0","@aws-sdk/util-endpoints":"3.511.0","@aws-sdk/util-user-agent-browser":"3.511.0","@aws-sdk/util-user-agent-node":"3.511.0","@smithy/config-resolver":"^2.1.1","@smithy/core":"^1.3.1","@smithy/fetch-http-handler":"^2.4.1","@smithy/hash-node":"^2.1.1","@smithy/invalid-dependency":"^2.1.1","@smithy/middleware-content-length":"^2.1.1","@smithy/middleware-endpoint":"^2.4.1","@smithy/middleware-retry":"^2.1.1","@smithy/middleware-serde":"^2.1.1","@smithy/middleware-stack":"^2.1.1","@smithy/node-config-provider":"^2.2.1","@smithy/node-http-handler":"^2.3.1","@smithy/protocol-http":"^3.1.1","@smithy/smithy-client":"^2.3.1","@smithy/types":"^2.9.1","@smithy/url-parser":"^2.1.1","@smithy/util-base64":"^2.1.1","@smithy/util-body-length-browser":"^2.1.1","@smithy/util-body-length-node":"^2.2.1","@smithy/util-defaults-mode-browser":"^2.1.1","@smithy/util-defaults-mode-node":"^2.1.1","@smithy/util-endpoints":"^1.1.1","@smithy/util-retry":"^2.1.1","@smithy/util-utf8":"^2.1.1","tslib":"^2.5.0"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.1.1","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","peerDependencies":{"@aws-sdk/credential-provider-node":"^3.511.0"},"browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso-oidc"}}'); +module.exports = JSON.parse('{"name":"@aws-sdk/client-sso-oidc","description":"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native","version":"3.540.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.540.0","@aws-sdk/core":"3.535.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.0","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.0","@smithy/middleware-retry":"^2.2.0","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.0","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.0","@smithy/util-defaults-mode-node":"^2.3.0","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0","tslib":"^2.6.2"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","peerDependencies":{"@aws-sdk/credential-provider-node":"^3.540.0"},"browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso-oidc"}}'); /***/ }), @@ -22244,7 +23864,7 @@ module.exports = JSON.parse('{"name":"@aws-sdk/client-sso-oidc","description":"A /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.511.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.511.0","@aws-sdk/middleware-host-header":"3.511.0","@aws-sdk/middleware-logger":"3.511.0","@aws-sdk/middleware-recursion-detection":"3.511.0","@aws-sdk/middleware-user-agent":"3.511.0","@aws-sdk/region-config-resolver":"3.511.0","@aws-sdk/types":"3.511.0","@aws-sdk/util-endpoints":"3.511.0","@aws-sdk/util-user-agent-browser":"3.511.0","@aws-sdk/util-user-agent-node":"3.511.0","@smithy/config-resolver":"^2.1.1","@smithy/core":"^1.3.1","@smithy/fetch-http-handler":"^2.4.1","@smithy/hash-node":"^2.1.1","@smithy/invalid-dependency":"^2.1.1","@smithy/middleware-content-length":"^2.1.1","@smithy/middleware-endpoint":"^2.4.1","@smithy/middleware-retry":"^2.1.1","@smithy/middleware-serde":"^2.1.1","@smithy/middleware-stack":"^2.1.1","@smithy/node-config-provider":"^2.2.1","@smithy/node-http-handler":"^2.3.1","@smithy/protocol-http":"^3.1.1","@smithy/smithy-client":"^2.3.1","@smithy/types":"^2.9.1","@smithy/url-parser":"^2.1.1","@smithy/util-base64":"^2.1.1","@smithy/util-body-length-browser":"^2.1.1","@smithy/util-body-length-node":"^2.2.1","@smithy/util-defaults-mode-browser":"^2.1.1","@smithy/util-defaults-mode-node":"^2.1.1","@smithy/util-endpoints":"^1.1.1","@smithy/util-retry":"^2.1.1","@smithy/util-utf8":"^2.1.1","tslib":"^2.5.0"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.1.1","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); +module.exports = JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.540.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.535.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.0","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.0","@smithy/middleware-retry":"^2.2.0","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.0","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.0","@smithy/util-defaults-mode-node":"^2.3.0","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0","tslib":"^2.6.2"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); /***/ }), @@ -22252,7 +23872,7 @@ module.exports = JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SD /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.511.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn test:unit","test:unit":"jest"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.511.0","@aws-sdk/middleware-host-header":"3.511.0","@aws-sdk/middleware-logger":"3.511.0","@aws-sdk/middleware-recursion-detection":"3.511.0","@aws-sdk/middleware-user-agent":"3.511.0","@aws-sdk/region-config-resolver":"3.511.0","@aws-sdk/types":"3.511.0","@aws-sdk/util-endpoints":"3.511.0","@aws-sdk/util-user-agent-browser":"3.511.0","@aws-sdk/util-user-agent-node":"3.511.0","@smithy/config-resolver":"^2.1.1","@smithy/core":"^1.3.1","@smithy/fetch-http-handler":"^2.4.1","@smithy/hash-node":"^2.1.1","@smithy/invalid-dependency":"^2.1.1","@smithy/middleware-content-length":"^2.1.1","@smithy/middleware-endpoint":"^2.4.1","@smithy/middleware-retry":"^2.1.1","@smithy/middleware-serde":"^2.1.1","@smithy/middleware-stack":"^2.1.1","@smithy/node-config-provider":"^2.2.1","@smithy/node-http-handler":"^2.3.1","@smithy/protocol-http":"^3.1.1","@smithy/smithy-client":"^2.3.1","@smithy/types":"^2.9.1","@smithy/url-parser":"^2.1.1","@smithy/util-base64":"^2.1.1","@smithy/util-body-length-browser":"^2.1.1","@smithy/util-body-length-node":"^2.2.1","@smithy/util-defaults-mode-browser":"^2.1.1","@smithy/util-defaults-mode-node":"^2.1.1","@smithy/util-endpoints":"^1.1.1","@smithy/util-middleware":"^2.1.1","@smithy/util-retry":"^2.1.1","@smithy/util-utf8":"^2.1.1","fast-xml-parser":"4.2.5","tslib":"^2.5.0"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.1.1","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","peerDependencies":{"@aws-sdk/credential-provider-node":"^3.511.0"},"browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); +module.exports = JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.540.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn test:unit","test:unit":"jest"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.535.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.0","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.0","@smithy/middleware-retry":"^2.2.0","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.0","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.0","@smithy/util-defaults-mode-node":"^2.3.0","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0","tslib":"^2.6.2"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","peerDependencies":{"@aws-sdk/credential-provider-node":"^3.540.0"},"browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); /***/ }) diff --git a/dist/index.js.map b/dist/index.js.map index 8c56383..4d2e0cf 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiDA;;;;;;;;;ACv4CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA8BA;;;;;;;;;ACj/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;;;;;;;;;ACnmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkCA;;;;;;;;;ACp9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;;;;;;;;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;ACnZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;;;;;;;;AC5eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;;;;;;;;AC1aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBA;;;;;;;;;ACvaA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;AC7TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;ACjnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;AC5OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;;;;;;;;ACldA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA4DA;;;;;;;;ACvuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;;;;;;;;ACneA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;;;;;;;;;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpaA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;AEDA;AACA;AACA;AACA","sources":[".././lib/main.js",".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@aws-crypto/crc32/build/aws_crc32.js",".././node_modules/@aws-crypto/crc32/build/index.js",".././node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.js",".././node_modules/@aws-crypto/util/build/convertToBuffer.js",".././node_modules/@aws-crypto/util/build/index.js",".././node_modules/@aws-crypto/util/build/isEmptyData.js",".././node_modules/@aws-crypto/util/build/numToUint8.js",".././node_modules/@aws-crypto/util/build/uint32ArrayFrom.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/index.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/credentialDefaultProvider.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/credentialDefaultProvider.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js",".././node_modules/@aws-sdk/core/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/loadSts.js",".././node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-signing/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js",".././node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js",".././node_modules/@aws-sdk/token-providers/dist-cjs/index.js",".././node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js",".././node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js",".././node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js",".././node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js",".././node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js",".././node_modules/@smithy/config-resolver/dist-cjs/index.js",".././node_modules/@smithy/core/dist-cjs/index.js",".././node_modules/@smithy/credential-provider-imds/dist-cjs/index.js",".././node_modules/@smithy/eventstream-codec/dist-cjs/index.js",".././node_modules/@smithy/hash-node/dist-cjs/index.js",".././node_modules/@smithy/is-array-buffer/dist-cjs/index.js",".././node_modules/@smithy/middleware-content-length/dist-cjs/index.js",".././node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js",".././node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js",".././node_modules/@smithy/middleware-endpoint/dist-cjs/index.js",".././node_modules/@smithy/middleware-retry/dist-cjs/index.js",".././node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js",".././node_modules/@smithy/middleware-serde/dist-cjs/index.js",".././node_modules/@smithy/middleware-stack/dist-cjs/index.js",".././node_modules/@smithy/node-config-provider/dist-cjs/index.js",".././node_modules/@smithy/node-http-handler/dist-cjs/index.js",".././node_modules/@smithy/property-provider/dist-cjs/index.js",".././node_modules/@smithy/protocol-http/dist-cjs/index.js",".././node_modules/@smithy/querystring-builder/dist-cjs/index.js",".././node_modules/@smithy/querystring-parser/dist-cjs/index.js",".././node_modules/@smithy/service-error-classification/dist-cjs/index.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js",".././node_modules/@smithy/signature-v4/dist-cjs/index.js",".././node_modules/@smithy/smithy-client/dist-cjs/index.js",".././node_modules/@smithy/types/dist-cjs/index.js",".././node_modules/@smithy/url-parser/dist-cjs/index.js",".././node_modules/@smithy/util-base64/dist-cjs/fromBase64.js",".././node_modules/@smithy/util-base64/dist-cjs/index.js",".././node_modules/@smithy/util-base64/dist-cjs/toBase64.js",".././node_modules/@smithy/util-body-length-node/dist-cjs/index.js",".././node_modules/@smithy/util-buffer-from/dist-cjs/index.js",".././node_modules/@smithy/util-config-provider/dist-cjs/index.js",".././node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js",".././node_modules/@smithy/util-endpoints/dist-cjs/index.js",".././node_modules/@smithy/util-hex-encoding/dist-cjs/index.js",".././node_modules/@smithy/util-middleware/dist-cjs/index.js",".././node_modules/@smithy/util-retry/dist-cjs/index.js",".././node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js",".././node_modules/@smithy/util-stream/dist-cjs/index.js",".././node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js",".././node_modules/@smithy/util-uri-escape/dist-cjs/index.js",".././node_modules/@smithy/util-utf8/dist-cjs/index.js",".././node_modules/fast-xml-parser/src/fxp.js",".././node_modules/fast-xml-parser/src/util.js",".././node_modules/fast-xml-parser/src/validator.js",".././node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js",".././node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js",".././node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js",".././node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js",".././node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js",".././node_modules/fast-xml-parser/src/xmlparser/XMLParser.js",".././node_modules/fast-xml-parser/src/xmlparser/node2json.js",".././node_modules/fast-xml-parser/src/xmlparser/xmlNode.js",".././node_modules/strnum/strnum.js",".././node_modules/tslib/tslib.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/uuid/dist/index.js",".././node_modules/uuid/dist/md5.js",".././node_modules/uuid/dist/nil.js",".././node_modules/uuid/dist/parse.js",".././node_modules/uuid/dist/regex.js",".././node_modules/uuid/dist/rng.js",".././node_modules/uuid/dist/sha1.js",".././node_modules/uuid/dist/stringify.js",".././node_modules/uuid/dist/v1.js",".././node_modules/uuid/dist/v3.js",".././node_modules/uuid/dist/v35.js",".././node_modules/uuid/dist/v4.js",".././node_modules/uuid/dist/v5.js",".././node_modules/uuid/dist/validate.js",".././node_modules/uuid/dist/version.js","../external node-commonjs \"assert\"","../external node-commonjs \"buffer\"","../external node-commonjs \"child_process\"","../external node-commonjs \"crypto\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"fs/promises\"","../external node-commonjs \"http\"","../external node-commonjs \"http2\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"process\"","../external node-commonjs \"stream\"","../external node-commonjs \"tls\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../webpack/bootstrap","../webpack/runtime/compat","../webpack/before-startup","../webpack/startup","../webpack/after-startup"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst aws = __importStar(require(\"@aws-sdk/client-marketplace-catalog\"));\nfunction run() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const client = new aws.MarketplaceCatalogClient({ region: 'us-east-1' });\n const productID = core.getInput('product-id', { required: true });\n core.setSecret(productID);\n const version = core.getInput('version', { required: true });\n const registry = core.getInput('registry', { required: true });\n const releaseNotes = core.getInput('release-notes');\n const description = core.getInput('description');\n const usageInstructions = core.getInput('usage-instructions');\n const details = {\n Version: {\n VersionTitle: version,\n ReleaseNotes: releaseNotes,\n },\n DeliveryOptions: [\n {\n DeliveryOptionTitle: 'EKSDelivery',\n Details: {\n EcrDeliveryOptionDetails: {\n DeploymentResources: [],\n ContainerImages: [registry],\n CompatibleServices: ['EKS'],\n Description: description,\n UsageInstructions: usageInstructions,\n },\n },\n },\n ],\n };\n const params = {\n Catalog: 'AWSMarketplace',\n ChangeSet: [\n {\n ChangeType: 'AddDeliveryOptions',\n Entity: {\n Identifier: productID,\n Type: 'ContainerProduct@1.0',\n },\n Details: JSON.stringify(details),\n },\n ],\n };\n const result = yield client.send(new aws.StartChangeSetCommand(params));\n core.info(JSON.stringify(result, null, 2));\n if (((_a = result.$metadata.httpStatusCode) === null || _a === void 0 ? void 0 : _a.toString()) !== '200') {\n core.setFailed(`Failed to start change set: ${result.$metadata.httpStatusCode}`);\n }\n }\n catch (error) {\n if (error instanceof Error)\n core.setFailed(error.message);\n }\n });\n}\nrun();\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n return new URL(proxyVar);\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar index_1 = require(\"./index\");\nvar AwsCrc32 = /** @class */ (function () {\n function AwsCrc32() {\n this.crc32 = new index_1.Crc32();\n }\n AwsCrc32.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash))\n return;\n this.crc32.update((0, util_1.convertToBuffer)(toHash));\n };\n AwsCrc32.prototype.digest = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())];\n });\n });\n };\n AwsCrc32.prototype.reset = function () {\n this.crc32 = new index_1.Crc32();\n };\n return AwsCrc32;\n}());\nexports.AwsCrc32 = AwsCrc32;\n//# sourceMappingURL=aws_crc32.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nfunction crc32(data) {\n return new Crc32().update(data).digest();\n}\nexports.crc32 = crc32;\nvar Crc32 = /** @class */ (function () {\n function Crc32() {\n this.checksum = 0xffffffff;\n }\n Crc32.prototype.update = function (data) {\n var e_1, _a;\n try {\n for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var byte = data_1_1.value;\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n Crc32.prototype.digest = function () {\n return (this.checksum ^ 0xffffffff) >>> 0;\n };\n return Crc32;\n}());\nexports.Crc32 = Crc32;\n// prettier-ignore\nvar a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nvar lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);\nvar aws_crc32_1 = require(\"./aws_crc32\");\nObject.defineProperty(exports, \"AwsCrc32\", { enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } });\n//# sourceMappingURL=index.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __createBinding = function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n };\r\n\r\n __exportStar = function (m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n };\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToBuffer = void 0;\nvar util_utf8_browser_1 = require(\"@aws-sdk/util-utf8-browser\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : util_utf8_browser_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\nexports.convertToBuffer = convertToBuffer;\n//# sourceMappingURL=convertToBuffer.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=isEmptyData.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\nexports.numToUint8 = numToUint8;\n//# sourceMappingURL=numToUint8.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;\n//# sourceMappingURL=uint32ArrayFrom.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst s = \"required\", t = \"fn\", u = \"argv\", v = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = { [s]: false, \"type\": \"String\" }, i = { [s]: true, \"default\": false, \"type\": \"Boolean\" }, j = { [v]: \"Endpoint\" }, k = { [t]: c, [u]: [{ [v]: \"UseFIPS\" }, true] }, l = { [t]: c, [u]: [{ [v]: \"UseDualStack\" }, true] }, m = {}, n = { [t]: \"getAttr\", [u]: [{ [v]: g }, \"supportsFIPS\"] }, o = { [t]: c, [u]: [true, { [t]: \"getAttr\", [u]: [{ [v]: g }, \"supportsDualStack\"] }] }, p = [k], q = [l], r = [{ [v]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: q, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: \"aws.partition\", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: \"https://catalog.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: m, headers: m }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: \"https://catalog.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: m, headers: m }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: \"https://catalog.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: m, headers: m }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://catalog.marketplace.{Region}.{PartitionResult#dnsSuffix}\", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AccessDeniedException: () => AccessDeniedException,\n AmiProductSortBy: () => AmiProductSortBy,\n AmiProductVisibilityString: () => AmiProductVisibilityString,\n BatchDescribeEntitiesCommand: () => BatchDescribeEntitiesCommand,\n CancelChangeSetCommand: () => CancelChangeSetCommand,\n ChangeStatus: () => ChangeStatus,\n ContainerProductSortBy: () => ContainerProductSortBy,\n ContainerProductVisibilityString: () => ContainerProductVisibilityString,\n DataProductSortBy: () => DataProductSortBy,\n DataProductVisibilityString: () => DataProductVisibilityString,\n DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand,\n DescribeChangeSetCommand: () => DescribeChangeSetCommand,\n DescribeEntityCommand: () => DescribeEntityCommand,\n EntityTypeFilters: () => EntityTypeFilters,\n EntityTypeSort: () => EntityTypeSort,\n FailureCode: () => FailureCode,\n GetResourcePolicyCommand: () => GetResourcePolicyCommand,\n InternalServiceException: () => InternalServiceException,\n ListChangeSetsCommand: () => ListChangeSetsCommand,\n ListEntitiesCommand: () => ListEntitiesCommand,\n ListTagsForResourceCommand: () => ListTagsForResourceCommand,\n MarketplaceCatalog: () => MarketplaceCatalog,\n MarketplaceCatalogClient: () => MarketplaceCatalogClient,\n MarketplaceCatalogServiceException: () => MarketplaceCatalogServiceException,\n OfferSortBy: () => OfferSortBy,\n OfferStateString: () => OfferStateString,\n OfferTargetingString: () => OfferTargetingString,\n OwnershipType: () => OwnershipType,\n PutResourcePolicyCommand: () => PutResourcePolicyCommand,\n ResaleAuthorizationSortBy: () => ResaleAuthorizationSortBy,\n ResaleAuthorizationStatusString: () => ResaleAuthorizationStatusString,\n ResourceInUseException: () => ResourceInUseException,\n ResourceNotFoundException: () => ResourceNotFoundException,\n ResourceNotSupportedException: () => ResourceNotSupportedException,\n SaaSProductSortBy: () => SaaSProductSortBy,\n SaaSProductVisibilityString: () => SaaSProductVisibilityString,\n ServiceQuotaExceededException: () => ServiceQuotaExceededException,\n SortOrder: () => SortOrder,\n StartChangeSetCommand: () => StartChangeSetCommand,\n TagResourceCommand: () => TagResourceCommand,\n ThrottlingException: () => ThrottlingException,\n UntagResourceCommand: () => UntagResourceCommand,\n ValidationException: () => ValidationException,\n __Client: () => import_smithy_client.Client,\n paginateListChangeSets: () => paginateListChangeSets,\n paginateListEntities: () => paginateListEntities\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MarketplaceCatalogClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_signing = require(\"@aws-sdk/middleware-signing\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"aws-marketplace\"\n };\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/MarketplaceCatalogClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar asPartial = /* @__PURE__ */ __name((t) => t, \"asPartial\");\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)\n };\n}, \"resolveRuntimeExtensions\");\n\n// src/MarketplaceCatalogClient.ts\nvar _MarketplaceCatalogClient = class _MarketplaceCatalogClient extends import_smithy_client.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);\n const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);\n const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n__name(_MarketplaceCatalogClient, \"MarketplaceCatalogClient\");\nvar MarketplaceCatalogClient = _MarketplaceCatalogClient;\n\n// src/MarketplaceCatalog.ts\n\n\n// src/commands/BatchDescribeEntitiesCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core = require(\"@smithy/core\");\n\nvar import_uuid = require(\"uuid\");\n\n// src/models/MarketplaceCatalogServiceException.ts\n\nvar _MarketplaceCatalogServiceException = class _MarketplaceCatalogServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _MarketplaceCatalogServiceException.prototype);\n }\n};\n__name(_MarketplaceCatalogServiceException, \"MarketplaceCatalogServiceException\");\nvar MarketplaceCatalogServiceException = _MarketplaceCatalogServiceException;\n\n// src/models/models_0.ts\nvar _AccessDeniedException = class _AccessDeniedException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"AccessDeniedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _AccessDeniedException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_AccessDeniedException, \"AccessDeniedException\");\nvar AccessDeniedException = _AccessDeniedException;\nvar AmiProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\"\n};\nvar AmiProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar SortOrder = {\n ASCENDING: \"ASCENDING\",\n DESCENDING: \"DESCENDING\"\n};\nvar _InternalServiceException = class _InternalServiceException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalServiceException\",\n $fault: \"server\",\n ...opts\n });\n this.name = \"InternalServiceException\";\n this.$fault = \"server\";\n Object.setPrototypeOf(this, _InternalServiceException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_InternalServiceException, \"InternalServiceException\");\nvar InternalServiceException = _InternalServiceException;\nvar _ThrottlingException = class _ThrottlingException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ThrottlingException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ThrottlingException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ThrottlingException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ThrottlingException, \"ThrottlingException\");\nvar ThrottlingException = _ThrottlingException;\nvar _ValidationException = class _ValidationException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ValidationException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ValidationException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ValidationException, \"ValidationException\");\nvar ValidationException = _ValidationException;\nvar _ResourceInUseException = class _ResourceInUseException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceInUseException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceInUseException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceInUseException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ResourceInUseException, \"ResourceInUseException\");\nvar ResourceInUseException = _ResourceInUseException;\nvar _ResourceNotFoundException = class _ResourceNotFoundException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceNotFoundException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ResourceNotFoundException, \"ResourceNotFoundException\");\nvar ResourceNotFoundException = _ResourceNotFoundException;\nvar FailureCode = {\n ClientError: \"CLIENT_ERROR\",\n ServerFault: \"SERVER_FAULT\"\n};\nvar ChangeStatus = {\n APPLYING: \"APPLYING\",\n CANCELLED: \"CANCELLED\",\n FAILED: \"FAILED\",\n PREPARING: \"PREPARING\",\n SUCCEEDED: \"SUCCEEDED\"\n};\nvar _ResourceNotSupportedException = class _ResourceNotSupportedException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotSupportedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceNotSupportedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceNotSupportedException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ResourceNotSupportedException, \"ResourceNotSupportedException\");\nvar ResourceNotSupportedException = _ResourceNotSupportedException;\nvar ContainerProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\"\n};\nvar DataProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\",\n Unavailable: \"Unavailable\"\n};\nvar OfferStateString = {\n Draft: \"Draft\",\n Released: \"Released\"\n};\nvar OfferTargetingString = {\n BuyerAccounts: \"BuyerAccounts\",\n CountryCodes: \"CountryCodes\",\n None: \"None\",\n ParticipatingPrograms: \"ParticipatingPrograms\"\n};\nvar ResaleAuthorizationStatusString = {\n Active: \"Active\",\n Draft: \"Draft\",\n Restricted: \"Restricted\"\n};\nvar SaaSProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\"\n};\nvar EntityTypeFilters;\n((EntityTypeFilters3) => {\n EntityTypeFilters3.visit = /* @__PURE__ */ __name((value, visitor) => {\n if (value.DataProductFilters !== void 0)\n return visitor.DataProductFilters(value.DataProductFilters);\n if (value.SaaSProductFilters !== void 0)\n return visitor.SaaSProductFilters(value.SaaSProductFilters);\n if (value.AmiProductFilters !== void 0)\n return visitor.AmiProductFilters(value.AmiProductFilters);\n if (value.OfferFilters !== void 0)\n return visitor.OfferFilters(value.OfferFilters);\n if (value.ContainerProductFilters !== void 0)\n return visitor.ContainerProductFilters(value.ContainerProductFilters);\n if (value.ResaleAuthorizationFilters !== void 0)\n return visitor.ResaleAuthorizationFilters(value.ResaleAuthorizationFilters);\n return visitor._(value.$unknown[0], value.$unknown[1]);\n }, \"visit\");\n})(EntityTypeFilters || (EntityTypeFilters = {}));\nvar ContainerProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar DataProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar OfferSortBy = {\n AvailabilityEndDate: \"AvailabilityEndDate\",\n BuyerAccounts: \"BuyerAccounts\",\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n Name: \"Name\",\n ProductId: \"ProductId\",\n ReleaseDate: \"ReleaseDate\",\n State: \"State\",\n Targeting: \"Targeting\"\n};\nvar ResaleAuthorizationSortBy = {\n AvailabilityEndDate: \"AvailabilityEndDate\",\n CreatedDate: \"CreatedDate\",\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ManufacturerAccountId: \"ManufacturerAccountId\",\n ManufacturerLegalName: \"ManufacturerLegalName\",\n Name: \"Name\",\n OfferExtendedStatus: \"OfferExtendedStatus\",\n ProductId: \"ProductId\",\n ProductName: \"ProductName\",\n ResellerAccountID: \"ResellerAccountID\",\n ResellerLegalName: \"ResellerLegalName\",\n Status: \"Status\"\n};\nvar SaaSProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar EntityTypeSort;\n((EntityTypeSort3) => {\n EntityTypeSort3.visit = /* @__PURE__ */ __name((value, visitor) => {\n if (value.DataProductSort !== void 0)\n return visitor.DataProductSort(value.DataProductSort);\n if (value.SaaSProductSort !== void 0)\n return visitor.SaaSProductSort(value.SaaSProductSort);\n if (value.AmiProductSort !== void 0)\n return visitor.AmiProductSort(value.AmiProductSort);\n if (value.OfferSort !== void 0)\n return visitor.OfferSort(value.OfferSort);\n if (value.ContainerProductSort !== void 0)\n return visitor.ContainerProductSort(value.ContainerProductSort);\n if (value.ResaleAuthorizationSort !== void 0)\n return visitor.ResaleAuthorizationSort(value.ResaleAuthorizationSort);\n return visitor._(value.$unknown[0], value.$unknown[1]);\n }, \"visit\");\n})(EntityTypeSort || (EntityTypeSort = {}));\nvar OwnershipType = {\n SELF: \"SELF\",\n SHARED: \"SHARED\"\n};\nvar _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ServiceQuotaExceededException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ServiceQuotaExceededException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ServiceQuotaExceededException, \"ServiceQuotaExceededException\");\nvar ServiceQuotaExceededException = _ServiceQuotaExceededException;\n\n// src/protocols/Aws_restJson1.ts\nvar se_BatchDescribeEntitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/BatchDescribeEntities\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n EntityRequestList: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_BatchDescribeEntitiesCommand\");\nvar se_CancelChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/CancelChangeSet\");\n const query = (0, import_smithy_client.map)({\n [_c]: [, (0, import_smithy_client.expectNonNull)(input[_C], `Catalog`)],\n [_cSI]: [, (0, import_smithy_client.expectNonNull)(input[_CSI], `ChangeSetId`)]\n });\n let body;\n b.m(\"PATCH\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_CancelChangeSetCommand\");\nvar se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/DeleteResourcePolicy\");\n const query = (0, import_smithy_client.map)({\n [_rA]: [, (0, import_smithy_client.expectNonNull)(input[_RA], `ResourceArn`)]\n });\n let body;\n b.m(\"DELETE\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_DeleteResourcePolicyCommand\");\nvar se_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/DescribeChangeSet\");\n const query = (0, import_smithy_client.map)({\n [_c]: [, (0, import_smithy_client.expectNonNull)(input[_C], `Catalog`)],\n [_cSI]: [, (0, import_smithy_client.expectNonNull)(input[_CSI], `ChangeSetId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_DescribeChangeSetCommand\");\nvar se_DescribeEntityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/DescribeEntity\");\n const query = (0, import_smithy_client.map)({\n [_c]: [, (0, import_smithy_client.expectNonNull)(input[_C], `Catalog`)],\n [_eI]: [, (0, import_smithy_client.expectNonNull)(input[_EI], `EntityId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_DescribeEntityCommand\");\nvar se_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/GetResourcePolicy\");\n const query = (0, import_smithy_client.map)({\n [_rA]: [, (0, import_smithy_client.expectNonNull)(input[_RA], `ResourceArn`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_GetResourcePolicyCommand\");\nvar se_ListChangeSetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/ListChangeSets\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Catalog: [],\n FilterList: (_) => (0, import_smithy_client._json)(_),\n MaxResults: [],\n NextToken: [],\n Sort: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_ListChangeSetsCommand\");\nvar se_ListEntitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/ListEntities\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Catalog: [],\n EntityType: [],\n EntityTypeFilters: (_) => (0, import_smithy_client._json)(_),\n EntityTypeSort: (_) => (0, import_smithy_client._json)(_),\n FilterList: (_) => (0, import_smithy_client._json)(_),\n MaxResults: [],\n NextToken: [],\n OwnershipType: [],\n Sort: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_ListEntitiesCommand\");\nvar se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/ListTagsForResource\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n ResourceArn: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_ListTagsForResourceCommand\");\nvar se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/PutResourcePolicy\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Policy: [],\n ResourceArn: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_PutResourcePolicyCommand\");\nvar se_StartChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/StartChangeSet\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Catalog: [],\n ChangeSet: (_) => se_RequestedChangeList(_, context),\n ChangeSetName: [],\n ChangeSetTags: (_) => (0, import_smithy_client._json)(_),\n ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()]\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_StartChangeSetCommand\");\nvar se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/TagResource\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n ResourceArn: [],\n Tags: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_TagResourceCommand\");\nvar se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/UntagResource\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n ResourceArn: [],\n TagKeys: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_UntagResourceCommand\");\nvar de_BatchDescribeEntitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n EntityDetails: (_) => de_EntityDetails(_, context),\n Errors: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_BatchDescribeEntitiesCommand\");\nvar de_CancelChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSetArn: import_smithy_client.expectString,\n ChangeSetId: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CancelChangeSetCommand\");\nvar de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_DeleteResourcePolicyCommand\");\nvar de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSet: (_) => de_ChangeSetDescription(_, context),\n ChangeSetArn: import_smithy_client.expectString,\n ChangeSetId: import_smithy_client.expectString,\n ChangeSetName: import_smithy_client.expectString,\n EndTime: import_smithy_client.expectString,\n FailureCode: import_smithy_client.expectString,\n FailureDescription: import_smithy_client.expectString,\n StartTime: import_smithy_client.expectString,\n Status: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_DescribeChangeSetCommand\");\nvar de_DescribeEntityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n Details: import_smithy_client.expectString,\n DetailsDocument: (_) => de_JsonDocumentType(_, context),\n EntityArn: import_smithy_client.expectString,\n EntityIdentifier: import_smithy_client.expectString,\n EntityType: import_smithy_client.expectString,\n LastModifiedDate: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_DescribeEntityCommand\");\nvar de_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n Policy: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_GetResourcePolicyCommand\");\nvar de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSetSummaryList: import_smithy_client._json,\n NextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListChangeSetsCommand\");\nvar de_ListEntitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n EntitySummaryList: import_smithy_client._json,\n NextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListEntitiesCommand\");\nvar de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ResourceArn: import_smithy_client.expectString,\n Tags: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListTagsForResourceCommand\");\nvar de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_PutResourcePolicyCommand\");\nvar de_StartChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSetArn: import_smithy_client.expectString,\n ChangeSetId: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_StartChangeSetCommand\");\nvar de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_TagResourceCommand\");\nvar de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_UntagResourceCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context)\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.marketplacecatalog#AccessDeniedException\":\n throw await de_AccessDeniedExceptionRes(parsedOutput, context);\n case \"InternalServiceException\":\n case \"com.amazonaws.marketplacecatalog#InternalServiceException\":\n throw await de_InternalServiceExceptionRes(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.marketplacecatalog#ThrottlingException\":\n throw await de_ThrottlingExceptionRes(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.marketplacecatalog#ValidationException\":\n throw await de_ValidationExceptionRes(parsedOutput, context);\n case \"ResourceInUseException\":\n case \"com.amazonaws.marketplacecatalog#ResourceInUseException\":\n throw await de_ResourceInUseExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.marketplacecatalog#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"ResourceNotSupportedException\":\n case \"com.amazonaws.marketplacecatalog#ResourceNotSupportedException\":\n throw await de_ResourceNotSupportedExceptionRes(parsedOutput, context);\n case \"ServiceQuotaExceededException\":\n case \"com.amazonaws.marketplacecatalog#ServiceQuotaExceededException\":\n throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(MarketplaceCatalogServiceException);\nvar de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AccessDeniedExceptionRes\");\nvar de_InternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InternalServiceException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InternalServiceExceptionRes\");\nvar de_ResourceInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceInUseException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceInUseExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_ResourceNotSupportedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotSupportedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotSupportedExceptionRes\");\nvar de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ServiceQuotaExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ServiceQuotaExceededExceptionRes\");\nvar de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ThrottlingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ThrottlingExceptionRes\");\nvar de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ValidationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ValidationExceptionRes\");\nvar se_Change = /* @__PURE__ */ __name((input, context) => {\n return (0, import_smithy_client.take)(input, {\n ChangeName: [],\n ChangeType: [],\n Details: [],\n DetailsDocument: (_) => se_JsonDocumentType(_, context),\n Entity: import_smithy_client._json,\n EntityTags: import_smithy_client._json\n });\n}, \"se_Change\");\nvar se_JsonDocumentType = /* @__PURE__ */ __name((input, context) => {\n return input;\n}, \"se_JsonDocumentType\");\nvar se_RequestedChangeList = /* @__PURE__ */ __name((input, context) => {\n return input.filter((e) => e != null).map((entry) => {\n return se_Change(entry, context);\n });\n}, \"se_RequestedChangeList\");\nvar de_ChangeSetDescription = /* @__PURE__ */ __name((output, context) => {\n const retVal = (output || []).filter((e) => e != null).map((entry) => {\n return de_ChangeSummary(entry, context);\n });\n return retVal;\n}, \"de_ChangeSetDescription\");\nvar de_ChangeSummary = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n ChangeName: import_smithy_client.expectString,\n ChangeType: import_smithy_client.expectString,\n Details: import_smithy_client.expectString,\n DetailsDocument: (_) => de_JsonDocumentType(_, context),\n Entity: import_smithy_client._json,\n ErrorDetailList: import_smithy_client._json\n });\n}, \"de_ChangeSummary\");\nvar de_EntityDetail = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n DetailsDocument: (_) => de_JsonDocumentType(_, context),\n EntityArn: import_smithy_client.expectString,\n EntityIdentifier: import_smithy_client.expectString,\n EntityType: import_smithy_client.expectString,\n LastModifiedDate: import_smithy_client.expectString\n });\n}, \"de_EntityDetail\");\nvar de_EntityDetails = /* @__PURE__ */ __name((output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n acc[key] = de_EntityDetail(value, context);\n return acc;\n }, {});\n}, \"de_EntityDetails\");\nvar de_JsonDocumentType = /* @__PURE__ */ __name((output, context) => {\n return output;\n}, \"de_JsonDocumentType\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\nvar _C = \"Catalog\";\nvar _CSI = \"ChangeSetId\";\nvar _EI = \"EntityId\";\nvar _RA = \"ResourceArn\";\nvar _c = \"catalog\";\nvar _cSI = \"changeSetId\";\nvar _eI = \"entityId\";\nvar _rA = \"resourceArn\";\nvar parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n return JSON.parse(encoded);\n }\n return {};\n}), \"parseBody\");\nvar parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n}, \"parseErrorBody\");\nvar loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {\n const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), \"findKey\");\n const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n }, \"sanitizeErrorCode\");\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== void 0) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data.code !== void 0) {\n return sanitizeErrorCode(data.code);\n }\n if (data[\"__type\"] !== void 0) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n}, \"loadRestJsonErrorCode\");\n\n// src/commands/BatchDescribeEntitiesCommand.ts\nvar _BatchDescribeEntitiesCommand = class _BatchDescribeEntitiesCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"BatchDescribeEntities\", {}).n(\"MarketplaceCatalogClient\", \"BatchDescribeEntitiesCommand\").f(void 0, void 0).ser(se_BatchDescribeEntitiesCommand).de(de_BatchDescribeEntitiesCommand).build() {\n};\n__name(_BatchDescribeEntitiesCommand, \"BatchDescribeEntitiesCommand\");\nvar BatchDescribeEntitiesCommand = _BatchDescribeEntitiesCommand;\n\n// src/commands/CancelChangeSetCommand.ts\n\n\n\n\nvar _CancelChangeSetCommand = class _CancelChangeSetCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"CancelChangeSet\", {}).n(\"MarketplaceCatalogClient\", \"CancelChangeSetCommand\").f(void 0, void 0).ser(se_CancelChangeSetCommand).de(de_CancelChangeSetCommand).build() {\n};\n__name(_CancelChangeSetCommand, \"CancelChangeSetCommand\");\nvar CancelChangeSetCommand = _CancelChangeSetCommand;\n\n// src/commands/DeleteResourcePolicyCommand.ts\n\n\n\n\nvar _DeleteResourcePolicyCommand = class _DeleteResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"DeleteResourcePolicy\", {}).n(\"MarketplaceCatalogClient\", \"DeleteResourcePolicyCommand\").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() {\n};\n__name(_DeleteResourcePolicyCommand, \"DeleteResourcePolicyCommand\");\nvar DeleteResourcePolicyCommand = _DeleteResourcePolicyCommand;\n\n// src/commands/DescribeChangeSetCommand.ts\n\n\n\n\nvar _DescribeChangeSetCommand = class _DescribeChangeSetCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"DescribeChangeSet\", {}).n(\"MarketplaceCatalogClient\", \"DescribeChangeSetCommand\").f(void 0, void 0).ser(se_DescribeChangeSetCommand).de(de_DescribeChangeSetCommand).build() {\n};\n__name(_DescribeChangeSetCommand, \"DescribeChangeSetCommand\");\nvar DescribeChangeSetCommand = _DescribeChangeSetCommand;\n\n// src/commands/DescribeEntityCommand.ts\n\n\n\n\nvar _DescribeEntityCommand = class _DescribeEntityCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"DescribeEntity\", {}).n(\"MarketplaceCatalogClient\", \"DescribeEntityCommand\").f(void 0, void 0).ser(se_DescribeEntityCommand).de(de_DescribeEntityCommand).build() {\n};\n__name(_DescribeEntityCommand, \"DescribeEntityCommand\");\nvar DescribeEntityCommand = _DescribeEntityCommand;\n\n// src/commands/GetResourcePolicyCommand.ts\n\n\n\n\nvar _GetResourcePolicyCommand = class _GetResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"GetResourcePolicy\", {}).n(\"MarketplaceCatalogClient\", \"GetResourcePolicyCommand\").f(void 0, void 0).ser(se_GetResourcePolicyCommand).de(de_GetResourcePolicyCommand).build() {\n};\n__name(_GetResourcePolicyCommand, \"GetResourcePolicyCommand\");\nvar GetResourcePolicyCommand = _GetResourcePolicyCommand;\n\n// src/commands/ListChangeSetsCommand.ts\n\n\n\n\nvar _ListChangeSetsCommand = class _ListChangeSetsCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"ListChangeSets\", {}).n(\"MarketplaceCatalogClient\", \"ListChangeSetsCommand\").f(void 0, void 0).ser(se_ListChangeSetsCommand).de(de_ListChangeSetsCommand).build() {\n};\n__name(_ListChangeSetsCommand, \"ListChangeSetsCommand\");\nvar ListChangeSetsCommand = _ListChangeSetsCommand;\n\n// src/commands/ListEntitiesCommand.ts\n\n\n\n\nvar _ListEntitiesCommand = class _ListEntitiesCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"ListEntities\", {}).n(\"MarketplaceCatalogClient\", \"ListEntitiesCommand\").f(void 0, void 0).ser(se_ListEntitiesCommand).de(de_ListEntitiesCommand).build() {\n};\n__name(_ListEntitiesCommand, \"ListEntitiesCommand\");\nvar ListEntitiesCommand = _ListEntitiesCommand;\n\n// src/commands/ListTagsForResourceCommand.ts\n\n\n\n\nvar _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"ListTagsForResource\", {}).n(\"MarketplaceCatalogClient\", \"ListTagsForResourceCommand\").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {\n};\n__name(_ListTagsForResourceCommand, \"ListTagsForResourceCommand\");\nvar ListTagsForResourceCommand = _ListTagsForResourceCommand;\n\n// src/commands/PutResourcePolicyCommand.ts\n\n\n\n\nvar _PutResourcePolicyCommand = class _PutResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"PutResourcePolicy\", {}).n(\"MarketplaceCatalogClient\", \"PutResourcePolicyCommand\").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() {\n};\n__name(_PutResourcePolicyCommand, \"PutResourcePolicyCommand\");\nvar PutResourcePolicyCommand = _PutResourcePolicyCommand;\n\n// src/commands/StartChangeSetCommand.ts\n\n\n\n\nvar _StartChangeSetCommand = class _StartChangeSetCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"StartChangeSet\", {}).n(\"MarketplaceCatalogClient\", \"StartChangeSetCommand\").f(void 0, void 0).ser(se_StartChangeSetCommand).de(de_StartChangeSetCommand).build() {\n};\n__name(_StartChangeSetCommand, \"StartChangeSetCommand\");\nvar StartChangeSetCommand = _StartChangeSetCommand;\n\n// src/commands/TagResourceCommand.ts\n\n\n\n\nvar _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"TagResource\", {}).n(\"MarketplaceCatalogClient\", \"TagResourceCommand\").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {\n};\n__name(_TagResourceCommand, \"TagResourceCommand\");\nvar TagResourceCommand = _TagResourceCommand;\n\n// src/commands/UntagResourceCommand.ts\n\n\n\n\nvar _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"UntagResource\", {}).n(\"MarketplaceCatalogClient\", \"UntagResourceCommand\").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {\n};\n__name(_UntagResourceCommand, \"UntagResourceCommand\");\nvar UntagResourceCommand = _UntagResourceCommand;\n\n// src/MarketplaceCatalog.ts\nvar commands = {\n BatchDescribeEntitiesCommand,\n CancelChangeSetCommand,\n DeleteResourcePolicyCommand,\n DescribeChangeSetCommand,\n DescribeEntityCommand,\n GetResourcePolicyCommand,\n ListChangeSetsCommand,\n ListEntitiesCommand,\n ListTagsForResourceCommand,\n PutResourcePolicyCommand,\n StartChangeSetCommand,\n TagResourceCommand,\n UntagResourceCommand\n};\nvar _MarketplaceCatalog = class _MarketplaceCatalog extends MarketplaceCatalogClient {\n};\n__name(_MarketplaceCatalog, \"MarketplaceCatalog\");\nvar MarketplaceCatalog = _MarketplaceCatalog;\n(0, import_smithy_client.createAggregatedClient)(commands, MarketplaceCatalog);\n\n// src/pagination/ListChangeSetsPaginator.ts\n\nvar paginateListChangeSets = (0, import_core.createPaginator)(MarketplaceCatalogClient, ListChangeSetsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListEntitiesPaginator.ts\n\nvar paginateListEntities = (0, import_core.createPaginator)(MarketplaceCatalogClient, ListEntitiesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/index.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n MarketplaceCatalogServiceException,\n __Client,\n MarketplaceCatalogClient,\n MarketplaceCatalog,\n $Command,\n BatchDescribeEntitiesCommand,\n CancelChangeSetCommand,\n DeleteResourcePolicyCommand,\n DescribeChangeSetCommand,\n DescribeEntityCommand,\n GetResourcePolicyCommand,\n ListChangeSetsCommand,\n ListEntitiesCommand,\n ListTagsForResourceCommand,\n PutResourcePolicyCommand,\n StartChangeSetCommand,\n TagResourceCommand,\n UntagResourceCommand,\n paginateListChangeSets,\n paginateListEntities,\n AccessDeniedException,\n AmiProductVisibilityString,\n AmiProductSortBy,\n SortOrder,\n InternalServiceException,\n ThrottlingException,\n ValidationException,\n ResourceInUseException,\n ResourceNotFoundException,\n FailureCode,\n ChangeStatus,\n ResourceNotSupportedException,\n ContainerProductVisibilityString,\n DataProductVisibilityString,\n OfferStateString,\n OfferTargetingString,\n ResaleAuthorizationStatusString,\n SaaSProductVisibilityString,\n EntityTypeFilters,\n ContainerProductSortBy,\n DataProductSortBy,\n OfferSortBy,\n ResaleAuthorizationSortBy,\n SaaSProductSortBy,\n EntityTypeSort,\n OwnershipType,\n ServiceQuotaExceededException\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2018-09-17\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"Marketplace Catalog\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultProvider = void 0;\nexports.defaultProvider = ((input) => {\n return () => Promise.resolve().then(() => __importStar(require(\"@aws-sdk/credential-provider-node\"))).then(({ defaultProvider }) => defaultProvider(input)());\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://oidc.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AccessDeniedException: () => AccessDeniedException,\n AuthorizationPendingException: () => AuthorizationPendingException,\n CreateTokenCommand: () => CreateTokenCommand,\n CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,\n CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand,\n CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog,\n CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog,\n ExpiredTokenException: () => ExpiredTokenException,\n InternalServerException: () => InternalServerException,\n InvalidClientException: () => InvalidClientException,\n InvalidClientMetadataException: () => InvalidClientMetadataException,\n InvalidGrantException: () => InvalidGrantException,\n InvalidRequestException: () => InvalidRequestException,\n InvalidRequestRegionException: () => InvalidRequestRegionException,\n InvalidScopeException: () => InvalidScopeException,\n RegisterClientCommand: () => RegisterClientCommand,\n RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog,\n SSOOIDC: () => SSOOIDC,\n SSOOIDCClient: () => SSOOIDCClient,\n SSOOIDCServiceException: () => SSOOIDCServiceException,\n SlowDownException: () => SlowDownException,\n StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand,\n StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog,\n UnauthorizedClientException: () => UnauthorizedClientException,\n UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,\n __Client: () => import_smithy_client.Client\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SSOOIDCClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_signing = require(\"@aws-sdk/middleware-signing\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\"\n };\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/SSOOIDCClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar asPartial = /* @__PURE__ */ __name((t) => t, \"asPartial\");\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)\n };\n}, \"resolveRuntimeExtensions\");\n\n// src/SSOOIDCClient.ts\nvar _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);\n const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);\n const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n__name(_SSOOIDCClient, \"SSOOIDCClient\");\nvar SSOOIDCClient = _SSOOIDCClient;\n\n// src/SSOOIDC.ts\n\n\n// src/commands/CreateTokenCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\n\n// src/models/models_0.ts\n\n\n// src/models/SSOOIDCServiceException.ts\n\nvar _SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);\n }\n};\n__name(_SSOOIDCServiceException, \"SSOOIDCServiceException\");\nvar SSOOIDCServiceException = _SSOOIDCServiceException;\n\n// src/models/models_0.ts\nvar _AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"AccessDeniedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _AccessDeniedException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_AccessDeniedException, \"AccessDeniedException\");\nvar AccessDeniedException = _AccessDeniedException;\nvar _AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"AuthorizationPendingException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_AuthorizationPendingException, \"AuthorizationPendingException\");\nvar AuthorizationPendingException = _AuthorizationPendingException;\nvar _ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ExpiredTokenException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_ExpiredTokenException, \"ExpiredTokenException\");\nvar ExpiredTokenException = _ExpiredTokenException;\nvar _InternalServerException = class _InternalServerException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts\n });\n this.name = \"InternalServerException\";\n this.$fault = \"server\";\n Object.setPrototypeOf(this, _InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InternalServerException, \"InternalServerException\");\nvar InternalServerException = _InternalServerException;\nvar _InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidClientException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidClientException, \"InvalidClientException\");\nvar InvalidClientException = _InvalidClientException;\nvar _InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidGrantException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidGrantException, \"InvalidGrantException\");\nvar InvalidGrantException = _InvalidGrantException;\nvar _InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidRequestException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidRequestException, \"InvalidRequestException\");\nvar InvalidRequestException = _InvalidRequestException;\nvar _InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidScopeException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidScopeException, \"InvalidScopeException\");\nvar InvalidScopeException = _InvalidScopeException;\nvar _SlowDownException = class _SlowDownException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"SlowDownException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_SlowDownException, \"SlowDownException\");\nvar SlowDownException = _SlowDownException;\nvar _UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"UnauthorizedClientException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_UnauthorizedClientException, \"UnauthorizedClientException\");\nvar UnauthorizedClientException = _UnauthorizedClientException;\nvar _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"UnsupportedGrantTypeException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_UnsupportedGrantTypeException, \"UnsupportedGrantTypeException\");\nvar UnsupportedGrantTypeException = _UnsupportedGrantTypeException;\nvar _InvalidRequestRegionException = class _InvalidRequestRegionException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestRegionException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidRequestRegionException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidRequestRegionException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n this.endpoint = opts.endpoint;\n this.region = opts.region;\n }\n};\n__name(_InvalidRequestRegionException, \"InvalidRequestRegionException\");\nvar InvalidRequestRegionException = _InvalidRequestRegionException;\nvar _InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidClientMetadataException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidClientMetadataException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidClientMetadataException, \"InvalidClientMetadataException\");\nvar InvalidClientMetadataException = _InvalidClientMetadataException;\nvar CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenRequestFilterSensitiveLog\");\nvar CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenResponseFilterSensitiveLog\");\nvar CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.assertion && { assertion: import_smithy_client.SENSITIVE_STRING },\n ...obj.subjectToken && { subjectToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenWithIAMRequestFilterSensitiveLog\");\nvar CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenWithIAMResponseFilterSensitiveLog\");\nvar RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }\n}), \"RegisterClientResponseFilterSensitiveLog\");\nvar StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }\n}), \"StartDeviceAuthorizationRequestFilterSensitiveLog\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core = require(\"@smithy/core\");\n\nvar se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/token\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n clientId: [],\n clientSecret: [],\n code: [],\n deviceCode: [],\n grantType: [],\n redirectUri: [],\n refreshToken: [],\n scope: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_CreateTokenCommand\");\nvar se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/token\");\n const query = (0, import_smithy_client.map)({\n [_ai]: [, \"t\"]\n });\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n assertion: [],\n clientId: [],\n code: [],\n grantType: [],\n redirectUri: [],\n refreshToken: [],\n requestedTokenType: [],\n scope: (_) => (0, import_smithy_client._json)(_),\n subjectToken: [],\n subjectTokenType: []\n })\n );\n b.m(\"POST\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_CreateTokenWithIAMCommand\");\nvar se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/client/register\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n clientName: [],\n clientType: [],\n scopes: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_RegisterClientCommand\");\nvar se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/device_authorization\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n clientId: [],\n clientSecret: [],\n startUrl: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_StartDeviceAuthorizationCommand\");\nvar de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accessToken: import_smithy_client.expectString,\n expiresIn: import_smithy_client.expectInt32,\n idToken: import_smithy_client.expectString,\n refreshToken: import_smithy_client.expectString,\n tokenType: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CreateTokenCommand\");\nvar de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accessToken: import_smithy_client.expectString,\n expiresIn: import_smithy_client.expectInt32,\n idToken: import_smithy_client.expectString,\n issuedTokenType: import_smithy_client.expectString,\n refreshToken: import_smithy_client.expectString,\n scope: import_smithy_client._json,\n tokenType: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CreateTokenWithIAMCommand\");\nvar de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n authorizationEndpoint: import_smithy_client.expectString,\n clientId: import_smithy_client.expectString,\n clientIdIssuedAt: import_smithy_client.expectLong,\n clientSecret: import_smithy_client.expectString,\n clientSecretExpiresAt: import_smithy_client.expectLong,\n tokenEndpoint: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_RegisterClientCommand\");\nvar de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n deviceCode: import_smithy_client.expectString,\n expiresIn: import_smithy_client.expectInt32,\n interval: import_smithy_client.expectInt32,\n userCode: import_smithy_client.expectString,\n verificationUri: import_smithy_client.expectString,\n verificationUriComplete: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_StartDeviceAuthorizationCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context)\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ssooidc#AccessDeniedException\":\n throw await de_AccessDeniedExceptionRes(parsedOutput, context);\n case \"AuthorizationPendingException\":\n case \"com.amazonaws.ssooidc#AuthorizationPendingException\":\n throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);\n case \"ExpiredTokenException\":\n case \"com.amazonaws.ssooidc#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.ssooidc#InternalServerException\":\n throw await de_InternalServerExceptionRes(parsedOutput, context);\n case \"InvalidClientException\":\n case \"com.amazonaws.ssooidc#InvalidClientException\":\n throw await de_InvalidClientExceptionRes(parsedOutput, context);\n case \"InvalidGrantException\":\n case \"com.amazonaws.ssooidc#InvalidGrantException\":\n throw await de_InvalidGrantExceptionRes(parsedOutput, context);\n case \"InvalidRequestException\":\n case \"com.amazonaws.ssooidc#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"InvalidScopeException\":\n case \"com.amazonaws.ssooidc#InvalidScopeException\":\n throw await de_InvalidScopeExceptionRes(parsedOutput, context);\n case \"SlowDownException\":\n case \"com.amazonaws.ssooidc#SlowDownException\":\n throw await de_SlowDownExceptionRes(parsedOutput, context);\n case \"UnauthorizedClientException\":\n case \"com.amazonaws.ssooidc#UnauthorizedClientException\":\n throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);\n case \"UnsupportedGrantTypeException\":\n case \"com.amazonaws.ssooidc#UnsupportedGrantTypeException\":\n throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);\n case \"InvalidRequestRegionException\":\n case \"com.amazonaws.ssooidc#InvalidRequestRegionException\":\n throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);\n case \"InvalidClientMetadataException\":\n case \"com.amazonaws.ssooidc#InvalidClientMetadataException\":\n throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(SSOOIDCServiceException);\nvar de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AccessDeniedExceptionRes\");\nvar de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new AuthorizationPendingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AuthorizationPendingExceptionRes\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InternalServerException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InternalServerExceptionRes\");\nvar de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidClientExceptionRes\");\nvar de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidClientMetadataException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidClientMetadataExceptionRes\");\nvar de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidGrantException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidGrantExceptionRes\");\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n endpoint: import_smithy_client.expectString,\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString,\n region: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestRegionException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestRegionExceptionRes\");\nvar de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidScopeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidScopeExceptionRes\");\nvar de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new SlowDownException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_SlowDownExceptionRes\");\nvar de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedClientExceptionRes\");\nvar de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnsupportedGrantTypeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnsupportedGrantTypeExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\nvar _ai = \"aws_iam\";\nvar parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n return JSON.parse(encoded);\n }\n return {};\n}), \"parseBody\");\nvar parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n}, \"parseErrorBody\");\nvar loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {\n const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), \"findKey\");\n const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n }, \"sanitizeErrorCode\");\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== void 0) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data.code !== void 0) {\n return sanitizeErrorCode(data.code);\n }\n if (data[\"__type\"] !== void 0) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n}, \"loadRestJsonErrorCode\");\n\n// src/commands/CreateTokenCommand.ts\nvar _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"CreateToken\", {}).n(\"SSOOIDCClient\", \"CreateTokenCommand\").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {\n};\n__name(_CreateTokenCommand, \"CreateTokenCommand\");\nvar CreateTokenCommand = _CreateTokenCommand;\n\n// src/commands/CreateTokenWithIAMCommand.ts\n\n\n\n\n\nvar _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),\n (0, import_middleware_signing.getAwsAuthPlugin)(config)\n ];\n}).s(\"AWSSSOOIDCService\", \"CreateTokenWithIAM\", {}).n(\"SSOOIDCClient\", \"CreateTokenWithIAMCommand\").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() {\n};\n__name(_CreateTokenWithIAMCommand, \"CreateTokenWithIAMCommand\");\nvar CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand;\n\n// src/commands/RegisterClientCommand.ts\n\n\n\n\nvar _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"RegisterClient\", {}).n(\"SSOOIDCClient\", \"RegisterClientCommand\").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() {\n};\n__name(_RegisterClientCommand, \"RegisterClientCommand\");\nvar RegisterClientCommand = _RegisterClientCommand;\n\n// src/commands/StartDeviceAuthorizationCommand.ts\n\n\n\n\nvar _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"StartDeviceAuthorization\", {}).n(\"SSOOIDCClient\", \"StartDeviceAuthorizationCommand\").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() {\n};\n__name(_StartDeviceAuthorizationCommand, \"StartDeviceAuthorizationCommand\");\nvar StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand;\n\n// src/SSOOIDC.ts\nvar commands = {\n CreateTokenCommand,\n CreateTokenWithIAMCommand,\n RegisterClientCommand,\n StartDeviceAuthorizationCommand\n};\nvar _SSOOIDC = class _SSOOIDC extends SSOOIDCClient {\n};\n__name(_SSOOIDC, \"SSOOIDC\");\nvar SSOOIDC = _SSOOIDC;\n(0, import_smithy_client.createAggregatedClient)(commands, SSOOIDC);\n\n// src/index.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SSOOIDCServiceException,\n __Client,\n SSOOIDCClient,\n SSOOIDC,\n $Command,\n CreateTokenCommand,\n CreateTokenWithIAMCommand,\n RegisterClientCommand,\n StartDeviceAuthorizationCommand,\n AccessDeniedException,\n AuthorizationPendingException,\n ExpiredTokenException,\n InternalServerException,\n InvalidClientException,\n InvalidGrantException,\n InvalidRequestException,\n InvalidScopeException,\n SlowDownException,\n UnauthorizedClientException,\n UnsupportedGrantTypeException,\n InvalidRequestRegionException,\n InvalidClientMetadataException,\n CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog,\n CreateTokenWithIAMRequestFilterSensitiveLog,\n CreateTokenWithIAMResponseFilterSensitiveLog,\n RegisterClientResponseFilterSensitiveLog,\n StartDeviceAuthorizationRequestFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst credentialDefaultProvider_1 = require(\"./credentialDefaultProvider\");\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://portal.sso.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,\n GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,\n InvalidRequestException: () => InvalidRequestException,\n ListAccountRolesCommand: () => ListAccountRolesCommand,\n ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsCommand: () => ListAccountsCommand,\n ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,\n LogoutCommand: () => LogoutCommand,\n LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,\n ResourceNotFoundException: () => ResourceNotFoundException,\n RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,\n SSO: () => SSO,\n SSOClient: () => SSOClient,\n SSOServiceException: () => SSOServiceException,\n TooManyRequestsException: () => TooManyRequestsException,\n UnauthorizedException: () => UnauthorizedException,\n __Client: () => import_smithy_client.Client,\n paginateListAccountRoles: () => paginateListAccountRoles,\n paginateListAccounts: () => paginateListAccounts\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SSOClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\"\n };\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/SSOClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar asPartial = /* @__PURE__ */ __name((t) => t, \"asPartial\");\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)\n };\n}, \"resolveRuntimeExtensions\");\n\n// src/SSOClient.ts\nvar _SSOClient = class _SSOClient extends import_smithy_client.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);\n const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);\n const _config_7 = resolveRuntimeExtensions(_config_6, (configuration == null ? void 0 : configuration.extensions) || []);\n super(_config_7);\n this.config = _config_7;\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n__name(_SSOClient, \"SSOClient\");\nvar SSOClient = _SSOClient;\n\n// src/SSO.ts\n\n\n// src/commands/GetRoleCredentialsCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\n\n// src/models/models_0.ts\n\n\n// src/models/SSOServiceException.ts\n\nvar _SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOServiceException.prototype);\n }\n};\n__name(_SSOServiceException, \"SSOServiceException\");\nvar SSOServiceException = _SSOServiceException;\n\n// src/models/models_0.ts\nvar _InvalidRequestException = class _InvalidRequestException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidRequestException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n }\n};\n__name(_InvalidRequestException, \"InvalidRequestException\");\nvar InvalidRequestException = _InvalidRequestException;\nvar _ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceNotFoundException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n }\n};\n__name(_ResourceNotFoundException, \"ResourceNotFoundException\");\nvar ResourceNotFoundException = _ResourceNotFoundException;\nvar _TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"TooManyRequestsException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _TooManyRequestsException.prototype);\n }\n};\n__name(_TooManyRequestsException, \"TooManyRequestsException\");\nvar TooManyRequestsException = _TooManyRequestsException;\nvar _UnauthorizedException = class _UnauthorizedException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"UnauthorizedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _UnauthorizedException.prototype);\n }\n};\n__name(_UnauthorizedException, \"UnauthorizedException\");\nvar UnauthorizedException = _UnauthorizedException;\nvar GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"GetRoleCredentialsRequestFilterSensitiveLog\");\nvar RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },\n ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }\n}), \"RoleCredentialsFilterSensitiveLog\");\nvar GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }\n}), \"GetRoleCredentialsResponseFilterSensitiveLog\");\nvar ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountRolesRequestFilterSensitiveLog\");\nvar ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountsRequestFilterSensitiveLog\");\nvar LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"LogoutRequestFilterSensitiveLog\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core = require(\"@smithy/core\");\n\nvar se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/federation/credentials\");\n const query = (0, import_smithy_client.map)({\n [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_GetRoleCredentialsCommand\");\nvar se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/roles\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountRolesCommand\");\nvar se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/accounts\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountsCommand\");\nvar se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/logout\");\n let body;\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_LogoutCommand\");\nvar de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n roleCredentials: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_GetRoleCredentialsCommand\");\nvar de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n nextToken: import_smithy_client.expectString,\n roleList: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountRolesCommand\");\nvar de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accountList: import_smithy_client._json,\n nextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountsCommand\");\nvar de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_LogoutCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context)\n };\n const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n throw await de_UnauthorizedExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_TooManyRequestsExceptionRes\");\nvar de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\nvar isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== \"\" && (!Object.getOwnPropertyNames(value).includes(\"length\") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes(\"size\") || value.size != 0), \"isSerializableHeaderValue\");\nvar _aI = \"accountId\";\nvar _aT = \"accessToken\";\nvar _ai = \"account_id\";\nvar _mR = \"maxResults\";\nvar _mr = \"max_result\";\nvar _nT = \"nextToken\";\nvar _nt = \"next_token\";\nvar _rN = \"roleName\";\nvar _rn = \"role_name\";\nvar _xasbt = \"x-amz-sso_bearer_token\";\nvar parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n return JSON.parse(encoded);\n }\n return {};\n}), \"parseBody\");\nvar parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n}, \"parseErrorBody\");\nvar loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {\n const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), \"findKey\");\n const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n }, \"sanitizeErrorCode\");\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== void 0) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data.code !== void 0) {\n return sanitizeErrorCode(data.code);\n }\n if (data[\"__type\"] !== void 0) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n}, \"loadRestJsonErrorCode\");\n\n// src/commands/GetRoleCredentialsCommand.ts\nvar _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"GetRoleCredentials\", {}).n(\"SSOClient\", \"GetRoleCredentialsCommand\").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {\n};\n__name(_GetRoleCredentialsCommand, \"GetRoleCredentialsCommand\");\nvar GetRoleCredentialsCommand = _GetRoleCredentialsCommand;\n\n// src/commands/ListAccountRolesCommand.ts\n\n\n\n\nvar _ListAccountRolesCommand = class _ListAccountRolesCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccountRoles\", {}).n(\"SSOClient\", \"ListAccountRolesCommand\").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {\n};\n__name(_ListAccountRolesCommand, \"ListAccountRolesCommand\");\nvar ListAccountRolesCommand = _ListAccountRolesCommand;\n\n// src/commands/ListAccountsCommand.ts\n\n\n\n\nvar _ListAccountsCommand = class _ListAccountsCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccounts\", {}).n(\"SSOClient\", \"ListAccountsCommand\").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {\n};\n__name(_ListAccountsCommand, \"ListAccountsCommand\");\nvar ListAccountsCommand = _ListAccountsCommand;\n\n// src/commands/LogoutCommand.ts\n\n\n\n\nvar _LogoutCommand = class _LogoutCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"Logout\", {}).n(\"SSOClient\", \"LogoutCommand\").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() {\n};\n__name(_LogoutCommand, \"LogoutCommand\");\nvar LogoutCommand = _LogoutCommand;\n\n// src/SSO.ts\nvar commands = {\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand\n};\nvar _SSO = class _SSO extends SSOClient {\n};\n__name(_SSO, \"SSO\");\nvar SSO = _SSO;\n(0, import_smithy_client.createAggregatedClient)(commands, SSO);\n\n// src/pagination/ListAccountRolesPaginator.ts\n\nvar paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\n// src/pagination/ListAccountsPaginator.ts\n\nvar paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\n// src/index.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SSOServiceException,\n __Client,\n SSOClient,\n SSO,\n $Command,\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand,\n paginateListAccountRoles,\n paginateListAccounts,\n InvalidRequestException,\n ResourceNotFoundException,\n TooManyRequestsException,\n UnauthorizedException,\n GetRoleCredentialsRequestFilterSensitiveLog,\n RoleCredentialsFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog,\n ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsRequestFilterSensitiveLog,\n LogoutRequestFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.__Client = void 0;\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_recursion_detection_1 = require(\"@aws-sdk/middleware-recursion-detection\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_1 = require(\"@smithy/core\");\nconst middleware_content_length_1 = require(\"@smithy/middleware-content-length\");\nconst middleware_endpoint_1 = require(\"@smithy/middleware-endpoint\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__Client\", { enumerable: true, get: function () { return smithy_client_1.Client; } });\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst EndpointParameters_1 = require(\"./endpoint/EndpointParameters\");\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst runtimeExtensions_1 = require(\"./runtimeExtensions\");\nclass STSClient extends smithy_client_1.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});\n const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);\n const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);\n const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);\n const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);\n const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),\n identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),\n }));\n this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));\n }\n destroy() {\n super.destroy();\n }\n getDefaultHttpAuthSchemeParametersProvider() {\n return httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider;\n }\n getIdentityProviderConfigProvider() {\n return async (config) => new core_1.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n });\n }\n}\nexports.STSClient = STSClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\nexports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst STSClient_1 = require(\"../STSClient\");\nconst defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithSAML\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;\nconst resolveStsAuthConfig = (input) => ({\n ...input,\n stsClientCtor: STSClient_1.STSClient,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, exports.resolveStsAuthConfig)(config);\n const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);\n return {\n ...config_1,\n };\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultProvider = void 0;\nexports.defaultProvider = ((input) => {\n return () => Promise.resolve().then(() => __importStar(require(\"@aws-sdk/credential-provider-node\"))).then(({ defaultProvider }) => defaultProvider(input)());\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commonParams = exports.resolveClientEndpointParameters = void 0;\nconst resolveClientEndpointParameters = (options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n };\n};\nexports.resolveClientEndpointParameters = resolveClientEndpointParameters;\nexports.commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst F = \"required\", G = \"type\", H = \"fn\", I = \"argv\", J = \"ref\";\nconst a = false, b = true, c = \"booleanEquals\", d = \"stringEquals\", e = \"sigv4\", f = \"sts\", g = \"us-east-1\", h = \"endpoint\", i = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", j = \"tree\", k = \"error\", l = \"getAttr\", m = { [F]: false, [G]: \"String\" }, n = { [F]: true, \"default\": false, [G]: \"Boolean\" }, o = { [J]: \"Endpoint\" }, p = { [H]: \"isSet\", [I]: [{ [J]: \"Region\" }] }, q = { [J]: \"Region\" }, r = { [H]: \"aws.partition\", [I]: [q], \"assign\": \"PartitionResult\" }, s = { [J]: \"UseFIPS\" }, t = { [J]: \"UseDualStack\" }, u = { \"url\": \"https://sts.amazonaws.com\", \"properties\": { \"authSchemes\": [{ \"name\": e, \"signingName\": f, \"signingRegion\": g }] }, \"headers\": {} }, v = {}, w = { \"conditions\": [{ [H]: d, [I]: [q, \"aws-global\"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: \"PartitionResult\" }, \"supportsFIPS\"] }, A = { [J]: \"PartitionResult\" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, \"supportsDualStack\"] }] }, C = [{ [H]: \"isSet\", [I]: [o] }], D = [x], E = [y];\nconst _data = { version: \"1.0\", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: \"UseGlobalEndpoint\" }, b] }, { [H]: \"not\", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, \"ap-northeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-south-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-2\"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, \"ca-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-north-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-3\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"sa-east-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-east-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-2\"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: \"{Region}\" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", [G]: k }, { conditions: E, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://sts.{Region}.amazonaws.com\", properties: v, headers: v }, [G]: h }, { endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS is enabled but this partition does not support FIPS\", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: \"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"DualStack is enabled but this partition does not support DualStack\", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: \"Invalid Configuration: Missing Region\", [G]: k }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AssumeRoleCommand: () => AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand,\n AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n ClientInputEndpointParameters: () => import_EndpointParameters9.ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand,\n ExpiredTokenException: () => ExpiredTokenException,\n GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand,\n GetCallerIdentityCommand: () => GetCallerIdentityCommand,\n GetFederationTokenCommand: () => GetFederationTokenCommand,\n GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenCommand: () => GetSessionTokenCommand,\n GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog,\n IDPCommunicationErrorException: () => IDPCommunicationErrorException,\n IDPRejectedClaimException: () => IDPRejectedClaimException,\n InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException,\n InvalidIdentityTokenException: () => InvalidIdentityTokenException,\n MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,\n PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,\n RegionDisabledException: () => RegionDisabledException,\n RuntimeExtension: () => import_runtimeExtensions.RuntimeExtension,\n STS: () => STS,\n STSServiceException: () => STSServiceException,\n decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,\n getDefaultRoleAssumer: () => getDefaultRoleAssumer2,\n getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2\n});\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././STSClient\"), module.exports);\n\n// src/STS.ts\n\n\n// src/commands/AssumeRoleCommand.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\nvar import_EndpointParameters = require(\"./endpoint/EndpointParameters\");\n\n// src/models/models_0.ts\n\n\n// src/models/STSServiceException.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar _STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _STSServiceException.prototype);\n }\n};\n__name(_STSServiceException, \"STSServiceException\");\nvar STSServiceException = _STSServiceException;\n\n// src/models/models_0.ts\nvar _ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ExpiredTokenException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n }\n};\n__name(_ExpiredTokenException, \"ExpiredTokenException\");\nvar ExpiredTokenException = _ExpiredTokenException;\nvar _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"MalformedPolicyDocumentException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);\n }\n};\n__name(_MalformedPolicyDocumentException, \"MalformedPolicyDocumentException\");\nvar MalformedPolicyDocumentException = _MalformedPolicyDocumentException;\nvar _PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"PackedPolicyTooLargeException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);\n }\n};\n__name(_PackedPolicyTooLargeException, \"PackedPolicyTooLargeException\");\nvar PackedPolicyTooLargeException = _PackedPolicyTooLargeException;\nvar _RegionDisabledException = class _RegionDisabledException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"RegionDisabledException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _RegionDisabledException.prototype);\n }\n};\n__name(_RegionDisabledException, \"RegionDisabledException\");\nvar RegionDisabledException = _RegionDisabledException;\nvar _IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"IDPRejectedClaimException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);\n }\n};\n__name(_IDPRejectedClaimException, \"IDPRejectedClaimException\");\nvar IDPRejectedClaimException = _IDPRejectedClaimException;\nvar _InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidIdentityTokenException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);\n }\n};\n__name(_InvalidIdentityTokenException, \"InvalidIdentityTokenException\");\nvar InvalidIdentityTokenException = _InvalidIdentityTokenException;\nvar _IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"IDPCommunicationErrorException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);\n }\n};\n__name(_IDPCommunicationErrorException, \"IDPCommunicationErrorException\");\nvar IDPCommunicationErrorException = _IDPCommunicationErrorException;\nvar _InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidAuthorizationMessageException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidAuthorizationMessageException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype);\n }\n};\n__name(_InvalidAuthorizationMessageException, \"InvalidAuthorizationMessageException\");\nvar InvalidAuthorizationMessageException = _InvalidAuthorizationMessageException;\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleResponseFilterSensitiveLog\");\nvar AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithSAMLRequestFilterSensitiveLog\");\nvar AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithSAMLResponseFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithWebIdentityRequestFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithWebIdentityResponseFilterSensitiveLog\");\nvar GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetFederationTokenResponseFilterSensitiveLog\");\nvar GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetSessionTokenResponseFilterSensitiveLog\");\n\n// src/protocols/Aws_query.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar import_fast_xml_parser = require(\"fast-xml-parser\");\nvar se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleRequest(input, context),\n [_A]: _AR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleCommand\");\nvar se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithSAMLRequest(input, context),\n [_A]: _ARWSAML,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithSAMLCommand\");\nvar se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithWebIdentityRequest(input, context),\n [_A]: _ARWWI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithWebIdentityCommand\");\nvar se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DecodeAuthorizationMessageRequest(input, context),\n [_A]: _DAM,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DecodeAuthorizationMessageCommand\");\nvar se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetAccessKeyInfoRequest(input, context),\n [_A]: _GAKI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetAccessKeyInfoCommand\");\nvar se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetCallerIdentityRequest(input, context),\n [_A]: _GCI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetCallerIdentityCommand\");\nvar se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetFederationTokenRequest(input, context),\n [_A]: _GFT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetFederationTokenCommand\");\nvar se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetSessionTokenRequest(input, context),\n [_A]: _GST,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetSessionTokenCommand\");\nvar de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleCommand\");\nvar de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithSAMLCommand\");\nvar de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithWebIdentityCommand\");\nvar de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DecodeAuthorizationMessageCommand\");\nvar de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetAccessKeyInfoCommand\");\nvar de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetCallerIdentityCommand\");\nvar de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetFederationTokenCommand\");\nvar de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await parseBody(output.body, context);\n let contents = {};\n contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetSessionTokenCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await parseErrorBody(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"MalformedPolicyDocument\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);\n case \"PackedPolicyTooLarge\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n throw await de_RegionDisabledExceptionRes(parsedOutput, context);\n case \"IDPRejectedClaim\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);\n case \"InvalidIdentityToken\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);\n case \"IDPCommunicationError\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);\n case \"InvalidAuthorizationMessageException\":\n case \"com.amazonaws.sts#InvalidAuthorizationMessageException\":\n throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ExpiredTokenException(body.Error, context);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPCommunicationErrorException(body.Error, context);\n const exception = new IDPCommunicationErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPCommunicationErrorExceptionRes\");\nvar de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPRejectedClaimException(body.Error, context);\n const exception = new IDPRejectedClaimException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPRejectedClaimExceptionRes\");\nvar de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidAuthorizationMessageException(body.Error, context);\n const exception = new InvalidAuthorizationMessageException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidAuthorizationMessageExceptionRes\");\nvar de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidIdentityTokenException(body.Error, context);\n const exception = new InvalidIdentityTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityTokenExceptionRes\");\nvar de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_MalformedPolicyDocumentException(body.Error, context);\n const exception = new MalformedPolicyDocumentException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_MalformedPolicyDocumentExceptionRes\");\nvar de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_PackedPolicyTooLargeException(body.Error, context);\n const exception = new PackedPolicyTooLargeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_PackedPolicyTooLargeExceptionRes\");\nvar de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_RegionDisabledException(body.Error, context);\n const exception = new RegionDisabledException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_RegionDisabledExceptionRes\");\nvar se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2, _b, _c, _d;\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TTK] != null) {\n const memberEntries = se_tagKeyListType(input[_TTK], context);\n if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) {\n entries.TransitiveTagKeys = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_EI] != null) {\n entries[_EI] = input[_EI];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_PC] != null) {\n const memberEntries = se_ProvidedContextsListType(input[_PC], context);\n if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) {\n entries.ProvidedContexts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ProvidedContexts.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_AssumeRoleRequest\");\nvar se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2;\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_PAr] != null) {\n entries[_PAr] = input[_PAr];\n }\n if (input[_SAMLA] != null) {\n entries[_SAMLA] = input[_SAMLA];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithSAMLRequest\");\nvar se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2;\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_WIT] != null) {\n entries[_WIT] = input[_WIT];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithWebIdentityRequest\");\nvar se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_EM] != null) {\n entries[_EM] = input[_EM];\n }\n return entries;\n}, \"se_DecodeAuthorizationMessageRequest\");\nvar se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_AKI] != null) {\n entries[_AKI] = input[_AKI];\n }\n return entries;\n}, \"se_GetAccessKeyInfoRequest\");\nvar se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_GetCallerIdentityRequest\");\nvar se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2, _b;\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_GetFederationTokenRequest\");\nvar se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n return entries;\n}, \"se_GetSessionTokenRequest\");\nvar se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_PolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_policyDescriptorListType\");\nvar se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_a] != null) {\n entries[_a] = input[_a];\n }\n return entries;\n}, \"se_PolicyDescriptorType\");\nvar se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PAro] != null) {\n entries[_PAro] = input[_PAro];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ProvidedContext\");\nvar se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ProvidedContext(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ProvidedContextsListType\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_Tag\");\nvar se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_tagKeyListType\");\nvar se_tagListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_tagListType\");\nvar de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ARI] != null) {\n contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_AssumedRoleUser\");\nvar de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleResponse\");\nvar de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]);\n }\n if (output[_I] != null) {\n contents[_I] = (0, import_smithy_client.expectString)(output[_I]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_NQ] != null) {\n contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithSAMLResponse\");\nvar de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SFWIT] != null) {\n contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_Pr] != null) {\n contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithWebIdentityResponse\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_AKI] != null) {\n contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]);\n }\n if (output[_SAK] != null) {\n contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]);\n }\n if (output[_STe] != null) {\n contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]);\n }\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E]));\n }\n return contents;\n}, \"de_Credentials\");\nvar de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DM] != null) {\n contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);\n }\n return contents;\n}, \"de_DecodeAuthorizationMessageResponse\");\nvar de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_ExpiredTokenException\");\nvar de_FederatedUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_FUI] != null) {\n contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_FederatedUser\");\nvar de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n return contents;\n}, \"de_GetAccessKeyInfoResponse\");\nvar de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_UI] != null) {\n contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]);\n }\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_GetCallerIdentityResponse\");\nvar de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_FU] != null) {\n contents[_FU] = de_FederatedUser(output[_FU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n return contents;\n}, \"de_GetFederationTokenResponse\");\nvar de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n return contents;\n}, \"de_GetSessionTokenResponse\");\nvar de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPCommunicationErrorException\");\nvar de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPRejectedClaimException\");\nvar de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidAuthorizationMessageException\");\nvar de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidIdentityTokenException\");\nvar de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_MalformedPolicyDocumentException\");\nvar de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_PackedPolicyTooLargeException\");\nvar de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_RegionDisabledException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2011-06-15\";\nvar _A = \"Action\";\nvar _AKI = \"AccessKeyId\";\nvar _AR = \"AssumeRole\";\nvar _ARI = \"AssumedRoleId\";\nvar _ARU = \"AssumedRoleUser\";\nvar _ARWSAML = \"AssumeRoleWithSAML\";\nvar _ARWWI = \"AssumeRoleWithWebIdentity\";\nvar _Ac = \"Account\";\nvar _Ar = \"Arn\";\nvar _Au = \"Audience\";\nvar _C = \"Credentials\";\nvar _CA = \"ContextAssertion\";\nvar _DAM = \"DecodeAuthorizationMessage\";\nvar _DM = \"DecodedMessage\";\nvar _DS = \"DurationSeconds\";\nvar _E = \"Expiration\";\nvar _EI = \"ExternalId\";\nvar _EM = \"EncodedMessage\";\nvar _FU = \"FederatedUser\";\nvar _FUI = \"FederatedUserId\";\nvar _GAKI = \"GetAccessKeyInfo\";\nvar _GCI = \"GetCallerIdentity\";\nvar _GFT = \"GetFederationToken\";\nvar _GST = \"GetSessionToken\";\nvar _I = \"Issuer\";\nvar _K = \"Key\";\nvar _N = \"Name\";\nvar _NQ = \"NameQualifier\";\nvar _P = \"Policy\";\nvar _PA = \"PolicyArns\";\nvar _PAr = \"PrincipalArn\";\nvar _PAro = \"ProviderArn\";\nvar _PC = \"ProvidedContexts\";\nvar _PI = \"ProviderId\";\nvar _PPS = \"PackedPolicySize\";\nvar _Pr = \"Provider\";\nvar _RA = \"RoleArn\";\nvar _RSN = \"RoleSessionName\";\nvar _S = \"Subject\";\nvar _SAK = \"SecretAccessKey\";\nvar _SAMLA = \"SAMLAssertion\";\nvar _SFWIT = \"SubjectFromWebIdentityToken\";\nvar _SI = \"SourceIdentity\";\nvar _SN = \"SerialNumber\";\nvar _ST = \"SubjectType\";\nvar _STe = \"SessionToken\";\nvar _T = \"Tags\";\nvar _TC = \"TokenCode\";\nvar _TTK = \"TransitiveTagKeys\";\nvar _UI = \"UserId\";\nvar _V = \"Version\";\nvar _Va = \"Value\";\nvar _WIT = \"WebIdentityToken\";\nvar _a = \"arn\";\nvar _m = \"message\";\nvar parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n const parser = new import_fast_xml_parser.XMLParser({\n attributeNamePrefix: \"\",\n htmlEntities: true,\n ignoreAttributes: false,\n ignoreDeclaration: true,\n parseTagValue: false,\n trimValues: false,\n tagValueProcessor: (_2, val) => val.trim() === \"\" && val.includes(\"\\n\") ? \"\" : void 0\n });\n parser.addEntity(\"#xD\", \"\\r\");\n parser.addEntity(\"#10\", \"\\n\");\n const parsedObj = parser.parse(encoded);\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn);\n }\n return {};\n}), \"parseBody\");\nvar parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n}, \"parseErrorBody\");\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n var _a2;\n if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/commands/AssumeRoleCommand.ts\nvar _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {}).n(\"STSClient\", \"AssumeRoleCommand\").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {\n};\n__name(_AssumeRoleCommand, \"AssumeRoleCommand\");\nvar AssumeRoleCommand = _AssumeRoleCommand;\n\n// src/commands/AssumeRoleWithSAMLCommand.ts\n\n\n\n\nvar import_EndpointParameters2 = require(\"./endpoint/EndpointParameters\");\nvar _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters2.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithSAML\", {}).n(\"STSClient\", \"AssumeRoleWithSAMLCommand\").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() {\n};\n__name(_AssumeRoleWithSAMLCommand, \"AssumeRoleWithSAMLCommand\");\nvar AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand;\n\n// src/commands/AssumeRoleWithWebIdentityCommand.ts\n\n\n\n\nvar import_EndpointParameters3 = require(\"./endpoint/EndpointParameters\");\nvar _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters3.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {}).n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {\n};\n__name(_AssumeRoleWithWebIdentityCommand, \"AssumeRoleWithWebIdentityCommand\");\nvar AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand;\n\n// src/commands/DecodeAuthorizationMessageCommand.ts\n\n\n\n\nvar import_EndpointParameters4 = require(\"./endpoint/EndpointParameters\");\nvar _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters4.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"DecodeAuthorizationMessage\", {}).n(\"STSClient\", \"DecodeAuthorizationMessageCommand\").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() {\n};\n__name(_DecodeAuthorizationMessageCommand, \"DecodeAuthorizationMessageCommand\");\nvar DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand;\n\n// src/commands/GetAccessKeyInfoCommand.ts\n\n\n\n\nvar import_EndpointParameters5 = require(\"./endpoint/EndpointParameters\");\nvar _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters5.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetAccessKeyInfo\", {}).n(\"STSClient\", \"GetAccessKeyInfoCommand\").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() {\n};\n__name(_GetAccessKeyInfoCommand, \"GetAccessKeyInfoCommand\");\nvar GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand;\n\n// src/commands/GetCallerIdentityCommand.ts\n\n\n\n\nvar import_EndpointParameters6 = require(\"./endpoint/EndpointParameters\");\nvar _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters6.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetCallerIdentity\", {}).n(\"STSClient\", \"GetCallerIdentityCommand\").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() {\n};\n__name(_GetCallerIdentityCommand, \"GetCallerIdentityCommand\");\nvar GetCallerIdentityCommand = _GetCallerIdentityCommand;\n\n// src/commands/GetFederationTokenCommand.ts\n\n\n\n\nvar import_EndpointParameters7 = require(\"./endpoint/EndpointParameters\");\nvar _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters7.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetFederationToken\", {}).n(\"STSClient\", \"GetFederationTokenCommand\").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() {\n};\n__name(_GetFederationTokenCommand, \"GetFederationTokenCommand\");\nvar GetFederationTokenCommand = _GetFederationTokenCommand;\n\n// src/commands/GetSessionTokenCommand.ts\n\n\n\n\nvar import_EndpointParameters8 = require(\"./endpoint/EndpointParameters\");\nvar _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters8.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetSessionToken\", {}).n(\"STSClient\", \"GetSessionTokenCommand\").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() {\n};\n__name(_GetSessionTokenCommand, \"GetSessionTokenCommand\");\nvar GetSessionTokenCommand = _GetSessionTokenCommand;\n\n// src/STS.ts\nvar import_STSClient = require(\"././STSClient\");\nvar commands = {\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand\n};\nvar _STS = class _STS extends import_STSClient.STSClient {\n};\n__name(_STS, \"STS\");\nvar STS = _STS;\n(0, import_smithy_client.createAggregatedClient)(commands, STS);\n\n// src/index.ts\nvar import_EndpointParameters9 = require(\"./endpoint/EndpointParameters\");\nvar import_runtimeExtensions = require(\"././runtimeExtensions\");\n\n\n// src/defaultStsRoleAssumers.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\nvar ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nvar resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {\n var _a2, _b;\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n if (!parentRegion || (0, import_util_endpoints.partition)(parentRegion).name === \"aws\") {\n (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call(\n credentialProviderLogger,\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? ASSUME_ROLE_DEFAULT_REGION;\n } else {\n (_b = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _b.call(\n credentialProviderLogger,\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${parentRegion} (parent client)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;\n }\n}, \"resolveRegion\");\nvar getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n var _a2;\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const { logger, region, requestHandler, credentialProviderLogger } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.region,\n credentialProviderLogger\n );\n stsClient = new stsClientCtor({\n logger,\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: () => async () => closureSourceCreds,\n region: resolvedRegion,\n ...requestHandler ? { requestHandler } : {}\n });\n }\n const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n return {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n credentialScope: Credentials2.CredentialScope\n };\n };\n}, \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {\n let stsClient;\n return async (params) => {\n var _a2;\n if (!stsClient) {\n const { logger, region, requestHandler, credentialProviderLogger } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.region,\n credentialProviderLogger\n );\n stsClient = new stsClientCtor({\n logger,\n region: resolvedRegion,\n ...requestHandler ? { requestHandler } : {}\n });\n }\n const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n return {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n credentialScope: Credentials2.CredentialScope\n };\n };\n}, \"getDefaultRoleAssumerWithWebIdentity\");\n\n// src/defaultRoleAssumers.ts\nvar import_STSClient2 = require(\"././STSClient\");\nvar getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {\n var _a2;\n if (!customizations)\n return baseCtor;\n else\n return _a2 = class extends baseCtor {\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n }, __name(_a2, \"CustomizableSTSClient\"), _a2;\n}, \"getCustomizableStsClientCtor\");\nvar getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumerWithWebIdentity\");\nvar decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer2(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),\n ...input\n}), \"decorateDefaultCredentialProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n STSServiceException,\n __Client,\n STSClient,\n STS,\n $Command,\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand,\n ExpiredTokenException,\n MalformedPolicyDocumentException,\n PackedPolicyTooLargeException,\n RegionDisabledException,\n IDPRejectedClaimException,\n InvalidIdentityTokenException,\n IDPCommunicationErrorException,\n InvalidAuthorizationMessageException,\n CredentialsFilterSensitiveLog,\n AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenResponseFilterSensitiveLog,\n getDefaultRoleAssumer,\n getDefaultRoleAssumerWithWebIdentity,\n decorateDefaultCredentialProvider\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst credentialDefaultProvider_1 = require(\"./credentialDefaultProvider\");\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_2 = require(\"@smithy/core\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") ||\n (async (idProps) => await (0, credentialDefaultProvider_1.defaultProvider)(idProps?.__config || {})()),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"STS\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRuntimeExtensions = void 0;\nconst region_config_resolver_1 = require(\"@aws-sdk/region-config-resolver\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst httpAuthExtensionConfiguration_1 = require(\"./auth/httpAuthExtensionConfiguration\");\nconst asPartial = (t) => t;\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)),\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration),\n };\n};\nexports.resolveRuntimeExtensions = resolveRuntimeExtensions;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,\n AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,\n _toBool: () => _toBool,\n _toNum: () => _toNum,\n _toStr: () => _toStr,\n awsExpectUnion: () => awsExpectUnion,\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,\n resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/client/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n process.emitWarning(\n `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 14.x on May 1, 2024.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to an active Node.js LTS version.\n\nMore information can be found at: https://a.co/dzr2AJd`\n );\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\n\n\n// src/httpAuthSchemes/utils/getDateHeader.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar getDateHeader = /* @__PURE__ */ __name((response) => {\n var _a, _b;\n return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0;\n}, \"getDateHeader\");\n\n// src/httpAuthSchemes/utils/getSkewCorrectedDate.ts\nvar getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), \"getSkewCorrectedDate\");\n\n// src/httpAuthSchemes/utils/isClockSkewed.ts\nvar isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, \"isClockSkewed\");\n\n// src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts\nvar getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n}, \"getUpdatedSystemClockOffset\");\n\n// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\nvar throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n}, \"throwSigningPropertyError\");\nvar validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => {\n var _a, _b, _c;\n const context = throwSigningPropertyError(\n \"context\",\n signingProperties.context\n );\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0];\n const signerFunction = throwSigningPropertyError(\n \"signer\",\n config.signer\n );\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion;\n const signingName = signingProperties == null ? void 0 : signingProperties.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingName\n };\n}, \"validateSigningProperties\");\nvar _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!import_protocol_http.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion,\n signingService: signingName\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\n \"config\",\n signingProperties.config\n );\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\n \"config\",\n signingProperties.config\n );\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n};\n__name(_AwsSdkSigV4Signer, \"AwsSdkSigV4Signer\");\nvar AwsSdkSigV4Signer = _AwsSdkSigV4Signer;\nvar AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n\n// src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts\nvar import_core = require(\"@smithy/core\");\nvar import_signature_v4 = require(\"@smithy/signature-v4\");\nvar resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {\n let normalizedCreds;\n if (config.credentials) {\n normalizedCreds = (0, import_core.memoizeIdentityProvider)(config.credentials, import_core.isIdentityExpired, import_core.doesIdentityRequireRefresh);\n }\n if (!normalizedCreds) {\n if (config.credentialDefaultProvider) {\n normalizedCreds = (0, import_core.normalizeProvider)(\n config.credentialDefaultProvider(\n Object.assign({}, config, {\n parentClientConfig: config\n })\n )\n );\n } else {\n normalizedCreds = /* @__PURE__ */ __name(async () => {\n throw new Error(\"`credentials` is missing\");\n }, \"normalizedCreds\");\n }\n }\n const {\n // Default for signingEscapePath\n signingEscapePath = true,\n // Default for systemClockOffset\n systemClockOffset = config.systemClockOffset || 0,\n // No default for sha256 since it is platform dependent\n sha256\n } = config;\n let signer;\n if (config.signer) {\n signer = (0, import_core.normalizeProvider)(config.signer);\n } else if (config.regionInfoProvider) {\n signer = /* @__PURE__ */ __name(() => (0, import_core.normalizeProvider)(config.region)().then(\n async (region) => [\n await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint()\n }) || {},\n region\n ]\n ).then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: normalizedCreds,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }), \"signer\");\n } else {\n signer = /* @__PURE__ */ __name(async (authScheme) => {\n authScheme = Object.assign(\n {},\n {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await (0, import_core.normalizeProvider)(config.region)(),\n properties: {}\n },\n authScheme\n );\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: normalizedCreds,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }, \"signer\");\n }\n return {\n ...config,\n systemClockOffset,\n signingEscapePath,\n credentials: normalizedCreds,\n signer\n };\n}, \"resolveAwsSdkSigV4Config\");\nvar resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\n\n// src/protocols/coercing-serializers.ts\nvar _toStr = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n}, \"_toStr\");\nvar _toBool = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n}, \"_toBool\");\nvar _toNum = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n}, \"_toNum\");\n\n// src/protocols/json/awsExpectUnion.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar awsExpectUnion = /* @__PURE__ */ __name((value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return (0, import_smithy_client.expectUnion)(value);\n}, \"awsExpectUnion\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n emitWarningIfUnsupportedVersion,\n AwsSdkSigV4Signer,\n AWSSDKSigV4Signer,\n resolveAwsSdkSigV4Config,\n resolveAWSSDKSigV4Config,\n _toStr,\n _toBool,\n _toNum,\n awsExpectUnion\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,\n ENV_EXPIRATION: () => ENV_EXPIRATION,\n ENV_KEY: () => ENV_KEY,\n ENV_SECRET: () => ENV_SECRET,\n ENV_SESSION: () => ENV_SESSION,\n fromEnv: () => fromEnv\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromEnv.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nvar ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nvar ENV_SESSION = \"AWS_SESSION_TOKEN\";\nvar ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nvar ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nvar fromEnv = /* @__PURE__ */ __name((init) => async () => {\n var _a;\n (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-env\", \"fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n if (accessKeyId && secretAccessKey) {\n return {\n accessKeyId,\n secretAccessKey,\n ...sessionToken && { sessionToken },\n ...expiry && { expiration: new Date(expiry) },\n ...credentialScope && { credentialScope }\n };\n }\n throw new import_property_provider.CredentialsProviderError(\"Unable to find environment variable credentials.\");\n}, \"fromEnv\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_KEY,\n ENV_SECRET,\n ENV_SESSION,\n ENV_EXPIRATION,\n ENV_CREDENTIAL_SCOPE,\n fromEnv\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkUrl = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nconst checkUrl = (url) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`);\n};\nexports.checkUrl = checkUrl;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nconst tslib_1 = require(\"tslib\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst promises_1 = tslib_1.__importDefault(require(\"fs/promises\"));\nconst checkUrl_1 = require(\"./checkUrl\");\nconst requestHelpers_1 = require(\"./requestHelpers\");\nconst retry_wrapper_1 = require(\"./retry-wrapper\");\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nconst fromHttp = (options) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug(\"@aws-sdk/credential-provider-http\", \"fromHttp\");\n let host;\n const relative = (_b = options.awsContainerCredentialsRelativeUri) !== null && _b !== void 0 ? _b : process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = (_c = options.awsContainerCredentialsFullUri) !== null && _c !== void 0 ? _c : process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = (_d = options.awsContainerAuthorizationToken) !== null && _d !== void 0 ? _d : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = (_e = options.awsContainerAuthorizationTokenFile) !== null && _e !== void 0 ? _e : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n if (relative && full) {\n console.warn(\"AWS SDK HTTP credentials provider:\", \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n console.warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n console.warn(\"AWS SDK HTTP credentials provider:\", \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n console.warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`);\n }\n const url = new URL(host);\n (0, checkUrl_1.checkUrl)(url);\n const requestHandler = new node_http_handler_1.NodeHttpHandler({\n requestTimeout: (_f = options.timeout) !== null && _f !== void 0 ? _f : 1000,\n connectionTimeout: (_g = options.timeout) !== null && _g !== void 0 ? _g : 1000,\n });\n return (0, retry_wrapper_1.retryWrapper)(async () => {\n const request = (0, requestHelpers_1.createGetRequest)(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request);\n return (0, requestHelpers_1.getCredentials)(result.response);\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(String(e));\n }\n }, (_h = options.maxRetries) !== null && _h !== void 0 ? _h : 3, (_j = options.timeout) !== null && _j !== void 0 ? _j : 1000);\n};\nexports.fromHttp = fromHttp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCredentials = exports.createGetRequest = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_stream_1 = require(\"@smithy/util-stream\");\nfunction createGetRequest(url) {\n return new protocol_http_1.HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexports.createGetRequest = createGetRequest;\nasync function getCredentials(response) {\n var _a, _b;\n const contentType = (_b = (_a = response === null || response === void 0 ? void 0 : response.headers[\"content-type\"]) !== null && _a !== void 0 ? _a : response === null || response === void 0 ? void 0 : response.headers[\"Content-Type\"]) !== null && _b !== void 0 ? _b : \"\";\n if (!contentType.includes(\"json\")) {\n console.warn(\"HTTP credential provider response header content-type was not application/json. Observed: \" + contentType + \".\");\n }\n const stream = (0, util_stream_1.sdkStreamMixin)(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new property_provider_1.CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\");\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`);\n}\nexports.getCredentials = getCredentials;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryWrapper = void 0;\nconst retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\nexports.retryWrapper = retryWrapper;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nvar fromHttp_1 = require(\"./fromHttp/fromHttp\");\nObject.defineProperty(exports, \"fromHttp\", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } });\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSts.ts\nvar loadSts_exports = {};\n__export(loadSts_exports, {\n getDefaultRoleAssumer: () => import_client_sts.getDefaultRoleAssumer\n});\nvar import_client_sts;\nvar init_loadSts = __esm({\n \"src/loadSts.ts\"() {\n import_client_sts = require(\"@aws-sdk/client-sts\");\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromIni: () => fromIni\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromIni.ts\n\n\n// src/resolveProfileData.ts\n\n\n// src/resolveAssumeRoleCredentials.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveCredentialSource.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => {\n const sourceProvidersMap = {\n EcsContainer: (options) => Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\"))).then(({ fromContainerMetadata }) => fromContainerMetadata(options)),\n Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\"))).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)),\n Environment: (options) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-env\"))).then(({ fromEnv }) => fromEnv(options))\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n } else {\n throw new import_property_provider.CredentialsProviderError(\n `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`\n );\n }\n}, \"resolveCredentialSource\");\n\n// src/resolveAssumeRoleCredentials.ts\nvar isAssumeRoleProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), \"isAssumeRoleProfile\");\nvar isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\", \"isAssumeRoleWithSourceProfile\");\nvar isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\", \"isAssumeRoleWithProviderProfile\");\nvar resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {\n var _a;\n (_a = options.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-ini\", \"resolveAssumeRoleCredentials (STS)\");\n const data = profiles[profileName];\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer: getDefaultRoleAssumer2 } = await Promise.resolve().then(() => (init_loadSts(), loadSts_exports));\n options.roleAssumer = getDefaultRoleAssumer2(\n {\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: options == null ? void 0 : options.parentClientConfig\n },\n options.clientPlugins\n );\n }\n const { source_profile } = data;\n if (source_profile && source_profile in visitedProfiles) {\n throw new import_property_provider.CredentialsProviderError(\n `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(\", \"),\n false\n );\n }\n const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {\n ...visitedProfiles,\n [source_profile]: true\n }) : (await resolveCredentialSource(data.credential_source, profileName)(options))();\n const params = {\n RoleArn: data.role_arn,\n RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: data.external_id,\n DurationSeconds: parseInt(data.duration_seconds || \"3600\", 10)\n };\n const { mfa_serial } = data;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,\n false\n );\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params);\n}, \"resolveAssumeRoleCredentials\");\n\n// src/resolveProcessCredentials.ts\nvar isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\", \"isProcessProfile\");\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\"))).then(\n ({ fromProcess }) => fromProcess({\n ...options,\n profile\n })()\n), \"resolveProcessCredentials\");\n\n// src/resolveSsoCredentials.ts\nvar resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO({\n profile,\n logger: options.logger\n })();\n}, \"resolveSsoCredentials\");\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveStaticCredentials.ts\nvar isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.aws_access_key_id === \"string\" && typeof arg.aws_secret_access_key === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1, \"isStaticCredsProfile\");\nvar resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {\n var _a;\n (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-ini\", \"resolveStaticCredentials\");\n return Promise.resolve({\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n credentialScope: profile.aws_credential_scope\n });\n}, \"resolveStaticCredentials\");\n\n// src/resolveWebIdentityCredentials.ts\nvar isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.web_identity_token_file === \"string\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1, \"isWebIdentityProfile\");\nvar resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\"))).then(\n ({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig\n })()\n), \"resolveWebIdentityCredentials\");\n\n// src/resolveProfileData.ts\nvar resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleProfile(data)) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, options);\n }\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);\n}, \"resolveProfileData\");\n\n// src/fromIni.ts\nvar fromIni = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-ini\", \"fromIni\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init);\n}, \"fromIni\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromIni\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,\n credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,\n defaultProvider: () => defaultProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/defaultProvider.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/remoteProvider.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar remoteProvider = /* @__PURE__ */ __name(async (init) => {\n var _a, _b;\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-http\")));\n return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED]) {\n return async () => {\n throw new import_property_provider.CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\");\n };\n }\n (_b = init.logger) == null ? void 0 : _b.debug(\"@aws-sdk/credential-provider-node\", \"remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n}, \"remoteProvider\");\n\n// src/defaultProvider.ts\nvar defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n ...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromEnv\");\n const { fromEnv } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-env\")));\n return fromEnv(init)();\n }\n ],\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new import_property_provider.CredentialsProviderError(\n \"Skipping SSO provider in default chain (inputs do not include SSO fields).\"\n );\n }\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromIni\");\n const { fromIni } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-ini\")));\n return fromIni(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromProcess\");\n const { fromProcess } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\")));\n return fromProcess(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\")));\n return fromTokenFile(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new import_property_provider.CredentialsProviderError(\"Could not load credentials from any providers\", false);\n }\n ),\n credentialsTreatedAsExpired,\n credentialsWillNeedRefresh\n), \"defaultProvider\");\nvar credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, \"credentialsWillNeedRefresh\");\nvar credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, \"credentialsTreatedAsExpired\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n defaultProvider,\n credentialsWillNeedRefresh,\n credentialsTreatedAsExpired\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromProcess: () => fromProcess\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromProcess.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveProcessCredentials.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_child_process = require(\"child_process\");\nvar import_util = require(\"util\");\n\n// src/getValidatedProcessCredentials.ts\nvar getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = /* @__PURE__ */ new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n return {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...data.SessionToken && { sessionToken: data.SessionToken },\n ...data.Expiration && { expiration: new Date(data.Expiration) },\n ...data.CredentialScope && { credentialScope: data.CredentialScope }\n };\n}, \"getValidatedProcessCredentials\");\n\n// src/resolveProcessCredentials.ts\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== void 0) {\n const execPromise = (0, import_util.promisify)(import_child_process.exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n } catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data);\n } catch (error) {\n throw new import_property_provider.CredentialsProviderError(error.message);\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);\n }\n}, \"resolveProcessCredentials\");\n\n// src/fromProcess.ts\nvar fromProcess = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-process\", \"fromProcess\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles);\n}, \"fromProcess\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromProcess\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSso.ts\nvar loadSso_exports = {};\n__export(loadSso_exports, {\n GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,\n SSOClient: () => import_client_sso.SSOClient\n});\nvar import_client_sso;\nvar init_loadSso = __esm({\n \"src/loadSso.ts\"() {\n import_client_sso = require(\"@aws-sdk/client-sso\");\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromSSO: () => fromSSO,\n isSsoProfile: () => isSsoProfile,\n validateSsoProfile: () => validateSsoProfile\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromSSO.ts\n\n\n\n// src/isSsoProfile.ts\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveSSOCredentials.ts\nvar import_token_providers = require(\"@aws-sdk/token-providers\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nvar resolveSSOCredentials = /* @__PURE__ */ __name(async ({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig,\n profile\n}) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await (0, import_token_providers.fromSso)({ profile })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString()\n };\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n } else {\n try {\n token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n `The SSO session associated with this profile is invalid. ${refreshMessage}`,\n SHOULD_FAIL_CREDENTIAL_CHAIN\n );\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new import_property_provider.CredentialsProviderError(\n `The SSO session associated with this profile has expired. ${refreshMessage}`,\n SHOULD_FAIL_CREDENTIAL_CHAIN\n );\n }\n const { accessToken } = token;\n const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));\n const sso = ssoClient || new SSOClient2(\n Object.assign({}, clientConfig ?? {}, {\n region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion\n })\n );\n let ssoResp;\n try {\n ssoResp = await sso.send(\n new GetRoleCredentialsCommand2({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken\n })\n );\n } catch (e) {\n throw import_property_provider.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new import_property_provider.CredentialsProviderError(\"SSO returns an invalid temporary credential.\", SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope };\n}, \"resolveSSOCredentials\");\n\n// src/validateSsoProfile.ts\n\nvar validateSsoProfile = /* @__PURE__ */ __name((profile) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", \"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\n \", \"\n )}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,\n false\n );\n }\n return profile;\n}, \"validateSsoProfile\");\n\n// src/fromSSO.ts\nvar fromSSO = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-sso\", \"fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`);\n }\n if (!isSsoProfile(profile)) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);\n }\n if (profile == null ? void 0 : profile.sso_session) {\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false);\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false);\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient,\n clientConfig: init.clientConfig,\n profile: profileName\n });\n } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new import_property_provider.CredentialsProviderError(\n 'Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"'\n );\n } else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n profile: profileName\n });\n }\n}, \"fromSSO\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromSSO,\n isSsoProfile,\n validateSsoProfile\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst fs_1 = require(\"fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async () => {\n var _a, _b, _c, _d;\n (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug(\"@aws-sdk/credential-provider-web-identity\", \"fromTokenFile\");\n const webIdentityTokenFile = (_b = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _b !== void 0 ? _b : process.env[ENV_TOKEN_FILE];\n const roleArn = (_c = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_ARN];\n const roleSessionName = (_d = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _d !== void 0 ? _d : process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new property_provider_1.CredentialsProviderError(\"Web identity configuration not specified\");\n }\n return (0, fromWebToken_1.fromWebToken)({\n ...init,\n webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n};\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst fromWebToken = (init) => async () => {\n var _a;\n (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug(\"@aws-sdk/credential-provider-web-identity\", \"fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require(\"./loadSts\")));\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: init.parentClientConfig,\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromTokenFile\"), module.exports);\n__reExport(src_exports, require(\"././fromWebToken\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromTokenFile,\n fromWebToken\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDefaultRoleAssumerWithWebIdentity = void 0;\nconst client_sts_1 = require(\"@aws-sdk/client-sts\");\nObject.defineProperty(exports, \"getDefaultRoleAssumerWithWebIdentity\", { enumerable: true, get: function () { return client_sts_1.getDefaultRoleAssumerWithWebIdentity; } });\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getHostHeaderPlugin: () => getHostHeaderPlugin,\n hostHeaderMiddleware: () => hostHeaderMiddleware,\n hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,\n resolveHostHeaderConfig: () => resolveHostHeaderConfig\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nfunction resolveHostHeaderConfig(input) {\n return input;\n}\n__name(resolveHostHeaderConfig, \"resolveHostHeaderConfig\");\nvar hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n } else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null)\n host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n}, \"hostHeaderMiddleware\");\nvar hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true\n};\nvar getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n }\n}), \"getHostHeaderPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveHostHeaderConfig,\n hostHeaderMiddleware,\n hostHeaderMiddlewareOptions,\n getHostHeaderPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getLoggerPlugin: () => getLoggerPlugin,\n loggerMiddleware: () => loggerMiddleware,\n loggerMiddlewareOptions: () => loggerMiddlewareOptions\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/loggerMiddleware.ts\nvar loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {\n var _a, _b;\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, {\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata\n });\n return response;\n } catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, {\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata\n });\n throw error;\n }\n}, \"loggerMiddleware\");\nvar loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true\n};\nvar getLoggerPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n }\n}), \"getLoggerPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loggerMiddleware,\n loggerMiddlewareOptions,\n getLoggerPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin: () => getRecursionDetectionPlugin,\n recursionDetectionMiddleware: () => recursionDetectionMiddleware\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar TRACE_ID_HEADER_NAME = \"X-Amzn-Trace-Id\";\nvar ENV_LAMBDA_FUNCTION_NAME = \"AWS_LAMBDA_FUNCTION_NAME\";\nvar ENV_TRACE_ID = \"_X_AMZN_TRACE_ID\";\nvar recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== \"node\" || request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) {\n return next(args);\n }\n const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];\n const traceId = process.env[ENV_TRACE_ID];\n const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === \"string\" && str.length > 0, \"nonEmptyString\");\n if (nonEmptyString(functionName) && nonEmptyString(traceId)) {\n request.headers[TRACE_ID_HEADER_NAME] = traceId;\n }\n return next({\n ...args,\n request\n });\n}, \"recursionDetectionMiddleware\");\nvar addRecursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\"\n};\nvar getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);\n }\n}), \"getRecursionDetectionPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n recursionDetectionMiddleware,\n addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n awsAuthMiddleware: () => awsAuthMiddleware,\n awsAuthMiddlewareOptions: () => awsAuthMiddlewareOptions,\n getAwsAuthPlugin: () => getAwsAuthPlugin,\n getSigV4AuthPlugin: () => getSigV4AuthPlugin,\n resolveAwsAuthConfig: () => resolveAwsAuthConfig,\n resolveSigV4AuthConfig: () => resolveSigV4AuthConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/awsAuthConfiguration.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_signature_v4 = require(\"@smithy/signature-v4\");\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar CREDENTIAL_EXPIRE_WINDOW = 3e5;\nvar resolveAwsAuthConfig = /* @__PURE__ */ __name((input) => {\n const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(\n Object.assign({}, input, {\n parentClientConfig: input\n })\n );\n const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;\n let signer;\n if (input.signer) {\n signer = (0, import_util_middleware.normalizeProvider)(input.signer);\n } else if (input.regionInfoProvider) {\n signer = /* @__PURE__ */ __name(() => (0, import_util_middleware.normalizeProvider)(input.region)().then(\n async (region) => [\n await input.regionInfoProvider(region, {\n useFipsEndpoint: await input.useFipsEndpoint(),\n useDualstackEndpoint: await input.useDualstackEndpoint()\n }) || {},\n region\n ]\n ).then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n input.signingRegion = input.signingRegion || signingRegion || region;\n input.signingName = input.signingName || signingService || input.serviceId;\n const params = {\n ...input,\n credentials: normalizedCreds,\n region: input.signingRegion,\n service: input.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = input.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }), \"signer\");\n } else {\n signer = /* @__PURE__ */ __name(async (authScheme) => {\n authScheme = Object.assign(\n {},\n {\n name: \"sigv4\",\n signingName: input.signingName || input.defaultSigningName,\n signingRegion: await (0, import_util_middleware.normalizeProvider)(input.region)(),\n properties: {}\n },\n authScheme\n );\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n input.signingRegion = input.signingRegion || signingRegion;\n input.signingName = input.signingName || signingService || input.serviceId;\n const params = {\n ...input,\n credentials: normalizedCreds,\n region: input.signingRegion,\n service: input.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = input.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }, \"signer\");\n }\n return {\n ...input,\n systemClockOffset,\n signingEscapePath,\n credentials: normalizedCreds,\n signer\n };\n}, \"resolveAwsAuthConfig\");\nvar resolveSigV4AuthConfig = /* @__PURE__ */ __name((input) => {\n const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(\n Object.assign({}, input, {\n parentClientConfig: input\n })\n );\n const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;\n let signer;\n if (input.signer) {\n signer = (0, import_util_middleware.normalizeProvider)(input.signer);\n } else {\n signer = (0, import_util_middleware.normalizeProvider)(\n new import_signature_v4.SignatureV4({\n credentials: normalizedCreds,\n region: input.region,\n service: input.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n })\n );\n }\n return {\n ...input,\n systemClockOffset,\n signingEscapePath,\n credentials: normalizedCreds,\n signer\n };\n}, \"resolveSigV4AuthConfig\");\nvar normalizeCredentialProvider = /* @__PURE__ */ __name((credentials) => {\n if (typeof credentials === \"function\") {\n return (0, import_property_provider.memoize)(\n credentials,\n (credentials2) => credentials2.expiration !== void 0 && credentials2.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW,\n (credentials2) => credentials2.expiration !== void 0\n );\n }\n return (0, import_util_middleware.normalizeProvider)(credentials);\n}, \"normalizeCredentialProvider\");\n\n// src/awsAuthMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n// src/utils/getSkewCorrectedDate.ts\nvar getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), \"getSkewCorrectedDate\");\n\n// src/utils/isClockSkewed.ts\nvar isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, \"isClockSkewed\");\n\n// src/utils/getUpdatedSystemClockOffset.ts\nvar getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n}, \"getUpdatedSystemClockOffset\");\n\n// src/awsAuthMiddleware.ts\nvar awsAuthMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async function(args) {\n var _a, _b, _c, _d;\n if (!import_protocol_http.HttpRequest.isInstance(args.request))\n return next(args);\n const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0];\n const multiRegionOverride = (authScheme == null ? void 0 : authScheme.name) === \"sigv4a\" ? (_d = authScheme == null ? void 0 : authScheme.signingRegionSet) == null ? void 0 : _d.join(\",\") : void 0;\n const signer = await options.signer(authScheme);\n let signedRequest;\n const signingOptions = {\n signingDate: getSkewCorrectedDate(options.systemClockOffset),\n signingRegion: multiRegionOverride || context[\"signing_region\"],\n signingService: context[\"signing_service\"]\n };\n if (context.s3ExpressIdentity) {\n const sigV4MultiRegion = signer;\n signedRequest = await sigV4MultiRegion.signWithCredentials(\n args.request,\n context.s3ExpressIdentity,\n signingOptions\n );\n if (signedRequest.headers[\"X-Amz-Security-Token\"] || signedRequest.headers[\"x-amz-security-token\"]) {\n throw new Error(\"X-Amz-Security-Token must not be set for s3-express requests.\");\n }\n } else {\n signedRequest = await signer.sign(args.request, signingOptions);\n }\n const output = await next({\n ...args,\n request: signedRequest\n }).catch((error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n options.systemClockOffset = getUpdatedSystemClockOffset(serverTime, options.systemClockOffset);\n }\n throw error;\n });\n const dateHeader = getDateHeader(output.response);\n if (dateHeader) {\n options.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset);\n }\n return output;\n}, \"awsAuthMiddleware\");\nvar getDateHeader = /* @__PURE__ */ __name((response) => {\n var _a, _b;\n return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0;\n}, \"getDateHeader\");\nvar awsAuthMiddlewareOptions = {\n name: \"awsAuthMiddleware\",\n tags: [\"SIGNATURE\", \"AWSAUTH\"],\n relation: \"after\",\n toMiddleware: \"retryMiddleware\",\n override: true\n};\nvar getAwsAuthPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(awsAuthMiddleware(options), awsAuthMiddlewareOptions);\n }\n}), \"getAwsAuthPlugin\");\nvar getSigV4AuthPlugin = getAwsAuthPlugin;\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveAwsAuthConfig,\n resolveSigV4AuthConfig,\n awsAuthMiddleware,\n awsAuthMiddlewareOptions,\n getAwsAuthPlugin,\n getSigV4AuthPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,\n getUserAgentPlugin: () => getUserAgentPlugin,\n resolveUserAgentConfig: () => resolveUserAgentConfig,\n userAgentMiddleware: () => userAgentMiddleware\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/configurations.ts\nfunction resolveUserAgentConfig(input) {\n return {\n ...input,\n customUserAgent: typeof input.customUserAgent === \"string\" ? [[input.customUserAgent]] : input.customUserAgent\n };\n}\n__name(resolveUserAgentConfig, \"resolveUserAgentConfig\");\n\n// src/user-agent-middleware.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n// src/constants.ts\nvar USER_AGENT = \"user-agent\";\nvar X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nvar SPACE = \" \";\nvar UA_NAME_SEPARATOR = \"/\";\nvar UA_NAME_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;\nvar UA_VALUE_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w\\#]/g;\nvar UA_ESCAPE_CHAR = \"-\";\n\n// src/user-agent-middleware.ts\nvar userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n var _a, _b;\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request))\n return next(args);\n const { headers } = request;\n const userAgent = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || [];\n const prefix = (0, import_util_endpoints.getUserAgentPrefix)();\n const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n } else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request\n });\n}, \"userAgentMiddleware\");\nvar escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => {\n var _a;\n const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);\n const version = (_a = userAgentPair[1]) == null ? void 0 : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n}, \"escapeUserAgent\");\nvar getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true\n};\nvar getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n }\n}), \"getUserAgentPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveUserAgentConfig,\n userAgentMiddleware,\n getUserAgentMiddlewareOptions,\n getUserAgentPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/index.ts\nvar getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let runtimeConfigRegion = /* @__PURE__ */ __name(async () => {\n if (runtimeConfig.region === void 0) {\n throw new Error(\"Region is missing from runtimeConfig\");\n }\n const region = runtimeConfig.region;\n if (typeof region === \"string\") {\n return region;\n }\n return region();\n }, \"runtimeConfigRegion\");\n return {\n setRegion(region) {\n runtimeConfigRegion = region;\n },\n region() {\n return runtimeConfigRegion;\n }\n };\n}, \"getAwsRegionExtensionConfiguration\");\nvar resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region()\n };\n}, \"resolveAwsRegionExtensionConfiguration\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n }\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return {\n ...input,\n region: async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }\n };\n}, \"resolveRegionConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSsoOidc.ts\nvar loadSsoOidc_exports = {};\n__export(loadSsoOidc_exports, {\n CreateTokenCommand: () => import_client_sso_oidc.CreateTokenCommand,\n SSOOIDCClient: () => import_client_sso_oidc.SSOOIDCClient\n});\nvar import_client_sso_oidc;\nvar init_loadSsoOidc = __esm({\n \"src/loadSsoOidc.ts\"() {\n import_client_sso_oidc = require(\"@aws-sdk/client-sso-oidc\");\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromSso: () => fromSso,\n fromStatic: () => fromStatic,\n nodeProvider: () => nodeProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromSso.ts\n\n\n\n// src/constants.ts\nvar EXPIRE_WINDOW_MS = 5 * 60 * 1e3;\nvar REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n\n// src/getSsoOidcClient.ts\nvar ssoOidcClientsHash = {};\nvar getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => {\n const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports));\n if (ssoOidcClientsHash[ssoRegion]) {\n return ssoOidcClientsHash[ssoRegion];\n }\n const ssoOidcClient = new SSOOIDCClient2({ region: ssoRegion });\n ssoOidcClientsHash[ssoRegion] = ssoOidcClient;\n return ssoOidcClient;\n}, \"getSsoOidcClient\");\n\n// src/getNewSsoOidcToken.ts\nvar getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => {\n const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports));\n const ssoOidcClient = await getSsoOidcClient(ssoRegion);\n return ssoOidcClient.send(\n new CreateTokenCommand2({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\"\n })\n );\n}, \"getNewSsoOidcToken\");\n\n// src/validateTokenExpiry.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar validateTokenExpiry = /* @__PURE__ */ __name((token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n}, \"validateTokenExpiry\");\n\n// src/validateTokenKey.ts\n\nvar validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new import_property_provider.TokenProviderError(\n `Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`,\n false\n );\n }\n}, \"validateTokenKey\");\n\n// src/writeSSOTokenToFile.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar import_fs = require(\"fs\");\nvar { writeFile } = import_fs.promises;\nvar writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {\n const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n}, \"writeSSOTokenToFile\");\n\n// src/fromSso.ts\nvar lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);\nvar fromSso = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/token-providers\", \"fromSso\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n } else if (!profile[\"sso_session\"]) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' could not be found in shared credentials file.`,\n false\n );\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,\n false\n );\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);\n } catch (e) {\n throw new import_property_provider.TokenProviderError(\n `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,\n false\n );\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken\n });\n } catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration\n };\n } catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n}, \"fromSso\");\n\n// src/fromStatic.ts\n\nvar fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {\n logger == null ? void 0 : logger.debug(\"@aws-sdk/token-providers\", \"fromStatic\");\n if (!token || !token.token) {\n throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);\n }\n return token;\n}, \"fromStatic\");\n\n// src/nodeProvider.ts\n\nvar nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(fromSso(init), async () => {\n throw new import_property_provider.TokenProviderError(\"Could not load token from any providers\", false);\n }),\n (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,\n (token) => token.expiration !== void 0\n), \"nodeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromSso,\n fromStatic,\n nodeProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ConditionObject: () => import_util_endpoints.ConditionObject,\n DeprecatedObject: () => import_util_endpoints.DeprecatedObject,\n EndpointError: () => import_util_endpoints.EndpointError,\n EndpointObject: () => import_util_endpoints.EndpointObject,\n EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,\n EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,\n EndpointParams: () => import_util_endpoints.EndpointParams,\n EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,\n EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,\n ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,\n EvaluateOptions: () => import_util_endpoints.EvaluateOptions,\n Expression: () => import_util_endpoints.Expression,\n FunctionArgv: () => import_util_endpoints.FunctionArgv,\n FunctionObject: () => import_util_endpoints.FunctionObject,\n FunctionReturn: () => import_util_endpoints.FunctionReturn,\n ParameterObject: () => import_util_endpoints.ParameterObject,\n ReferenceObject: () => import_util_endpoints.ReferenceObject,\n ReferenceRecord: () => import_util_endpoints.ReferenceRecord,\n RuleSetObject: () => import_util_endpoints.RuleSetObject,\n RuleSetRules: () => import_util_endpoints.RuleSetRules,\n TreeRuleObject: () => import_util_endpoints.TreeRuleObject,\n getUserAgentPrefix: () => getUserAgentPrefix,\n isIpAddress: () => import_util_endpoints.isIpAddress,\n partition: () => partition,\n resolveEndpoint: () => import_util_endpoints.resolveEndpoint,\n setPartitionInfo: () => setPartitionInfo,\n useDefaultPartitionInfo: () => useDefaultPartitionInfo\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/aws.ts\n\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\n\n\n// src/lib/isIpAddress.ts\nvar import_util_endpoints = require(\"@smithy/util-endpoints\");\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\nvar isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!(0, import_util_endpoints.isValidHostLabel)(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if ((0, import_util_endpoints.isIpAddress)(value)) {\n return false;\n }\n return true;\n}, \"isVirtualHostableS3Bucket\");\n\n// src/lib/aws/parseArn.ts\nvar parseArn = /* @__PURE__ */ __name((value) => {\n const segments = value.split(\":\");\n if (segments.length < 6)\n return null;\n const [arn, partition2, service, region, accountId, ...resourceId] = segments;\n if (arn !== \"arn\" || partition2 === \"\" || service === \"\" || resourceId[0] === \"\")\n return null;\n return {\n partition: partition2,\n service,\n region,\n accountId,\n resourceId: resourceId[0].includes(\"/\") ? resourceId[0].split(\"/\") : resourceId\n };\n}, \"parseArn\");\n\n// src/lib/aws/partitions.json\nvar partitions_default = {\n partitions: [{\n id: \"aws\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-east-1\",\n name: \"aws\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"af-south-1\": {\n description: \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n description: \"Asia Pacific (Hong Kong)\"\n },\n \"ap-northeast-1\": {\n description: \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n description: \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n description: \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n description: \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n description: \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n description: \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n description: \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n description: \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n description: \"Asia Pacific (Melbourne)\"\n },\n \"aws-global\": {\n description: \"AWS Standard global region\"\n },\n \"ca-central-1\": {\n description: \"Canada (Central)\"\n },\n \"ca-west-1\": {\n description: \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n description: \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n description: \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n description: \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n description: \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n description: \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n description: \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n description: \"Europe (London)\"\n },\n \"eu-west-3\": {\n description: \"Europe (Paris)\"\n },\n \"il-central-1\": {\n description: \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n description: \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n description: \"Middle East (Bahrain)\"\n },\n \"sa-east-1\": {\n description: \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n description: \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n description: \"US East (Ohio)\"\n },\n \"us-west-1\": {\n description: \"US West (N. California)\"\n },\n \"us-west-2\": {\n description: \"US West (Oregon)\"\n }\n }\n }, {\n id: \"aws-cn\",\n outputs: {\n dnsSuffix: \"amazonaws.com.cn\",\n dualStackDnsSuffix: \"api.amazonwebservices.com.cn\",\n implicitGlobalRegion: \"cn-northwest-1\",\n name: \"aws-cn\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-cn-global\": {\n description: \"AWS China global region\"\n },\n \"cn-north-1\": {\n description: \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n description: \"China (Ningxia)\"\n }\n }\n }, {\n id: \"aws-us-gov\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-gov-west-1\",\n name: \"aws-us-gov\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-us-gov-global\": {\n description: \"AWS GovCloud (US) global region\"\n },\n \"us-gov-east-1\": {\n description: \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n description: \"AWS GovCloud (US-West)\"\n }\n }\n }, {\n id: \"aws-iso\",\n outputs: {\n dnsSuffix: \"c2s.ic.gov\",\n dualStackDnsSuffix: \"c2s.ic.gov\",\n implicitGlobalRegion: \"us-iso-east-1\",\n name: \"aws-iso\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-global\": {\n description: \"AWS ISO (US) global region\"\n },\n \"us-iso-east-1\": {\n description: \"US ISO East\"\n },\n \"us-iso-west-1\": {\n description: \"US ISO WEST\"\n }\n }\n }, {\n id: \"aws-iso-b\",\n outputs: {\n dnsSuffix: \"sc2s.sgov.gov\",\n dualStackDnsSuffix: \"sc2s.sgov.gov\",\n implicitGlobalRegion: \"us-isob-east-1\",\n name: \"aws-iso-b\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-b-global\": {\n description: \"AWS ISOB (US) global region\"\n },\n \"us-isob-east-1\": {\n description: \"US ISOB East (Ohio)\"\n }\n }\n }, {\n id: \"aws-iso-e\",\n outputs: {\n dnsSuffix: \"cloud.adc-e.uk\",\n dualStackDnsSuffix: \"cloud.adc-e.uk\",\n implicitGlobalRegion: \"eu-isoe-west-1\",\n name: \"aws-iso-e\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {}\n }, {\n id: \"aws-iso-f\",\n outputs: {\n dnsSuffix: \"csp.hci.ic.gov\",\n dualStackDnsSuffix: \"csp.hci.ic.gov\",\n implicitGlobalRegion: \"us-isof-south-1\",\n name: \"aws-iso-f\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {}\n }],\n version: \"1.1\"\n};\n\n// src/lib/aws/partition.ts\nvar selectedPartitionsInfo = partitions_default;\nvar selectedUserAgentPrefix = \"\";\nvar partition = /* @__PURE__ */ __name((value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition2 of partitions) {\n const { regions, outputs } = partition2;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData\n };\n }\n }\n }\n for (const partition2 of partitions) {\n const { regionRegex, outputs } = partition2;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\n \"Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.\"\n );\n }\n return {\n ...DEFAULT_PARTITION.outputs\n };\n}, \"partition\");\nvar setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n}, \"setPartitionInfo\");\nvar useDefaultPartitionInfo = /* @__PURE__ */ __name(() => {\n setPartitionInfo(partitions_default, \"\");\n}, \"useDefaultPartitionInfo\");\nvar getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, \"getUserAgentPrefix\");\n\n// src/aws.ts\nvar awsEndpointFunctions = {\n isVirtualHostableS3Bucket,\n parseArn,\n partition\n};\nimport_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;\n\n// src/resolveEndpoint.ts\n\n\n// src/types/EndpointError.ts\n\n\n// src/types/EndpointRuleObject.ts\n\n\n// src/types/ErrorRuleObject.ts\n\n\n// src/types/RuleSetObject.ts\n\n\n// src/types/TreeRuleObject.ts\n\n\n// src/types/shared.ts\n\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n partition,\n setPartitionInfo,\n useDefaultPartitionInfo,\n getUserAgentPrefix,\n isIpAddress,\n resolveEndpoint,\n EndpointError\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,\n crtAvailability: () => crtAvailability,\n defaultUserAgent: () => defaultUserAgent\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_os = require(\"os\");\nvar import_process = require(\"process\");\n\n// src/crt-availability.ts\nvar crtAvailability = {\n isCrtAvailable: false\n};\n\n// src/is-crt-available.ts\nvar isCrtAvailable = /* @__PURE__ */ __name(() => {\n if (crtAvailability.isCrtAvailable) {\n return [\"md/crt-avail\"];\n }\n return null;\n}, \"isCrtAvailable\");\n\n// src/index.ts\nvar UA_APP_ID_ENV_NAME = \"AWS_SDK_UA_APP_ID\";\nvar UA_APP_ID_INI_NAME = \"sdk-ua-app-id\";\nvar defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => {\n const sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // ua-metadata\n [\"ua\", \"2.0\"],\n // os-metadata\n [`os/${(0, import_os.platform)()}`, (0, import_os.release)()],\n // language-metadata\n // ECMAScript edition doesn't matter in JS, so no version needed.\n [\"lang/js\"],\n [\"md/nodejs\", `${import_process.versions.node}`]\n ];\n const crtAvailable = isCrtAvailable();\n if (crtAvailable) {\n sections.push(crtAvailable);\n }\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n if (import_process.env.AWS_EXECUTION_ENV) {\n sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);\n }\n const appIdPromise = (0, import_node_config_provider.loadConfig)({\n environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],\n configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME],\n default: void 0\n })();\n let resolvedUserAgent = void 0;\n return async () => {\n if (!resolvedUserAgent) {\n const appId = await appIdPromise;\n resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];\n }\n return resolvedUserAgent;\n };\n}, \"defaultUserAgent\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n crtAvailability,\n UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME,\n defaultUserAgent\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nconst pureJs_1 = require(\"./pureJs\");\nconst whatwgEncodingApi_1 = require(\"./whatwgEncodingApi\");\nconst fromUtf8 = (input) => typeof TextEncoder === \"function\" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input);\nexports.fromUtf8 = fromUtf8;\nconst toUtf8 = (input) => typeof TextDecoder === \"function\" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input);\nexports.toUtf8 = toUtf8;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nconst fromUtf8 = (input) => {\n const bytes = [];\n for (let i = 0, len = input.length; i < len; i++) {\n const value = input.charCodeAt(i);\n if (value < 0x80) {\n bytes.push(value);\n }\n else if (value < 0x800) {\n bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);\n }\n else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);\n bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);\n }\n else {\n bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);\n }\n }\n return Uint8Array.from(bytes);\n};\nexports.fromUtf8 = fromUtf8;\nconst toUtf8 = (input) => {\n let decoded = \"\";\n for (let i = 0, len = input.length; i < len; i++) {\n const byte = input[i];\n if (byte < 0x80) {\n decoded += String.fromCharCode(byte);\n }\n else if (0b11000000 <= byte && byte < 0b11100000) {\n const nextByte = input[++i];\n decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));\n }\n else if (0b11110000 <= byte && byte < 0b101101101) {\n const surrogatePair = [byte, input[++i], input[++i], input[++i]];\n const encoded = \"%\" + surrogatePair.map((byteValue) => byteValue.toString(16)).join(\"%\");\n decoded += decodeURIComponent(encoded);\n }\n else {\n decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));\n }\n }\n return decoded;\n};\nexports.toUtf8 = toUtf8;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nfunction fromUtf8(input) {\n return new TextEncoder().encode(input);\n}\nexports.fromUtf8 = fromUtf8;\nfunction toUtf8(input) {\n return new TextDecoder(\"utf-8\").decode(input);\n}\nexports.toUtf8 = toUtf8;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT,\n ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,\n ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getRegionInfo: () => getRegionInfo,\n resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,\n resolveEndpointsConfig: () => resolveEndpointsConfig,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts\nvar import_util_config_provider = require(\"@smithy/util-config-provider\");\nvar ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nvar CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nvar DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nvar NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts\n\nvar ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nvar CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nvar DEFAULT_USE_FIPS_ENDPOINT = false;\nvar NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/resolveCustomEndpointsConfig.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const { endpoint, urlParser } = input;\n return {\n ...input,\n tls: input.tls ?? true,\n endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false)\n };\n}, \"resolveCustomEndpointsConfig\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\n\n\n// src/endpointsConfig/utils/getEndpointFromRegion.ts\nvar getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => {\n const { tls = true } = input;\n const region = await input.region();\n const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n const useDualstackEndpoint = await input.useDualstackEndpoint();\n const useFipsEndpoint = await input.useFipsEndpoint();\n const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return input.urlParser(`${tls ? \"https:\" : \"http:\"}//${hostname}`);\n}, \"getEndpointFromRegion\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\nvar resolveEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser } = input;\n return {\n ...input,\n tls: input.tls ?? true,\n endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint\n };\n}, \"resolveEndpointsConfig\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n }\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return {\n ...input,\n region: async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }\n };\n}, \"resolveRegionConfig\");\n\n// src/regionInfo/getHostnameFromVariants.ts\nvar getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => {\n var _a;\n return (_a = variants.find(\n ({ tags }) => useFipsEndpoint === tags.includes(\"fips\") && useDualstackEndpoint === tags.includes(\"dualstack\")\n )) == null ? void 0 : _a.hostname;\n}, \"getHostnameFromVariants\");\n\n// src/regionInfo/getResolvedHostname.ts\nvar getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace(\"{region}\", resolvedRegion) : void 0, \"getResolvedHostname\");\n\n// src/regionInfo/getResolvedPartition.ts\nvar getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? \"aws\", \"getResolvedPartition\");\n\n// src/regionInfo/getResolvedSigningRegion.ts\nvar getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {\n if (signingRegion) {\n return signingRegion;\n } else if (useFipsEndpoint) {\n const regionRegexJs = regionRegex.replace(\"\\\\\\\\\", \"\\\\\").replace(/^\\^/g, \"\\\\.\").replace(/\\$$/g, \"\\\\.\");\n const regionRegexmatchArray = hostname.match(regionRegexJs);\n if (regionRegexmatchArray) {\n return regionRegexmatchArray[0].slice(1, -1);\n }\n }\n}, \"getResolvedSigningRegion\");\n\n// src/regionInfo/getRegionInfo.ts\nvar getRegionInfo = /* @__PURE__ */ __name((region, {\n useFipsEndpoint = false,\n useDualstackEndpoint = false,\n signingService,\n regionHash,\n partitionHash\n}) => {\n var _a, _b, _c, _d, _e;\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === void 0) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint\n });\n return {\n partition,\n signingService,\n hostname,\n ...signingRegion && { signingRegion },\n ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && {\n signingService: regionHash[resolvedRegion].signingService\n }\n };\n}, \"getRegionInfo\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CONFIG_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT,\n ENV_USE_DUALSTACK_ENDPOINT,\n ENV_USE_FIPS_ENDPOINT,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n getRegionInfo,\n resolveCustomEndpointsConfig,\n resolveEndpointsConfig,\n resolveRegionConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,\n EXPIRATION_MS: () => EXPIRATION_MS,\n HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,\n HttpBearerAuthSigner: () => HttpBearerAuthSigner,\n NoAuthSigner: () => NoAuthSigner,\n RequestBuilder: () => RequestBuilder,\n createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,\n createPaginator: () => createPaginator,\n doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,\n getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,\n getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,\n getHttpSigningPlugin: () => getHttpSigningPlugin,\n getSmithyContext: () => getSmithyContext3,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,\n httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,\n httpSigningMiddleware: () => httpSigningMiddleware,\n httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,\n isIdentityExpired: () => isIdentityExpired,\n memoizeIdentityProvider: () => memoizeIdentityProvider,\n normalizeProvider: () => normalizeProvider,\n requestBuilder: () => requestBuilder\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = /* @__PURE__ */ new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\n__name(convertHttpAuthSchemesToMap, \"convertHttpAuthSchemesToMap\");\nvar httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => {\n var _a;\n const options = config.httpAuthSchemeProvider(\n await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)\n );\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const failureReasons = [];\n for (const option of options) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) == null ? void 0 : _a.call(option, config, context)) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n}, \"httpAuthSchemeMiddleware\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name\n};\nvar getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeEndpointRuleSetMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemeEndpointRuleSetPlugin\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemePlugin\");\n\n// src/middleware-http-signing/httpSigningMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => {\n throw error;\n}, \"defaultErrorHandler\");\nvar defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => {\n}, \"defaultSuccessHandler\");\nvar httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const {\n httpAuthOption: { signingProperties = {} },\n identity,\n signer\n } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties)\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n}, \"httpSigningMiddleware\");\n\n// src/middleware-http-signing/getHttpSigningMiddleware.ts\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\nvar httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: import_middleware_retry.retryMiddlewareOptions.name\n};\nvar getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n }\n}), \"getHttpSigningPlugin\");\n\n// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts\nvar _DefaultIdentityProviderConfig = class _DefaultIdentityProviderConfig {\n /**\n * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers.\n *\n * @param config scheme IDs and identity providers to configure\n */\n constructor(config) {\n this.authSchemes = /* @__PURE__ */ new Map();\n for (const [key, value] of Object.entries(config)) {\n if (value !== void 0) {\n this.authSchemes.set(key, value);\n }\n }\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n};\n__name(_DefaultIdentityProviderConfig, \"DefaultIdentityProviderConfig\");\nvar DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig;\n\n// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts\nvar import_types = require(\"@smithy/types\");\nvar _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\n \"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\"\n );\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = httpRequest.clone();\n if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;\n } else {\n throw new Error(\n \"request can only be signed with `apiKey` locations `query` or `header`, but found: `\" + signingProperties.in + \"`\"\n );\n }\n return clonedRequest;\n }\n};\n__name(_HttpApiKeyAuthSigner, \"HttpApiKeyAuthSigner\");\nvar HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner;\n\n// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts\nvar _HttpBearerAuthSigner = class _HttpBearerAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = httpRequest.clone();\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n};\n__name(_HttpBearerAuthSigner, \"HttpBearerAuthSigner\");\nvar HttpBearerAuthSigner = _HttpBearerAuthSigner;\n\n// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts\nvar _NoAuthSigner = class _NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n};\n__name(_NoAuthSigner, \"NoAuthSigner\");\nvar NoAuthSigner = _NoAuthSigner;\n\n// src/util-identity-and-auth/memoizeIdentityProvider.ts\nvar createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, \"createIsIdentityExpiredFunction\");\nvar EXPIRATION_MS = 3e5;\nvar isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nvar doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, \"doesIdentityRequireRefresh\");\nvar memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n if (provider === void 0) {\n return void 0;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n}, \"memoizeIdentityProvider\");\n\n// src/getSmithyContext.ts\n\nvar getSmithyContext3 = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n\n// src/protocols/requestBuilder.ts\n\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\n__name(requestBuilder, \"requestBuilder\");\nvar _RequestBuilder = class _RequestBuilder {\n constructor(input, context) {\n this.input = input;\n this.context = context;\n this.query = {};\n this.method = \"\";\n this.headers = {};\n this.path = \"\";\n this.body = null;\n this.hostname = \"\";\n this.resolvePathStack = [];\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new import_protocol_http.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers\n });\n }\n /**\n * Brevity setter for \"hostname\".\n */\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n /**\n * Brevity initial builder for \"basepath\".\n */\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${(basePath == null ? void 0 : basePath.endsWith(\"/\")) ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n /**\n * Brevity incremental builder for \"path\".\n */\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n /**\n * Brevity setter for \"headers\".\n */\n h(headers) {\n this.headers = headers;\n return this;\n }\n /**\n * Brevity setter for \"query\".\n */\n q(query) {\n this.query = query;\n return this;\n }\n /**\n * Brevity setter for \"body\".\n */\n b(body) {\n this.body = body;\n return this;\n }\n /**\n * Brevity setter for \"method\".\n */\n m(method) {\n this.method = method;\n return this;\n }\n};\n__name(_RequestBuilder, \"RequestBuilder\");\nvar RequestBuilder = _RequestBuilder;\n\n// src/pagination/createPaginator.ts\nvar makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, ...args) => {\n return await client.send(new CommandCtor(input), ...args);\n}, \"makePagedClientRequest\");\nfunction createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) {\n let token = config.startingToken || void 0;\n let hasNext = true;\n let page;\n while (hasNext) {\n input[inputTokenName] = token;\n if (pageSizeTokenName) {\n input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments);\n } else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return void 0;\n }, \"paginateOperation\");\n}\n__name(createPaginator, \"createPaginator\");\nvar get = /* @__PURE__ */ __name((fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return void 0;\n }\n cursor = cursor[step];\n }\n return cursor;\n}, \"get\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n createPaginator,\n httpAuthSchemeMiddleware,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n getHttpAuthSchemeEndpointRuleSetPlugin,\n httpAuthSchemeMiddlewareOptions,\n getHttpAuthSchemePlugin,\n httpSigningMiddleware,\n httpSigningMiddlewareOptions,\n getHttpSigningPlugin,\n DefaultIdentityProviderConfig,\n HttpApiKeyAuthSigner,\n HttpBearerAuthSigner,\n NoAuthSigner,\n createIsIdentityExpiredFunction,\n EXPIRATION_MS,\n isIdentityExpired,\n doesIdentityRequireRefresh,\n memoizeIdentityProvider,\n getSmithyContext,\n normalizeProvider,\n requestBuilder,\n RequestBuilder\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES,\n DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT,\n ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,\n ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,\n fromContainerMetadata: () => fromContainerMetadata,\n fromInstanceMetadata: () => fromInstanceMetadata,\n getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,\n httpRequest: () => httpRequest,\n providerConfigFromInit: () => providerConfigFromInit\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromContainerMetadata.ts\n\nvar import_url = require(\"url\");\n\n// src/remoteProvider/httpRequest.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_buffer = require(\"buffer\");\nvar import_http = require(\"http\");\nfunction httpRequest(options) {\n return new Promise((resolve, reject) => {\n var _a;\n const req = (0, import_http.request)({\n method: \"GET\",\n ...options,\n // Node.js http module doesn't accept hostname with square brackets\n // Refs: https://github.com/nodejs/node/issues/39738\n hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\\[(.+)\\]$/, \"$1\")\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new import_property_provider.ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new import_property_provider.ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(\n Object.assign(new import_property_provider.ProviderError(\"Error response received from instance metadata service\"), { statusCode })\n );\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(import_buffer.Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n__name(httpRequest, \"httpRequest\");\n\n// src/remoteProvider/ImdsCredentials.ts\nvar isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.AccessKeyId === \"string\" && typeof arg.SecretAccessKey === \"string\" && typeof arg.Token === \"string\" && typeof arg.Expiration === \"string\", \"isImdsCredentials\");\nvar fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration)\n}), \"fromImdsCredentials\");\n\n// src/remoteProvider/RemoteProviderInit.ts\nvar DEFAULT_TIMEOUT = 1e3;\nvar DEFAULT_MAX_RETRIES = 0;\nvar providerConfigFromInit = /* @__PURE__ */ __name(({\n maxRetries = DEFAULT_MAX_RETRIES,\n timeout = DEFAULT_TIMEOUT\n}) => ({ maxRetries, timeout }), \"providerConfigFromInit\");\n\n// src/remoteProvider/retry.ts\nvar retry = /* @__PURE__ */ __name((toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n}, \"retry\");\n\n// src/fromContainerMetadata.ts\nvar ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nvar ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nvar ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nvar fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri();\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\");\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n}, \"fromContainerMetadata\");\nvar requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN]\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout\n });\n return buffer.toString();\n}, \"requestFromEcsImds\");\nvar CMDS_IP = \"169.254.170.2\";\nvar GREENGRASS_HOSTS = {\n localhost: true,\n \"127.0.0.1\": true\n};\nvar GREENGRASS_PROTOCOLS = {\n \"http:\": true,\n \"https:\": true\n};\nvar getCmdsUri = /* @__PURE__ */ __name(async () => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI]\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]);\n if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {\n throw new import_property_provider.CredentialsProviderError(\n `${parsed.hostname} is not a valid container metadata service hostname`,\n false\n );\n }\n if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {\n throw new import_property_provider.CredentialsProviderError(\n `${parsed.protocol} is not a valid container metadata service protocol`,\n false\n );\n }\n return {\n ...parsed,\n port: parsed.port ? parseInt(parsed.port, 10) : void 0\n };\n }\n throw new import_property_provider.CredentialsProviderError(\n `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`,\n false\n );\n}, \"getCmdsUri\");\n\n// src/fromInstanceMetadata.ts\n\n\n\n// src/error/InstanceMetadataV1FallbackError.ts\n\nvar _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"InstanceMetadataV1FallbackError\";\n Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype);\n }\n};\n__name(_InstanceMetadataV1FallbackError, \"InstanceMetadataV1FallbackError\");\nvar InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError;\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_url_parser = require(\"@smithy/url-parser\");\n\n// src/config/EndpointConfigOptions.ts\nvar ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nvar CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nvar ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: void 0\n};\n\n// src/config/EndpointMode.ts\nvar EndpointMode = /* @__PURE__ */ ((EndpointMode2) => {\n EndpointMode2[\"IPv4\"] = \"IPv4\";\n EndpointMode2[\"IPv6\"] = \"IPv6\";\n return EndpointMode2;\n})(EndpointMode || {});\n\n// src/config/EndpointModeConfigOptions.ts\nvar ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nvar CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nvar ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: \"IPv4\" /* IPv4 */\n};\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), \"getInstanceMetadataEndpoint\");\nvar getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), \"getFromEndpointConfig\");\nvar getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => {\n const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case \"IPv4\" /* IPv4 */:\n return \"http://169.254.169.254\" /* IPv4 */;\n case \"IPv6\" /* IPv6 */:\n return \"http://[fd00:ec2::254]\" /* IPv6 */;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`);\n }\n}, \"getFromEndpointModeConfig\");\n\n// src/utils/getExtendedInstanceMetadataCredentials.ts\nvar STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nvar STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nvar STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nvar getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1e3);\n logger.warn(\n \"Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: \" + STATIC_STABILITY_DOC_URL\n );\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...originalExpiration ? { originalExpiration } : {},\n expiration: newExpiration\n };\n}, \"getExtendedInstanceMetadataCredentials\");\n\n// src/utils/staticStabilityProvider.ts\nvar staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => {\n const logger = (options == null ? void 0 : options.logger) || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n } catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n } else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n}, \"staticStabilityProvider\");\n\n// src/fromInstanceMetadata.ts\nvar IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nvar IMDS_TOKEN_PATH = \"/latest/api/token\";\nvar AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nvar PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nvar X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nvar fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), \"fromInstanceMetadata\");\nvar getInstanceImdsProvider = /* @__PURE__ */ __name((init) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => {\n var _a;\n const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await (0, import_node_config_provider.loadConfig)(\n {\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === void 0) {\n throw new import_property_provider.CredentialsProviderError(\n `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`\n );\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile2) => {\n const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false\n },\n {\n profile\n }\n )();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(\n `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\n \", \"\n )}].`\n );\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile2;\n try {\n profile2 = await getProfile(options);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile2;\n }, maxRetries2)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries2);\n }, \"getCredentials\");\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger == null ? void 0 : logger.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n } else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n } catch (error) {\n if ((error == null ? void 0 : error.statusCode) === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\"\n });\n } else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger == null ? void 0 : logger.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token\n },\n timeout\n });\n }\n };\n}, \"getInstanceImdsProvider\");\nvar getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\"\n }\n}), \"getMetadataToken\");\nvar getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), \"getProfile\");\nvar getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) => {\n const credsResponse = JSON.parse(\n (await httpRequest({\n ...options,\n path: IMDS_PATH + profile\n })).toString()\n );\n if (!isImdsCredentials(credsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\");\n }\n return fromImdsCredentials(credsResponse);\n}, \"getCredentialsFromProfile\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_MAX_RETRIES,\n DEFAULT_TIMEOUT,\n ENV_CMDS_AUTH_TOKEN,\n ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI,\n fromContainerMetadata,\n fromInstanceMetadata,\n getInstanceMetadataEndpoint,\n httpRequest,\n providerConfigFromInit\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n EventStreamCodec: () => EventStreamCodec,\n HeaderMarshaller: () => HeaderMarshaller,\n Int64: () => Int64,\n MessageDecoderStream: () => MessageDecoderStream,\n MessageEncoderStream: () => MessageEncoderStream,\n SmithyMessageDecoderStream: () => SmithyMessageDecoderStream,\n SmithyMessageEncoderStream: () => SmithyMessageEncoderStream\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/EventStreamCodec.ts\nvar import_crc322 = require(\"@aws-crypto/crc32\");\n\n// src/HeaderMarshaller.ts\n\n\n// src/Int64.ts\nvar import_util_hex_encoding = require(\"@smithy/util-hex-encoding\");\nvar _Int64 = class _Int64 {\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9223372036854776e3 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new _Int64(bytes);\n }\n /**\n * Called implicitly by infix arithmetic operators.\n */\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n};\n__name(_Int64, \"Int64\");\nvar Int64 = _Int64;\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 255;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n__name(negate, \"negate\");\n\n// src/HeaderMarshaller.ts\nvar _HeaderMarshaller = class _HeaderMarshaller {\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]);\n case \"byte\":\n return Uint8Array.from([2 /* byte */, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3 /* short */);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4 /* integer */);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5 /* long */;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6 /* byteArray */);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7 /* string */);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8 /* timestamp */;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9 /* uuid */;\n uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0 /* boolTrue */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true\n };\n break;\n case 1 /* boolFalse */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false\n };\n break;\n case 2 /* byte */:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++)\n };\n break;\n case 3 /* short */:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false)\n };\n position += 2;\n break;\n case 4 /* integer */:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false)\n };\n position += 4;\n break;\n case 5 /* long */:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))\n };\n position += 8;\n break;\n case 6 /* byteArray */:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)\n };\n position += binaryLength;\n break;\n case 7 /* string */:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))\n };\n position += stringLength;\n break;\n case 8 /* timestamp */:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())\n };\n position += 8;\n break;\n case 9 /* uuid */:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)(\n uuidBytes.subarray(6, 8)\n )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}`\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n};\n__name(_HeaderMarshaller, \"HeaderMarshaller\");\nvar HeaderMarshaller = _HeaderMarshaller;\nvar BOOLEAN_TAG = \"boolean\";\nvar BYTE_TAG = \"byte\";\nvar SHORT_TAG = \"short\";\nvar INT_TAG = \"integer\";\nvar LONG_TAG = \"long\";\nvar BINARY_TAG = \"binary\";\nvar STRING_TAG = \"string\";\nvar TIMESTAMP_TAG = \"timestamp\";\nvar UUID_TAG = \"uuid\";\nvar UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n\n// src/splitMessage.ts\nvar import_crc32 = require(\"@aws-crypto/crc32\");\nvar PRELUDE_MEMBER_LENGTH = 4;\nvar PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nvar CHECKSUM_LENGTH = 4;\nvar MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nfunction splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(\n `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`\n );\n }\n checksummer.update(\n new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))\n );\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(\n `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`\n );\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(\n buffer,\n byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength,\n messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)\n )\n };\n}\n__name(splitMessage, \"splitMessage\");\n\n// src/EventStreamCodec.ts\nvar _EventStreamCodec = class _EventStreamCodec {\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n }\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n }\n };\n }\n /**\n * Convert a structured JavaScript object with tagged headers into a binary\n * event stream message.\n */\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new import_crc322.Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n /**\n * Convert a binary event stream message into a JavaScript object with an\n * opaque, binary body and tagged, parsed headers.\n */\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n /**\n * Convert a structured JavaScript object with tagged headers into a binary\n * event stream message header.\n */\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n};\n__name(_EventStreamCodec, \"EventStreamCodec\");\nvar EventStreamCodec = _EventStreamCodec;\n\n// src/MessageDecoderStream.ts\nvar _MessageDecoderStream = class _MessageDecoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n};\n__name(_MessageDecoderStream, \"MessageDecoderStream\");\nvar MessageDecoderStream = _MessageDecoderStream;\n\n// src/MessageEncoderStream.ts\nvar _MessageEncoderStream = class _MessageEncoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n};\n__name(_MessageEncoderStream, \"MessageEncoderStream\");\nvar MessageEncoderStream = _MessageEncoderStream;\n\n// src/SmithyMessageDecoderStream.ts\nvar _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === void 0)\n continue;\n yield deserialized;\n }\n }\n};\n__name(_SmithyMessageDecoderStream, \"SmithyMessageDecoderStream\");\nvar SmithyMessageDecoderStream = _SmithyMessageDecoderStream;\n\n// src/SmithyMessageEncoderStream.ts\nvar _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n};\n__name(_SmithyMessageEncoderStream, \"SmithyMessageEncoderStream\");\nvar SmithyMessageEncoderStream = _SmithyMessageEncoderStream;\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n EventStreamCodec,\n HeaderMarshaller,\n Int64,\n MessageDecoderStream,\n MessageEncoderStream,\n SmithyMessageDecoderStream,\n SmithyMessageEncoderStream\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Hash: () => Hash\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar import_buffer = require(\"buffer\");\nvar import_crypto = require(\"crypto\");\nvar _Hash = class _Hash {\n constructor(algorithmIdentifier, secret) {\n this.algorithmIdentifier = algorithmIdentifier;\n this.secret = secret;\n this.reset();\n }\n update(toHash, encoding) {\n this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding)));\n }\n digest() {\n return Promise.resolve(this.hash.digest());\n }\n reset() {\n this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier);\n }\n};\n__name(_Hash, \"Hash\");\nvar Hash = _Hash;\nfunction castSourceData(toCast, encoding) {\n if (import_buffer.Buffer.isBuffer(toCast)) {\n return toCast;\n }\n if (typeof toCast === \"string\") {\n return (0, import_util_buffer_from.fromString)(toCast, encoding);\n }\n if (ArrayBuffer.isView(toCast)) {\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength);\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast);\n}\n__name(castSourceData, \"castSourceData\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Hash\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n contentLengthMiddleware: () => contentLengthMiddleware,\n contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions,\n getContentLengthPlugin: () => getContentLengthPlugin\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length)\n };\n } catch (error) {\n }\n }\n }\n return next({\n ...args,\n request\n });\n };\n}\n__name(contentLengthMiddleware, \"contentLengthMiddleware\");\nvar contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true\n};\nvar getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n }\n}), \"getContentLengthPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n contentLengthMiddleware,\n contentLengthMiddlewareOptions,\n getContentLengthPlugin\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointFromConfig = void 0;\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst getEndpointUrlConfig_1 = require(\"./getEndpointUrlConfig\");\nconst getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))();\nexports.getEndpointFromConfig = getEndpointFromConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointUrlConfig = void 0;\nconst shared_ini_file_loader_1 = require(\"@smithy/shared-ini-file-loader\");\nconst ENV_ENDPOINT_URL = \"AWS_ENDPOINT_URL\";\nconst CONFIG_ENDPOINT_URL = \"endpoint_url\";\nconst getEndpointUrlConfig = (serviceId) => ({\n environmentVariableSelector: (env) => {\n const serviceSuffixParts = serviceId.split(\" \").map((w) => w.toUpperCase());\n const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join(\"_\")];\n if (serviceEndpointUrl)\n return serviceEndpointUrl;\n const endpointUrl = env[ENV_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n configFileSelector: (profile, config) => {\n if (config && profile.services) {\n const servicesSection = config[[\"services\", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (servicesSection) {\n const servicePrefixParts = serviceId.split(\" \").map((w) => w.toLowerCase());\n const endpointUrl = servicesSection[[servicePrefixParts.join(\"_\"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (endpointUrl)\n return endpointUrl;\n }\n }\n const endpointUrl = profile[CONFIG_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n default: undefined,\n});\nexports.getEndpointUrlConfig = getEndpointUrlConfig;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n endpointMiddleware: () => endpointMiddleware,\n endpointMiddlewareOptions: () => endpointMiddlewareOptions,\n getEndpointFromInstructions: () => getEndpointFromInstructions,\n getEndpointPlugin: () => getEndpointPlugin,\n resolveEndpointConfig: () => resolveEndpointConfig,\n resolveParams: () => resolveParams,\n toEndpointV1: () => toEndpointV1\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/service-customizations/s3.ts\nvar resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => {\n const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\") || bucket.toLowerCase() !== bucket || bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n}, \"resolveParamsForS3\");\nvar DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nvar IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nvar DOTS_PATTERN = /\\.\\./;\nvar isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), \"isDnsCompatibleBucketName\");\nvar isArnBucketName = /* @__PURE__ */ __name((bucketName) => {\n const [arn, partition, service, region, account, typeOrId] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5;\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return arn === \"arn\" && !!partition && !!service && !!account && !!typeOrId;\n}, \"isArnBucketName\");\n\n// src/adaptors/createConfigValueProvider.ts\nvar createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => {\n const configProvider = /* @__PURE__ */ __name(async () => {\n const configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n }, \"configProvider\");\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope);\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n}, \"createConfigValueProvider\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar import_getEndpointFromConfig = require(\"./adaptors/getEndpointFromConfig\");\n\n// src/adaptors/toEndpointV1.ts\nvar import_url_parser = require(\"@smithy/url-parser\");\nvar toEndpointV1 = /* @__PURE__ */ __name((endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return (0, import_url_parser.parseUrl)(endpoint.url);\n }\n return endpoint;\n }\n return (0, import_url_parser.parseUrl)(endpoint);\n}, \"toEndpointV1\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.endpoint) {\n const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || \"\");\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n return endpoint;\n}, \"getEndpointFromInstructions\");\nvar resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => {\n var _a;\n const endpointParams = {};\n const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n}, \"resolveParams\");\n\n// src/endpointMiddleware.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar endpointMiddleware = /* @__PURE__ */ __name(({\n config,\n instructions\n}) => {\n return (next, context) => async (args) => {\n var _a, _b, _c;\n const endpoint = await getEndpointFromInstructions(\n args.input,\n {\n getEndpointParameterInstructions() {\n return instructions;\n }\n },\n { ...config },\n context\n );\n context.endpointV2 = endpoint;\n context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes;\n const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(\n httpAuthOption.signingProperties || {},\n {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet\n },\n authScheme.properties\n );\n }\n }\n return next({\n ...args\n });\n };\n}, \"endpointMiddleware\");\n\n// src/getEndpointPlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n endpointMiddleware({\n config,\n instructions\n }),\n endpointMiddlewareOptions\n );\n }\n}), \"getEndpointPlugin\");\n\n// src/resolveEndpointConfig.ts\n\nvar resolveEndpointConfig = /* @__PURE__ */ __name((input) => {\n const tls = input.tls ?? true;\n const { endpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0;\n const isCustomEndpoint = !!endpoint;\n return {\n ...input,\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false),\n useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false)\n };\n}, \"resolveEndpointConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n endpointMiddleware,\n endpointMiddlewareOptions,\n getEndpointFromInstructions,\n getEndpointPlugin,\n resolveEndpointConfig,\n resolveParams,\n toEndpointV1\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS,\n CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE,\n ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS,\n ENV_RETRY_MODE: () => ENV_RETRY_MODE,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS,\n StandardRetryStrategy: () => StandardRetryStrategy,\n defaultDelayDecider: () => defaultDelayDecider,\n defaultRetryDecider: () => defaultRetryDecider,\n getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin,\n getRetryAfterHint: () => getRetryAfterHint,\n getRetryPlugin: () => getRetryPlugin,\n omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions,\n resolveRetryConfig: () => resolveRetryConfig,\n retryMiddleware: () => retryMiddleware,\n retryMiddlewareOptions: () => retryMiddlewareOptions\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/AdaptiveRetryStrategy.ts\n\n\n// src/StandardRetryStrategy.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n\nvar import_uuid = require(\"uuid\");\n\n// src/defaultRetryQuota.ts\nvar import_util_retry = require(\"@smithy/util-retry\");\nvar getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => {\n const MAX_CAPACITY = initialRetryTokens;\n const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT;\n const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST;\n const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST;\n let availableCapacity = initialRetryTokens;\n const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === \"TimeoutError\" ? timeoutRetryCost : retryCost, \"getCapacityAmount\");\n const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, \"hasRetryTokens\");\n const retrieveRetryTokens = /* @__PURE__ */ __name((error) => {\n if (!hasRetryTokens(error)) {\n throw new Error(\"No retry token available\");\n }\n const capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n }, \"retrieveRetryTokens\");\n const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => {\n availableCapacity += capacityReleaseAmount ?? noRetryIncrement;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n }, \"releaseRetryTokens\");\n return Object.freeze({\n hasRetryTokens,\n retrieveRetryTokens,\n releaseRetryTokens\n });\n}, \"getDefaultRetryQuota\");\n\n// src/delayDecider.ts\n\nvar defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), \"defaultDelayDecider\");\n\n// src/retryDecider.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar defaultRetryDecider = /* @__PURE__ */ __name((error) => {\n if (!error) {\n return false;\n }\n return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);\n}, \"defaultRetryDecider\");\n\n// src/util.ts\nvar asSdkError = /* @__PURE__ */ __name((error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n}, \"asSdkError\");\n\n// src/StandardRetryStrategy.ts\nvar _StandardRetryStrategy = class _StandardRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = import_util_retry.RETRY_MODES.STANDARD;\n this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider;\n this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider;\n this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n } catch (error) {\n maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options == null ? void 0 : options.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options == null ? void 0 : options.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n } catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(\n (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE,\n attempts\n );\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n};\n__name(_StandardRetryStrategy, \"StandardRetryStrategy\");\nvar StandardRetryStrategy = _StandardRetryStrategy;\nvar getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1e3;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n}, \"getDelayFromRetryAfterHeader\");\n\n// src/AdaptiveRetryStrategy.ts\nvar _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter();\n this.mode = import_util_retry.RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n }\n });\n }\n};\n__name(_AdaptiveRetryStrategy, \"AdaptiveRetryStrategy\");\nvar AdaptiveRetryStrategy = _AdaptiveRetryStrategy;\n\n// src/configurations.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\nvar ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nvar CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nvar NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: import_util_retry.DEFAULT_MAX_ATTEMPTS\n};\nvar resolveRetryConfig = /* @__PURE__ */ __name((input) => {\n const { retryStrategy } = input;\n const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS);\n return {\n ...input,\n maxAttempts,\n retryStrategy: async () => {\n if (retryStrategy) {\n return retryStrategy;\n }\n const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)();\n if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) {\n return new import_util_retry.AdaptiveRetryStrategy(maxAttempts);\n }\n return new import_util_retry.StandardRetryStrategy(maxAttempts);\n }\n };\n}, \"resolveRetryConfig\");\nvar ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nvar CONFIG_RETRY_MODE = \"retry_mode\";\nvar NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: import_util_retry.DEFAULT_RETRY_MODE\n};\n\n// src/omitRetryHeadersMiddleware.ts\n\n\nvar omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => {\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n delete request.headers[import_util_retry.INVOCATION_ID_HEADER];\n delete request.headers[import_util_retry.REQUEST_HEADER];\n }\n return next(args);\n}, \"omitRetryHeadersMiddleware\");\nvar omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true\n};\nvar getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n }\n}), \"getOmitRetryHeadersPlugin\");\n\n// src/retryMiddleware.ts\n\n\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n\nvar import_isStreamingPayload = require(\"./isStreamingPayload/isStreamingPayload\");\nvar retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n var _a;\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = import_protocol_http.HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n } catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) {\n (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn(\n \"An error was encountered in a non-retryable streaming request.\"\n );\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n } catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n } else {\n retryStrategy = retryStrategy;\n if (retryStrategy == null ? void 0 : retryStrategy.mode)\n context.userAgent = [...context.userAgent || [], [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n}, \"retryMiddleware\");\nvar isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" && typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" && typeof retryStrategy.recordSuccess !== \"undefined\", \"isRetryStrategyV2\");\nvar getRetryErrorInfo = /* @__PURE__ */ __name((error) => {\n const errorInfo = {\n errorType: getRetryErrorType(error)\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n}, \"getRetryErrorInfo\");\nvar getRetryErrorType = /* @__PURE__ */ __name((error) => {\n if ((0, import_service_error_classification.isThrottlingError)(error))\n return \"THROTTLING\";\n if ((0, import_service_error_classification.isTransientError)(error))\n return \"TRANSIENT\";\n if ((0, import_service_error_classification.isServerError)(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n}, \"getRetryErrorType\");\nvar retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true\n};\nvar getRetryPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n }\n}), \"getRetryPlugin\");\nvar getRetryAfterHint = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1e3);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n}, \"getRetryAfterHint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n CONFIG_MAX_ATTEMPTS,\n CONFIG_RETRY_MODE,\n ENV_MAX_ATTEMPTS,\n ENV_RETRY_MODE,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n NODE_RETRY_MODE_CONFIG_OPTIONS,\n StandardRetryStrategy,\n defaultDelayDecider,\n defaultRetryDecider,\n getOmitRetryHeadersPlugin,\n getRetryAfterHint,\n getRetryPlugin,\n omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions,\n resolveRetryConfig,\n retryMiddleware,\n retryMiddlewareOptions\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isStreamingPayload = void 0;\nconst stream_1 = require(\"stream\");\nconst isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable ||\n (typeof ReadableStream !== \"undefined\" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream);\nexports.isStreamingPayload = isStreamingPayload;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n deserializerMiddleware: () => deserializerMiddleware,\n deserializerMiddlewareOption: () => deserializerMiddlewareOption,\n getSerdePlugin: () => getSerdePlugin,\n serializerMiddleware: () => serializerMiddleware,\n serializerMiddlewareOption: () => serializerMiddlewareOption\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/deserializerMiddleware.ts\nvar deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed\n };\n } catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n error.message += \"\\n \" + hint;\n }\n throw error;\n }\n}, \"deserializerMiddleware\");\n\n// src/serializerMiddleware.ts\nvar serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => {\n var _a;\n const endpoint = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request\n });\n}, \"serializerMiddleware\");\n\n// src/serdePlugin.ts\nvar deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nvar serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nfunction getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n }\n };\n}\n__name(getSerdePlugin, \"getSerdePlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n deserializerMiddleware,\n deserializerMiddlewareOption,\n getSerdePlugin,\n serializerMiddleware,\n serializerMiddlewareOption\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n constructStack: () => constructStack\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MiddlewareStack.ts\nvar getAllAliases = /* @__PURE__ */ __name((name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n}, \"getAllAliases\");\nvar getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n}, \"getMiddlewareNameWithAliases\");\nvar constructStack = /* @__PURE__ */ __name(() => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = /* @__PURE__ */ new Set();\n const sort = /* @__PURE__ */ __name((entries) => entries.sort(\n (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]\n ), \"sort\");\n const removeByName = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByName\");\n const removeByReference = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByReference\");\n const cloneTo = /* @__PURE__ */ __name((toStack) => {\n var _a;\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve());\n return toStack;\n }, \"cloneTo\");\n const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n }, \"expandRelativeMiddlewareList\");\n const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === void 0) {\n if (debug) {\n return;\n }\n throw new Error(\n `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`\n );\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n }, \"getMiddlewareList\");\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex(\n (entry2) => {\n var _a;\n return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias));\n }\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ${entry.priority} priority in ${entry.step} step.`\n );\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex(\n (entry2) => {\n var _a;\n return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias));\n }\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} \"${entry.toMiddleware}\" middleware.`\n );\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n var _a;\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(\n identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false)\n );\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ?? mw.relation + \" \" + mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n }\n };\n return stack;\n}, \"constructStack\");\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n constructStack\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n loadConfig: () => loadConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/configLoader.ts\n\n\n// src/fromEnv.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar fromEnv = /* @__PURE__ */ __name((envVarSelector) => async () => {\n try {\n const config = envVarSelector(process.env);\n if (config === void 0) {\n throw new Error();\n }\n return config;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`\n );\n }\n}, \"fromEnv\");\n\n// src/fromSharedConfigFiles.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = (0, import_shared_ini_file_loader.getProfileName)(init);\n const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === void 0) {\n throw new Error();\n }\n return configValue;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`\n );\n }\n}, \"fromSharedConfigFiles\");\n\n// src/fromStatic.ts\n\nvar isFunction = /* @__PURE__ */ __name((func) => typeof func === \"function\", \"isFunction\");\nvar fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), \"fromStatic\");\n\n// src/configLoader.ts\nvar loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n fromEnv(environmentVariableSelector),\n fromSharedConfigFiles(configFileSelector, configuration),\n fromStatic(defaultValue)\n )\n), \"loadConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loadConfig\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler: () => NodeHttp2Handler,\n NodeHttpHandler: () => NodeHttpHandler,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/node-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\nvar import_http = require(\"http\");\nvar import_https = require(\"https\");\n\n// src/constants.ts\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/get-transformed-headers.ts\nvar getTransformedHeaders = /* @__PURE__ */ __name((headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n}, \"getTransformedHeaders\");\n\n// src/set-connection-timeout.ts\nvar setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return;\n }\n const timeoutId = setTimeout(() => {\n request.destroy();\n reject(\n Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\"\n })\n );\n }, timeoutInMs);\n request.on(\"socket\", (socket) => {\n if (socket.connecting) {\n socket.on(\"connect\", () => {\n clearTimeout(timeoutId);\n });\n } else {\n clearTimeout(timeoutId);\n }\n });\n}, \"setConnectionTimeout\");\n\n// src/set-socket-keep-alive.ts\nvar setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }) => {\n if (keepAlive !== true) {\n return;\n }\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n}, \"setSocketKeepAlive\");\n\n// src/set-socket-timeout.ts\nvar setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n request.setTimeout(timeoutInMs, () => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n });\n}, \"setSocketTimeout\");\n\n// src/write-request-body.ts\nvar import_stream = require(\"stream\");\nvar MIN_WAIT_TIME = 1e3;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let hasError = false;\n if (expect === \"100-continue\") {\n await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n clearTimeout(timeoutId);\n resolve();\n });\n httpRequest.on(\"error\", () => {\n hasError = true;\n clearTimeout(timeoutId);\n resolve();\n });\n })\n ]);\n }\n if (!hasError) {\n writeBody(httpRequest, request.body);\n }\n}\n__name(writeRequestBody, \"writeRequestBody\");\nfunction writeBody(httpRequest, body) {\n if (body instanceof import_stream.Readable) {\n body.pipe(httpRequest);\n } else if (body) {\n httpRequest.end(Buffer.from(body));\n } else {\n httpRequest.end();\n }\n}\n__name(writeBody, \"writeBody\");\n\n// src/node-http-handler.ts\nvar DEFAULT_REQUEST_TIMEOUT = 0;\nvar _NodeHttpHandler = class _NodeHttpHandler {\n constructor(options) {\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n }).catch(reject);\n } else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttpHandler(instanceOrOptions);\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n httpAgent: httpAgent || new import_http.Agent({ keepAlive, maxSockets }),\n httpsAgent: httpsAgent || new import_https.Agent({ keepAlive, maxSockets })\n };\n }\n destroy() {\n var _a, _b, _c, _d;\n (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy();\n (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n let auth = void 0;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: request.hostname,\n method: request.method,\n path,\n port: request.port,\n agent: isSSL ? this.config.httpsAgent : this.config.httpAgent,\n auth\n };\n const requestFunc = isSSL ? import_https.request : import_http.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n } else {\n reject(err);\n }\n });\n setConnectionTimeout(req, reject, this.config.connectionTimeout);\n setSocketTimeout(req, reject, this.config.requestTimeout);\n if (abortSignal) {\n abortSignal.onabort = () => {\n req.abort();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n setSocketKeepAlive(req, {\n // @ts-expect-error keepAlive is not public on httpAgent.\n keepAlive: httpAgent.keepAlive,\n // @ts-expect-error keepAliveMsecs is not public on httpAgent.\n keepAliveMsecs: httpAgent.keepAliveMsecs\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n__name(_NodeHttpHandler, \"NodeHttpHandler\");\nvar NodeHttpHandler = _NodeHttpHandler;\n\n// src/node-http2-handler.ts\n\n\nvar import_http22 = require(\"http2\");\n\n// src/node-http2-connection-manager.ts\nvar import_http2 = __toESM(require(\"http2\"));\n\n// src/node-http2-connection-pool.ts\nvar _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool {\n constructor(sessions) {\n this.sessions = [];\n this.sessions = sessions ?? [];\n }\n poll() {\n if (this.sessions.length > 0) {\n return this.sessions.shift();\n }\n }\n offerLast(session) {\n this.sessions.push(session);\n }\n contains(session) {\n return this.sessions.includes(session);\n }\n remove(session) {\n this.sessions = this.sessions.filter((s) => s !== session);\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n destroy(connection) {\n for (const session of this.sessions) {\n if (session === connection) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n }\n }\n};\n__name(_NodeHttp2ConnectionPool, \"NodeHttp2ConnectionPool\");\nvar NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool;\n\n// src/node-http2-connection-manager.ts\nvar _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {\n constructor(config) {\n this.sessionCache = /* @__PURE__ */ new Map();\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const existingPool = this.sessionCache.get(url);\n if (existingPool) {\n const existingSession = existingPool.poll();\n if (existingSession && !this.config.disableConcurrency) {\n return existingSession;\n }\n }\n const session = import_http2.default.connect(url);\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\n \"Fail to set maxConcurrentStreams to \" + this.config.maxConcurrency + \"when creating new session for \" + requestContext.destination.toString()\n );\n }\n });\n }\n session.unref();\n const destroySessionCb = /* @__PURE__ */ __name(() => {\n session.destroy();\n this.deleteSession(url, session);\n }, \"destroySessionCb\");\n session.on(\"goaway\", destroySessionCb);\n session.on(\"error\", destroySessionCb);\n session.on(\"frameError\", destroySessionCb);\n session.on(\"close\", () => this.deleteSession(url, session));\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);\n }\n const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();\n connectionPool.offerLast(session);\n this.sessionCache.set(url, connectionPool);\n return session;\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSession(authority, session) {\n const existingConnectionPool = this.sessionCache.get(authority);\n if (!existingConnectionPool) {\n return;\n }\n if (!existingConnectionPool.contains(session)) {\n return;\n }\n existingConnectionPool.remove(session);\n this.sessionCache.set(authority, existingConnectionPool);\n }\n release(requestContext, session) {\n var _a;\n const cacheKey = this.getUrlString(requestContext);\n (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session);\n }\n destroy() {\n for (const [key, connectionPool] of this.sessionCache) {\n for (const session of connectionPool) {\n if (!session.destroyed) {\n session.destroy();\n }\n connectionPool.remove(session);\n }\n this.sessionCache.delete(key);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n};\n__name(_NodeHttp2ConnectionManager, \"NodeHttp2ConnectionManager\");\nvar NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager;\n\n// src/node-http2-handler.ts\nvar _NodeHttp2Handler = class _NodeHttp2Handler {\n constructor(options) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.connectionManager = new NodeHttp2ConnectionManager({});\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((opts) => {\n resolve(opts || {});\n }).catch(reject);\n } else {\n resolve(options || {});\n }\n });\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttp2Handler(instanceOrOptions);\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);\n if (this.config.maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);\n }\n }\n const { requestTimeout, disableConcurrentStreams } = this.config;\n return new Promise((_resolve, _reject) => {\n var _a;\n let fulfilled = false;\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const session = this.connectionManager.lease(requestContext, {\n requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout,\n disableConcurrentStreams: disableConcurrentStreams || false\n });\n const rejectWithDestroy = /* @__PURE__ */ __name((err) => {\n if (disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n reject(err);\n }, \"rejectWithDestroy\");\n const queryString = (0, import_querystring_builder.buildQueryString)(query || {});\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const req = session.request({\n ...request.headers,\n [import_http22.constants.HTTP2_HEADER_PATH]: path,\n [import_http22.constants.HTTP2_HEADER_METHOD]: method\n });\n session.ref();\n req.on(\"response\", (headers) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: getTransformedHeaders(headers),\n body: req\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (disableConcurrentStreams) {\n session.close();\n this.connectionManager.deleteSession(authority, session);\n }\n });\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n abortSignal.onabort = () => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectWithDestroy(abortError);\n };\n }\n req.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", rejectWithDestroy);\n req.on(\"aborted\", () => {\n rejectWithDestroy(\n new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)\n );\n });\n req.on(\"close\", () => {\n session.unref();\n if (disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n /**\n * Destroys a session.\n * @param session The session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n};\n__name(_NodeHttp2Handler, \"NodeHttp2Handler\");\nvar NodeHttp2Handler = _NodeHttp2Handler;\n\n// src/stream-collector/collector.ts\n\nvar _Collector = class _Collector extends import_stream.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n};\n__name(_Collector, \"Collector\");\nvar Collector = _Collector;\n\n// src/stream-collector/index.ts\nvar streamCollector = /* @__PURE__ */ __name((stream) => new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function() {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n}), \"streamCollector\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler,\n NodeHttpHandler,\n streamCollector\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CredentialsProviderError: () => CredentialsProviderError,\n ProviderError: () => ProviderError,\n TokenProviderError: () => TokenProviderError,\n chain: () => chain,\n fromStatic: () => fromStatic,\n memoize: () => memoize\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/ProviderError.ts\nvar _ProviderError = class _ProviderError extends Error {\n constructor(message, tryNextLink = true) {\n super(message);\n this.tryNextLink = tryNextLink;\n this.name = \"ProviderError\";\n Object.setPrototypeOf(this, _ProviderError.prototype);\n }\n static from(error, tryNextLink = true) {\n return Object.assign(new this(error.message, tryNextLink), error);\n }\n};\n__name(_ProviderError, \"ProviderError\");\nvar ProviderError = _ProviderError;\n\n// src/CredentialsProviderError.ts\nvar _CredentialsProviderError = class _CredentialsProviderError extends ProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"CredentialsProviderError\";\n Object.setPrototypeOf(this, _CredentialsProviderError.prototype);\n }\n};\n__name(_CredentialsProviderError, \"CredentialsProviderError\");\nvar CredentialsProviderError = _CredentialsProviderError;\n\n// src/TokenProviderError.ts\nvar _TokenProviderError = class _TokenProviderError extends ProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"TokenProviderError\";\n Object.setPrototypeOf(this, _TokenProviderError.prototype);\n }\n};\n__name(_TokenProviderError, \"TokenProviderError\");\nvar TokenProviderError = _TokenProviderError;\n\n// src/chain.ts\nvar chain = /* @__PURE__ */ __name((...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n } catch (err) {\n lastProviderError = err;\n if (err == null ? void 0 : err.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n}, \"chain\");\n\n// src/fromStatic.ts\nvar fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), \"fromStatic\");\n\n// src/memoize.ts\nvar memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n}, \"memoize\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CredentialsProviderError,\n ProviderError,\n TokenProviderError,\n chain,\n fromStatic,\n memoize\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Field: () => Field,\n Fields: () => Fields,\n HttpRequest: () => HttpRequest,\n HttpResponse: () => HttpResponse,\n getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,\n isValidHostname: () => isValidHostname,\n resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/httpExtensionConfiguration.ts\nvar getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let httpHandler = runtimeConfig.httpHandler;\n return {\n setHttpHandler(handler) {\n httpHandler = handler;\n },\n httpHandler() {\n return httpHandler;\n },\n updateHttpClientConfig(key, value) {\n httpHandler.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return httpHandler.httpHandlerConfigs();\n }\n };\n}, \"getHttpHandlerExtensionConfiguration\");\nvar resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler()\n };\n}, \"resolveHttpHandlerRuntimeConfig\");\n\n// src/Field.ts\nvar import_types = require(\"@smithy/types\");\nvar _Field = class _Field {\n constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n /**\n * Appends a value to the field.\n *\n * @param value The value to append.\n */\n add(value) {\n this.values.push(value);\n }\n /**\n * Overwrite existing field values.\n *\n * @param values The new field values.\n */\n set(values) {\n this.values = values;\n }\n /**\n * Remove all matching entries from list.\n *\n * @param value Value to remove.\n */\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n /**\n * Get comma-delimited string.\n *\n * @returns String representation of {@link Field}.\n */\n toString() {\n return this.values.map((v) => v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v).join(\", \");\n }\n /**\n * Get string values as a list\n *\n * @returns Values in {@link Field} as a list.\n */\n get() {\n return this.values;\n }\n};\n__name(_Field, \"Field\");\nvar Field = _Field;\n\n// src/Fields.ts\nvar _Fields = class _Fields {\n constructor({ fields = [], encoding = \"utf-8\" }) {\n this.entries = {};\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n /**\n * Set entry for a {@link Field} name. The `name`\n * attribute will be used to key the collection.\n *\n * @param field The {@link Field} to set.\n */\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n /**\n * Retrieve {@link Field} entry by name.\n *\n * @param name The name of the {@link Field} entry\n * to retrieve\n * @returns The {@link Field} if it exists.\n */\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n /**\n * Delete entry from collection.\n *\n * @param name Name of the entry to delete.\n */\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n /**\n * Helper function for retrieving specific types of fields.\n * Used to grab all headers or all trailers.\n *\n * @param kind {@link FieldPosition} of entries to retrieve.\n * @returns The {@link Field} entries with the specified\n * {@link FieldPosition}.\n */\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n};\n__name(_Fields, \"Fields\");\nvar Fields = _Fields;\n\n// src/httpRequest.ts\nvar _HttpRequest = class _HttpRequest {\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.slice(-1) !== \":\" ? `${options.protocol}:` : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static isInstance(request) {\n if (!request)\n return false;\n const req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n }\n clone() {\n const cloned = new _HttpRequest({\n ...this,\n headers: { ...this.headers }\n });\n if (cloned.query)\n cloned.query = cloneQuery(cloned.query);\n return cloned;\n }\n};\n__name(_HttpRequest, \"HttpRequest\");\nvar HttpRequest = _HttpRequest;\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n }, {});\n}\n__name(cloneQuery, \"cloneQuery\");\n\n// src/httpResponse.ts\nvar _HttpResponse = class _HttpResponse {\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n};\n__name(_HttpResponse, \"HttpResponse\");\nvar HttpResponse = _HttpResponse;\n\n// src/isValidHostname.ts\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n__name(isValidHostname, \"isValidHostname\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Field,\n Fields,\n HttpRequest,\n HttpResponse,\n getHttpHandlerExtensionConfiguration,\n isValidHostname,\n resolveHttpHandlerRuntimeConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n buildQueryString: () => buildQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = (0, import_util_uri_escape.escapeUri)(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);\n }\n } else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n__name(buildQueryString, \"buildQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n buildQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseQueryString: () => parseQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nfunction parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n__name(parseQueryString, \"parseQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isClockSkewError: () => isClockSkewError,\n isRetryableByTrait: () => isRetryableByTrait,\n isServerError: () => isServerError,\n isThrottlingError: () => isThrottlingError,\n isTransientError: () => isTransientError\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/constants.ts\nvar CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\"\n];\nvar THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\"\n // DynamoDB\n];\nvar TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nvar TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/index.ts\nvar isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, \"isRetryableByTrait\");\nvar isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), \"isClockSkewError\");\nvar isThrottlingError = /* @__PURE__ */ __name((error) => {\n var _a, _b;\n return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true;\n}, \"isThrottlingError\");\nvar isTransientError = /* @__PURE__ */ __name((error) => {\n var _a;\n return TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || \"\") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0);\n}, \"isTransientError\");\nvar isServerError = /* @__PURE__ */ __name((error) => {\n var _a;\n if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n}, \"isServerError\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isClockSkewError,\n isRetryableByTrait,\n isServerError,\n isThrottlingError,\n isTransientError\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHomeDir = void 0;\nconst os_1 = require(\"os\");\nconst path_1 = require(\"path\");\nconst homeDirCache = {};\nconst getHomeDirCacheKey = () => {\n if (process && process.geteuid) {\n return `${process.geteuid()}`;\n }\n return \"DEFAULT\";\n};\nconst getHomeDir = () => {\n const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;\n if (HOME)\n return HOME;\n if (USERPROFILE)\n return USERPROFILE;\n if (HOMEPATH)\n return `${HOMEDRIVE}${HOMEPATH}`;\n const homeDirCacheKey = getHomeDirCacheKey();\n if (!homeDirCache[homeDirCacheKey])\n homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();\n return homeDirCache[homeDirCacheKey];\n};\nexports.getHomeDir = getHomeDir;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFilepath = void 0;\nconst crypto_1 = require(\"crypto\");\nconst path_1 = require(\"path\");\nconst getHomeDir_1 = require(\"./getHomeDir\");\nconst getSSOTokenFilepath = (id) => {\n const hasher = (0, crypto_1.createHash)(\"sha1\");\n const cacheName = hasher.update(id).digest(\"hex\");\n return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), \".aws\", \"sso\", \"cache\", `${cacheName}.json`);\n};\nexports.getSSOTokenFilepath = getSSOTokenFilepath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFromFile = void 0;\nconst fs_1 = require(\"fs\");\nconst getSSOTokenFilepath_1 = require(\"./getSSOTokenFilepath\");\nconst { readFile } = fs_1.promises;\nconst getSSOTokenFromFile = async (id) => {\n const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);\n const ssoTokenText = await readFile(ssoTokenFilepath, \"utf8\");\n return JSON.parse(ssoTokenText);\n};\nexports.getSSOTokenFromFile = getSSOTokenFromFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR,\n DEFAULT_PROFILE: () => DEFAULT_PROFILE,\n ENV_PROFILE: () => ENV_PROFILE,\n getProfileName: () => getProfileName,\n loadSharedConfigFiles: () => loadSharedConfigFiles,\n loadSsoSessionData: () => loadSsoSessionData,\n parseKnownFiles: () => parseKnownFiles\n});\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././getHomeDir\"), module.exports);\n\n// src/getProfileName.ts\nvar ENV_PROFILE = \"AWS_PROFILE\";\nvar DEFAULT_PROFILE = \"default\";\nvar getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, \"getProfileName\");\n\n// src/index.ts\n__reExport(src_exports, require(\"././getSSOTokenFilepath\"), module.exports);\n__reExport(src_exports, require(\"././getSSOTokenFromFile\"), module.exports);\n\n// src/getConfigData.ts\nvar import_types = require(\"@smithy/types\");\nvar getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n if (indexOfSeparator === -1) {\n return false;\n }\n return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator));\n}).reduce(\n (acc, [key, value]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;\n acc[updatedKey] = value;\n return acc;\n },\n {\n // Populate default profile, if present.\n ...data.default && { default: data.default }\n }\n), \"getConfigData\");\n\n// src/getConfigFilepath.ts\nvar import_path = require(\"path\");\nvar import_getHomeDir = require(\"././getHomeDir\");\nvar ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nvar getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), \".aws\", \"config\"), \"getConfigFilepath\");\n\n// src/getCredentialsFilepath.ts\n\nvar import_getHomeDir2 = require(\"././getHomeDir\");\nvar ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nvar getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), \".aws\", \"credentials\"), \"getCredentialsFilepath\");\n\n// src/parseIni.ts\n\nvar prefixKeyRegex = /^([\\w-]+)\\s([\"'])?([\\w-@\\+\\.%:/]+)\\2$/;\nvar profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nvar parseIni = /* @__PURE__ */ __name((iniData) => {\n const map = {};\n let currentSection;\n let currentSubSection;\n for (const iniLine of iniData.split(/\\r?\\n/)) {\n const trimmedLine = iniLine.split(/(^|\\s)[;#]/)[0].trim();\n const isSection = trimmedLine[0] === \"[\" && trimmedLine[trimmedLine.length - 1] === \"]\";\n if (isSection) {\n currentSection = void 0;\n currentSubSection = void 0;\n const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);\n const matches = prefixKeyRegex.exec(sectionName);\n if (matches) {\n const [, prefix, , name] = matches;\n if (Object.values(import_types.IniSectionType).includes(prefix)) {\n currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);\n }\n } else {\n currentSection = sectionName;\n }\n if (profileNameBlockList.includes(sectionName)) {\n throw new Error(`Found invalid profile name \"${sectionName}\"`);\n }\n } else if (currentSection) {\n const indexOfEqualsSign = trimmedLine.indexOf(\"=\");\n if (![0, -1].includes(indexOfEqualsSign)) {\n const [name, value] = [\n trimmedLine.substring(0, indexOfEqualsSign).trim(),\n trimmedLine.substring(indexOfEqualsSign + 1).trim()\n ];\n if (value === \"\") {\n currentSubSection = name;\n } else {\n if (currentSubSection && iniLine.trimStart() === iniLine) {\n currentSubSection = void 0;\n }\n map[currentSection] = map[currentSection] || {};\n const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;\n map[currentSection][key] = value;\n }\n }\n }\n }\n return map;\n}, \"parseIni\");\n\n// src/loadSharedConfigFiles.ts\nvar import_slurpFile = require(\"././slurpFile\");\nvar swallowError = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar CONFIG_PREFIX_SEPARATOR = \".\";\nvar loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => {\n const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;\n const parsedFiles = await Promise.all([\n (0, import_slurpFile.slurpFile)(configFilepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).then(getConfigData).catch(swallowError),\n (0, import_slurpFile.slurpFile)(filepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).catch(swallowError)\n ]);\n return {\n configFile: parsedFiles[0],\n credentialsFile: parsedFiles[1]\n };\n}, \"loadSharedConfigFiles\");\n\n// src/getSsoSessionData.ts\n\nvar getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.split(CONFIG_PREFIX_SEPARATOR)[1]]: value }), {}), \"getSsoSessionData\");\n\n// src/loadSsoSessionData.ts\nvar import_slurpFile2 = require(\"././slurpFile\");\nvar swallowError2 = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), \"loadSsoSessionData\");\n\n// src/mergeConfigFiles.ts\nvar mergeConfigFiles = /* @__PURE__ */ __name((...files) => {\n const merged = {};\n for (const file of files) {\n for (const [key, values] of Object.entries(file)) {\n if (merged[key] !== void 0) {\n Object.assign(merged[key], values);\n } else {\n merged[key] = values;\n }\n }\n }\n return merged;\n}, \"mergeConfigFiles\");\n\n// src/parseKnownFiles.ts\nvar parseKnownFiles = /* @__PURE__ */ __name(async (init) => {\n const parsedFiles = await loadSharedConfigFiles(init);\n return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n}, \"parseKnownFiles\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CONFIG_PREFIX_SEPARATOR,\n DEFAULT_PROFILE,\n ENV_PROFILE,\n getProfileName,\n loadSharedConfigFiles,\n loadSsoSessionData,\n parseKnownFiles,\n getHomeDir,\n getSSOTokenFilepath,\n getSSOTokenFromFile\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slurpFile = void 0;\nconst fs_1 = require(\"fs\");\nconst { readFile } = fs_1.promises;\nconst filePromisesHash = {};\nconst slurpFile = (path, options) => {\n if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) {\n filePromisesHash[path] = readFile(path, \"utf8\");\n }\n return filePromisesHash[path];\n};\nexports.slurpFile = slurpFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n SignatureV4: () => SignatureV4,\n clearCredentialCache: () => clearCredentialCache,\n createScope: () => createScope,\n getCanonicalHeaders: () => getCanonicalHeaders,\n getCanonicalQuery: () => getCanonicalQuery,\n getPayloadHash: () => getPayloadHash,\n getSigningKey: () => getSigningKey,\n moveHeadersToQuery: () => moveHeadersToQuery,\n prepareRequest: () => prepareRequest\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SignatureV4.ts\nvar import_eventstream_codec = require(\"@smithy/eventstream-codec\");\n\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar import_util_utf83 = require(\"@smithy/util-utf8\");\n\n// src/constants.ts\nvar ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nvar CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nvar AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nvar SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nvar EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nvar SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nvar TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nvar AUTH_HEADER = \"authorization\";\nvar AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nvar DATE_HEADER = \"date\";\nvar GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nvar SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nvar SHA256_HEADER = \"x-amz-content-sha256\";\nvar TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nvar ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true\n};\nvar PROXY_HEADER_PATTERN = /^proxy-/;\nvar SEC_HEADER_PATTERN = /^sec-/;\nvar ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nvar EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nvar UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nvar MAX_CACHE_SIZE = 50;\nvar KEY_TYPE_IDENTIFIER = \"aws4_request\";\nvar MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n\n// src/credentialDerivation.ts\nvar import_util_hex_encoding = require(\"@smithy/util-hex-encoding\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar signingKeyCache = {};\nvar cacheQueue = [];\nvar createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, \"createScope\");\nvar getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return signingKeyCache[cacheKey] = key;\n}, \"getSigningKey\");\nvar clearCredentialCache = /* @__PURE__ */ __name(() => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n}, \"clearCredentialCache\");\nvar hmac = /* @__PURE__ */ __name((ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update((0, import_util_utf8.toUint8Array)(data));\n return hash.digest();\n}, \"hmac\");\n\n// src/getCanonicalHeaders.ts\nvar getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == void 0) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders == null ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n}, \"getCanonicalHeaders\");\n\n// src/getCanonicalQuery.ts\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nvar getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n keys.push(key);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`;\n } else if (Array.isArray(value)) {\n serialized[key] = value.slice(0).reduce(\n (encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]),\n []\n ).sort().join(\"&\");\n }\n }\n return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join(\"&\");\n}, \"getCanonicalQuery\");\n\n// src/getPayloadHash.ts\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\n\nvar import_util_utf82 = require(\"@smithy/util-utf8\");\nvar getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == void 0) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n } else if (typeof body === \"string\" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update((0, import_util_utf82.toUint8Array)(body));\n return (0, import_util_hex_encoding.toHex)(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n}, \"getPayloadHash\");\n\n// src/headerUtil.ts\nvar hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n}, \"hasHeader\");\n\n// src/cloneRequest.ts\nvar cloneRequest = /* @__PURE__ */ __name(({ headers, query, ...rest }) => ({\n ...rest,\n headers: { ...headers },\n query: query ? cloneQuery(query) : void 0\n}), \"cloneRequest\");\nvar cloneQuery = /* @__PURE__ */ __name((query) => Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n}, {}), \"cloneQuery\");\n\n// src/moveHeadersToQuery.ts\nvar moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {\n var _a;\n const { headers, query = {} } = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if (lname.slice(0, 6) === \"x-amz-\" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query\n };\n}, \"moveHeadersToQuery\");\n\n// src/prepareRequest.ts\nvar prepareRequest = /* @__PURE__ */ __name((request) => {\n request = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n}, \"prepareRequest\");\n\n// src/utilDate.ts\nvar iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\\.\\d{3}Z$/, \"Z\"), \"iso8601\");\nvar toDate = /* @__PURE__ */ __name((time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1e3);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1e3);\n }\n return new Date(time);\n }\n return time;\n}, \"toDate\");\n\n// src/SignatureV4.ts\nvar _SignatureV4 = class _SignatureV4 {\n constructor({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath = true\n }) {\n this.headerMarshaller = new import_eventstream_codec.HeaderMarshaller(import_util_utf83.toUtf8, import_util_utf83.fromUtf8);\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = (0, import_util_middleware.normalizeProvider)(region);\n this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials);\n }\n async presign(originalRequest, options = {}) {\n const {\n signingDate = /* @__PURE__ */ new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService\n } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { longDate, shortDate } = formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\n \"Signature version 4 presigned URLs must have an expiration date less than one week in the future\"\n );\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))\n );\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n } else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n } else if (toSign.message) {\n return this.signMessage(toSign, options);\n } else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate, longDate } = formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) {\n const promise = this.signEvent(\n {\n headers: this.headerMarshaller.format(signableMessage.message.headers),\n payload: signableMessage.message.body\n },\n {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature\n }\n );\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate } = formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update((0, import_util_utf83.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n async signRequest(requestToSign, {\n signingDate = /* @__PURE__ */ new Date(),\n signableHeaders,\n unsignableHeaders,\n signingRegion,\n signingService\n } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n );\n request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;\n return request;\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest) {\n const hash = new this.sha256();\n hash.update((0, import_util_utf83.toUint8Array)(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${ALGORITHM_IDENTIFIER}\n${longDate}\n${credentialScope}\n${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if ((pathSegment == null ? void 0 : pathSegment.length) === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n } else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${(path == null ? void 0 : path.startsWith(\"/\")) ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith(\"/\")) ? \"/\" : \"\"}`;\n const doubleEncoded = encodeURIComponent(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);\n const hash = new this.sha256(await keyPromise);\n hash.update((0, import_util_utf83.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339)\n typeof credentials.accessKeyId !== \"string\" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339)\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n};\n__name(_SignatureV4, \"SignatureV4\");\nvar SignatureV4 = _SignatureV4;\nvar formatDate = /* @__PURE__ */ __name((now) => {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8)\n };\n}, \"formatDate\");\nvar getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(\";\"), \"getCanonicalHeaderList\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SignatureV4,\n clearCredentialCache,\n createScope,\n getCanonicalHeaders,\n getCanonicalQuery,\n getPayloadHash,\n getSigningKey,\n moveHeadersToQuery,\n prepareRequest\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Client: () => Client,\n Command: () => Command,\n LazyJsonString: () => LazyJsonString,\n NoOpLogger: () => NoOpLogger,\n SENSITIVE_STRING: () => SENSITIVE_STRING,\n ServiceException: () => ServiceException,\n StringWrapper: () => StringWrapper,\n _json: () => _json,\n collectBody: () => collectBody,\n convertMap: () => convertMap,\n createAggregatedClient: () => createAggregatedClient,\n dateToUtcString: () => dateToUtcString,\n decorateServiceException: () => decorateServiceException,\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n expectBoolean: () => expectBoolean,\n expectByte: () => expectByte,\n expectFloat32: () => expectFloat32,\n expectInt: () => expectInt,\n expectInt32: () => expectInt32,\n expectLong: () => expectLong,\n expectNonNull: () => expectNonNull,\n expectNumber: () => expectNumber,\n expectObject: () => expectObject,\n expectShort: () => expectShort,\n expectString: () => expectString,\n expectUnion: () => expectUnion,\n extendedEncodeURIComponent: () => extendedEncodeURIComponent,\n getArrayIfSingleItem: () => getArrayIfSingleItem,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,\n getValueFromTextNode: () => getValueFromTextNode,\n handleFloat: () => handleFloat,\n limitedParseDouble: () => limitedParseDouble,\n limitedParseFloat: () => limitedParseFloat,\n limitedParseFloat32: () => limitedParseFloat32,\n loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,\n logger: () => logger,\n map: () => map,\n parseBoolean: () => parseBoolean,\n parseEpochTimestamp: () => parseEpochTimestamp,\n parseRfc3339DateTime: () => parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime: () => parseRfc7231DateTime,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,\n resolvedPath: () => resolvedPath,\n serializeFloat: () => serializeFloat,\n splitEvery: () => splitEvery,\n strictParseByte: () => strictParseByte,\n strictParseDouble: () => strictParseDouble,\n strictParseFloat: () => strictParseFloat,\n strictParseFloat32: () => strictParseFloat32,\n strictParseInt: () => strictParseInt,\n strictParseInt32: () => strictParseInt32,\n strictParseLong: () => strictParseLong,\n strictParseShort: () => strictParseShort,\n take: () => take,\n throwDefaultError: () => throwDefaultError,\n withBaseException: () => withBaseException\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/NoOpLogger.ts\nvar _NoOpLogger = class _NoOpLogger {\n trace() {\n }\n debug() {\n }\n info() {\n }\n warn() {\n }\n error() {\n }\n};\n__name(_NoOpLogger, \"NoOpLogger\");\nvar NoOpLogger = _NoOpLogger;\n\n// src/client.ts\nvar import_middleware_stack = require(\"@smithy/middleware-stack\");\nvar _Client = class _Client {\n constructor(config) {\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n this.config = config;\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : void 0;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n if (callback) {\n handler(command).then(\n (result) => callback(null, result.output),\n (err) => callback(err)\n ).catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n () => {\n }\n );\n } else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n if (this.config.requestHandler.destroy)\n this.config.requestHandler.destroy();\n }\n};\n__name(_Client, \"Client\");\nvar Client = _Client;\n\n// src/collect-stream-body.ts\nvar import_util_stream = require(\"@smithy/util-stream\");\nvar collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);\n}, \"collectBody\");\n\n// src/command.ts\n\nvar import_types = require(\"@smithy/types\");\nvar _Command = class _Command {\n constructor() {\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n }\n /**\n * Factory for Command ClassBuilder.\n * @internal\n */\n static classBuilder() {\n return new ClassBuilder();\n }\n /**\n * @internal\n */\n resolveMiddlewareWithContext(clientStack, configuration, options, {\n middlewareFn,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n smithyContext,\n additionalContext,\n CommandCtor\n }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger: logger2 } = configuration;\n const handlerExecutionContext = {\n logger: logger2,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [import_types.SMITHY_CONTEXT_KEY]: {\n ...smithyContext\n },\n ...additionalContext\n };\n const { requestHandler } = configuration;\n return stack.resolve(\n (request) => requestHandler.handle(request.request, options || {}),\n handlerExecutionContext\n );\n }\n};\n__name(_Command, \"Command\");\nvar Command = _Command;\nvar _ClassBuilder = class _ClassBuilder {\n constructor() {\n this._init = () => {\n };\n this._ep = {};\n this._middlewareFn = () => [];\n this._commandName = \"\";\n this._clientName = \"\";\n this._additionalContext = {};\n this._smithyContext = {};\n this._inputFilterSensitiveLog = (_) => _;\n this._outputFilterSensitiveLog = (_) => _;\n this._serializer = null;\n this._deserializer = null;\n }\n /**\n * Optional init callback.\n */\n init(cb) {\n this._init = cb;\n }\n /**\n * Set the endpoint parameter instructions.\n */\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n /**\n * Add any number of middleware.\n */\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n /**\n * Set the initial handler execution context Smithy field.\n */\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext\n };\n return this;\n }\n /**\n * Set the initial handler execution context.\n */\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n /**\n * Set constant string identifiers for the operation.\n */\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n /**\n * Set the input and output sensistive log filters.\n */\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n /**\n * Sets the serializer.\n */\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n /**\n * Sets the deserializer.\n */\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n /**\n * @returns a Command class with the classBuilder properties.\n */\n build() {\n var _a;\n const closure = this;\n let CommandRef;\n return CommandRef = (_a = class extends Command {\n /**\n * @public\n */\n constructor(input) {\n super();\n this.input = input;\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.serialize = closure._serializer;\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.deserialize = closure._deserializer;\n closure._init(this);\n }\n /**\n * @public\n */\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n /**\n * @internal\n */\n resolveMiddleware(stack, configuration, options) {\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog,\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog,\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext\n });\n }\n }, __name(_a, \"CommandRef\"), _a);\n }\n};\n__name(_ClassBuilder, \"ClassBuilder\");\nvar ClassBuilder = _ClassBuilder;\n\n// src/constants.ts\nvar SENSITIVE_STRING = \"***SensitiveInformation***\";\n\n// src/create-aggregated-client.ts\nvar createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => {\n for (const command of Object.keys(commands)) {\n const CommandCtor = commands[command];\n const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) {\n const command2 = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command2, optionsOrCb);\n } else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command2, optionsOrCb || {}, cb);\n } else {\n return this.send(command2, optionsOrCb);\n }\n }, \"methodImpl\");\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client2.prototype[methodName] = methodImpl;\n }\n}, \"createAggregatedClient\");\n\n// src/parse-utils.ts\nvar parseBoolean = /* @__PURE__ */ __name((value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n}, \"parseBoolean\");\nvar expectBoolean = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n}, \"expectBoolean\");\nvar expectNumber = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n}, \"expectNumber\");\nvar MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nvar expectFloat32 = /* @__PURE__ */ __name((value) => {\n const expected = expectNumber(value);\n if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n}, \"expectFloat32\");\nvar expectLong = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n}, \"expectLong\");\nvar expectInt = expectLong;\nvar expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), \"expectInt32\");\nvar expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), \"expectShort\");\nvar expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), \"expectByte\");\nvar expectSizedInt = /* @__PURE__ */ __name((value, size) => {\n const expected = expectLong(value);\n if (expected !== void 0 && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n}, \"expectSizedInt\");\nvar castInt = /* @__PURE__ */ __name((value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n}, \"castInt\");\nvar expectNonNull = /* @__PURE__ */ __name((value, location) => {\n if (value === null || value === void 0) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n}, \"expectNonNull\");\nvar expectObject = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n}, \"expectObject\");\nvar expectString = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n}, \"expectString\");\nvar expectUnion = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n}, \"expectUnion\");\nvar strictParseDouble = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n}, \"strictParseDouble\");\nvar strictParseFloat = strictParseDouble;\nvar strictParseFloat32 = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n}, \"strictParseFloat32\");\nvar NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nvar parseNumber = /* @__PURE__ */ __name((value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n}, \"parseNumber\");\nvar limitedParseDouble = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n}, \"limitedParseDouble\");\nvar handleFloat = limitedParseDouble;\nvar limitedParseFloat = limitedParseDouble;\nvar limitedParseFloat32 = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n}, \"limitedParseFloat32\");\nvar parseFloatString = /* @__PURE__ */ __name((value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n}, \"parseFloatString\");\nvar strictParseLong = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n}, \"strictParseLong\");\nvar strictParseInt = strictParseLong;\nvar strictParseInt32 = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n}, \"strictParseInt32\");\nvar strictParseShort = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n}, \"strictParseShort\");\nvar strictParseByte = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n}, \"strictParseByte\");\nvar stackTraceWarning = /* @__PURE__ */ __name((message) => {\n return String(new TypeError(message).stack || message).split(\"\\n\").slice(0, 5).filter((s) => !s.includes(\"stackTraceWarning\")).join(\"\\n\");\n}, \"stackTraceWarning\");\nvar logger = {\n warn: console.warn\n};\n\n// src/date-utils.ts\nvar DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nvar MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nfunction dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\n__name(dateToUtcString, \"dateToUtcString\");\nvar RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nvar parseRfc3339DateTime = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n}, \"parseRfc3339DateTime\");\nvar RFC3339_WITH_OFFSET = new RegExp(\n /^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/\n);\nvar parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n}, \"parseRfc3339DateTimeWithOffset\");\nvar IMF_FIXDATE = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar RFC_850_DATE = new RegExp(\n /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar ASC_TIME = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/\n);\nvar parseRfc7231DateTime = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr, \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(\n buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds\n })\n );\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr.trimLeft(), \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n}, \"parseRfc7231DateTime\");\nvar parseEpochTimestamp = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n } else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n } else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1e3));\n}, \"parseEpochTimestamp\");\nvar buildDate = /* @__PURE__ */ __name((year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(\n Date.UTC(\n year,\n adjustedMonth,\n day,\n parseDateValue(time.hours, \"hour\", 0, 23),\n parseDateValue(time.minutes, \"minute\", 0, 59),\n // seconds can go up to 60 for leap seconds\n parseDateValue(time.seconds, \"seconds\", 0, 60),\n parseMilliseconds(time.fractionalMilliseconds)\n )\n );\n}, \"buildDate\");\nvar parseTwoDigitYear = /* @__PURE__ */ __name((value) => {\n const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n}, \"parseTwoDigitYear\");\nvar FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;\nvar adjustRfc850Year = /* @__PURE__ */ __name((input) => {\n if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(\n Date.UTC(\n input.getUTCFullYear() - 100,\n input.getUTCMonth(),\n input.getUTCDate(),\n input.getUTCHours(),\n input.getUTCMinutes(),\n input.getUTCSeconds(),\n input.getUTCMilliseconds()\n )\n );\n }\n return input;\n}, \"adjustRfc850Year\");\nvar parseMonthByShortName = /* @__PURE__ */ __name((value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n}, \"parseMonthByShortName\");\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n}, \"validateDayOfMonth\");\nvar isLeapYear = /* @__PURE__ */ __name((year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}, \"isLeapYear\");\nvar parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n}, \"parseDateValue\");\nvar parseMilliseconds = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1e3;\n}, \"parseMilliseconds\");\nvar parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n } else if (directionStr == \"-\") {\n direction = -1;\n } else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1e3;\n}, \"parseOffsetToMilliseconds\");\nvar stripLeadingZeroes = /* @__PURE__ */ __name((value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n}, \"stripLeadingZeroes\");\n\n// src/exceptions.ts\nvar _ServiceException = class _ServiceException extends Error {\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, _ServiceException.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n};\n__name(_ServiceException, \"ServiceException\");\nvar ServiceException = _ServiceException;\nvar decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => {\n Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {\n if (exception[k] == void 0 || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n}, \"decorateServiceException\");\n\n// src/default-error-handler.ts\nvar throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : void 0;\n const response = new exceptionCtor({\n name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata\n });\n throw decorateServiceException(response, parsedBody);\n}, \"throwDefaultError\");\nvar withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n}, \"withBaseException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\n\n// src/defaults-mode.ts\nvar loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3e4\n };\n default:\n return {};\n }\n}, \"loadConfigsForDefaultMode\");\n\n// src/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 14) {\n warningEmitted = true;\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/extensions/checksum.ts\n\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in import_types.AlgorithmId) {\n const algorithmId = import_types.AlgorithmId[id];\n if (runtimeConfig[algorithmId] === void 0) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId]\n });\n }\n return {\n _checksumAlgorithms: checksumAlgorithms,\n addChecksumAlgorithm(algo) {\n this._checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return this._checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/retry.ts\nvar getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let _retryStrategy = runtimeConfig.retryStrategy;\n return {\n setRetryStrategy(retryStrategy) {\n _retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return _retryStrategy;\n }\n };\n}, \"getRetryConfiguration\");\nvar resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n}, \"resolveRetryRuntimeConfig\");\n\n// src/extensions/defaultExtensionConfiguration.ts\nvar getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n ...getChecksumConfiguration(runtimeConfig),\n ...getRetryConfiguration(runtimeConfig)\n };\n}, \"getDefaultExtensionConfiguration\");\nvar getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n ...resolveChecksumRuntimeConfig(config),\n ...resolveRetryRuntimeConfig(config)\n };\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/extended-encode-uri-component.ts\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n__name(extendedEncodeURIComponent, \"extendedEncodeURIComponent\");\n\n// src/get-array-if-single-item.ts\nvar getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], \"getArrayIfSingleItem\");\n\n// src/get-value-from-text-node.ts\nvar getValueFromTextNode = /* @__PURE__ */ __name((obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) {\n obj[key] = obj[key][textNodeName];\n } else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n}, \"getValueFromTextNode\");\n\n// src/lazy-json.ts\nvar StringWrapper = /* @__PURE__ */ __name(function() {\n const Class = Object.getPrototypeOf(this).constructor;\n const Constructor = Function.bind.apply(String, [null, ...arguments]);\n const instance = new Constructor();\n Object.setPrototypeOf(instance, Class.prototype);\n return instance;\n}, \"StringWrapper\");\nStringWrapper.prototype = Object.create(String.prototype, {\n constructor: {\n value: StringWrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n});\nObject.setPrototypeOf(StringWrapper, String);\nvar _LazyJsonString = class _LazyJsonString extends StringWrapper {\n deserializeJSON() {\n return JSON.parse(super.toString());\n }\n toJSON() {\n return super.toString();\n }\n static fromObject(object) {\n if (object instanceof _LazyJsonString) {\n return object;\n } else if (object instanceof String || typeof object === \"string\") {\n return new _LazyJsonString(object);\n }\n return new _LazyJsonString(JSON.stringify(object));\n }\n};\n__name(_LazyJsonString, \"LazyJsonString\");\nvar LazyJsonString = _LazyJsonString;\n\n// src/object-mapping.ts\nfunction map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n } else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n } else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\n__name(map, \"map\");\nvar convertMap = /* @__PURE__ */ __name((target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n}, \"convertMap\");\nvar take = /* @__PURE__ */ __name((source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n}, \"take\");\nvar mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => {\n return map(\n target,\n Object.entries(instructions).reduce(\n (_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n } else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n } else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n },\n {}\n )\n );\n}, \"mapWithFilter\");\nvar applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if (typeof filter2 === \"function\" && filter2(source[sourceKey]) || typeof filter2 !== \"function\" && !!filter2) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === void 0 && (_value = value()) != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(void 0) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n } else if (customFilterPassed) {\n target[targetKey] = value();\n }\n } else {\n const defaultFilterPassed = filter === void 0 && value != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(value) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n}, \"applyInstruction\");\nvar nonNullish = /* @__PURE__ */ __name((_) => _ != null, \"nonNullish\");\nvar pass = /* @__PURE__ */ __name((_) => _, \"pass\");\n\n// src/resolve-path.ts\nvar resolvedPath = /* @__PURE__ */ __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== void 0) {\n const labelValue = labelValueProvider();\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath2 = resolvedPath2.replace(\n uriLabel,\n isGreedyLabel ? labelValue.split(\"/\").map((segment) => extendedEncodeURIComponent(segment)).join(\"/\") : extendedEncodeURIComponent(labelValue)\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath2;\n}, \"resolvedPath\");\n\n// src/ser-utils.ts\nvar serializeFloat = /* @__PURE__ */ __name((value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n}, \"serializeFloat\");\n\n// src/serde-json.ts\nvar _json = /* @__PURE__ */ __name((obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n}, \"_json\");\n\n// src/split-every.ts\nfunction splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n } else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n__name(splitEvery, \"splitEvery\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Client,\n Command,\n LazyJsonString,\n NoOpLogger,\n SENSITIVE_STRING,\n ServiceException,\n StringWrapper,\n _json,\n collectBody,\n convertMap,\n createAggregatedClient,\n dateToUtcString,\n decorateServiceException,\n emitWarningIfUnsupportedVersion,\n expectBoolean,\n expectByte,\n expectFloat32,\n expectInt,\n expectInt32,\n expectLong,\n expectNonNull,\n expectNumber,\n expectObject,\n expectShort,\n expectString,\n expectUnion,\n extendedEncodeURIComponent,\n getArrayIfSingleItem,\n getDefaultClientConfiguration,\n getDefaultExtensionConfiguration,\n getValueFromTextNode,\n handleFloat,\n limitedParseDouble,\n limitedParseFloat,\n limitedParseFloat32,\n loadConfigsForDefaultMode,\n logger,\n map,\n parseBoolean,\n parseEpochTimestamp,\n parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime,\n resolveDefaultRuntimeConfig,\n resolvedPath,\n serializeFloat,\n splitEvery,\n strictParseByte,\n strictParseDouble,\n strictParseFloat,\n strictParseFloat32,\n strictParseInt,\n strictParseInt32,\n strictParseLong,\n strictParseShort,\n take,\n throwDefaultError,\n withBaseException\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n _checksumAlgorithms: checksumAlgorithms,\n addChecksumAlgorithm(algo) {\n this._checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return this._checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n ...getChecksumConfiguration(runtimeConfig)\n };\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n ...resolveChecksumRuntimeConfig(config)\n };\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AlgorithmId,\n EndpointURLScheme,\n FieldPosition,\n HttpApiKeyAuthLocation,\n HttpAuthLocation,\n IniSectionType,\n RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseUrl: () => parseUrl\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_querystring_parser = require(\"@smithy/querystring-parser\");\nvar parseUrl = /* @__PURE__ */ __name((url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = (0, import_querystring_parser.parseQueryString)(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : void 0,\n protocol,\n path: pathname,\n query\n };\n}, \"parseUrl\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseUrl\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nconst fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = (0, util_buffer_from_1.fromString)(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\nexports.fromBase64 = fromBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromBase64\"), module.exports);\n__reExport(src_exports, require(\"././toBase64\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromBase64,\n toBase64\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst toBase64 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\nexports.toBase64 = toBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n calculateBodyLength: () => calculateBodyLength\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/calculateBodyLength.ts\nvar import_fs = require(\"fs\");\nvar calculateBodyLength = /* @__PURE__ */ __name((body) => {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return Buffer.from(body).length;\n } else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n } else if (typeof body.size === \"number\") {\n return body.size;\n } else if (typeof body.start === \"number\" && typeof body.end === \"number\") {\n return body.end + 1 - body.start;\n } else if (typeof body.path === \"string\" || Buffer.isBuffer(body.path)) {\n return (0, import_fs.lstatSync)(body.path).size;\n } else if (typeof body.fd === \"number\") {\n return (0, import_fs.fstatSync)(body.fd).size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n}, \"calculateBodyLength\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n calculateBodyLength\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n SelectorType: () => SelectorType,\n booleanSelector: () => booleanSelector,\n numberSelector: () => numberSelector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/booleanSelector.ts\nvar booleanSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n if (obj[key] === \"true\")\n return true;\n if (obj[key] === \"false\")\n return false;\n throw new Error(`Cannot load ${type} \"${key}\". Expected \"true\" or \"false\", got ${obj[key]}.`);\n}, \"booleanSelector\");\n\n// src/numberSelector.ts\nvar numberSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n const numberValue = parseInt(obj[key], 10);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);\n }\n return numberValue;\n}, \"numberSelector\");\n\n// src/types.ts\nvar SelectorType = /* @__PURE__ */ ((SelectorType2) => {\n SelectorType2[\"ENV\"] = \"env\";\n SelectorType2[\"CONFIG\"] = \"shared config entry\";\n return SelectorType2;\n})(SelectorType || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SelectorType,\n booleanSelector,\n numberSelector\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n resolveDefaultsModeConfig: () => resolveDefaultsModeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/resolveDefaultsModeConfig.ts\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/constants.ts\nvar AWS_EXECUTION_ENV = \"AWS_EXECUTION_ENV\";\nvar AWS_REGION_ENV = \"AWS_REGION\";\nvar AWS_DEFAULT_REGION_ENV = \"AWS_DEFAULT_REGION\";\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\nvar IMDS_REGION_PATH = \"/latest/meta-data/placement/region\";\n\n// src/defaultsModeConfig.ts\nvar AWS_DEFAULTS_MODE_ENV = \"AWS_DEFAULTS_MODE\";\nvar AWS_DEFAULTS_MODE_CONFIG = \"defaults_mode\";\nvar NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n return env[AWS_DEFAULTS_MODE_ENV];\n },\n configFileSelector: (profile) => {\n return profile[AWS_DEFAULTS_MODE_CONFIG];\n },\n default: \"legacy\"\n};\n\n// src/resolveDefaultsModeConfig.ts\nvar resolveDefaultsModeConfig = /* @__PURE__ */ __name(({\n region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS),\n defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS)\n} = {}) => (0, import_property_provider.memoize)(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode == null ? void 0 : mode.toLowerCase()) {\n case \"auto\":\n return resolveNodeDefaultsModeAuto(region);\n case \"in-region\":\n case \"cross-region\":\n case \"mobile\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode == null ? void 0 : mode.toLocaleLowerCase());\n case void 0:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(\n `Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`\n );\n }\n}), \"resolveDefaultsModeConfig\");\nvar resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => {\n if (clientRegion) {\n const resolvedRegion = typeof clientRegion === \"function\" ? await clientRegion() : clientRegion;\n const inferredRegion = await inferPhysicalRegion();\n if (!inferredRegion) {\n return \"standard\";\n }\n if (resolvedRegion === inferredRegion) {\n return \"in-region\";\n } else {\n return \"cross-region\";\n }\n }\n return \"standard\";\n}, \"resolveNodeDefaultsModeAuto\");\nvar inferPhysicalRegion = /* @__PURE__ */ __name(async () => {\n if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {\n return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];\n }\n if (!process.env[ENV_IMDS_DISABLED]) {\n try {\n const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n const endpoint = await getInstanceMetadataEndpoint();\n return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();\n } catch (e) {\n }\n }\n}, \"inferPhysicalRegion\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveDefaultsModeConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n EndpointError: () => EndpointError,\n customEndpointFunctions: () => customEndpointFunctions,\n isIpAddress: () => isIpAddress,\n isValidHostLabel: () => isValidHostLabel,\n resolveEndpoint: () => resolveEndpoint\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/lib/isIpAddress.ts\nvar IP_V4_REGEX = new RegExp(\n `^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`\n);\nvar isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith(\"[\") && value.endsWith(\"]\"), \"isIpAddress\");\n\n// src/lib/isValidHostLabel.ts\nvar VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nvar isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n}, \"isValidHostLabel\");\n\n// src/utils/customEndpointFunctions.ts\nvar customEndpointFunctions = {};\n\n// src/debug/debugId.ts\nvar debugId = \"endpoints\";\n\n// src/debug/toDebugString.ts\nfunction toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n__name(toDebugString, \"toDebugString\");\n\n// src/types/EndpointError.ts\nvar _EndpointError = class _EndpointError extends Error {\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n};\n__name(_EndpointError, \"EndpointError\");\nvar EndpointError = _EndpointError;\n\n// src/lib/booleanEquals.ts\nvar booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"booleanEquals\");\n\n// src/lib/getAttrPathList.ts\nvar getAttrPathList = /* @__PURE__ */ __name((path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n } else {\n pathList.push(part);\n }\n }\n return pathList;\n}, \"getAttrPathList\");\n\n// src/lib/getAttr.ts\nvar getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n } else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value), \"getAttr\");\n\n// src/lib/isSet.ts\nvar isSet = /* @__PURE__ */ __name((value) => value != null, \"isSet\");\n\n// src/lib/not.ts\nvar not = /* @__PURE__ */ __name((value) => !value, \"not\");\n\n// src/lib/parseURL.ts\nvar import_types3 = require(\"@smithy/types\");\nvar DEFAULT_PORTS = {\n [import_types3.EndpointURLScheme.HTTP]: 80,\n [import_types3.EndpointURLScheme.HTTPS]: 443\n};\nvar parseURL = /* @__PURE__ */ __name((value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname: hostname2, port, protocol: protocol2 = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join(\"&\");\n return url;\n }\n return new URL(value);\n } catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp\n };\n}, \"parseURL\");\n\n// src/lib/stringEquals.ts\nvar stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"stringEquals\");\n\n// src/lib/substring.ts\nvar substring = /* @__PURE__ */ __name((input, start, stop, reverse) => {\n if (start >= stop || input.length < stop) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n}, \"substring\");\n\n// src/lib/uriEncode.ts\nvar uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), \"uriEncode\");\n\n// src/utils/endpointFunctions.ts\nvar endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode\n};\n\n// src/utils/evaluateTemplate.ts\nvar evaluateTemplate = /* @__PURE__ */ __name((template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n } else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n}, \"evaluateTemplate\");\n\n// src/utils/getReferenceValue.ts\nvar getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n return referenceRecord[ref];\n}, \"getReferenceValue\");\n\n// src/utils/evaluateExpression.ts\nvar evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n } else if (obj[\"fn\"]) {\n return callFunction(obj, options);\n } else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n}, \"evaluateExpression\");\n\n// src/utils/callFunction.ts\nvar callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => {\n const evaluatedArgs = argv.map(\n (arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : evaluateExpression(arg, \"arg\", options)\n );\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n}, \"callFunction\");\n\n// src/utils/evaluateCondition.ts\nvar evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => {\n var _a, _b;\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...assign != null && { toAssign: { name: assign, value } }\n };\n}, \"evaluateCondition\");\n\n// src/utils/evaluateConditions.ts\nvar evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => {\n var _a, _b;\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord\n }\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n}, \"evaluateConditions\");\n\n// src/utils/getEndpointHeaders.ts\nvar getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce(\n (acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n })\n }),\n {}\n), \"getEndpointHeaders\");\n\n// src/utils/getEndpointProperty.ts\nvar getEndpointProperty = /* @__PURE__ */ __name((property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n}, \"getEndpointProperty\");\n\n// src/utils/getEndpointProperties.ts\nvar getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce(\n (acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: getEndpointProperty(propertyVal, options)\n }),\n {}\n), \"getEndpointProperties\");\n\n// src/utils/getEndpointUrl.ts\nvar getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n } catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n}, \"getEndpointUrl\");\n\n// src/utils/evaluateEndpointRule.ts\nvar evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => {\n var _a, _b;\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n };\n const { url, properties, headers } = endpoint;\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...headers != void 0 && {\n headers: getEndpointHeaders(headers, endpointRuleOptions)\n },\n ...properties != void 0 && {\n properties: getEndpointProperties(properties, endpointRuleOptions)\n },\n url: getEndpointUrl(url, endpointRuleOptions)\n };\n}, \"evaluateEndpointRule\");\n\n// src/utils/evaluateErrorRule.ts\nvar evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(\n evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n })\n );\n}, \"evaluateErrorRule\");\n\n// src/utils/evaluateTreeRule.ts\nvar evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n });\n}, \"evaluateTreeRule\");\n\n// src/utils/evaluateRules.ts\nvar evaluateRules = /* @__PURE__ */ __name((rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n } else if (rule.type === \"tree\") {\n const endpointOrUndefined = evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n}, \"evaluateRules\");\n\n// src/resolveEndpoint.ts\nvar resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => {\n var _a, _b, _c, _d, _e;\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n if ((_c = options.endpointParams) == null ? void 0 : _c.Endpoint) {\n try {\n const givenEndpoint = new URL(options.endpointParams.Endpoint);\n const { protocol, port } = givenEndpoint;\n endpoint.url.protocol = protocol;\n endpoint.url.port = port;\n } catch (e) {\n }\n }\n (_e = (_d = options.logger) == null ? void 0 : _d.debug) == null ? void 0 : _e.call(_d, `${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n}, \"resolveEndpoint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n EndpointError,\n customEndpointFunctions,\n isIpAddress,\n isValidHostLabel,\n resolveEndpoint\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromHex: () => fromHex,\n toHex: () => toHex\n});\nmodule.exports = __toCommonJS(src_exports);\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nfunction fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\n__name(fromHex, \"fromHex\");\nfunction toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n__name(toHex, \"toHex\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromHex,\n toHex\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getSmithyContext: () => getSmithyContext,\n normalizeProvider: () => normalizeProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/getSmithyContext.ts\nvar import_types = require(\"@smithy/types\");\nvar getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getSmithyContext,\n normalizeProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n ConfiguredRetryStrategy: () => ConfiguredRetryStrategy,\n DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE,\n DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE,\n DefaultRateLimiter: () => DefaultRateLimiter,\n INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS,\n INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER,\n MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY,\n NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT,\n REQUEST_HEADER: () => REQUEST_HEADER,\n RETRY_COST: () => RETRY_COST,\n RETRY_MODES: () => RETRY_MODES,\n StandardRetryStrategy: () => StandardRetryStrategy,\n THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE,\n TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/config.ts\nvar RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => {\n RETRY_MODES2[\"STANDARD\"] = \"standard\";\n RETRY_MODES2[\"ADAPTIVE\"] = \"adaptive\";\n return RETRY_MODES2;\n})(RETRY_MODES || {});\nvar DEFAULT_MAX_ATTEMPTS = 3;\nvar DEFAULT_RETRY_MODE = \"standard\" /* STANDARD */;\n\n// src/DefaultRateLimiter.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar _DefaultRateLimiter = class _DefaultRateLimiter {\n constructor(options) {\n // Pre-set state variables\n this.currentCapacity = 0;\n this.enabled = false;\n this.lastMaxRate = 0;\n this.measuredTxRate = 0;\n this.requestCount = 0;\n this.lastTimestamp = 0;\n this.timeWindow = 0;\n this.beta = (options == null ? void 0 : options.beta) ?? 0.7;\n this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1;\n this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5;\n this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4;\n this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1e3;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if ((0, import_service_error_classification.isThrottlingError)(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n } else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(\n this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate\n );\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n};\n__name(_DefaultRateLimiter, \"DefaultRateLimiter\");\nvar DefaultRateLimiter = _DefaultRateLimiter;\n\n// src/constants.ts\nvar DEFAULT_RETRY_DELAY_BASE = 100;\nvar MAXIMUM_RETRY_DELAY = 20 * 1e3;\nvar THROTTLING_RETRY_DELAY_BASE = 500;\nvar INITIAL_RETRY_TOKENS = 500;\nvar RETRY_COST = 5;\nvar TIMEOUT_RETRY_COST = 10;\nvar NO_RETRY_INCREMENT = 1;\nvar INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nvar REQUEST_HEADER = \"amz-sdk-request\";\n\n// src/defaultRetryBackoffStrategy.ts\nvar getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n }, \"computeNextBackoffDelay\");\n const setDelayBase = /* @__PURE__ */ __name((delay) => {\n delayBase = delay;\n }, \"setDelayBase\");\n return {\n computeNextBackoffDelay,\n setDelayBase\n };\n}, \"getDefaultRetryBackoffStrategy\");\n\n// src/defaultRetryToken.ts\nvar createDefaultRetryToken = /* @__PURE__ */ __name(({\n retryDelay,\n retryCount,\n retryCost\n}) => {\n const getRetryCount = /* @__PURE__ */ __name(() => retryCount, \"getRetryCount\");\n const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), \"getRetryDelay\");\n const getRetryCost = /* @__PURE__ */ __name(() => retryCost, \"getRetryCost\");\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost\n };\n}, \"createDefaultRetryToken\");\n\n// src/StandardRetryStrategy.ts\nvar _StandardRetryStrategy = class _StandardRetryStrategy {\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.mode = \"standard\" /* STANDARD */;\n this.capacity = INITIAL_RETRY_TOKENS;\n this.retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(\n errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE\n );\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n /**\n * @returns the current available retry capacity.\n *\n * This number decreases when retries are executed and refills when requests or retries succeed.\n */\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n } catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n};\n__name(_StandardRetryStrategy, \"StandardRetryStrategy\");\nvar StandardRetryStrategy = _StandardRetryStrategy;\n\n// src/AdaptiveRetryStrategy.ts\nvar _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = \"adaptive\" /* ADAPTIVE */;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n};\n__name(_AdaptiveRetryStrategy, \"AdaptiveRetryStrategy\");\nvar AdaptiveRetryStrategy = _AdaptiveRetryStrategy;\n\n// src/ConfiguredRetryStrategy.ts\nvar _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy {\n /**\n * @param maxAttempts - the maximum number of retry attempts allowed.\n * e.g., if set to 3, then 4 total requests are possible.\n * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt\n * and returns the delay.\n *\n * @example exponential backoff.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2)\n * });\n * ```\n * @example constant delay.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, 2000)\n * });\n * ```\n */\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n } else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n};\n__name(_ConfiguredRetryStrategy, \"ConfiguredRetryStrategy\");\nvar ConfiguredRetryStrategy = _ConfiguredRetryStrategy;\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n ConfiguredRetryStrategy,\n DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_DELAY_BASE,\n DEFAULT_RETRY_MODE,\n DefaultRateLimiter,\n INITIAL_RETRY_TOKENS,\n INVOCATION_ID_HEADER,\n MAXIMUM_RETRY_DELAY,\n NO_RETRY_INCREMENT,\n REQUEST_HEADER,\n RETRY_COST,\n RETRY_MODES,\n StandardRetryStrategy,\n THROTTLING_RETRY_DELAY_BASE,\n TIMEOUT_RETRY_COST\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAwsChunkedEncodingStream = void 0;\nconst stream_1 = require(\"stream\");\nconst getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } });\n readableStream.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readableStream.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n};\nexports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/blob/transforms.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nfunction transformToString(payload, encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return (0, import_util_base64.toBase64)(payload);\n }\n return (0, import_util_utf8.toUtf8)(payload);\n}\n__name(transformToString, \"transformToString\");\nfunction transformFromString(str, encoding) {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));\n }\n return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));\n}\n__name(transformFromString, \"transformFromString\");\n\n// src/blob/Uint8ArrayBlobAdapter.ts\nvar _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {\n /**\n * @param source - such as a string or Stream.\n * @returns a new Uint8ArrayBlobAdapter extending Uint8Array.\n */\n static fromString(source, encoding = \"utf-8\") {\n switch (typeof source) {\n case \"string\":\n return transformFromString(source, encoding);\n default:\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n }\n /**\n * @param source - Uint8Array to be mutated.\n * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter.\n */\n static mutate(source) {\n Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n /**\n * @param encoding - default 'utf-8'.\n * @returns the blob as string.\n */\n transformToString(encoding = \"utf-8\") {\n return transformToString(this, encoding);\n }\n};\n__name(_Uint8ArrayBlobAdapter, \"Uint8ArrayBlobAdapter\");\nvar Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter;\n\n// src/index.ts\n__reExport(src_exports, require(\"././getAwsChunkedEncodingStream\"), module.exports);\n__reExport(src_exports, require(\"././sdk-stream-mixin\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Uint8ArrayBlobAdapter,\n getAwsChunkedEncodingStream,\n sdkStreamMixin\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst stream_1 = require(\"stream\");\nconst util_1 = require(\"util\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!(stream instanceof stream_1.Readable)) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, node_http_handler_1.streamCollector)(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new util_1.TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof stream_1.Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.\");\n }\n transformed = true;\n return stream_1.Readable.toWeb(stream);\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n escapeUri: () => escapeUri,\n escapeUriPath: () => escapeUriPath\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/escape-uri.ts\nvar escapeUri = /* @__PURE__ */ __name((uri) => (\n // AWS percent-encodes some extra non-standard characters in a URI\n encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode)\n), \"escapeUri\");\nvar hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, \"hexEncode\");\n\n// src/escape-uri-path.ts\nvar escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split(\"/\").map(escapeUri).join(\"/\"), \"escapeUriPath\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n escapeUri,\n escapeUriPath\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\"), \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n","'use strict';\n\nconst validator = require('./validator');\nconst XMLParser = require('./xmlparser/XMLParser');\nconst XMLBuilder = require('./xmlbuilder/json2xml');\n\nmodule.exports = {\n XMLParser: XMLParser,\n XMLValidator: validator,\n XMLBuilder: XMLBuilder\n}","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nconst getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n};\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n};\n\nexports.isExist = function(v) {\n return typeof v !== 'undefined';\n};\n\nexports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nexports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n};\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nexports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n};\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\nexports.isName = isName;\nexports.getAllMatches = getAllMatches;\nexports.nameRegexp = nameRegexp;\n","'use strict';\n\nconst util = require('./util');\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexports.validate = function (xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n \n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if(options.unpairedTags.indexOf(tagName) !== -1){\n //don't push into stack\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }else{\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if ( isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char){\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return util.isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return util.isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n","'use strict';\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = require('./orderedJs2Xml');\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup ){\n listTagVal += this.j2x(item, level + 1).val;\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level)\n }\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, '', level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `>` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n ' 0 && this.options.processEntities){\n for (let i=0; i 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\n\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n\n return xmlStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\") return key;\n }\n}\n\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nmodule.exports = toXml;\n","const util = require('../util');\n\n//TODO: handle comments\nfunction readDocType(xmlData, i){\n \n const entities = {};\n if( xmlData[i + 3] === 'O' &&\n xmlData[i + 4] === 'C' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'Y' &&\n xmlData[i + 7] === 'P' &&\n xmlData[i + 8] === 'E')\n { \n i = i+9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for(;i') { //Read tag content\n if(comment){\n if( xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\"){\n comment = false;\n angleBracketsCount--;\n }\n }else{\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n }else if( xmlData[i] === '['){\n hasBody = true;\n }else{\n exp += xmlData[i];\n }\n }\n if(angleBracketsCount !== 0){\n throw new Error(`Unclosed DOCTYPE`);\n }\n }else{\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return {entities, i};\n}\n\nfunction readEntityExp(xmlData,i){\n //External entities are not supported\n // \n\n //Parameter entities are not supported\n // \n\n //Internal entities are supported\n // \n \n //read EntityName\n let entityName = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"' ); i++) {\n // if(xmlData[i] === \" \") continue;\n // else \n entityName += xmlData[i];\n }\n entityName = entityName.trim();\n if(entityName.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n\n //read Entity Value\n const startChar = xmlData[i++];\n let val = \"\"\n for (; i < xmlData.length && xmlData[i] !== startChar ; i++) {\n val += xmlData[i];\n }\n return [entityName, val, i];\n}\n\nfunction isComment(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === '-' &&\n xmlData[i+3] === '-') return true\n return false\n}\nfunction isEntity(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'N' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'I' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'Y') return true\n return false\n}\nfunction isElement(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'L' &&\n xmlData[i+4] === 'E' &&\n xmlData[i+5] === 'M' &&\n xmlData[i+6] === 'E' &&\n xmlData[i+7] === 'N' &&\n xmlData[i+8] === 'T') return true\n return false\n}\n\nfunction isAttlist(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'A' &&\n xmlData[i+3] === 'T' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'L' &&\n xmlData[i+6] === 'I' &&\n xmlData[i+7] === 'S' &&\n xmlData[i+8] === 'T') return true\n return false\n}\nfunction isNotation(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'N' &&\n xmlData[i+3] === 'O' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'A' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'I' &&\n xmlData[i+8] === 'O' &&\n xmlData[i+9] === 'N') return true\n return false\n}\n\nfunction validateEntityName(name){\n if (util.isName(name))\n\treturn name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\n\nmodule.exports = readDocType;\n","\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val) {\n return val;\n },\n attributeValueProcessor: function(attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs){\n return tagName\n },\n // skipEmptyListItem: false\n};\n \nconst buildOptions = function(options) {\n return Object.assign({}, defaultOptions, options);\n};\n\nexports.buildOptions = buildOptions;\nexports.defaultOptions = defaultOptions;","'use strict';\n///@ts-check\n\nconst util = require('../util');\nconst xmlNode = require('./xmlNode');\nconst readDocType = require(\"./DocTypeReader\");\nconst toNumber = require(\"strnum\");\n\nconst regx =\n '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\nclass OrderedObjParser{\n constructor(options){\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\" : { regex: /&(apos|#39|#x27);/g, val : \"'\"},\n \"gt\" : { regex: /&(gt|#62|#x3E);/g, val : \">\"},\n \"lt\" : { regex: /&(lt|#60|#x3C);/g, val : \"<\"},\n \"quot\" : { regex: /&(quot|#34|#x22);/g, val : \"\\\"\"},\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : \"&\"};\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\" : { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\" : { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\" : { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\" : { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\" : { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\" : { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\" : { regex: /&(inr|#8377);/g, val: \"₹\" },\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n\n}\n\nfunction addExternalEntities(externalEntities){\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\"+ent+\";\",\"g\"),\n val : externalEntities[ent]\n }\n }\n}\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string} jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val !== undefined) {\n if (this.options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if(val.length > 0){\n if(!escapeEntities) val = this.replaceEntitiesValue(val);\n \n const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);\n if(newval === null || newval === undefined){\n //don't parse\n return val;\n }else if(typeof newval !== typeof val || newval !== val){\n //overwrite\n return newval;\n }else if(this.options.trimValues){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n const trimmedVal = val.trim();\n if(trimmedVal === val){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === 'string') {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if(aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== undefined) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if(newVal === null || newVal === undefined){\n //don't parse\n attrs[aName] = oldVal;\n }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){\n //overwrite\n attrs[aName] = newVal;\n }else{\n //parse\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs\n }\n}\n\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for(let i=0; i< xmlData.length; i++){//for each char in XML data\n const ch = xmlData[i];\n if(ch === '<'){\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(this.options.removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n if(currentNode){\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n\n //check if last tag of nested tag was unpaired tag\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\")+1);\n if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0\n if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){\n propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1)\n this.tagsNodeStack.pop();\n }else{\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n\n currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n\n let tagData = readTagExp(xmlData,i, false, \"?>\");\n if(!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if( (this.options.ignoreDeclaration && tagData.tagName === \"?xml\") || this.options.ignorePiTags){\n\n }else{\n \n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n \n if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n\n }\n\n\n i = tagData.closeIndex + 1;\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n const endIndex = findClosingIndex(xmlData, \"-->\", i+4, \"Comment is not closed.\")\n if(this.options.commentPropName){\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);\n }\n i = endIndex;\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n //cdata should be set even if it is 0 length string\n if(this.options.cdataPropName){\n // let val = this.parseTextData(tagExp, this.options.cdataPropName, jPath + \".\" + this.options.cdataPropName, true, false, true);\n // if(!val) val = \"\";\n currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);\n }else{\n let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true);\n if(val == undefined) val = \"\";\n currentNode.add(this.options.textNodeName, val);\n }\n \n i = closeIndex + 2;\n }else {//Opening tag\n let result = readTagExp(xmlData,i, this.options.removeNSPrefix);\n let tagName= result.tagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n \n //save text as child node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if(tagName !== xmlObj.tagname){\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { //TODO: namespace\n let tagContent = \"\";\n //self-closing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n i = result.closeIndex;\n }\n //unpaired tag\n else if(this.options.unpairedTags.indexOf(tagName) !== -1){\n i = result.closeIndex;\n }\n //normal tag\n else{\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, tagName, closeIndex + 1);\n if(!result) throw new Error(`Unexpected end of ${tagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if(tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n \n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n \n this.addChild(currentNode, childNode, jPath)\n }else{\n //selfClosing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n \n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n }\n //opening tag\n else{\n const childNode = new xmlNode( tagName);\n this.tagsNodeStack.push(currentNode);\n \n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nfunction addChild(currentNode, childNode, jPath){\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"])\n if(result === false){\n }else if(typeof result === \"string\"){\n childNode.tagname = result\n currentNode.addChild(childNode);\n }else{\n currentNode.addChild(childNode);\n }\n}\n\nconst replaceEntitiesValue = function(val){\n\n if(this.options.processEntities){\n for(let entityName in this.docTypeEntities){\n const entity = this.docTypeEntities[entityName];\n val = val.replace( entity.regx, entity.val);\n }\n for(let entityName in this.lastEntities){\n const entity = this.lastEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n if(this.options.htmlEntities){\n for(let entityName in this.htmlEntities){\n const entity = this.htmlEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n }\n val = val.replace( this.ampEntity.regex, this.ampEntity.val);\n }\n return val;\n}\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0\n \n textData = this.parseTextData(textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n//TODO: use jPath to simplify the logic\n/**\n * \n * @param {string[]} stopNodes \n * @param {string} jPath\n * @param {string} currentTagName \n */\nfunction isItStopNode(stopNodes, jPath, currentTagName){\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;\n }\n return false;\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-double quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\"){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if(closingChar[1]){\n if(xmlData[index + 1] === closingChar[1]){\n return {\n data: tagExp,\n index: index\n }\n }\n }else{\n return {\n data: tagExp,\n index: index\n }\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nfunction readTagExp(xmlData,i, removeNSPrefix, closingChar = \">\"){\n const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);\n if(!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if(separatorIndex !== -1){//separate tag name and attributes expression\n tagName = tagExp.substr(0, separatorIndex).replace(/\\s\\s*$/, '');\n tagExp = tagExp.substr(separatorIndex + 1);\n }\n\n if(removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i){\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n for (; i < xmlData.length; i++) {\n if( xmlData[i] === \"<\"){ \n if (xmlData[i+1] === \"/\") {//close tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i+2,closeIndex).trim();\n if(closeTagName === tagName){\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i : closeIndex\n }\n }\n }\n i=closeIndex;\n } else if(xmlData[i+1] === '?') { \n const closeIndex = findClosingIndex(xmlData, \"?>\", i+1, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 3) === '!--') { \n const closeIndex = findClosingIndex(xmlData, \"-->\", i+3, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 2) === '![') { \n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i=closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, '>')\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== \"/\") {\n openTagCount++;\n }\n i=tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return toNumber(val, options);\n } else {\n if (util.isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n\nmodule.exports = OrderedObjParser;\n","const { buildOptions} = require(\"./OptionsBuilder\");\nconst OrderedObjParser = require(\"./OrderedObjParser\");\nconst { prettify} = require(\"./node2json\");\nconst validator = require('../validator');\n\nclass XMLParser{\n \n constructor(options){\n this.externalEntities = {};\n this.options = buildOptions(options);\n \n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData,validationOption){\n if(typeof xmlData === \"string\"){\n }else if( xmlData.toString){\n xmlData = xmlData.toString();\n }else{\n throw new Error(\"XML data is accepted in String or Bytes[] form.\")\n }\n if( validationOption){\n if(validationOption === true) validationOption = {}; //validate with default options\n \n const result = validator.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` )\n }\n }\n const orderedObjParser = new OrderedObjParser(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if(this.options.preserveOrder || orderedResult === undefined) return orderedResult;\n else return prettify(orderedResult, this.options);\n }\n\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value){\n if(value.indexOf(\"&\") !== -1){\n throw new Error(\"Entity value can't have '&'\")\n }else if(key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1){\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\")\n }else if(value === \"&\"){\n throw new Error(\"An entity with value '&' is not permitted\");\n }else{\n this.externalEntities[key] = value;\n }\n }\n}\n\nmodule.exports = XMLParser;","'use strict';\n\n/**\n * \n * @param {array} node \n * @param {any} options \n * @returns \n */\nfunction prettify(node, options){\n return compress( node, options);\n}\n\n/**\n * \n * @param {array} arr \n * @param {object} options \n * @param {string} jPath \n * @returns object\n */\nfunction compress(arr, options, jPath){\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName(tagObj);\n let newJpath = \"\";\n if(jPath === undefined) newJpath = property;\n else newJpath = jPath + \".\" + property;\n\n if(property === options.textNodeName){\n if(text === undefined) text = tagObj[property];\n else text += \"\" + tagObj[property];\n }else if(property === undefined){\n continue;\n }else if(tagObj[property]){\n \n let val = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val, options);\n\n if(tagObj[\":@\"]){\n assignAttributes( val, tagObj[\":@\"], newJpath, options);\n }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){\n val = val[options.textNodeName];\n }else if(Object.keys(val).length === 0){\n if(options.alwaysCreateTextNode) val[options.textNodeName] = \"\";\n else val = \"\";\n }\n\n if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) {\n if(!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [ compressedObj[property] ];\n }\n compressedObj[property].push(val);\n }else{\n //TODO: if a node is not an array, then check if it should be an array\n //also determine if it is a leaf node\n if (options.isArray(property, newJpath, isLeaf )) {\n compressedObj[property] = [val];\n }else{\n compressedObj[property] = val;\n }\n }\n }\n \n }\n // if(text && text.length > 0) compressedObj[options.textNodeName] = text;\n if(typeof text === \"string\"){\n if(text.length > 0) compressedObj[options.textNodeName] = text;\n }else if(text !== undefined) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\n\nfunction propName(obj){\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(key !== \":@\") return key;\n }\n}\n\nfunction assignAttributes(obj, attrMap, jpath, options){\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [ attrMap[atrrName] ];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\n\nfunction isLeafTag(obj, options){\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n \n if (propCount === 0) {\n return true;\n }\n\n if (\n propCount === 1 &&\n (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)\n ) {\n return true;\n }\n\n return false;\n}\nexports.prettify = prettify;\n","'use strict';\n\nclass XmlNode{\n constructor(tagname) {\n this.tagname = tagname;\n this.child = []; //nested tags, text, cdata, comments in order\n this[\":@\"] = {}; //attributes map\n }\n add(key,val){\n // this.child.push( {name : key, val: val, isCdata: isCdata });\n if(key === \"__proto__\") key = \"#__proto__\";\n this.child.push( {[key]: val });\n }\n addChild(node) {\n if(node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if(node[\":@\"] && Object.keys(node[\":@\"]).length > 0){\n this.child.push( { [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n }else{\n this.child.push( { [node.tagname]: node.child });\n }\n };\n};\n\n\nmodule.exports = XmlNode;","const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n// const octRegex = /0x[a-z0-9]+/;\n// const binRegex = /0x[a-z0-9]+/;\n\n\n//polyfill\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\n\n \nconst consider = {\n hex : true,\n leadingZeros: true,\n decimalPoint: \"\\.\",\n eNotation: true\n //skipLike: /regex/\n};\n\nfunction toNumber(str, options = {}){\n // const options = Object.assign({}, consider);\n // if(opt.leadingZeros === false){\n // options.leadingZeros = false;\n // }else if(opt.hex === false){\n // options.hex = false;\n // }\n\n options = Object.assign({}, consider, options );\n if(!str || typeof str !== \"string\" ) return str;\n \n let trimmedStr = str.trim();\n // if(trimmedStr === \"0.0\") return 0;\n // else if(trimmedStr === \"+0.0\") return 0;\n // else if(trimmedStr === \"-0.0\") return -0;\n\n if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n // } else if (options.parseOct && octRegex.test(str)) {\n // return Number.parseInt(val, 8);\n // }else if (options.parseBin && binRegex.test(str)) {\n // return Number.parseInt(val, 2);\n }else{\n //separate negative sign, leading zeros, and rest number\n const match = numRegex.exec(trimmedStr);\n if(match){\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros\n //trim ending zeros for floating number\n \n const eNotation = match[4] || match[6];\n if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str; //-0123\n else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str; //0123\n else{//no leading zeros or leading zeros are allowed\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation\n if(options.eNotation) return num;\n else return str;\n }else if(eNotation){ //given number has enotation\n if(options.eNotation) return num;\n else return str;\n }else if(trimmedStr.indexOf(\".\") !== -1){ //floating number\n // const decimalPart = match[5].substr(1);\n // const intPart = trimmedStr.substr(0,trimmedStr.indexOf(\".\"));\n\n \n // const p = numStr.indexOf(\".\");\n // const givenIntPart = numStr.substr(0,p);\n // const givenDecPart = numStr.substr(p+1);\n if(numStr === \"0\" && (numTrimmedByZeros === \"\") ) return num; //0.0\n else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000\n else if( sign && numStr === \"-\"+numTrimmedByZeros) return num;\n else return str;\n }\n \n if(leadingZeros){\n // if(numTrimmedByZeros === numStr){\n // if(options.leadingZeros) return num;\n // else return str;\n // }else return str;\n if(numTrimmedByZeros === numStr) return num;\n else if(sign+numTrimmedByZeros === numStr) return num;\n else return str;\n }\n\n if(trimmedStr === numStr) return num;\n else if(trimmedStr === sign+numStr) return num;\n // else{\n // //number with +/- sign\n // trimmedStr.test(/[-+][0-9]);\n\n // }\n return str;\n }\n // else if(!eNotation && trimmedStr && trimmedStr !== Number(trimmedStr) ) return str;\n \n }else{ //non-numeric string\n return str;\n }\n }\n}\n\n/**\n * \n * @param {string} numStr without leading zeros\n * @returns \n */\nfunction trimZeros(numStr){\n if(numStr && numStr.indexOf(\".\") !== -1){//float\n numStr = numStr.replace(/0+$/, \"\"); //remove ending zeros\n if(numStr === \".\") numStr = \"0\";\n else if(numStr[0] === \".\") numStr = \"0\"+numStr;\n else if(numStr[numStr.length-1] === \".\") numStr = numStr.substr(0,numStr.length-1);\n return numStr;\n }\n return numStr;\n}\nmodule.exports = toNumber\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, Symbol, Reflect, Promise, SuppressedError */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __esDecorate;\r\nvar __runInitializers;\r\nvar __propKey;\r\nvar __setFunctionName;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\nvar __addDisposableResource;\r\nvar __disposeResources;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n };\r\n\r\n __runInitializers = function (thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n };\r\n\r\n __propKey = function (x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n };\r\n\r\n __setFunctionName = function (f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n __addDisposableResource = function (env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n };\r\n\r\n var _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\r\n\r\n __disposeResources = function (env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__esDecorate\", __esDecorate);\r\n exporter(\"__runInitializers\", __runInitializers);\r\n exporter(\"__propKey\", __propKey);\r\n exporter(\"__setFunctionName\", __setFunctionName);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n exporter(\"__addDisposableResource\", __addDisposableResource);\r\n exporter(\"__disposeResources\", __disposeResources);\r\n});\r\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = require(\"assert\");","module.exports = require(\"buffer\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"fs/promises\");","module.exports = require(\"http\");","module.exports = require(\"http2\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"process\");","module.exports = require(\"stream\");","module.exports = require(\"tls\");","module.exports = require(\"url\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3109);\n",""],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkDA;;;;;;;;;AC/5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA8BA;;;;;;;;;AC//BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;;;;;;;;;ACrnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkCA;;;;;;;;;ACh7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiBA;;;;;;;;AC7bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;;;;;;;;ACrZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;;;;;;;;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAwBA;;;;;;;;AC5eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAaA;;;;;;;;ACpbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;AC7PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoBA;;;;;;;;;ACxaA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;AC7TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;;;;;;;;AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;;;;;;;;AC5OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA;;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;;;;;;;;ACldA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA4DA;;;;;;;;ACvuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;;;;;;;;ACneA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;;;;;;;;;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpaA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;AEDA;AACA;AACA;AACA","sources":[".././lib/main.js",".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@aws-crypto/crc32/build/aws_crc32.js",".././node_modules/@aws-crypto/crc32/build/index.js",".././node_modules/@aws-crypto/crc32/node_modules/tslib/tslib.js",".././node_modules/@aws-crypto/util/build/convertToBuffer.js",".././node_modules/@aws-crypto/util/build/index.js",".././node_modules/@aws-crypto/util/build/isEmptyData.js",".././node_modules/@aws-crypto/util/build/numToUint8.js",".././node_modules/@aws-crypto/util/build/uint32ArrayFrom.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/index.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-marketplace-catalog/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/index.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/md5.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/native.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/nil.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/parse.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/regex.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/rng.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/sha1.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/stringify.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/v1.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/v3.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/v35.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/v4.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/v5.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/validate.js",".././node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid/dist/version.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/credentialDefaultProvider.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/STSClient.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthExtensionConfiguration.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/auth/httpAuthSchemeProvider.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/credentialDefaultProvider.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/EndpointParameters.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/endpointResolver.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/endpoint/ruleset.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/index.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.shared.js",".././node_modules/@aws-sdk/client-sts/dist-cjs/runtimeExtensions.js",".././node_modules/@aws-sdk/core/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js",".././node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js",".././node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/loadSts.js",".././node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js",".././node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js",".././node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js",".././node_modules/@aws-sdk/token-providers/dist-cjs/index.js",".././node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js",".././node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js",".././node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js",".././node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js",".././node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js",".././node_modules/@smithy/config-resolver/dist-cjs/index.js",".././node_modules/@smithy/core/dist-cjs/index.js",".././node_modules/@smithy/credential-provider-imds/dist-cjs/index.js",".././node_modules/@smithy/eventstream-codec/dist-cjs/index.js",".././node_modules/@smithy/hash-node/dist-cjs/index.js",".././node_modules/@smithy/is-array-buffer/dist-cjs/index.js",".././node_modules/@smithy/middleware-content-length/dist-cjs/index.js",".././node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js",".././node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js",".././node_modules/@smithy/middleware-endpoint/dist-cjs/index.js",".././node_modules/@smithy/middleware-retry/dist-cjs/index.js",".././node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/index.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/md5.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/native.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/nil.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/parse.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/regex.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/rng.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/sha1.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/stringify.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v1.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v3.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v35.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v4.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/v5.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/validate.js",".././node_modules/@smithy/middleware-retry/node_modules/uuid/dist/version.js",".././node_modules/@smithy/middleware-serde/dist-cjs/index.js",".././node_modules/@smithy/middleware-stack/dist-cjs/index.js",".././node_modules/@smithy/node-config-provider/dist-cjs/index.js",".././node_modules/@smithy/node-http-handler/dist-cjs/index.js",".././node_modules/@smithy/property-provider/dist-cjs/index.js",".././node_modules/@smithy/protocol-http/dist-cjs/index.js",".././node_modules/@smithy/querystring-builder/dist-cjs/index.js",".././node_modules/@smithy/querystring-parser/dist-cjs/index.js",".././node_modules/@smithy/service-error-classification/dist-cjs/index.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js",".././node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js",".././node_modules/@smithy/signature-v4/dist-cjs/index.js",".././node_modules/@smithy/smithy-client/dist-cjs/index.js",".././node_modules/@smithy/types/dist-cjs/index.js",".././node_modules/@smithy/url-parser/dist-cjs/index.js",".././node_modules/@smithy/util-base64/dist-cjs/fromBase64.js",".././node_modules/@smithy/util-base64/dist-cjs/index.js",".././node_modules/@smithy/util-base64/dist-cjs/toBase64.js",".././node_modules/@smithy/util-body-length-node/dist-cjs/index.js",".././node_modules/@smithy/util-buffer-from/dist-cjs/index.js",".././node_modules/@smithy/util-config-provider/dist-cjs/index.js",".././node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js",".././node_modules/@smithy/util-endpoints/dist-cjs/index.js",".././node_modules/@smithy/util-hex-encoding/dist-cjs/index.js",".././node_modules/@smithy/util-middleware/dist-cjs/index.js",".././node_modules/@smithy/util-retry/dist-cjs/index.js",".././node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js",".././node_modules/@smithy/util-stream/dist-cjs/index.js",".././node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js",".././node_modules/@smithy/util-uri-escape/dist-cjs/index.js",".././node_modules/@smithy/util-utf8/dist-cjs/index.js",".././node_modules/fast-xml-parser/src/fxp.js",".././node_modules/fast-xml-parser/src/util.js",".././node_modules/fast-xml-parser/src/validator.js",".././node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js",".././node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js",".././node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js",".././node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js",".././node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js",".././node_modules/fast-xml-parser/src/xmlparser/XMLParser.js",".././node_modules/fast-xml-parser/src/xmlparser/node2json.js",".././node_modules/fast-xml-parser/src/xmlparser/xmlNode.js",".././node_modules/strnum/strnum.js",".././node_modules/tslib/tslib.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/uuid/dist/index.js",".././node_modules/uuid/dist/md5.js",".././node_modules/uuid/dist/nil.js",".././node_modules/uuid/dist/parse.js",".././node_modules/uuid/dist/regex.js",".././node_modules/uuid/dist/rng.js",".././node_modules/uuid/dist/sha1.js",".././node_modules/uuid/dist/stringify.js",".././node_modules/uuid/dist/v1.js",".././node_modules/uuid/dist/v3.js",".././node_modules/uuid/dist/v35.js",".././node_modules/uuid/dist/v4.js",".././node_modules/uuid/dist/v5.js",".././node_modules/uuid/dist/validate.js",".././node_modules/uuid/dist/version.js","../external node-commonjs \"assert\"","../external node-commonjs \"buffer\"","../external node-commonjs \"child_process\"","../external node-commonjs \"crypto\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"fs/promises\"","../external node-commonjs \"http\"","../external node-commonjs \"http2\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"process\"","../external node-commonjs \"stream\"","../external node-commonjs \"tls\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../webpack/bootstrap","../webpack/runtime/compat","../webpack/before-startup","../webpack/startup","../webpack/after-startup"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst aws = __importStar(require(\"@aws-sdk/client-marketplace-catalog\"));\nfunction run() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const client = new aws.MarketplaceCatalogClient({ region: 'us-east-1' });\n const productID = core.getInput('product-id', { required: true });\n core.setSecret(productID);\n const version = core.getInput('version', { required: true });\n const registry = core.getInput('registry', { required: true });\n const releaseNotes = core.getInput('release-notes');\n const description = core.getInput('description');\n const usageInstructions = core.getInput('usage-instructions');\n const details = {\n Version: {\n VersionTitle: version,\n ReleaseNotes: releaseNotes,\n },\n DeliveryOptions: [\n {\n DeliveryOptionTitle: 'EKSDelivery',\n Details: {\n EcrDeliveryOptionDetails: {\n DeploymentResources: [],\n ContainerImages: [registry],\n CompatibleServices: ['EKS'],\n Description: description,\n UsageInstructions: usageInstructions,\n },\n },\n },\n ],\n };\n const params = {\n Catalog: 'AWSMarketplace',\n ChangeSet: [\n {\n ChangeType: 'AddDeliveryOptions',\n Entity: {\n Identifier: productID,\n Type: 'ContainerProduct@1.0',\n },\n Details: JSON.stringify(details),\n },\n ],\n };\n const result = yield client.send(new aws.StartChangeSetCommand(params));\n core.info(JSON.stringify(result, null, 2));\n if (((_a = result.$metadata.httpStatusCode) === null || _a === void 0 ? void 0 : _a.toString()) !== '200') {\n core.setFailed(`Failed to start change set: ${result.$metadata.httpStatusCode}`);\n }\n }\n catch (error) {\n if (error instanceof Error)\n core.setFailed(error.message);\n }\n });\n}\nrun();\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n return new URL(proxyVar);\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nvar index_1 = require(\"./index\");\nvar AwsCrc32 = /** @class */ (function () {\n function AwsCrc32() {\n this.crc32 = new index_1.Crc32();\n }\n AwsCrc32.prototype.update = function (toHash) {\n if ((0, util_1.isEmptyData)(toHash))\n return;\n this.crc32.update((0, util_1.convertToBuffer)(toHash));\n };\n AwsCrc32.prototype.digest = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())];\n });\n });\n };\n AwsCrc32.prototype.reset = function () {\n this.crc32 = new index_1.Crc32();\n };\n return AwsCrc32;\n}());\nexports.AwsCrc32 = AwsCrc32;\n//# sourceMappingURL=aws_crc32.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0;\nvar tslib_1 = require(\"tslib\");\nvar util_1 = require(\"@aws-crypto/util\");\nfunction crc32(data) {\n return new Crc32().update(data).digest();\n}\nexports.crc32 = crc32;\nvar Crc32 = /** @class */ (function () {\n function Crc32() {\n this.checksum = 0xffffffff;\n }\n Crc32.prototype.update = function (data) {\n var e_1, _a;\n try {\n for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {\n var byte = data_1_1.value;\n this.checksum =\n (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (data_1_1 && !data_1_1.done && (_a = data_1.return)) _a.call(data_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n Crc32.prototype.digest = function () {\n return (this.checksum ^ 0xffffffff) >>> 0;\n };\n return Crc32;\n}());\nexports.Crc32 = Crc32;\n// prettier-ignore\nvar a_lookUpTable = [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,\n 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,\n 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,\n 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,\n 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,\n 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,\n 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,\n 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,\n 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,\n 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,\n 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,\n 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,\n 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,\n 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,\n 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,\n 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,\n 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,\n 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,\n 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,\n 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,\n 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,\n 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,\n 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,\n 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,\n 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,\n 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,\n 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,\n 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,\n 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,\n 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,\n 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,\n 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,\n 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,\n 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,\n 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,\n 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,\n 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,\n 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,\n 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,\n 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,\n 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,\n 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,\n 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,\n 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,\n 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,\n 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,\n 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,\n 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,\n 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,\n 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,\n 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,\n 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D,\n];\nvar lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);\nvar aws_crc32_1 = require(\"./aws_crc32\");\nObject.defineProperty(exports, \"AwsCrc32\", { enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } });\n//# sourceMappingURL=index.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __createBinding = function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n };\r\n\r\n __exportStar = function (m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n };\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToBuffer = void 0;\nvar util_utf8_browser_1 = require(\"@aws-sdk/util-utf8-browser\");\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : util_utf8_browser_1.fromUtf8;\nfunction convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\nexports.convertToBuffer = convertToBuffer;\n//# sourceMappingURL=convertToBuffer.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0;\nvar convertToBuffer_1 = require(\"./convertToBuffer\");\nObject.defineProperty(exports, \"convertToBuffer\", { enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } });\nvar isEmptyData_1 = require(\"./isEmptyData\");\nObject.defineProperty(exports, \"isEmptyData\", { enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } });\nvar numToUint8_1 = require(\"./numToUint8\");\nObject.defineProperty(exports, \"numToUint8\", { enumerable: true, get: function () { return numToUint8_1.numToUint8; } });\nvar uint32ArrayFrom_1 = require(\"./uint32ArrayFrom\");\nObject.defineProperty(exports, \"uint32ArrayFrom\", { enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmptyData = void 0;\nfunction isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\nexports.isEmptyData = isEmptyData;\n//# sourceMappingURL=isEmptyData.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.numToUint8 = void 0;\nfunction numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\nexports.numToUint8 = numToUint8;\n//# sourceMappingURL=numToUint8.js.map","\"use strict\";\n// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uint32ArrayFrom = void 0;\n// IE 11 does not support Array.from, so we do it manually\nfunction uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\nexports.uint32ArrayFrom = uint32ArrayFrom;\n//# sourceMappingURL=uint32ArrayFrom.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultMarketplaceCatalogHttpAuthSchemeProvider = exports.defaultMarketplaceCatalogHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultMarketplaceCatalogHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultMarketplaceCatalogHttpAuthSchemeParametersProvider = defaultMarketplaceCatalogHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"aws-marketplace\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nconst defaultMarketplaceCatalogHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultMarketplaceCatalogHttpAuthSchemeProvider = defaultMarketplaceCatalogHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return {\n ...config_0,\n };\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst s = \"required\", t = \"fn\", u = \"argv\", v = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = { [s]: false, \"type\": \"String\" }, i = { [s]: true, \"default\": false, \"type\": \"Boolean\" }, j = { [v]: \"Endpoint\" }, k = { [t]: c, [u]: [{ [v]: \"UseFIPS\" }, true] }, l = { [t]: c, [u]: [{ [v]: \"UseDualStack\" }, true] }, m = {}, n = { [t]: \"getAttr\", [u]: [{ [v]: g }, \"supportsFIPS\"] }, o = { [t]: c, [u]: [true, { [t]: \"getAttr\", [u]: [{ [v]: g }, \"supportsDualStack\"] }] }, p = [k], q = [l], r = [{ [v]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: q, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }, { conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: \"aws.partition\", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ endpoint: { url: \"https://catalog.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: m, headers: m }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ endpoint: { url: \"https://catalog.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: m, headers: m }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ endpoint: { url: \"https://catalog.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: m, headers: m }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://catalog.marketplace.{Region}.{PartitionResult#dnsSuffix}\", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AccessDeniedException: () => AccessDeniedException,\n AmiProductSortBy: () => AmiProductSortBy,\n AmiProductVisibilityString: () => AmiProductVisibilityString,\n BatchDescribeEntitiesCommand: () => BatchDescribeEntitiesCommand,\n CancelChangeSetCommand: () => CancelChangeSetCommand,\n ChangeStatus: () => ChangeStatus,\n ContainerProductSortBy: () => ContainerProductSortBy,\n ContainerProductVisibilityString: () => ContainerProductVisibilityString,\n DataProductSortBy: () => DataProductSortBy,\n DataProductVisibilityString: () => DataProductVisibilityString,\n DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand,\n DescribeChangeSetCommand: () => DescribeChangeSetCommand,\n DescribeEntityCommand: () => DescribeEntityCommand,\n EntityTypeFilters: () => EntityTypeFilters,\n EntityTypeSort: () => EntityTypeSort,\n FailureCode: () => FailureCode,\n GetResourcePolicyCommand: () => GetResourcePolicyCommand,\n Intent: () => Intent,\n InternalServiceException: () => InternalServiceException,\n ListChangeSetsCommand: () => ListChangeSetsCommand,\n ListEntitiesCommand: () => ListEntitiesCommand,\n ListTagsForResourceCommand: () => ListTagsForResourceCommand,\n MarketplaceCatalog: () => MarketplaceCatalog,\n MarketplaceCatalogClient: () => MarketplaceCatalogClient,\n MarketplaceCatalogServiceException: () => MarketplaceCatalogServiceException,\n OfferSortBy: () => OfferSortBy,\n OfferStateString: () => OfferStateString,\n OfferTargetingString: () => OfferTargetingString,\n OwnershipType: () => OwnershipType,\n PutResourcePolicyCommand: () => PutResourcePolicyCommand,\n ResaleAuthorizationSortBy: () => ResaleAuthorizationSortBy,\n ResaleAuthorizationStatusString: () => ResaleAuthorizationStatusString,\n ResourceInUseException: () => ResourceInUseException,\n ResourceNotFoundException: () => ResourceNotFoundException,\n ResourceNotSupportedException: () => ResourceNotSupportedException,\n SaaSProductSortBy: () => SaaSProductSortBy,\n SaaSProductVisibilityString: () => SaaSProductVisibilityString,\n ServiceQuotaExceededException: () => ServiceQuotaExceededException,\n SortOrder: () => SortOrder,\n StartChangeSetCommand: () => StartChangeSetCommand,\n TagResourceCommand: () => TagResourceCommand,\n ThrottlingException: () => ThrottlingException,\n UntagResourceCommand: () => UntagResourceCommand,\n ValidationException: () => ValidationException,\n __Client: () => import_smithy_client.Client,\n paginateListChangeSets: () => paginateListChangeSets,\n paginateListEntities: () => paginateListEntities\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MarketplaceCatalogClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"aws-marketplace\"\n };\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/MarketplaceCatalogClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar asPartial = /* @__PURE__ */ __name((t) => t, \"asPartial\");\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),\n ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n ...resolveHttpAuthRuntimeConfig(extensionConfiguration)\n };\n}, \"resolveRuntimeExtensions\");\n\n// src/MarketplaceCatalogClient.ts\nvar _MarketplaceCatalogClient = class _MarketplaceCatalogClient extends import_smithy_client.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);\n const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),\n identityProviderConfigProvider: this.getIdentityProviderConfigProvider()\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n getDefaultHttpAuthSchemeParametersProvider() {\n return import_httpAuthSchemeProvider.defaultMarketplaceCatalogHttpAuthSchemeParametersProvider;\n }\n getIdentityProviderConfigProvider() {\n return async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n });\n }\n};\n__name(_MarketplaceCatalogClient, \"MarketplaceCatalogClient\");\nvar MarketplaceCatalogClient = _MarketplaceCatalogClient;\n\n// src/MarketplaceCatalog.ts\n\n\n// src/commands/BatchDescribeEntitiesCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\nvar import_uuid = require(\"uuid\");\n\n// src/models/MarketplaceCatalogServiceException.ts\n\nvar _MarketplaceCatalogServiceException = class _MarketplaceCatalogServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _MarketplaceCatalogServiceException.prototype);\n }\n};\n__name(_MarketplaceCatalogServiceException, \"MarketplaceCatalogServiceException\");\nvar MarketplaceCatalogServiceException = _MarketplaceCatalogServiceException;\n\n// src/models/models_0.ts\nvar _AccessDeniedException = class _AccessDeniedException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"AccessDeniedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _AccessDeniedException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_AccessDeniedException, \"AccessDeniedException\");\nvar AccessDeniedException = _AccessDeniedException;\nvar AmiProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\"\n};\nvar AmiProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar SortOrder = {\n ASCENDING: \"ASCENDING\",\n DESCENDING: \"DESCENDING\"\n};\nvar _InternalServiceException = class _InternalServiceException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalServiceException\",\n $fault: \"server\",\n ...opts\n });\n this.name = \"InternalServiceException\";\n this.$fault = \"server\";\n Object.setPrototypeOf(this, _InternalServiceException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_InternalServiceException, \"InternalServiceException\");\nvar InternalServiceException = _InternalServiceException;\nvar _ThrottlingException = class _ThrottlingException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ThrottlingException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ThrottlingException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ThrottlingException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ThrottlingException, \"ThrottlingException\");\nvar ThrottlingException = _ThrottlingException;\nvar _ValidationException = class _ValidationException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ValidationException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ValidationException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ValidationException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ValidationException, \"ValidationException\");\nvar ValidationException = _ValidationException;\nvar _ResourceInUseException = class _ResourceInUseException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceInUseException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceInUseException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceInUseException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ResourceInUseException, \"ResourceInUseException\");\nvar ResourceInUseException = _ResourceInUseException;\nvar _ResourceNotFoundException = class _ResourceNotFoundException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceNotFoundException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ResourceNotFoundException, \"ResourceNotFoundException\");\nvar ResourceNotFoundException = _ResourceNotFoundException;\nvar FailureCode = {\n ClientError: \"CLIENT_ERROR\",\n ServerFault: \"SERVER_FAULT\"\n};\nvar Intent = {\n APPLY: \"APPLY\",\n VALIDATE: \"VALIDATE\"\n};\nvar ChangeStatus = {\n APPLYING: \"APPLYING\",\n CANCELLED: \"CANCELLED\",\n FAILED: \"FAILED\",\n PREPARING: \"PREPARING\",\n SUCCEEDED: \"SUCCEEDED\"\n};\nvar _ResourceNotSupportedException = class _ResourceNotSupportedException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotSupportedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceNotSupportedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceNotSupportedException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ResourceNotSupportedException, \"ResourceNotSupportedException\");\nvar ResourceNotSupportedException = _ResourceNotSupportedException;\nvar ContainerProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\"\n};\nvar DataProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\",\n Unavailable: \"Unavailable\"\n};\nvar OfferStateString = {\n Draft: \"Draft\",\n Released: \"Released\"\n};\nvar OfferTargetingString = {\n BuyerAccounts: \"BuyerAccounts\",\n CountryCodes: \"CountryCodes\",\n None: \"None\",\n ParticipatingPrograms: \"ParticipatingPrograms\"\n};\nvar ResaleAuthorizationStatusString = {\n Active: \"Active\",\n Draft: \"Draft\",\n Restricted: \"Restricted\"\n};\nvar SaaSProductVisibilityString = {\n Draft: \"Draft\",\n Limited: \"Limited\",\n Public: \"Public\",\n Restricted: \"Restricted\"\n};\nvar EntityTypeFilters;\n((EntityTypeFilters3) => {\n EntityTypeFilters3.visit = /* @__PURE__ */ __name((value, visitor) => {\n if (value.DataProductFilters !== void 0)\n return visitor.DataProductFilters(value.DataProductFilters);\n if (value.SaaSProductFilters !== void 0)\n return visitor.SaaSProductFilters(value.SaaSProductFilters);\n if (value.AmiProductFilters !== void 0)\n return visitor.AmiProductFilters(value.AmiProductFilters);\n if (value.OfferFilters !== void 0)\n return visitor.OfferFilters(value.OfferFilters);\n if (value.ContainerProductFilters !== void 0)\n return visitor.ContainerProductFilters(value.ContainerProductFilters);\n if (value.ResaleAuthorizationFilters !== void 0)\n return visitor.ResaleAuthorizationFilters(value.ResaleAuthorizationFilters);\n return visitor._(value.$unknown[0], value.$unknown[1]);\n }, \"visit\");\n})(EntityTypeFilters || (EntityTypeFilters = {}));\nvar ContainerProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar DataProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar OfferSortBy = {\n AvailabilityEndDate: \"AvailabilityEndDate\",\n BuyerAccounts: \"BuyerAccounts\",\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n Name: \"Name\",\n ProductId: \"ProductId\",\n ReleaseDate: \"ReleaseDate\",\n ResaleAuthorizationId: \"ResaleAuthorizationId\",\n State: \"State\",\n Targeting: \"Targeting\"\n};\nvar ResaleAuthorizationSortBy = {\n AvailabilityEndDate: \"AvailabilityEndDate\",\n CreatedDate: \"CreatedDate\",\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ManufacturerAccountId: \"ManufacturerAccountId\",\n ManufacturerLegalName: \"ManufacturerLegalName\",\n Name: \"Name\",\n OfferExtendedStatus: \"OfferExtendedStatus\",\n ProductId: \"ProductId\",\n ProductName: \"ProductName\",\n ResellerAccountID: \"ResellerAccountID\",\n ResellerLegalName: \"ResellerLegalName\",\n Status: \"Status\"\n};\nvar SaaSProductSortBy = {\n EntityId: \"EntityId\",\n LastModifiedDate: \"LastModifiedDate\",\n ProductTitle: \"ProductTitle\",\n Visibility: \"Visibility\"\n};\nvar EntityTypeSort;\n((EntityTypeSort3) => {\n EntityTypeSort3.visit = /* @__PURE__ */ __name((value, visitor) => {\n if (value.DataProductSort !== void 0)\n return visitor.DataProductSort(value.DataProductSort);\n if (value.SaaSProductSort !== void 0)\n return visitor.SaaSProductSort(value.SaaSProductSort);\n if (value.AmiProductSort !== void 0)\n return visitor.AmiProductSort(value.AmiProductSort);\n if (value.OfferSort !== void 0)\n return visitor.OfferSort(value.OfferSort);\n if (value.ContainerProductSort !== void 0)\n return visitor.ContainerProductSort(value.ContainerProductSort);\n if (value.ResaleAuthorizationSort !== void 0)\n return visitor.ResaleAuthorizationSort(value.ResaleAuthorizationSort);\n return visitor._(value.$unknown[0], value.$unknown[1]);\n }, \"visit\");\n})(EntityTypeSort || (EntityTypeSort = {}));\nvar OwnershipType = {\n SELF: \"SELF\",\n SHARED: \"SHARED\"\n};\nvar _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends MarketplaceCatalogServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ServiceQuotaExceededException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ServiceQuotaExceededException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);\n this.Message = opts.Message;\n }\n};\n__name(_ServiceQuotaExceededException, \"ServiceQuotaExceededException\");\nvar ServiceQuotaExceededException = _ServiceQuotaExceededException;\n\n// src/protocols/Aws_restJson1.ts\nvar se_BatchDescribeEntitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/BatchDescribeEntities\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n EntityRequestList: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_BatchDescribeEntitiesCommand\");\nvar se_CancelChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/CancelChangeSet\");\n const query = (0, import_smithy_client.map)({\n [_c]: [, (0, import_smithy_client.expectNonNull)(input[_C], `Catalog`)],\n [_cSI]: [, (0, import_smithy_client.expectNonNull)(input[_CSI], `ChangeSetId`)]\n });\n let body;\n b.m(\"PATCH\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_CancelChangeSetCommand\");\nvar se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/DeleteResourcePolicy\");\n const query = (0, import_smithy_client.map)({\n [_rA]: [, (0, import_smithy_client.expectNonNull)(input[_RA], `ResourceArn`)]\n });\n let body;\n b.m(\"DELETE\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_DeleteResourcePolicyCommand\");\nvar se_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/DescribeChangeSet\");\n const query = (0, import_smithy_client.map)({\n [_c]: [, (0, import_smithy_client.expectNonNull)(input[_C], `Catalog`)],\n [_cSI]: [, (0, import_smithy_client.expectNonNull)(input[_CSI], `ChangeSetId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_DescribeChangeSetCommand\");\nvar se_DescribeEntityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/DescribeEntity\");\n const query = (0, import_smithy_client.map)({\n [_c]: [, (0, import_smithy_client.expectNonNull)(input[_C], `Catalog`)],\n [_eI]: [, (0, import_smithy_client.expectNonNull)(input[_EI], `EntityId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_DescribeEntityCommand\");\nvar se_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {};\n b.bp(\"/GetResourcePolicy\");\n const query = (0, import_smithy_client.map)({\n [_rA]: [, (0, import_smithy_client.expectNonNull)(input[_RA], `ResourceArn`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_GetResourcePolicyCommand\");\nvar se_ListChangeSetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/ListChangeSets\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Catalog: [],\n FilterList: (_) => (0, import_smithy_client._json)(_),\n MaxResults: [],\n NextToken: [],\n Sort: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_ListChangeSetsCommand\");\nvar se_ListEntitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/ListEntities\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Catalog: [],\n EntityType: [],\n EntityTypeFilters: (_) => (0, import_smithy_client._json)(_),\n EntityTypeSort: (_) => (0, import_smithy_client._json)(_),\n FilterList: (_) => (0, import_smithy_client._json)(_),\n MaxResults: [],\n NextToken: [],\n OwnershipType: [],\n Sort: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_ListEntitiesCommand\");\nvar se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/ListTagsForResource\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n ResourceArn: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_ListTagsForResourceCommand\");\nvar se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/PutResourcePolicy\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Policy: [],\n ResourceArn: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_PutResourcePolicyCommand\");\nvar se_StartChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/StartChangeSet\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n Catalog: [],\n ChangeSet: (_) => se_RequestedChangeList(_, context),\n ChangeSetName: [],\n ChangeSetTags: (_) => (0, import_smithy_client._json)(_),\n ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],\n Intent: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_StartChangeSetCommand\");\nvar se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/TagResource\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n ResourceArn: [],\n Tags: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_TagResourceCommand\");\nvar se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/UntagResource\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n ResourceArn: [],\n TagKeys: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_UntagResourceCommand\");\nvar de_BatchDescribeEntitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n EntityDetails: (_) => de_EntityDetails(_, context),\n Errors: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_BatchDescribeEntitiesCommand\");\nvar de_CancelChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSetArn: import_smithy_client.expectString,\n ChangeSetId: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CancelChangeSetCommand\");\nvar de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_DeleteResourcePolicyCommand\");\nvar de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSet: (_) => de_ChangeSetDescription(_, context),\n ChangeSetArn: import_smithy_client.expectString,\n ChangeSetId: import_smithy_client.expectString,\n ChangeSetName: import_smithy_client.expectString,\n EndTime: import_smithy_client.expectString,\n FailureCode: import_smithy_client.expectString,\n FailureDescription: import_smithy_client.expectString,\n Intent: import_smithy_client.expectString,\n StartTime: import_smithy_client.expectString,\n Status: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_DescribeChangeSetCommand\");\nvar de_DescribeEntityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n Details: import_smithy_client.expectString,\n DetailsDocument: (_) => de_JsonDocumentType(_, context),\n EntityArn: import_smithy_client.expectString,\n EntityIdentifier: import_smithy_client.expectString,\n EntityType: import_smithy_client.expectString,\n LastModifiedDate: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_DescribeEntityCommand\");\nvar de_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n Policy: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_GetResourcePolicyCommand\");\nvar de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSetSummaryList: import_smithy_client._json,\n NextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListChangeSetsCommand\");\nvar de_ListEntitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n EntitySummaryList: import_smithy_client._json,\n NextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListEntitiesCommand\");\nvar de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ResourceArn: import_smithy_client.expectString,\n Tags: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListTagsForResourceCommand\");\nvar de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_PutResourcePolicyCommand\");\nvar de_StartChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n ChangeSetArn: import_smithy_client.expectString,\n ChangeSetId: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_StartChangeSetCommand\");\nvar de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_TagResourceCommand\");\nvar de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_UntagResourceCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.marketplacecatalog#AccessDeniedException\":\n throw await de_AccessDeniedExceptionRes(parsedOutput, context);\n case \"InternalServiceException\":\n case \"com.amazonaws.marketplacecatalog#InternalServiceException\":\n throw await de_InternalServiceExceptionRes(parsedOutput, context);\n case \"ThrottlingException\":\n case \"com.amazonaws.marketplacecatalog#ThrottlingException\":\n throw await de_ThrottlingExceptionRes(parsedOutput, context);\n case \"ValidationException\":\n case \"com.amazonaws.marketplacecatalog#ValidationException\":\n throw await de_ValidationExceptionRes(parsedOutput, context);\n case \"ResourceInUseException\":\n case \"com.amazonaws.marketplacecatalog#ResourceInUseException\":\n throw await de_ResourceInUseExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.marketplacecatalog#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"ResourceNotSupportedException\":\n case \"com.amazonaws.marketplacecatalog#ResourceNotSupportedException\":\n throw await de_ResourceNotSupportedExceptionRes(parsedOutput, context);\n case \"ServiceQuotaExceededException\":\n case \"com.amazonaws.marketplacecatalog#ServiceQuotaExceededException\":\n throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(MarketplaceCatalogServiceException);\nvar de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AccessDeniedExceptionRes\");\nvar de_InternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InternalServiceException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InternalServiceExceptionRes\");\nvar de_ResourceInUseExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceInUseException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceInUseExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_ResourceNotSupportedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotSupportedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotSupportedExceptionRes\");\nvar de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ServiceQuotaExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ServiceQuotaExceededExceptionRes\");\nvar de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ThrottlingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ThrottlingExceptionRes\");\nvar de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n Message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ValidationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ValidationExceptionRes\");\nvar se_Change = /* @__PURE__ */ __name((input, context) => {\n return (0, import_smithy_client.take)(input, {\n ChangeName: [],\n ChangeType: [],\n Details: [],\n DetailsDocument: (_) => se_JsonDocumentType(_, context),\n Entity: import_smithy_client._json,\n EntityTags: import_smithy_client._json\n });\n}, \"se_Change\");\nvar se_JsonDocumentType = /* @__PURE__ */ __name((input, context) => {\n return input;\n}, \"se_JsonDocumentType\");\nvar se_RequestedChangeList = /* @__PURE__ */ __name((input, context) => {\n return input.filter((e) => e != null).map((entry) => {\n return se_Change(entry, context);\n });\n}, \"se_RequestedChangeList\");\nvar de_ChangeSetDescription = /* @__PURE__ */ __name((output, context) => {\n const retVal = (output || []).filter((e) => e != null).map((entry) => {\n return de_ChangeSummary(entry, context);\n });\n return retVal;\n}, \"de_ChangeSetDescription\");\nvar de_ChangeSummary = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n ChangeName: import_smithy_client.expectString,\n ChangeType: import_smithy_client.expectString,\n Details: import_smithy_client.expectString,\n DetailsDocument: (_) => de_JsonDocumentType(_, context),\n Entity: import_smithy_client._json,\n ErrorDetailList: import_smithy_client._json\n });\n}, \"de_ChangeSummary\");\nvar de_EntityDetail = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n DetailsDocument: (_) => de_JsonDocumentType(_, context),\n EntityArn: import_smithy_client.expectString,\n EntityIdentifier: import_smithy_client.expectString,\n EntityType: import_smithy_client.expectString,\n LastModifiedDate: import_smithy_client.expectString\n });\n}, \"de_EntityDetail\");\nvar de_EntityDetails = /* @__PURE__ */ __name((output, context) => {\n return Object.entries(output).reduce((acc, [key, value]) => {\n if (value === null) {\n return acc;\n }\n acc[key] = de_EntityDetail(value, context);\n return acc;\n }, {});\n}, \"de_EntityDetails\");\nvar de_JsonDocumentType = /* @__PURE__ */ __name((output, context) => {\n return output;\n}, \"de_JsonDocumentType\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar _C = \"Catalog\";\nvar _CSI = \"ChangeSetId\";\nvar _EI = \"EntityId\";\nvar _RA = \"ResourceArn\";\nvar _c = \"catalog\";\nvar _cSI = \"changeSetId\";\nvar _eI = \"entityId\";\nvar _rA = \"resourceArn\";\n\n// src/commands/BatchDescribeEntitiesCommand.ts\nvar _BatchDescribeEntitiesCommand = class _BatchDescribeEntitiesCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"BatchDescribeEntities\", {}).n(\"MarketplaceCatalogClient\", \"BatchDescribeEntitiesCommand\").f(void 0, void 0).ser(se_BatchDescribeEntitiesCommand).de(de_BatchDescribeEntitiesCommand).build() {\n};\n__name(_BatchDescribeEntitiesCommand, \"BatchDescribeEntitiesCommand\");\nvar BatchDescribeEntitiesCommand = _BatchDescribeEntitiesCommand;\n\n// src/commands/CancelChangeSetCommand.ts\n\n\n\n\nvar _CancelChangeSetCommand = class _CancelChangeSetCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"CancelChangeSet\", {}).n(\"MarketplaceCatalogClient\", \"CancelChangeSetCommand\").f(void 0, void 0).ser(se_CancelChangeSetCommand).de(de_CancelChangeSetCommand).build() {\n};\n__name(_CancelChangeSetCommand, \"CancelChangeSetCommand\");\nvar CancelChangeSetCommand = _CancelChangeSetCommand;\n\n// src/commands/DeleteResourcePolicyCommand.ts\n\n\n\n\nvar _DeleteResourcePolicyCommand = class _DeleteResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"DeleteResourcePolicy\", {}).n(\"MarketplaceCatalogClient\", \"DeleteResourcePolicyCommand\").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() {\n};\n__name(_DeleteResourcePolicyCommand, \"DeleteResourcePolicyCommand\");\nvar DeleteResourcePolicyCommand = _DeleteResourcePolicyCommand;\n\n// src/commands/DescribeChangeSetCommand.ts\n\n\n\n\nvar _DescribeChangeSetCommand = class _DescribeChangeSetCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"DescribeChangeSet\", {}).n(\"MarketplaceCatalogClient\", \"DescribeChangeSetCommand\").f(void 0, void 0).ser(se_DescribeChangeSetCommand).de(de_DescribeChangeSetCommand).build() {\n};\n__name(_DescribeChangeSetCommand, \"DescribeChangeSetCommand\");\nvar DescribeChangeSetCommand = _DescribeChangeSetCommand;\n\n// src/commands/DescribeEntityCommand.ts\n\n\n\n\nvar _DescribeEntityCommand = class _DescribeEntityCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"DescribeEntity\", {}).n(\"MarketplaceCatalogClient\", \"DescribeEntityCommand\").f(void 0, void 0).ser(se_DescribeEntityCommand).de(de_DescribeEntityCommand).build() {\n};\n__name(_DescribeEntityCommand, \"DescribeEntityCommand\");\nvar DescribeEntityCommand = _DescribeEntityCommand;\n\n// src/commands/GetResourcePolicyCommand.ts\n\n\n\n\nvar _GetResourcePolicyCommand = class _GetResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"GetResourcePolicy\", {}).n(\"MarketplaceCatalogClient\", \"GetResourcePolicyCommand\").f(void 0, void 0).ser(se_GetResourcePolicyCommand).de(de_GetResourcePolicyCommand).build() {\n};\n__name(_GetResourcePolicyCommand, \"GetResourcePolicyCommand\");\nvar GetResourcePolicyCommand = _GetResourcePolicyCommand;\n\n// src/commands/ListChangeSetsCommand.ts\n\n\n\n\nvar _ListChangeSetsCommand = class _ListChangeSetsCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"ListChangeSets\", {}).n(\"MarketplaceCatalogClient\", \"ListChangeSetsCommand\").f(void 0, void 0).ser(se_ListChangeSetsCommand).de(de_ListChangeSetsCommand).build() {\n};\n__name(_ListChangeSetsCommand, \"ListChangeSetsCommand\");\nvar ListChangeSetsCommand = _ListChangeSetsCommand;\n\n// src/commands/ListEntitiesCommand.ts\n\n\n\n\nvar _ListEntitiesCommand = class _ListEntitiesCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"ListEntities\", {}).n(\"MarketplaceCatalogClient\", \"ListEntitiesCommand\").f(void 0, void 0).ser(se_ListEntitiesCommand).de(de_ListEntitiesCommand).build() {\n};\n__name(_ListEntitiesCommand, \"ListEntitiesCommand\");\nvar ListEntitiesCommand = _ListEntitiesCommand;\n\n// src/commands/ListTagsForResourceCommand.ts\n\n\n\n\nvar _ListTagsForResourceCommand = class _ListTagsForResourceCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"ListTagsForResource\", {}).n(\"MarketplaceCatalogClient\", \"ListTagsForResourceCommand\").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {\n};\n__name(_ListTagsForResourceCommand, \"ListTagsForResourceCommand\");\nvar ListTagsForResourceCommand = _ListTagsForResourceCommand;\n\n// src/commands/PutResourcePolicyCommand.ts\n\n\n\n\nvar _PutResourcePolicyCommand = class _PutResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"PutResourcePolicy\", {}).n(\"MarketplaceCatalogClient\", \"PutResourcePolicyCommand\").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() {\n};\n__name(_PutResourcePolicyCommand, \"PutResourcePolicyCommand\");\nvar PutResourcePolicyCommand = _PutResourcePolicyCommand;\n\n// src/commands/StartChangeSetCommand.ts\n\n\n\n\nvar _StartChangeSetCommand = class _StartChangeSetCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"StartChangeSet\", {}).n(\"MarketplaceCatalogClient\", \"StartChangeSetCommand\").f(void 0, void 0).ser(se_StartChangeSetCommand).de(de_StartChangeSetCommand).build() {\n};\n__name(_StartChangeSetCommand, \"StartChangeSetCommand\");\nvar StartChangeSetCommand = _StartChangeSetCommand;\n\n// src/commands/TagResourceCommand.ts\n\n\n\n\nvar _TagResourceCommand = class _TagResourceCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"TagResource\", {}).n(\"MarketplaceCatalogClient\", \"TagResourceCommand\").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {\n};\n__name(_TagResourceCommand, \"TagResourceCommand\");\nvar TagResourceCommand = _TagResourceCommand;\n\n// src/commands/UntagResourceCommand.ts\n\n\n\n\nvar _UntagResourceCommand = class _UntagResourceCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSMPSeymour\", \"UntagResource\", {}).n(\"MarketplaceCatalogClient\", \"UntagResourceCommand\").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {\n};\n__name(_UntagResourceCommand, \"UntagResourceCommand\");\nvar UntagResourceCommand = _UntagResourceCommand;\n\n// src/MarketplaceCatalog.ts\nvar commands = {\n BatchDescribeEntitiesCommand,\n CancelChangeSetCommand,\n DeleteResourcePolicyCommand,\n DescribeChangeSetCommand,\n DescribeEntityCommand,\n GetResourcePolicyCommand,\n ListChangeSetsCommand,\n ListEntitiesCommand,\n ListTagsForResourceCommand,\n PutResourcePolicyCommand,\n StartChangeSetCommand,\n TagResourceCommand,\n UntagResourceCommand\n};\nvar _MarketplaceCatalog = class _MarketplaceCatalog extends MarketplaceCatalogClient {\n};\n__name(_MarketplaceCatalog, \"MarketplaceCatalog\");\nvar MarketplaceCatalog = _MarketplaceCatalog;\n(0, import_smithy_client.createAggregatedClient)(commands, MarketplaceCatalog);\n\n// src/pagination/ListChangeSetsPaginator.ts\n\nvar paginateListChangeSets = (0, import_core.createPaginator)(MarketplaceCatalogClient, ListChangeSetsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListEntitiesPaginator.ts\n\nvar paginateListEntities = (0, import_core.createPaginator)(MarketplaceCatalogClient, ListEntitiesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n MarketplaceCatalogServiceException,\n __Client,\n MarketplaceCatalogClient,\n MarketplaceCatalog,\n $Command,\n BatchDescribeEntitiesCommand,\n CancelChangeSetCommand,\n DeleteResourcePolicyCommand,\n DescribeChangeSetCommand,\n DescribeEntityCommand,\n GetResourcePolicyCommand,\n ListChangeSetsCommand,\n ListEntitiesCommand,\n ListTagsForResourceCommand,\n PutResourcePolicyCommand,\n StartChangeSetCommand,\n TagResourceCommand,\n UntagResourceCommand,\n paginateListChangeSets,\n paginateListEntities,\n AccessDeniedException,\n AmiProductVisibilityString,\n AmiProductSortBy,\n SortOrder,\n InternalServiceException,\n ThrottlingException,\n ValidationException,\n ResourceInUseException,\n ResourceNotFoundException,\n FailureCode,\n Intent,\n ChangeStatus,\n ResourceNotSupportedException,\n ContainerProductVisibilityString,\n DataProductVisibilityString,\n OfferStateString,\n OfferTargetingString,\n ResaleAuthorizationStatusString,\n SaaSProductVisibilityString,\n EntityTypeFilters,\n ContainerProductSortBy,\n DataProductSortBy,\n OfferSortBy,\n ResaleAuthorizationSortBy,\n SaaSProductSortBy,\n EntityTypeSort,\n OwnershipType,\n ServiceQuotaExceededException\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2018-09-17\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultMarketplaceCatalogHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"Marketplace Catalog\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n randomUUID: _crypto.default.randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"RegisterClient\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"StartDeviceAuthorization\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return {\n ...config_0,\n };\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultProvider = void 0;\nexports.defaultProvider = ((input) => {\n return () => Promise.resolve().then(() => __importStar(require(\"@aws-sdk/credential-provider-node\"))).then(({ defaultProvider }) => defaultProvider(input)());\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://oidc.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AccessDeniedException: () => AccessDeniedException,\n AuthorizationPendingException: () => AuthorizationPendingException,\n CreateTokenCommand: () => CreateTokenCommand,\n CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,\n CreateTokenWithIAMCommand: () => CreateTokenWithIAMCommand,\n CreateTokenWithIAMRequestFilterSensitiveLog: () => CreateTokenWithIAMRequestFilterSensitiveLog,\n CreateTokenWithIAMResponseFilterSensitiveLog: () => CreateTokenWithIAMResponseFilterSensitiveLog,\n ExpiredTokenException: () => ExpiredTokenException,\n InternalServerException: () => InternalServerException,\n InvalidClientException: () => InvalidClientException,\n InvalidClientMetadataException: () => InvalidClientMetadataException,\n InvalidGrantException: () => InvalidGrantException,\n InvalidRequestException: () => InvalidRequestException,\n InvalidRequestRegionException: () => InvalidRequestRegionException,\n InvalidScopeException: () => InvalidScopeException,\n RegisterClientCommand: () => RegisterClientCommand,\n RegisterClientResponseFilterSensitiveLog: () => RegisterClientResponseFilterSensitiveLog,\n SSOOIDC: () => SSOOIDC,\n SSOOIDCClient: () => SSOOIDCClient,\n SSOOIDCServiceException: () => SSOOIDCServiceException,\n SlowDownException: () => SlowDownException,\n StartDeviceAuthorizationCommand: () => StartDeviceAuthorizationCommand,\n StartDeviceAuthorizationRequestFilterSensitiveLog: () => StartDeviceAuthorizationRequestFilterSensitiveLog,\n UnauthorizedClientException: () => UnauthorizedClientException,\n UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,\n __Client: () => import_smithy_client.Client\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SSOOIDCClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\"\n };\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/SSOOIDCClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar asPartial = /* @__PURE__ */ __name((t) => t, \"asPartial\");\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),\n ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n ...resolveHttpAuthRuntimeConfig(extensionConfiguration)\n };\n}, \"resolveRuntimeExtensions\");\n\n// src/SSOOIDCClient.ts\nvar _SSOOIDCClient = class _SSOOIDCClient extends import_smithy_client.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);\n const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),\n identityProviderConfigProvider: this.getIdentityProviderConfigProvider()\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n getDefaultHttpAuthSchemeParametersProvider() {\n return import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider;\n }\n getIdentityProviderConfigProvider() {\n return async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n });\n }\n};\n__name(_SSOOIDCClient, \"SSOOIDCClient\");\nvar SSOOIDCClient = _SSOOIDCClient;\n\n// src/SSOOIDC.ts\n\n\n// src/commands/CreateTokenCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\n\n// src/models/models_0.ts\n\n\n// src/models/SSOOIDCServiceException.ts\n\nvar _SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);\n }\n};\n__name(_SSOOIDCServiceException, \"SSOOIDCServiceException\");\nvar SSOOIDCServiceException = _SSOOIDCServiceException;\n\n// src/models/models_0.ts\nvar _AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"AccessDeniedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _AccessDeniedException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_AccessDeniedException, \"AccessDeniedException\");\nvar AccessDeniedException = _AccessDeniedException;\nvar _AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"AuthorizationPendingException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_AuthorizationPendingException, \"AuthorizationPendingException\");\nvar AuthorizationPendingException = _AuthorizationPendingException;\nvar _ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ExpiredTokenException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_ExpiredTokenException, \"ExpiredTokenException\");\nvar ExpiredTokenException = _ExpiredTokenException;\nvar _InternalServerException = class _InternalServerException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts\n });\n this.name = \"InternalServerException\";\n this.$fault = \"server\";\n Object.setPrototypeOf(this, _InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InternalServerException, \"InternalServerException\");\nvar InternalServerException = _InternalServerException;\nvar _InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidClientException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidClientException, \"InvalidClientException\");\nvar InvalidClientException = _InvalidClientException;\nvar _InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidGrantException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidGrantException, \"InvalidGrantException\");\nvar InvalidGrantException = _InvalidGrantException;\nvar _InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidRequestException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidRequestException, \"InvalidRequestException\");\nvar InvalidRequestException = _InvalidRequestException;\nvar _InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidScopeException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidScopeException, \"InvalidScopeException\");\nvar InvalidScopeException = _InvalidScopeException;\nvar _SlowDownException = class _SlowDownException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"SlowDownException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_SlowDownException, \"SlowDownException\");\nvar SlowDownException = _SlowDownException;\nvar _UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"UnauthorizedClientException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_UnauthorizedClientException, \"UnauthorizedClientException\");\nvar UnauthorizedClientException = _UnauthorizedClientException;\nvar _UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"UnsupportedGrantTypeException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_UnsupportedGrantTypeException, \"UnsupportedGrantTypeException\");\nvar UnsupportedGrantTypeException = _UnsupportedGrantTypeException;\nvar _InvalidRequestRegionException = class _InvalidRequestRegionException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestRegionException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidRequestRegionException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidRequestRegionException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n this.endpoint = opts.endpoint;\n this.region = opts.region;\n }\n};\n__name(_InvalidRequestRegionException, \"InvalidRequestRegionException\");\nvar InvalidRequestRegionException = _InvalidRequestRegionException;\nvar _InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidClientMetadataException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidClientMetadataException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n__name(_InvalidClientMetadataException, \"InvalidClientMetadataException\");\nvar InvalidClientMetadataException = _InvalidClientMetadataException;\nvar CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenRequestFilterSensitiveLog\");\nvar CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenResponseFilterSensitiveLog\");\nvar CreateTokenWithIAMRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.assertion && { assertion: import_smithy_client.SENSITIVE_STRING },\n ...obj.subjectToken && { subjectToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenWithIAMRequestFilterSensitiveLog\");\nvar CreateTokenWithIAMResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client.SENSITIVE_STRING },\n ...obj.idToken && { idToken: import_smithy_client.SENSITIVE_STRING }\n}), \"CreateTokenWithIAMResponseFilterSensitiveLog\");\nvar RegisterClientResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }\n}), \"RegisterClientResponseFilterSensitiveLog\");\nvar StartDeviceAuthorizationRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client.SENSITIVE_STRING }\n}), \"StartDeviceAuthorizationRequestFilterSensitiveLog\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\nvar se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/token\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n clientId: [],\n clientSecret: [],\n code: [],\n deviceCode: [],\n grantType: [],\n redirectUri: [],\n refreshToken: [],\n scope: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_CreateTokenCommand\");\nvar se_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/token\");\n const query = (0, import_smithy_client.map)({\n [_ai]: [, \"t\"]\n });\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n assertion: [],\n clientId: [],\n code: [],\n grantType: [],\n redirectUri: [],\n refreshToken: [],\n requestedTokenType: [],\n scope: (_) => (0, import_smithy_client._json)(_),\n subjectToken: [],\n subjectTokenType: []\n })\n );\n b.m(\"POST\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_CreateTokenWithIAMCommand\");\nvar se_RegisterClientCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/client/register\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n clientName: [],\n clientType: [],\n scopes: (_) => (0, import_smithy_client._json)(_)\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_RegisterClientCommand\");\nvar se_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/device_authorization\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client.take)(input, {\n clientId: [],\n clientSecret: [],\n startUrl: []\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_StartDeviceAuthorizationCommand\");\nvar de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accessToken: import_smithy_client.expectString,\n expiresIn: import_smithy_client.expectInt32,\n idToken: import_smithy_client.expectString,\n refreshToken: import_smithy_client.expectString,\n tokenType: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CreateTokenCommand\");\nvar de_CreateTokenWithIAMCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accessToken: import_smithy_client.expectString,\n expiresIn: import_smithy_client.expectInt32,\n idToken: import_smithy_client.expectString,\n issuedTokenType: import_smithy_client.expectString,\n refreshToken: import_smithy_client.expectString,\n scope: import_smithy_client._json,\n tokenType: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CreateTokenWithIAMCommand\");\nvar de_RegisterClientCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n authorizationEndpoint: import_smithy_client.expectString,\n clientId: import_smithy_client.expectString,\n clientIdIssuedAt: import_smithy_client.expectLong,\n clientSecret: import_smithy_client.expectString,\n clientSecretExpiresAt: import_smithy_client.expectLong,\n tokenEndpoint: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_RegisterClientCommand\");\nvar de_StartDeviceAuthorizationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n deviceCode: import_smithy_client.expectString,\n expiresIn: import_smithy_client.expectInt32,\n interval: import_smithy_client.expectInt32,\n userCode: import_smithy_client.expectString,\n verificationUri: import_smithy_client.expectString,\n verificationUriComplete: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_StartDeviceAuthorizationCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ssooidc#AccessDeniedException\":\n throw await de_AccessDeniedExceptionRes(parsedOutput, context);\n case \"AuthorizationPendingException\":\n case \"com.amazonaws.ssooidc#AuthorizationPendingException\":\n throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);\n case \"ExpiredTokenException\":\n case \"com.amazonaws.ssooidc#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.ssooidc#InternalServerException\":\n throw await de_InternalServerExceptionRes(parsedOutput, context);\n case \"InvalidClientException\":\n case \"com.amazonaws.ssooidc#InvalidClientException\":\n throw await de_InvalidClientExceptionRes(parsedOutput, context);\n case \"InvalidGrantException\":\n case \"com.amazonaws.ssooidc#InvalidGrantException\":\n throw await de_InvalidGrantExceptionRes(parsedOutput, context);\n case \"InvalidRequestException\":\n case \"com.amazonaws.ssooidc#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"InvalidScopeException\":\n case \"com.amazonaws.ssooidc#InvalidScopeException\":\n throw await de_InvalidScopeExceptionRes(parsedOutput, context);\n case \"SlowDownException\":\n case \"com.amazonaws.ssooidc#SlowDownException\":\n throw await de_SlowDownExceptionRes(parsedOutput, context);\n case \"UnauthorizedClientException\":\n case \"com.amazonaws.ssooidc#UnauthorizedClientException\":\n throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);\n case \"UnsupportedGrantTypeException\":\n case \"com.amazonaws.ssooidc#UnsupportedGrantTypeException\":\n throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);\n case \"InvalidRequestRegionException\":\n case \"com.amazonaws.ssooidc#InvalidRequestRegionException\":\n throw await de_InvalidRequestRegionExceptionRes(parsedOutput, context);\n case \"InvalidClientMetadataException\":\n case \"com.amazonaws.ssooidc#InvalidClientMetadataException\":\n throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(SSOOIDCServiceException);\nvar de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AccessDeniedExceptionRes\");\nvar de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new AuthorizationPendingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AuthorizationPendingExceptionRes\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InternalServerException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InternalServerExceptionRes\");\nvar de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidClientExceptionRes\");\nvar de_InvalidClientMetadataExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidClientMetadataException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidClientMetadataExceptionRes\");\nvar de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidGrantException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidGrantExceptionRes\");\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_InvalidRequestRegionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n endpoint: import_smithy_client.expectString,\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString,\n region: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestRegionException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestRegionExceptionRes\");\nvar de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidScopeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidScopeExceptionRes\");\nvar de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new SlowDownException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_SlowDownExceptionRes\");\nvar de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedClientExceptionRes\");\nvar de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n error: import_smithy_client.expectString,\n error_description: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnsupportedGrantTypeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnsupportedGrantTypeExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar _ai = \"aws_iam\";\n\n// src/commands/CreateTokenCommand.ts\nvar _CreateTokenCommand = class _CreateTokenCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"CreateToken\", {}).n(\"SSOOIDCClient\", \"CreateTokenCommand\").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {\n};\n__name(_CreateTokenCommand, \"CreateTokenCommand\");\nvar CreateTokenCommand = _CreateTokenCommand;\n\n// src/commands/CreateTokenWithIAMCommand.ts\n\n\n\n\nvar _CreateTokenWithIAMCommand = class _CreateTokenWithIAMCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"CreateTokenWithIAM\", {}).n(\"SSOOIDCClient\", \"CreateTokenWithIAMCommand\").f(CreateTokenWithIAMRequestFilterSensitiveLog, CreateTokenWithIAMResponseFilterSensitiveLog).ser(se_CreateTokenWithIAMCommand).de(de_CreateTokenWithIAMCommand).build() {\n};\n__name(_CreateTokenWithIAMCommand, \"CreateTokenWithIAMCommand\");\nvar CreateTokenWithIAMCommand = _CreateTokenWithIAMCommand;\n\n// src/commands/RegisterClientCommand.ts\n\n\n\n\nvar _RegisterClientCommand = class _RegisterClientCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"RegisterClient\", {}).n(\"SSOOIDCClient\", \"RegisterClientCommand\").f(void 0, RegisterClientResponseFilterSensitiveLog).ser(se_RegisterClientCommand).de(de_RegisterClientCommand).build() {\n};\n__name(_RegisterClientCommand, \"RegisterClientCommand\");\nvar RegisterClientCommand = _RegisterClientCommand;\n\n// src/commands/StartDeviceAuthorizationCommand.ts\n\n\n\n\nvar _StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"StartDeviceAuthorization\", {}).n(\"SSOOIDCClient\", \"StartDeviceAuthorizationCommand\").f(StartDeviceAuthorizationRequestFilterSensitiveLog, void 0).ser(se_StartDeviceAuthorizationCommand).de(de_StartDeviceAuthorizationCommand).build() {\n};\n__name(_StartDeviceAuthorizationCommand, \"StartDeviceAuthorizationCommand\");\nvar StartDeviceAuthorizationCommand = _StartDeviceAuthorizationCommand;\n\n// src/SSOOIDC.ts\nvar commands = {\n CreateTokenCommand,\n CreateTokenWithIAMCommand,\n RegisterClientCommand,\n StartDeviceAuthorizationCommand\n};\nvar _SSOOIDC = class _SSOOIDC extends SSOOIDCClient {\n};\n__name(_SSOOIDC, \"SSOOIDC\");\nvar SSOOIDC = _SSOOIDC;\n(0, import_smithy_client.createAggregatedClient)(commands, SSOOIDC);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SSOOIDCServiceException,\n __Client,\n SSOOIDCClient,\n SSOOIDC,\n $Command,\n CreateTokenCommand,\n CreateTokenWithIAMCommand,\n RegisterClientCommand,\n StartDeviceAuthorizationCommand,\n AccessDeniedException,\n AuthorizationPendingException,\n ExpiredTokenException,\n InternalServerException,\n InvalidClientException,\n InvalidGrantException,\n InvalidRequestException,\n InvalidScopeException,\n SlowDownException,\n UnauthorizedClientException,\n UnsupportedGrantTypeException,\n InvalidRequestRegionException,\n InvalidClientMetadataException,\n CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog,\n CreateTokenWithIAMRequestFilterSensitiveLog,\n CreateTokenWithIAMResponseFilterSensitiveLog,\n RegisterClientResponseFilterSensitiveLog,\n StartDeviceAuthorizationRequestFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst credentialDefaultProvider_1 = require(\"./credentialDefaultProvider\");\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccountRoles\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccounts\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"Logout\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return {\n ...config_0,\n };\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://portal.sso.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,\n GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,\n InvalidRequestException: () => InvalidRequestException,\n ListAccountRolesCommand: () => ListAccountRolesCommand,\n ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsCommand: () => ListAccountsCommand,\n ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,\n LogoutCommand: () => LogoutCommand,\n LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,\n ResourceNotFoundException: () => ResourceNotFoundException,\n RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,\n SSO: () => SSO,\n SSOClient: () => SSOClient,\n SSOServiceException: () => SSOServiceException,\n TooManyRequestsException: () => TooManyRequestsException,\n UnauthorizedException: () => UnauthorizedException,\n __Client: () => import_smithy_client.Client,\n paginateListAccountRoles: () => paginateListAccountRoles,\n paginateListAccounts: () => paginateListAccounts\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SSOClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\"\n };\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/SSOClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar asPartial = /* @__PURE__ */ __name((t) => t, \"asPartial\");\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),\n ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n ...resolveHttpAuthRuntimeConfig(extensionConfiguration)\n };\n}, \"resolveRuntimeExtensions\");\n\n// src/SSOClient.ts\nvar _SSOClient = class _SSOClient extends import_smithy_client.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);\n const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),\n identityProviderConfigProvider: this.getIdentityProviderConfigProvider()\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n getDefaultHttpAuthSchemeParametersProvider() {\n return import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider;\n }\n getIdentityProviderConfigProvider() {\n return async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n });\n }\n};\n__name(_SSOClient, \"SSOClient\");\nvar SSOClient = _SSOClient;\n\n// src/SSO.ts\n\n\n// src/commands/GetRoleCredentialsCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\n\n// src/models/models_0.ts\n\n\n// src/models/SSOServiceException.ts\n\nvar _SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOServiceException.prototype);\n }\n};\n__name(_SSOServiceException, \"SSOServiceException\");\nvar SSOServiceException = _SSOServiceException;\n\n// src/models/models_0.ts\nvar _InvalidRequestException = class _InvalidRequestException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidRequestException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n }\n};\n__name(_InvalidRequestException, \"InvalidRequestException\");\nvar InvalidRequestException = _InvalidRequestException;\nvar _ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ResourceNotFoundException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n }\n};\n__name(_ResourceNotFoundException, \"ResourceNotFoundException\");\nvar ResourceNotFoundException = _ResourceNotFoundException;\nvar _TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"TooManyRequestsException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _TooManyRequestsException.prototype);\n }\n};\n__name(_TooManyRequestsException, \"TooManyRequestsException\");\nvar TooManyRequestsException = _TooManyRequestsException;\nvar _UnauthorizedException = class _UnauthorizedException extends SSOServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"UnauthorizedException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _UnauthorizedException.prototype);\n }\n};\n__name(_UnauthorizedException, \"UnauthorizedException\");\nvar UnauthorizedException = _UnauthorizedException;\nvar GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"GetRoleCredentialsRequestFilterSensitiveLog\");\nvar RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },\n ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }\n}), \"RoleCredentialsFilterSensitiveLog\");\nvar GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }\n}), \"GetRoleCredentialsResponseFilterSensitiveLog\");\nvar ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountRolesRequestFilterSensitiveLog\");\nvar ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountsRequestFilterSensitiveLog\");\nvar LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"LogoutRequestFilterSensitiveLog\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\nvar se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/federation/credentials\");\n const query = (0, import_smithy_client.map)({\n [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_GetRoleCredentialsCommand\");\nvar se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/roles\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountRolesCommand\");\nvar se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/accounts\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountsCommand\");\nvar se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/logout\");\n let body;\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_LogoutCommand\");\nvar de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n roleCredentials: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_GetRoleCredentialsCommand\");\nvar de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n nextToken: import_smithy_client.expectString,\n roleList: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountRolesCommand\");\nvar de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accountList: import_smithy_client._json,\n nextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountsCommand\");\nvar de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_LogoutCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n throw await de_UnauthorizedExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_TooManyRequestsExceptionRes\");\nvar de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar isSerializableHeaderValue = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== \"\" && (!Object.getOwnPropertyNames(value).includes(\"length\") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes(\"size\") || value.size != 0), \"isSerializableHeaderValue\");\nvar _aI = \"accountId\";\nvar _aT = \"accessToken\";\nvar _ai = \"account_id\";\nvar _mR = \"maxResults\";\nvar _mr = \"max_result\";\nvar _nT = \"nextToken\";\nvar _nt = \"next_token\";\nvar _rN = \"roleName\";\nvar _rn = \"role_name\";\nvar _xasbt = \"x-amz-sso_bearer_token\";\n\n// src/commands/GetRoleCredentialsCommand.ts\nvar _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"GetRoleCredentials\", {}).n(\"SSOClient\", \"GetRoleCredentialsCommand\").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {\n};\n__name(_GetRoleCredentialsCommand, \"GetRoleCredentialsCommand\");\nvar GetRoleCredentialsCommand = _GetRoleCredentialsCommand;\n\n// src/commands/ListAccountRolesCommand.ts\n\n\n\n\nvar _ListAccountRolesCommand = class _ListAccountRolesCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccountRoles\", {}).n(\"SSOClient\", \"ListAccountRolesCommand\").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {\n};\n__name(_ListAccountRolesCommand, \"ListAccountRolesCommand\");\nvar ListAccountRolesCommand = _ListAccountRolesCommand;\n\n// src/commands/ListAccountsCommand.ts\n\n\n\n\nvar _ListAccountsCommand = class _ListAccountsCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccounts\", {}).n(\"SSOClient\", \"ListAccountsCommand\").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {\n};\n__name(_ListAccountsCommand, \"ListAccountsCommand\");\nvar ListAccountsCommand = _ListAccountsCommand;\n\n// src/commands/LogoutCommand.ts\n\n\n\n\nvar _LogoutCommand = class _LogoutCommand extends import_smithy_client.Command.classBuilder().ep({\n ...commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"Logout\", {}).n(\"SSOClient\", \"LogoutCommand\").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() {\n};\n__name(_LogoutCommand, \"LogoutCommand\");\nvar LogoutCommand = _LogoutCommand;\n\n// src/SSO.ts\nvar commands = {\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand\n};\nvar _SSO = class _SSO extends SSOClient {\n};\n__name(_SSO, \"SSO\");\nvar SSO = _SSO;\n(0, import_smithy_client.createAggregatedClient)(commands, SSO);\n\n// src/pagination/ListAccountRolesPaginator.ts\n\nvar paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\n// src/pagination/ListAccountsPaginator.ts\n\nvar paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SSOServiceException,\n __Client,\n SSOClient,\n SSO,\n $Command,\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand,\n paginateListAccountRoles,\n paginateListAccounts,\n InvalidRequestException,\n ResourceNotFoundException,\n TooManyRequestsException,\n UnauthorizedException,\n GetRoleCredentialsRequestFilterSensitiveLog,\n RoleCredentialsFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog,\n ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsRequestFilterSensitiveLog,\n LogoutRequestFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.__Client = void 0;\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_recursion_detection_1 = require(\"@aws-sdk/middleware-recursion-detection\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_1 = require(\"@smithy/core\");\nconst middleware_content_length_1 = require(\"@smithy/middleware-content-length\");\nconst middleware_endpoint_1 = require(\"@smithy/middleware-endpoint\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__Client\", { enumerable: true, get: function () { return smithy_client_1.Client; } });\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst EndpointParameters_1 = require(\"./endpoint/EndpointParameters\");\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst runtimeExtensions_1 = require(\"./runtimeExtensions\");\nclass STSClient extends smithy_client_1.Client {\n constructor(...[configuration]) {\n const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});\n const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);\n const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);\n const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);\n const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);\n const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);\n const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);\n super(_config_8);\n this.config = _config_8;\n this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),\n identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),\n }));\n this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));\n }\n destroy() {\n super.destroy();\n }\n getDefaultHttpAuthSchemeParametersProvider() {\n return httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider;\n }\n getIdentityProviderConfigProvider() {\n return async (config) => new core_1.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n });\n }\n}\nexports.STSClient = STSClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\nexports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst STSClient_1 = require(\"../STSClient\");\nconst defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithSAML\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;\nconst resolveStsAuthConfig = (input) => ({\n ...input,\n stsClientCtor: STSClient_1.STSClient,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, exports.resolveStsAuthConfig)(config);\n const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);\n return {\n ...config_1,\n };\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultProvider = void 0;\nexports.defaultProvider = ((input) => {\n return () => Promise.resolve().then(() => __importStar(require(\"@aws-sdk/credential-provider-node\"))).then(({ defaultProvider }) => defaultProvider(input)());\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commonParams = exports.resolveClientEndpointParameters = void 0;\nconst resolveClientEndpointParameters = (options) => {\n return {\n ...options,\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n };\n};\nexports.resolveClientEndpointParameters = resolveClientEndpointParameters;\nexports.commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n });\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst F = \"required\", G = \"type\", H = \"fn\", I = \"argv\", J = \"ref\";\nconst a = false, b = true, c = \"booleanEquals\", d = \"stringEquals\", e = \"sigv4\", f = \"sts\", g = \"us-east-1\", h = \"endpoint\", i = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", j = \"tree\", k = \"error\", l = \"getAttr\", m = { [F]: false, [G]: \"String\" }, n = { [F]: true, \"default\": false, [G]: \"Boolean\" }, o = { [J]: \"Endpoint\" }, p = { [H]: \"isSet\", [I]: [{ [J]: \"Region\" }] }, q = { [J]: \"Region\" }, r = { [H]: \"aws.partition\", [I]: [q], \"assign\": \"PartitionResult\" }, s = { [J]: \"UseFIPS\" }, t = { [J]: \"UseDualStack\" }, u = { \"url\": \"https://sts.amazonaws.com\", \"properties\": { \"authSchemes\": [{ \"name\": e, \"signingName\": f, \"signingRegion\": g }] }, \"headers\": {} }, v = {}, w = { \"conditions\": [{ [H]: d, [I]: [q, \"aws-global\"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: \"PartitionResult\" }, \"supportsFIPS\"] }, A = { [J]: \"PartitionResult\" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, \"supportsDualStack\"] }] }, C = [{ [H]: \"isSet\", [I]: [o] }], D = [x], E = [y];\nconst _data = { version: \"1.0\", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: \"UseGlobalEndpoint\" }, b] }, { [H]: \"not\", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, \"ap-northeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-south-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-2\"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, \"ca-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-north-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-3\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"sa-east-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-east-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-2\"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: \"{Region}\" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", [G]: k }, { conditions: E, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://sts.{Region}.amazonaws.com\", properties: v, headers: v }, [G]: h }, { endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS is enabled but this partition does not support FIPS\", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: \"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"DualStack is enabled but this partition does not support DualStack\", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: \"Invalid Configuration: Missing Region\", [G]: k }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AssumeRoleCommand: () => AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand,\n AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n ClientInputEndpointParameters: () => import_EndpointParameters9.ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand,\n ExpiredTokenException: () => ExpiredTokenException,\n GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand,\n GetCallerIdentityCommand: () => GetCallerIdentityCommand,\n GetFederationTokenCommand: () => GetFederationTokenCommand,\n GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenCommand: () => GetSessionTokenCommand,\n GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog,\n IDPCommunicationErrorException: () => IDPCommunicationErrorException,\n IDPRejectedClaimException: () => IDPRejectedClaimException,\n InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException,\n InvalidIdentityTokenException: () => InvalidIdentityTokenException,\n MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,\n PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,\n RegionDisabledException: () => RegionDisabledException,\n RuntimeExtension: () => import_runtimeExtensions.RuntimeExtension,\n STS: () => STS,\n STSServiceException: () => STSServiceException,\n decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,\n getDefaultRoleAssumer: () => getDefaultRoleAssumer2,\n getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2\n});\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././STSClient\"), module.exports);\n\n// src/STS.ts\n\n\n// src/commands/AssumeRoleCommand.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_types = require(\"@smithy/types\");\nvar import_EndpointParameters = require(\"./endpoint/EndpointParameters\");\n\n// src/models/models_0.ts\n\n\n// src/models/STSServiceException.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar _STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _STSServiceException.prototype);\n }\n};\n__name(_STSServiceException, \"STSServiceException\");\nvar STSServiceException = _STSServiceException;\n\n// src/models/models_0.ts\nvar _ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"ExpiredTokenException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n }\n};\n__name(_ExpiredTokenException, \"ExpiredTokenException\");\nvar ExpiredTokenException = _ExpiredTokenException;\nvar _MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"MalformedPolicyDocumentException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);\n }\n};\n__name(_MalformedPolicyDocumentException, \"MalformedPolicyDocumentException\");\nvar MalformedPolicyDocumentException = _MalformedPolicyDocumentException;\nvar _PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"PackedPolicyTooLargeException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);\n }\n};\n__name(_PackedPolicyTooLargeException, \"PackedPolicyTooLargeException\");\nvar PackedPolicyTooLargeException = _PackedPolicyTooLargeException;\nvar _RegionDisabledException = class _RegionDisabledException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"RegionDisabledException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _RegionDisabledException.prototype);\n }\n};\n__name(_RegionDisabledException, \"RegionDisabledException\");\nvar RegionDisabledException = _RegionDisabledException;\nvar _IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"IDPRejectedClaimException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);\n }\n};\n__name(_IDPRejectedClaimException, \"IDPRejectedClaimException\");\nvar IDPRejectedClaimException = _IDPRejectedClaimException;\nvar _InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidIdentityTokenException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);\n }\n};\n__name(_InvalidIdentityTokenException, \"InvalidIdentityTokenException\");\nvar InvalidIdentityTokenException = _InvalidIdentityTokenException;\nvar _IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"IDPCommunicationErrorException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);\n }\n};\n__name(_IDPCommunicationErrorException, \"IDPCommunicationErrorException\");\nvar IDPCommunicationErrorException = _IDPCommunicationErrorException;\nvar _InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException {\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidAuthorizationMessageException\",\n $fault: \"client\",\n ...opts\n });\n this.name = \"InvalidAuthorizationMessageException\";\n this.$fault = \"client\";\n Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype);\n }\n};\n__name(_InvalidAuthorizationMessageException, \"InvalidAuthorizationMessageException\");\nvar InvalidAuthorizationMessageException = _InvalidAuthorizationMessageException;\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleResponseFilterSensitiveLog\");\nvar AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithSAMLRequestFilterSensitiveLog\");\nvar AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithSAMLResponseFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithWebIdentityRequestFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithWebIdentityResponseFilterSensitiveLog\");\nvar GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetFederationTokenResponseFilterSensitiveLog\");\nvar GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetSessionTokenResponseFilterSensitiveLog\");\n\n// src/protocols/Aws_query.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleRequest(input, context),\n [_A]: _AR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleCommand\");\nvar se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithSAMLRequest(input, context),\n [_A]: _ARWSAML,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithSAMLCommand\");\nvar se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithWebIdentityRequest(input, context),\n [_A]: _ARWWI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithWebIdentityCommand\");\nvar se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DecodeAuthorizationMessageRequest(input, context),\n [_A]: _DAM,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DecodeAuthorizationMessageCommand\");\nvar se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetAccessKeyInfoRequest(input, context),\n [_A]: _GAKI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetAccessKeyInfoCommand\");\nvar se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetCallerIdentityRequest(input, context),\n [_A]: _GCI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetCallerIdentityCommand\");\nvar se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetFederationTokenRequest(input, context),\n [_A]: _GFT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetFederationTokenCommand\");\nvar se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetSessionTokenRequest(input, context),\n [_A]: _GST,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetSessionTokenCommand\");\nvar de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleCommand\");\nvar de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithSAMLCommand\");\nvar de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithWebIdentityCommand\");\nvar de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DecodeAuthorizationMessageCommand\");\nvar de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetAccessKeyInfoCommand\");\nvar de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetCallerIdentityCommand\");\nvar de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetFederationTokenCommand\");\nvar de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetSessionTokenCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"MalformedPolicyDocument\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);\n case \"PackedPolicyTooLarge\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n throw await de_RegionDisabledExceptionRes(parsedOutput, context);\n case \"IDPRejectedClaim\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);\n case \"InvalidIdentityToken\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);\n case \"IDPCommunicationError\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);\n case \"InvalidAuthorizationMessageException\":\n case \"com.amazonaws.sts#InvalidAuthorizationMessageException\":\n throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ExpiredTokenException(body.Error, context);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPCommunicationErrorException(body.Error, context);\n const exception = new IDPCommunicationErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPCommunicationErrorExceptionRes\");\nvar de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPRejectedClaimException(body.Error, context);\n const exception = new IDPRejectedClaimException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPRejectedClaimExceptionRes\");\nvar de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidAuthorizationMessageException(body.Error, context);\n const exception = new InvalidAuthorizationMessageException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidAuthorizationMessageExceptionRes\");\nvar de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidIdentityTokenException(body.Error, context);\n const exception = new InvalidIdentityTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityTokenExceptionRes\");\nvar de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_MalformedPolicyDocumentException(body.Error, context);\n const exception = new MalformedPolicyDocumentException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_MalformedPolicyDocumentExceptionRes\");\nvar de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_PackedPolicyTooLargeException(body.Error, context);\n const exception = new PackedPolicyTooLargeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_PackedPolicyTooLargeExceptionRes\");\nvar de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_RegionDisabledException(body.Error, context);\n const exception = new RegionDisabledException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_RegionDisabledExceptionRes\");\nvar se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2, _b, _c, _d;\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TTK] != null) {\n const memberEntries = se_tagKeyListType(input[_TTK], context);\n if (((_c = input[_TTK]) == null ? void 0 : _c.length) === 0) {\n entries.TransitiveTagKeys = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_EI] != null) {\n entries[_EI] = input[_EI];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_PC] != null) {\n const memberEntries = se_ProvidedContextsListType(input[_PC], context);\n if (((_d = input[_PC]) == null ? void 0 : _d.length) === 0) {\n entries.ProvidedContexts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ProvidedContexts.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_AssumeRoleRequest\");\nvar se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2;\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_PAr] != null) {\n entries[_PAr] = input[_PAr];\n }\n if (input[_SAMLA] != null) {\n entries[_SAMLA] = input[_SAMLA];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithSAMLRequest\");\nvar se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2;\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_WIT] != null) {\n entries[_WIT] = input[_WIT];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithWebIdentityRequest\");\nvar se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_EM] != null) {\n entries[_EM] = input[_EM];\n }\n return entries;\n}, \"se_DecodeAuthorizationMessageRequest\");\nvar se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_AKI] != null) {\n entries[_AKI] = input[_AKI];\n }\n return entries;\n}, \"se_GetAccessKeyInfoRequest\");\nvar se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_GetCallerIdentityRequest\");\nvar se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => {\n var _a2, _b;\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (((_a2 = input[_PA]) == null ? void 0 : _a2.length) === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (((_b = input[_T]) == null ? void 0 : _b.length) === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_GetFederationTokenRequest\");\nvar se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n return entries;\n}, \"se_GetSessionTokenRequest\");\nvar se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_PolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_policyDescriptorListType\");\nvar se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_a] != null) {\n entries[_a] = input[_a];\n }\n return entries;\n}, \"se_PolicyDescriptorType\");\nvar se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PAro] != null) {\n entries[_PAro] = input[_PAro];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ProvidedContext\");\nvar se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ProvidedContext(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ProvidedContextsListType\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_Tag\");\nvar se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_tagKeyListType\");\nvar se_tagListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_tagListType\");\nvar de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ARI] != null) {\n contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_AssumedRoleUser\");\nvar de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleResponse\");\nvar de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]);\n }\n if (output[_I] != null) {\n contents[_I] = (0, import_smithy_client.expectString)(output[_I]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_NQ] != null) {\n contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithSAMLResponse\");\nvar de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SFWIT] != null) {\n contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_Pr] != null) {\n contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithWebIdentityResponse\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_AKI] != null) {\n contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]);\n }\n if (output[_SAK] != null) {\n contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]);\n }\n if (output[_STe] != null) {\n contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]);\n }\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E]));\n }\n return contents;\n}, \"de_Credentials\");\nvar de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DM] != null) {\n contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);\n }\n return contents;\n}, \"de_DecodeAuthorizationMessageResponse\");\nvar de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_ExpiredTokenException\");\nvar de_FederatedUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_FUI] != null) {\n contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_FederatedUser\");\nvar de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n return contents;\n}, \"de_GetAccessKeyInfoResponse\");\nvar de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_UI] != null) {\n contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]);\n }\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_GetCallerIdentityResponse\");\nvar de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_FU] != null) {\n contents[_FU] = de_FederatedUser(output[_FU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n return contents;\n}, \"de_GetFederationTokenResponse\");\nvar de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n return contents;\n}, \"de_GetSessionTokenResponse\");\nvar de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPCommunicationErrorException\");\nvar de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPRejectedClaimException\");\nvar de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidAuthorizationMessageException\");\nvar de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidIdentityTokenException\");\nvar de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_MalformedPolicyDocumentException\");\nvar de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_PackedPolicyTooLargeException\");\nvar de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_RegionDisabledException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2011-06-15\";\nvar _A = \"Action\";\nvar _AKI = \"AccessKeyId\";\nvar _AR = \"AssumeRole\";\nvar _ARI = \"AssumedRoleId\";\nvar _ARU = \"AssumedRoleUser\";\nvar _ARWSAML = \"AssumeRoleWithSAML\";\nvar _ARWWI = \"AssumeRoleWithWebIdentity\";\nvar _Ac = \"Account\";\nvar _Ar = \"Arn\";\nvar _Au = \"Audience\";\nvar _C = \"Credentials\";\nvar _CA = \"ContextAssertion\";\nvar _DAM = \"DecodeAuthorizationMessage\";\nvar _DM = \"DecodedMessage\";\nvar _DS = \"DurationSeconds\";\nvar _E = \"Expiration\";\nvar _EI = \"ExternalId\";\nvar _EM = \"EncodedMessage\";\nvar _FU = \"FederatedUser\";\nvar _FUI = \"FederatedUserId\";\nvar _GAKI = \"GetAccessKeyInfo\";\nvar _GCI = \"GetCallerIdentity\";\nvar _GFT = \"GetFederationToken\";\nvar _GST = \"GetSessionToken\";\nvar _I = \"Issuer\";\nvar _K = \"Key\";\nvar _N = \"Name\";\nvar _NQ = \"NameQualifier\";\nvar _P = \"Policy\";\nvar _PA = \"PolicyArns\";\nvar _PAr = \"PrincipalArn\";\nvar _PAro = \"ProviderArn\";\nvar _PC = \"ProvidedContexts\";\nvar _PI = \"ProviderId\";\nvar _PPS = \"PackedPolicySize\";\nvar _Pr = \"Provider\";\nvar _RA = \"RoleArn\";\nvar _RSN = \"RoleSessionName\";\nvar _S = \"Subject\";\nvar _SAK = \"SecretAccessKey\";\nvar _SAMLA = \"SAMLAssertion\";\nvar _SFWIT = \"SubjectFromWebIdentityToken\";\nvar _SI = \"SourceIdentity\";\nvar _SN = \"SerialNumber\";\nvar _ST = \"SubjectType\";\nvar _STe = \"SessionToken\";\nvar _T = \"Tags\";\nvar _TC = \"TokenCode\";\nvar _TTK = \"TransitiveTagKeys\";\nvar _UI = \"UserId\";\nvar _V = \"Version\";\nvar _Va = \"Value\";\nvar _WIT = \"WebIdentityToken\";\nvar _a = \"arn\";\nvar _m = \"message\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n var _a2;\n if (((_a2 = data.Error) == null ? void 0 : _a2.Code) !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/commands/AssumeRoleCommand.ts\nvar _AssumeRoleCommand = class _AssumeRoleCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {}).n(\"STSClient\", \"AssumeRoleCommand\").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {\n};\n__name(_AssumeRoleCommand, \"AssumeRoleCommand\");\nvar AssumeRoleCommand = _AssumeRoleCommand;\n\n// src/commands/AssumeRoleWithSAMLCommand.ts\n\n\n\n\nvar import_EndpointParameters2 = require(\"./endpoint/EndpointParameters\");\nvar _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters2.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithSAML\", {}).n(\"STSClient\", \"AssumeRoleWithSAMLCommand\").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() {\n};\n__name(_AssumeRoleWithSAMLCommand, \"AssumeRoleWithSAMLCommand\");\nvar AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand;\n\n// src/commands/AssumeRoleWithWebIdentityCommand.ts\n\n\n\n\nvar import_EndpointParameters3 = require(\"./endpoint/EndpointParameters\");\nvar _AssumeRoleWithWebIdentityCommand = class _AssumeRoleWithWebIdentityCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters3.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {}).n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {\n};\n__name(_AssumeRoleWithWebIdentityCommand, \"AssumeRoleWithWebIdentityCommand\");\nvar AssumeRoleWithWebIdentityCommand = _AssumeRoleWithWebIdentityCommand;\n\n// src/commands/DecodeAuthorizationMessageCommand.ts\n\n\n\n\nvar import_EndpointParameters4 = require(\"./endpoint/EndpointParameters\");\nvar _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters4.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"DecodeAuthorizationMessage\", {}).n(\"STSClient\", \"DecodeAuthorizationMessageCommand\").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() {\n};\n__name(_DecodeAuthorizationMessageCommand, \"DecodeAuthorizationMessageCommand\");\nvar DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand;\n\n// src/commands/GetAccessKeyInfoCommand.ts\n\n\n\n\nvar import_EndpointParameters5 = require(\"./endpoint/EndpointParameters\");\nvar _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters5.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetAccessKeyInfo\", {}).n(\"STSClient\", \"GetAccessKeyInfoCommand\").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() {\n};\n__name(_GetAccessKeyInfoCommand, \"GetAccessKeyInfoCommand\");\nvar GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand;\n\n// src/commands/GetCallerIdentityCommand.ts\n\n\n\n\nvar import_EndpointParameters6 = require(\"./endpoint/EndpointParameters\");\nvar _GetCallerIdentityCommand = class _GetCallerIdentityCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters6.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetCallerIdentity\", {}).n(\"STSClient\", \"GetCallerIdentityCommand\").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() {\n};\n__name(_GetCallerIdentityCommand, \"GetCallerIdentityCommand\");\nvar GetCallerIdentityCommand = _GetCallerIdentityCommand;\n\n// src/commands/GetFederationTokenCommand.ts\n\n\n\n\nvar import_EndpointParameters7 = require(\"./endpoint/EndpointParameters\");\nvar _GetFederationTokenCommand = class _GetFederationTokenCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters7.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetFederationToken\", {}).n(\"STSClient\", \"GetFederationTokenCommand\").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() {\n};\n__name(_GetFederationTokenCommand, \"GetFederationTokenCommand\");\nvar GetFederationTokenCommand = _GetFederationTokenCommand;\n\n// src/commands/GetSessionTokenCommand.ts\n\n\n\n\nvar import_EndpointParameters8 = require(\"./endpoint/EndpointParameters\");\nvar _GetSessionTokenCommand = class _GetSessionTokenCommand extends import_smithy_client.Command.classBuilder().ep({\n ...import_EndpointParameters8.commonParams\n}).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetSessionToken\", {}).n(\"STSClient\", \"GetSessionTokenCommand\").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() {\n};\n__name(_GetSessionTokenCommand, \"GetSessionTokenCommand\");\nvar GetSessionTokenCommand = _GetSessionTokenCommand;\n\n// src/STS.ts\nvar import_STSClient = require(\"././STSClient\");\nvar commands = {\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand\n};\nvar _STS = class _STS extends import_STSClient.STSClient {\n};\n__name(_STS, \"STS\");\nvar STS = _STS;\n(0, import_smithy_client.createAggregatedClient)(commands, STS);\n\n// src/index.ts\nvar import_EndpointParameters9 = require(\"./endpoint/EndpointParameters\");\nvar import_runtimeExtensions = require(\"././runtimeExtensions\");\n\n// src/defaultStsRoleAssumers.ts\nvar ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nvar resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {\n var _a2;\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n (_a2 = credentialProviderLogger == null ? void 0 : credentialProviderLogger.debug) == null ? void 0 : _a2.call(\n credentialProviderLogger,\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${parentRegion} (parent client)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;\n}, \"resolveRegion\");\nvar getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n var _a2, _b, _c;\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const {\n logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger,\n region,\n requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region,\n credentialProviderLogger\n );\n stsClient = new stsClientCtor({\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: () => async () => closureSourceCreds,\n region: resolvedRegion,\n requestHandler,\n logger\n });\n }\n const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n return {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n credentialScope: Credentials2.CredentialScope\n };\n };\n}, \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, stsClientCtor) => {\n let stsClient;\n return async (params) => {\n var _a2, _b, _c;\n if (!stsClient) {\n const {\n logger = (_a2 = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _a2.logger,\n region,\n requestHandler = (_b = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _b.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n (_c = stsOptions == null ? void 0 : stsOptions.parentClientConfig) == null ? void 0 : _c.region,\n credentialProviderLogger\n );\n stsClient = new stsClientCtor({\n region: resolvedRegion,\n requestHandler,\n logger\n });\n }\n const { Credentials: Credentials2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n return {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n credentialScope: Credentials2.CredentialScope\n };\n };\n}, \"getDefaultRoleAssumerWithWebIdentity\");\n\n// src/defaultRoleAssumers.ts\nvar import_STSClient2 = require(\"././STSClient\");\nvar getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {\n var _a2;\n if (!customizations)\n return baseCtor;\n else\n return _a2 = class extends baseCtor {\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n }, __name(_a2, \"CustomizableSTSClient\"), _a2;\n}, \"getCustomizableStsClientCtor\");\nvar getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumerWithWebIdentity\");\nvar decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer2(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),\n ...input\n}), \"decorateDefaultCredentialProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n STSServiceException,\n __Client,\n STSClient,\n STS,\n $Command,\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand,\n ExpiredTokenException,\n MalformedPolicyDocumentException,\n PackedPolicyTooLargeException,\n RegionDisabledException,\n IDPRejectedClaimException,\n InvalidIdentityTokenException,\n IDPCommunicationErrorException,\n InvalidAuthorizationMessageException,\n CredentialsFilterSensitiveLog,\n AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenResponseFilterSensitiveLog,\n getDefaultRoleAssumer,\n getDefaultRoleAssumerWithWebIdentity,\n decorateDefaultCredentialProvider\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst credentialDefaultProvider_1 = require(\"./credentialDefaultProvider\");\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_2 = require(\"@smithy/core\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") ||\n (async (idProps) => await (0, credentialDefaultProvider_1.defaultProvider)(idProps?.__config || {})()),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),\n region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"STS\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRuntimeExtensions = void 0;\nconst region_config_resolver_1 = require(\"@aws-sdk/region-config-resolver\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst httpAuthExtensionConfiguration_1 = require(\"./auth/httpAuthExtensionConfiguration\");\nconst asPartial = (t) => t;\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = {\n ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),\n ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)),\n };\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return {\n ...runtimeConfig,\n ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),\n ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration),\n };\n};\nexports.resolveRuntimeExtensions = resolveRuntimeExtensions;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,\n AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,\n _toBool: () => _toBool,\n _toNum: () => _toNum,\n _toStr: () => _toStr,\n awsExpectUnion: () => awsExpectUnion,\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n loadRestJsonErrorCode: () => loadRestJsonErrorCode,\n loadRestXmlErrorCode: () => loadRestXmlErrorCode,\n parseJsonBody: () => parseJsonBody,\n parseJsonErrorBody: () => parseJsonErrorBody,\n parseXmlBody: () => parseXmlBody,\n parseXmlErrorBody: () => parseXmlErrorBody,\n resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,\n resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/client/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n process.emitWarning(\n `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 14.x on May 1, 2024.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to an active Node.js LTS version.\n\nMore information can be found at: https://a.co/dzr2AJd`\n );\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\n\n\n// src/httpAuthSchemes/utils/getDateHeader.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar getDateHeader = /* @__PURE__ */ __name((response) => {\n var _a, _b;\n return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? void 0 : _a.date) ?? ((_b = response.headers) == null ? void 0 : _b.Date) : void 0;\n}, \"getDateHeader\");\n\n// src/httpAuthSchemes/utils/getSkewCorrectedDate.ts\nvar getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), \"getSkewCorrectedDate\");\n\n// src/httpAuthSchemes/utils/isClockSkewed.ts\nvar isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, \"isClockSkewed\");\n\n// src/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts\nvar getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n}, \"getUpdatedSystemClockOffset\");\n\n// src/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\nvar throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n}, \"throwSigningPropertyError\");\nvar validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => {\n var _a, _b, _c;\n const context = throwSigningPropertyError(\n \"context\",\n signingProperties.context\n );\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? void 0 : _a.properties) == null ? void 0 : _b.authSchemes) == null ? void 0 : _c[0];\n const signerFunction = throwSigningPropertyError(\n \"signer\",\n config.signer\n );\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties == null ? void 0 : signingProperties.signingRegion;\n const signingName = signingProperties == null ? void 0 : signingProperties.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingName\n };\n}, \"validateSigningProperties\");\nvar _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer {\n async sign(httpRequest, identity, signingProperties) {\n if (!import_protocol_http.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion,\n signingService: signingName\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n};\n__name(_AwsSdkSigV4Signer, \"AwsSdkSigV4Signer\");\nvar AwsSdkSigV4Signer = _AwsSdkSigV4Signer;\nvar AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n\n// src/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts\nvar import_core = require(\"@smithy/core\");\nvar import_signature_v4 = require(\"@smithy/signature-v4\");\nvar resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {\n let normalizedCreds;\n if (config.credentials) {\n normalizedCreds = (0, import_core.memoizeIdentityProvider)(config.credentials, import_core.isIdentityExpired, import_core.doesIdentityRequireRefresh);\n }\n if (!normalizedCreds) {\n if (config.credentialDefaultProvider) {\n normalizedCreds = (0, import_core.normalizeProvider)(\n config.credentialDefaultProvider(\n Object.assign({}, config, {\n parentClientConfig: config\n })\n )\n );\n } else {\n normalizedCreds = /* @__PURE__ */ __name(async () => {\n throw new Error(\"`credentials` is missing\");\n }, \"normalizedCreds\");\n }\n }\n const {\n // Default for signingEscapePath\n signingEscapePath = true,\n // Default for systemClockOffset\n systemClockOffset = config.systemClockOffset || 0,\n // No default for sha256 since it is platform dependent\n sha256\n } = config;\n let signer;\n if (config.signer) {\n signer = (0, import_core.normalizeProvider)(config.signer);\n } else if (config.regionInfoProvider) {\n signer = /* @__PURE__ */ __name(() => (0, import_core.normalizeProvider)(config.region)().then(\n async (region) => [\n await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint()\n }) || {},\n region\n ]\n ).then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: normalizedCreds,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }), \"signer\");\n } else {\n signer = /* @__PURE__ */ __name(async (authScheme) => {\n authScheme = Object.assign(\n {},\n {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await (0, import_core.normalizeProvider)(config.region)(),\n properties: {}\n },\n authScheme\n );\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: normalizedCreds,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }, \"signer\");\n }\n return {\n ...config,\n systemClockOffset,\n signingEscapePath,\n credentials: normalizedCreds,\n signer\n };\n}, \"resolveAwsSdkSigV4Config\");\nvar resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\n\n// src/protocols/coercing-serializers.ts\nvar _toStr = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n}, \"_toStr\");\nvar _toBool = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n}, \"_toBool\");\nvar _toNum = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n}, \"_toNum\");\n\n// src/protocols/json/awsExpectUnion.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar awsExpectUnion = /* @__PURE__ */ __name((value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return (0, import_smithy_client.expectUnion)(value);\n}, \"awsExpectUnion\");\n\n// src/protocols/common.ts\n\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\n\n// src/protocols/json/parseJsonBody.ts\nvar parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n } catch (e) {\n if ((e == null ? void 0 : e.name) === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded\n });\n }\n throw e;\n }\n }\n return {};\n}), \"parseJsonBody\");\nvar parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n}, \"parseJsonErrorBody\");\nvar loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {\n const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), \"findKey\");\n const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n }, \"sanitizeErrorCode\");\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== void 0) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data.code !== void 0) {\n return sanitizeErrorCode(data.code);\n }\n if (data[\"__type\"] !== void 0) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n}, \"loadRestJsonErrorCode\");\n\n// src/protocols/xml/parseXmlBody.ts\n\nvar import_fast_xml_parser = require(\"fast-xml-parser\");\nvar parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n const parser = new import_fast_xml_parser.XMLParser({\n attributeNamePrefix: \"\",\n htmlEntities: true,\n ignoreAttributes: false,\n ignoreDeclaration: true,\n parseTagValue: false,\n trimValues: false,\n tagValueProcessor: (_, val) => val.trim() === \"\" && val.includes(\"\\n\") ? \"\" : void 0\n });\n parser.addEntity(\"#xD\", \"\\r\");\n parser.addEntity(\"#10\", \"\\n\");\n let parsedObj;\n try {\n parsedObj = parser.parse(encoded);\n } catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn);\n }\n return {};\n}), \"parseXmlBody\");\nvar parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n}, \"parseXmlErrorBody\");\nvar loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => {\n var _a;\n if (((_a = data == null ? void 0 : data.Error) == null ? void 0 : _a.Code) !== void 0) {\n return data.Error.Code;\n }\n if ((data == null ? void 0 : data.Code) !== void 0) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadRestXmlErrorCode\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n emitWarningIfUnsupportedVersion,\n AwsSdkSigV4Signer,\n AWSSDKSigV4Signer,\n resolveAwsSdkSigV4Config,\n resolveAWSSDKSigV4Config,\n _toStr,\n _toBool,\n _toNum,\n awsExpectUnion,\n parseJsonBody,\n parseJsonErrorBody,\n loadRestJsonErrorCode,\n parseXmlBody,\n parseXmlErrorBody,\n loadRestXmlErrorCode\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,\n ENV_EXPIRATION: () => ENV_EXPIRATION,\n ENV_KEY: () => ENV_KEY,\n ENV_SECRET: () => ENV_SECRET,\n ENV_SESSION: () => ENV_SESSION,\n fromEnv: () => fromEnv\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromEnv.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nvar ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nvar ENV_SESSION = \"AWS_SESSION_TOKEN\";\nvar ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nvar ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nvar fromEnv = /* @__PURE__ */ __name((init) => async () => {\n var _a;\n (_a = init == null ? void 0 : init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-env\", \"fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n if (accessKeyId && secretAccessKey) {\n return {\n accessKeyId,\n secretAccessKey,\n ...sessionToken && { sessionToken },\n ...expiry && { expiration: new Date(expiry) },\n ...credentialScope && { credentialScope }\n };\n }\n throw new import_property_provider.CredentialsProviderError(\"Unable to find environment variable credentials.\");\n}, \"fromEnv\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_KEY,\n ENV_SECRET,\n ENV_SESSION,\n ENV_EXPIRATION,\n ENV_CREDENTIAL_SCOPE,\n fromEnv\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkUrl = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nconst checkUrl = (url) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`);\n};\nexports.checkUrl = checkUrl;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nconst tslib_1 = require(\"tslib\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst promises_1 = tslib_1.__importDefault(require(\"fs/promises\"));\nconst checkUrl_1 = require(\"./checkUrl\");\nconst requestHelpers_1 = require(\"./requestHelpers\");\nconst retry_wrapper_1 = require(\"./retry-wrapper\");\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nconst fromHttp = (options) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug(\"@aws-sdk/credential-provider-http\", \"fromHttp\");\n let host;\n const relative = (_b = options.awsContainerCredentialsRelativeUri) !== null && _b !== void 0 ? _b : process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = (_c = options.awsContainerCredentialsFullUri) !== null && _c !== void 0 ? _c : process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = (_d = options.awsContainerAuthorizationToken) !== null && _d !== void 0 ? _d : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = (_e = options.awsContainerAuthorizationTokenFile) !== null && _e !== void 0 ? _e : process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n if (relative && full) {\n console.warn(\"AWS SDK HTTP credentials provider:\", \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n console.warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n console.warn(\"AWS SDK HTTP credentials provider:\", \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n console.warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`);\n }\n const url = new URL(host);\n (0, checkUrl_1.checkUrl)(url);\n const requestHandler = new node_http_handler_1.NodeHttpHandler({\n requestTimeout: (_f = options.timeout) !== null && _f !== void 0 ? _f : 1000,\n connectionTimeout: (_g = options.timeout) !== null && _g !== void 0 ? _g : 1000,\n });\n return (0, retry_wrapper_1.retryWrapper)(async () => {\n const request = (0, requestHelpers_1.createGetRequest)(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request);\n return (0, requestHelpers_1.getCredentials)(result.response);\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(String(e));\n }\n }, (_h = options.maxRetries) !== null && _h !== void 0 ? _h : 3, (_j = options.timeout) !== null && _j !== void 0 ? _j : 1000);\n};\nexports.fromHttp = fromHttp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCredentials = exports.createGetRequest = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_stream_1 = require(\"@smithy/util-stream\");\nfunction createGetRequest(url) {\n return new protocol_http_1.HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nexports.createGetRequest = createGetRequest;\nasync function getCredentials(response) {\n var _a, _b;\n const contentType = (_b = (_a = response === null || response === void 0 ? void 0 : response.headers[\"content-type\"]) !== null && _a !== void 0 ? _a : response === null || response === void 0 ? void 0 : response.headers[\"Content-Type\"]) !== null && _b !== void 0 ? _b : \"\";\n if (!contentType.includes(\"json\")) {\n console.warn(\"HTTP credential provider response header content-type was not application/json. Observed: \" + contentType + \".\");\n }\n const stream = (0, util_stream_1.sdkStreamMixin)(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new property_provider_1.CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\");\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`);\n}\nexports.getCredentials = getCredentials;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryWrapper = void 0;\nconst retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\nexports.retryWrapper = retryWrapper;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nvar fromHttp_1 = require(\"./fromHttp/fromHttp\");\nObject.defineProperty(exports, \"fromHttp\", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } });\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSts.ts\nvar loadSts_exports = {};\n__export(loadSts_exports, {\n getDefaultRoleAssumer: () => import_client_sts.getDefaultRoleAssumer\n});\nvar import_client_sts;\nvar init_loadSts = __esm({\n \"src/loadSts.ts\"() {\n import_client_sts = require(\"@aws-sdk/client-sts\");\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromIni: () => fromIni\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromIni.ts\n\n\n// src/resolveProfileData.ts\n\n\n// src/resolveAssumeRoleCredentials.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveCredentialSource.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName) => {\n const sourceProvidersMap = {\n EcsContainer: (options) => Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\"))).then(({ fromContainerMetadata }) => fromContainerMetadata(options)),\n Ec2InstanceMetadata: (options) => Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\"))).then(({ fromInstanceMetadata }) => fromInstanceMetadata(options)),\n Environment: (options) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-env\"))).then(({ fromEnv }) => fromEnv(options))\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n } else {\n throw new import_property_provider.CredentialsProviderError(\n `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`\n );\n }\n}, \"resolveCredentialSource\");\n\n// src/resolveAssumeRoleCredentials.ts\nvar isAssumeRoleProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), \"isAssumeRoleProfile\");\nvar isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg) => typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\", \"isAssumeRoleWithSourceProfile\");\nvar isAssumeRoleWithProviderProfile = /* @__PURE__ */ __name((arg) => typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\", \"isAssumeRoleWithProviderProfile\");\nvar resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {\n var _a;\n (_a = options.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-ini\", \"resolveAssumeRoleCredentials (STS)\");\n const data = profiles[profileName];\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer: getDefaultRoleAssumer2 } = await Promise.resolve().then(() => (init_loadSts(), loadSts_exports));\n options.roleAssumer = getDefaultRoleAssumer2(\n {\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: options == null ? void 0 : options.parentClientConfig\n },\n options.clientPlugins\n );\n }\n const { source_profile } = data;\n if (source_profile && source_profile in visitedProfiles) {\n throw new import_property_provider.CredentialsProviderError(\n `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(\", \"),\n false\n );\n }\n const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {\n ...visitedProfiles,\n [source_profile]: true\n }) : (await resolveCredentialSource(data.credential_source, profileName)(options))();\n const params = {\n RoleArn: data.role_arn,\n RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: data.external_id,\n DurationSeconds: parseInt(data.duration_seconds || \"3600\", 10)\n };\n const { mfa_serial } = data;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,\n false\n );\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params);\n}, \"resolveAssumeRoleCredentials\");\n\n// src/resolveProcessCredentials.ts\nvar isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\", \"isProcessProfile\");\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\"))).then(\n ({ fromProcess }) => fromProcess({\n ...options,\n profile\n })()\n), \"resolveProcessCredentials\");\n\n// src/resolveSsoCredentials.ts\nvar resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, options = {}) => {\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO({\n profile,\n logger: options.logger\n })();\n}, \"resolveSsoCredentials\");\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveStaticCredentials.ts\nvar isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.aws_access_key_id === \"string\" && typeof arg.aws_secret_access_key === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1, \"isStaticCredsProfile\");\nvar resolveStaticCredentials = /* @__PURE__ */ __name((profile, options) => {\n var _a;\n (_a = options == null ? void 0 : options.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-ini\", \"resolveStaticCredentials\");\n return Promise.resolve({\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n credentialScope: profile.aws_credential_scope\n });\n}, \"resolveStaticCredentials\");\n\n// src/resolveWebIdentityCredentials.ts\nvar isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.web_identity_token_file === \"string\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1, \"isWebIdentityProfile\");\nvar resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\"))).then(\n ({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig\n })()\n), \"resolveWebIdentityCredentials\");\n\n// src/resolveProfileData.ts\nvar resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleProfile(data)) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, options);\n }\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);\n}, \"resolveProfileData\");\n\n// src/fromIni.ts\nvar fromIni = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-ini\", \"fromIni\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init);\n}, \"fromIni\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromIni\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,\n credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,\n defaultProvider: () => defaultProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/defaultProvider.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/remoteProvider.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar remoteProvider = /* @__PURE__ */ __name(async (init) => {\n var _a, _b;\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-http\")));\n return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED]) {\n return async () => {\n throw new import_property_provider.CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\");\n };\n }\n (_b = init.logger) == null ? void 0 : _b.debug(\"@aws-sdk/credential-provider-node\", \"remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n}, \"remoteProvider\");\n\n// src/defaultProvider.ts\nvar defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n ...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromEnv\");\n const { fromEnv } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-env\")));\n return fromEnv(init)();\n }\n ],\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new import_property_provider.CredentialsProviderError(\n \"Skipping SSO provider in default chain (inputs do not include SSO fields).\"\n );\n }\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromIni\");\n const { fromIni } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-ini\")));\n return fromIni(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromProcess\");\n const { fromProcess } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\")));\n return fromProcess(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\")));\n return fromTokenFile(init)();\n },\n async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-node\", \"defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new import_property_provider.CredentialsProviderError(\"Could not load credentials from any providers\", false);\n }\n ),\n credentialsTreatedAsExpired,\n credentialsWillNeedRefresh\n), \"defaultProvider\");\nvar credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0, \"credentialsWillNeedRefresh\");\nvar credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => (credentials == null ? void 0 : credentials.expiration) !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, \"credentialsTreatedAsExpired\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n defaultProvider,\n credentialsWillNeedRefresh,\n credentialsTreatedAsExpired\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromProcess: () => fromProcess\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromProcess.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveProcessCredentials.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_child_process = require(\"child_process\");\nvar import_util = require(\"util\");\n\n// src/getValidatedProcessCredentials.ts\nvar getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = /* @__PURE__ */ new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n return {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...data.SessionToken && { sessionToken: data.SessionToken },\n ...data.Expiration && { expiration: new Date(data.Expiration) },\n ...data.CredentialScope && { credentialScope: data.CredentialScope }\n };\n}, \"getValidatedProcessCredentials\");\n\n// src/resolveProcessCredentials.ts\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== void 0) {\n const execPromise = (0, import_util.promisify)(import_child_process.exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n } catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data);\n } catch (error) {\n throw new import_property_provider.CredentialsProviderError(error.message);\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);\n }\n}, \"resolveProcessCredentials\");\n\n// src/fromProcess.ts\nvar fromProcess = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-process\", \"fromProcess\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles);\n}, \"fromProcess\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromProcess\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSso.ts\nvar loadSso_exports = {};\n__export(loadSso_exports, {\n GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,\n SSOClient: () => import_client_sso.SSOClient\n});\nvar import_client_sso;\nvar init_loadSso = __esm({\n \"src/loadSso.ts\"() {\n import_client_sso = require(\"@aws-sdk/client-sso\");\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromSSO: () => fromSSO,\n isSsoProfile: () => isSsoProfile,\n validateSsoProfile: () => validateSsoProfile\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromSSO.ts\n\n\n\n// src/isSsoProfile.ts\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveSSOCredentials.ts\nvar import_token_providers = require(\"@aws-sdk/token-providers\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nvar resolveSSOCredentials = /* @__PURE__ */ __name(async ({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig,\n profile\n}) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await (0, import_token_providers.fromSso)({ profile })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString()\n };\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n } else {\n try {\n token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n `The SSO session associated with this profile is invalid. ${refreshMessage}`,\n SHOULD_FAIL_CREDENTIAL_CHAIN\n );\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new import_property_provider.CredentialsProviderError(\n `The SSO session associated with this profile has expired. ${refreshMessage}`,\n SHOULD_FAIL_CREDENTIAL_CHAIN\n );\n }\n const { accessToken } = token;\n const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));\n const sso = ssoClient || new SSOClient2(\n Object.assign({}, clientConfig ?? {}, {\n region: (clientConfig == null ? void 0 : clientConfig.region) ?? ssoRegion\n })\n );\n let ssoResp;\n try {\n ssoResp = await sso.send(\n new GetRoleCredentialsCommand2({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken\n })\n );\n } catch (e) {\n throw import_property_provider.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope } = {} } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new import_property_provider.CredentialsProviderError(\"SSO returns an invalid temporary credential.\", SHOULD_FAIL_CREDENTIAL_CHAIN);\n }\n return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope };\n}, \"resolveSSOCredentials\");\n\n// src/validateSsoProfile.ts\n\nvar validateSsoProfile = /* @__PURE__ */ __name((profile) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", \"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\n \", \"\n )}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,\n false\n );\n }\n return profile;\n}, \"validateSsoProfile\");\n\n// src/fromSSO.ts\nvar fromSSO = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/credential-provider-sso\", \"fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`);\n }\n if (!isSsoProfile(profile)) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);\n }\n if (profile == null ? void 0 : profile.sso_session) {\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false);\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false);\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient,\n clientConfig: init.clientConfig,\n profile: profileName\n });\n } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new import_property_provider.CredentialsProviderError(\n 'Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"'\n );\n } else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n profile: profileName\n });\n }\n}, \"fromSSO\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromSSO,\n isSsoProfile,\n validateSsoProfile\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst fs_1 = require(\"fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async () => {\n var _a, _b, _c, _d;\n (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug(\"@aws-sdk/credential-provider-web-identity\", \"fromTokenFile\");\n const webIdentityTokenFile = (_b = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _b !== void 0 ? _b : process.env[ENV_TOKEN_FILE];\n const roleArn = (_c = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _c !== void 0 ? _c : process.env[ENV_ROLE_ARN];\n const roleSessionName = (_d = init === null || init === void 0 ? void 0 : init.roleSessionName) !== null && _d !== void 0 ? _d : process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new property_provider_1.CredentialsProviderError(\"Web identity configuration not specified\");\n }\n return (0, fromWebToken_1.fromWebToken)({\n ...init,\n webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n};\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst fromWebToken = (init) => async () => {\n var _a;\n (_a = init.logger) === null || _a === void 0 ? void 0 : _a.debug(\"@aws-sdk/credential-provider-web-identity\", \"fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require(\"./loadSts\")));\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: init.parentClientConfig,\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName !== null && roleSessionName !== void 0 ? roleSessionName : `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromTokenFile\"), module.exports);\n__reExport(src_exports, require(\"././fromWebToken\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromTokenFile,\n fromWebToken\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDefaultRoleAssumerWithWebIdentity = void 0;\nconst client_sts_1 = require(\"@aws-sdk/client-sts\");\nObject.defineProperty(exports, \"getDefaultRoleAssumerWithWebIdentity\", { enumerable: true, get: function () { return client_sts_1.getDefaultRoleAssumerWithWebIdentity; } });\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getHostHeaderPlugin: () => getHostHeaderPlugin,\n hostHeaderMiddleware: () => hostHeaderMiddleware,\n hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,\n resolveHostHeaderConfig: () => resolveHostHeaderConfig\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nfunction resolveHostHeaderConfig(input) {\n return input;\n}\n__name(resolveHostHeaderConfig, \"resolveHostHeaderConfig\");\nvar hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request))\n return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n } else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null)\n host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n}, \"hostHeaderMiddleware\");\nvar hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true\n};\nvar getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n }\n}), \"getHostHeaderPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveHostHeaderConfig,\n hostHeaderMiddleware,\n hostHeaderMiddlewareOptions,\n getHostHeaderPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getLoggerPlugin: () => getLoggerPlugin,\n loggerMiddleware: () => loggerMiddleware,\n loggerMiddlewareOptions: () => loggerMiddlewareOptions\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/loggerMiddleware.ts\nvar loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {\n var _a, _b;\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n (_a = logger == null ? void 0 : logger.info) == null ? void 0 : _a.call(logger, {\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata\n });\n return response;\n } catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n (_b = logger == null ? void 0 : logger.error) == null ? void 0 : _b.call(logger, {\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata\n });\n throw error;\n }\n}, \"loggerMiddleware\");\nvar loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true\n};\nvar getLoggerPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n }\n}), \"getLoggerPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loggerMiddleware,\n loggerMiddlewareOptions,\n getLoggerPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin: () => getRecursionDetectionPlugin,\n recursionDetectionMiddleware: () => recursionDetectionMiddleware\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar TRACE_ID_HEADER_NAME = \"X-Amzn-Trace-Id\";\nvar ENV_LAMBDA_FUNCTION_NAME = \"AWS_LAMBDA_FUNCTION_NAME\";\nvar ENV_TRACE_ID = \"_X_AMZN_TRACE_ID\";\nvar recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== \"node\" || request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) {\n return next(args);\n }\n const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];\n const traceId = process.env[ENV_TRACE_ID];\n const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === \"string\" && str.length > 0, \"nonEmptyString\");\n if (nonEmptyString(functionName) && nonEmptyString(traceId)) {\n request.headers[TRACE_ID_HEADER_NAME] = traceId;\n }\n return next({\n ...args,\n request\n });\n}, \"recursionDetectionMiddleware\");\nvar addRecursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\"\n};\nvar getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);\n }\n}), \"getRecursionDetectionPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n recursionDetectionMiddleware,\n addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,\n getUserAgentPlugin: () => getUserAgentPlugin,\n resolveUserAgentConfig: () => resolveUserAgentConfig,\n userAgentMiddleware: () => userAgentMiddleware\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/configurations.ts\nfunction resolveUserAgentConfig(input) {\n return {\n ...input,\n customUserAgent: typeof input.customUserAgent === \"string\" ? [[input.customUserAgent]] : input.customUserAgent\n };\n}\n__name(resolveUserAgentConfig, \"resolveUserAgentConfig\");\n\n// src/user-agent-middleware.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n// src/constants.ts\nvar USER_AGENT = \"user-agent\";\nvar X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nvar SPACE = \" \";\nvar UA_NAME_SEPARATOR = \"/\";\nvar UA_NAME_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;\nvar UA_VALUE_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w\\#]/g;\nvar UA_ESCAPE_CHAR = \"-\";\n\n// src/user-agent-middleware.ts\nvar userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n var _a, _b;\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request))\n return next(args);\n const { headers } = request;\n const userAgent = ((_a = context == null ? void 0 : context.userAgent) == null ? void 0 : _a.map(escapeUserAgent)) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n const customUserAgent = ((_b = options == null ? void 0 : options.customUserAgent) == null ? void 0 : _b.map(escapeUserAgent)) || [];\n const prefix = (0, import_util_endpoints.getUserAgentPrefix)();\n const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n } else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request\n });\n}, \"userAgentMiddleware\");\nvar escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => {\n var _a;\n const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);\n const version = (_a = userAgentPair[1]) == null ? void 0 : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n}, \"escapeUserAgent\");\nvar getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true\n};\nvar getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: (clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n }\n}), \"getUserAgentPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveUserAgentConfig,\n userAgentMiddleware,\n getUserAgentMiddlewareOptions,\n getUserAgentPlugin\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/index.ts\nvar getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let runtimeConfigRegion = /* @__PURE__ */ __name(async () => {\n if (runtimeConfig.region === void 0) {\n throw new Error(\"Region is missing from runtimeConfig\");\n }\n const region = runtimeConfig.region;\n if (typeof region === \"string\") {\n return region;\n }\n return region();\n }, \"runtimeConfigRegion\");\n return {\n setRegion(region) {\n runtimeConfigRegion = region;\n },\n region() {\n return runtimeConfigRegion;\n }\n };\n}, \"getAwsRegionExtensionConfiguration\");\nvar resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region()\n };\n}, \"resolveAwsRegionExtensionConfiguration\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n }\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return {\n ...input,\n region: async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }\n };\n}, \"resolveRegionConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSsoOidc.ts\nvar loadSsoOidc_exports = {};\n__export(loadSsoOidc_exports, {\n CreateTokenCommand: () => import_client_sso_oidc.CreateTokenCommand,\n SSOOIDCClient: () => import_client_sso_oidc.SSOOIDCClient\n});\nvar import_client_sso_oidc;\nvar init_loadSsoOidc = __esm({\n \"src/loadSsoOidc.ts\"() {\n import_client_sso_oidc = require(\"@aws-sdk/client-sso-oidc\");\n }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromSso: () => fromSso,\n fromStatic: () => fromStatic,\n nodeProvider: () => nodeProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromSso.ts\n\n\n\n// src/constants.ts\nvar EXPIRE_WINDOW_MS = 5 * 60 * 1e3;\nvar REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n\n// src/getSsoOidcClient.ts\nvar ssoOidcClientsHash = {};\nvar getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion) => {\n const { SSOOIDCClient: SSOOIDCClient2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports));\n if (ssoOidcClientsHash[ssoRegion]) {\n return ssoOidcClientsHash[ssoRegion];\n }\n const ssoOidcClient = new SSOOIDCClient2({ region: ssoRegion });\n ssoOidcClientsHash[ssoRegion] = ssoOidcClient;\n return ssoOidcClient;\n}, \"getSsoOidcClient\");\n\n// src/getNewSsoOidcToken.ts\nvar getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion) => {\n const { CreateTokenCommand: CreateTokenCommand2 } = await Promise.resolve().then(() => (init_loadSsoOidc(), loadSsoOidc_exports));\n const ssoOidcClient = await getSsoOidcClient(ssoRegion);\n return ssoOidcClient.send(\n new CreateTokenCommand2({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\"\n })\n );\n}, \"getNewSsoOidcToken\");\n\n// src/validateTokenExpiry.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar validateTokenExpiry = /* @__PURE__ */ __name((token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n}, \"validateTokenExpiry\");\n\n// src/validateTokenKey.ts\n\nvar validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new import_property_provider.TokenProviderError(\n `Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`,\n false\n );\n }\n}, \"validateTokenKey\");\n\n// src/writeSSOTokenToFile.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar import_fs = require(\"fs\");\nvar { writeFile } = import_fs.promises;\nvar writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {\n const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n}, \"writeSSOTokenToFile\");\n\n// src/fromSso.ts\nvar lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);\nvar fromSso = /* @__PURE__ */ __name((init = {}) => async () => {\n var _a;\n (_a = init.logger) == null ? void 0 : _a.debug(\"@aws-sdk/token-providers\", \"fromSso\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n } else if (!profile[\"sso_session\"]) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' could not be found in shared credentials file.`,\n false\n );\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,\n false\n );\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);\n } catch (e) {\n throw new import_property_provider.TokenProviderError(\n `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,\n false\n );\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken\n });\n } catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration\n };\n } catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n}, \"fromSso\");\n\n// src/fromStatic.ts\n\nvar fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {\n logger == null ? void 0 : logger.debug(\"@aws-sdk/token-providers\", \"fromStatic\");\n if (!token || !token.token) {\n throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);\n }\n return token;\n}, \"fromStatic\");\n\n// src/nodeProvider.ts\n\nvar nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(fromSso(init), async () => {\n throw new import_property_provider.TokenProviderError(\"Could not load token from any providers\", false);\n }),\n (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,\n (token) => token.expiration !== void 0\n), \"nodeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromSso,\n fromStatic,\n nodeProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ConditionObject: () => import_util_endpoints.ConditionObject,\n DeprecatedObject: () => import_util_endpoints.DeprecatedObject,\n EndpointError: () => import_util_endpoints.EndpointError,\n EndpointObject: () => import_util_endpoints.EndpointObject,\n EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,\n EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,\n EndpointParams: () => import_util_endpoints.EndpointParams,\n EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,\n EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,\n ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,\n EvaluateOptions: () => import_util_endpoints.EvaluateOptions,\n Expression: () => import_util_endpoints.Expression,\n FunctionArgv: () => import_util_endpoints.FunctionArgv,\n FunctionObject: () => import_util_endpoints.FunctionObject,\n FunctionReturn: () => import_util_endpoints.FunctionReturn,\n ParameterObject: () => import_util_endpoints.ParameterObject,\n ReferenceObject: () => import_util_endpoints.ReferenceObject,\n ReferenceRecord: () => import_util_endpoints.ReferenceRecord,\n RuleSetObject: () => import_util_endpoints.RuleSetObject,\n RuleSetRules: () => import_util_endpoints.RuleSetRules,\n TreeRuleObject: () => import_util_endpoints.TreeRuleObject,\n awsEndpointFunctions: () => awsEndpointFunctions,\n getUserAgentPrefix: () => getUserAgentPrefix,\n isIpAddress: () => import_util_endpoints.isIpAddress,\n partition: () => partition,\n resolveEndpoint: () => import_util_endpoints.resolveEndpoint,\n setPartitionInfo: () => setPartitionInfo,\n useDefaultPartitionInfo: () => useDefaultPartitionInfo\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/aws.ts\n\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\n\n\n// src/lib/isIpAddress.ts\nvar import_util_endpoints = require(\"@smithy/util-endpoints\");\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\nvar isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!(0, import_util_endpoints.isValidHostLabel)(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if ((0, import_util_endpoints.isIpAddress)(value)) {\n return false;\n }\n return true;\n}, \"isVirtualHostableS3Bucket\");\n\n// src/lib/aws/parseArn.ts\nvar parseArn = /* @__PURE__ */ __name((value) => {\n const segments = value.split(\":\");\n if (segments.length < 6)\n return null;\n const [arn, partition2, service, region, accountId, ...resourceId] = segments;\n if (arn !== \"arn\" || partition2 === \"\" || service === \"\" || resourceId[0] === \"\")\n return null;\n return {\n partition: partition2,\n service,\n region,\n accountId,\n resourceId: resourceId[0].includes(\"/\") ? resourceId[0].split(\"/\") : resourceId\n };\n}, \"parseArn\");\n\n// src/lib/aws/partitions.json\nvar partitions_default = {\n partitions: [{\n id: \"aws\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-east-1\",\n name: \"aws\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"af-south-1\": {\n description: \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n description: \"Asia Pacific (Hong Kong)\"\n },\n \"ap-northeast-1\": {\n description: \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n description: \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n description: \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n description: \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n description: \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n description: \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n description: \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n description: \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n description: \"Asia Pacific (Melbourne)\"\n },\n \"aws-global\": {\n description: \"AWS Standard global region\"\n },\n \"ca-central-1\": {\n description: \"Canada (Central)\"\n },\n \"ca-west-1\": {\n description: \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n description: \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n description: \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n description: \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n description: \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n description: \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n description: \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n description: \"Europe (London)\"\n },\n \"eu-west-3\": {\n description: \"Europe (Paris)\"\n },\n \"il-central-1\": {\n description: \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n description: \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n description: \"Middle East (Bahrain)\"\n },\n \"sa-east-1\": {\n description: \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n description: \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n description: \"US East (Ohio)\"\n },\n \"us-west-1\": {\n description: \"US West (N. California)\"\n },\n \"us-west-2\": {\n description: \"US West (Oregon)\"\n }\n }\n }, {\n id: \"aws-cn\",\n outputs: {\n dnsSuffix: \"amazonaws.com.cn\",\n dualStackDnsSuffix: \"api.amazonwebservices.com.cn\",\n implicitGlobalRegion: \"cn-northwest-1\",\n name: \"aws-cn\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-cn-global\": {\n description: \"AWS China global region\"\n },\n \"cn-north-1\": {\n description: \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n description: \"China (Ningxia)\"\n }\n }\n }, {\n id: \"aws-us-gov\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-gov-west-1\",\n name: \"aws-us-gov\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-us-gov-global\": {\n description: \"AWS GovCloud (US) global region\"\n },\n \"us-gov-east-1\": {\n description: \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n description: \"AWS GovCloud (US-West)\"\n }\n }\n }, {\n id: \"aws-iso\",\n outputs: {\n dnsSuffix: \"c2s.ic.gov\",\n dualStackDnsSuffix: \"c2s.ic.gov\",\n implicitGlobalRegion: \"us-iso-east-1\",\n name: \"aws-iso\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-global\": {\n description: \"AWS ISO (US) global region\"\n },\n \"us-iso-east-1\": {\n description: \"US ISO East\"\n },\n \"us-iso-west-1\": {\n description: \"US ISO WEST\"\n }\n }\n }, {\n id: \"aws-iso-b\",\n outputs: {\n dnsSuffix: \"sc2s.sgov.gov\",\n dualStackDnsSuffix: \"sc2s.sgov.gov\",\n implicitGlobalRegion: \"us-isob-east-1\",\n name: \"aws-iso-b\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-b-global\": {\n description: \"AWS ISOB (US) global region\"\n },\n \"us-isob-east-1\": {\n description: \"US ISOB East (Ohio)\"\n }\n }\n }, {\n id: \"aws-iso-e\",\n outputs: {\n dnsSuffix: \"cloud.adc-e.uk\",\n dualStackDnsSuffix: \"cloud.adc-e.uk\",\n implicitGlobalRegion: \"eu-isoe-west-1\",\n name: \"aws-iso-e\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {}\n }, {\n id: \"aws-iso-f\",\n outputs: {\n dnsSuffix: \"csp.hci.ic.gov\",\n dualStackDnsSuffix: \"csp.hci.ic.gov\",\n implicitGlobalRegion: \"us-isof-south-1\",\n name: \"aws-iso-f\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {}\n }],\n version: \"1.1\"\n};\n\n// src/lib/aws/partition.ts\nvar selectedPartitionsInfo = partitions_default;\nvar selectedUserAgentPrefix = \"\";\nvar partition = /* @__PURE__ */ __name((value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition2 of partitions) {\n const { regions, outputs } = partition2;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData\n };\n }\n }\n }\n for (const partition2 of partitions) {\n const { regionRegex, outputs } = partition2;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\n \"Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.\"\n );\n }\n return {\n ...DEFAULT_PARTITION.outputs\n };\n}, \"partition\");\nvar setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n}, \"setPartitionInfo\");\nvar useDefaultPartitionInfo = /* @__PURE__ */ __name(() => {\n setPartitionInfo(partitions_default, \"\");\n}, \"useDefaultPartitionInfo\");\nvar getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, \"getUserAgentPrefix\");\n\n// src/aws.ts\nvar awsEndpointFunctions = {\n isVirtualHostableS3Bucket,\n parseArn,\n partition\n};\nimport_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;\n\n// src/resolveEndpoint.ts\n\n\n// src/types/EndpointError.ts\n\n\n// src/types/EndpointRuleObject.ts\n\n\n// src/types/ErrorRuleObject.ts\n\n\n// src/types/RuleSetObject.ts\n\n\n// src/types/TreeRuleObject.ts\n\n\n// src/types/shared.ts\n\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n awsEndpointFunctions,\n partition,\n setPartitionInfo,\n useDefaultPartitionInfo,\n getUserAgentPrefix,\n isIpAddress,\n resolveEndpoint,\n EndpointError\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,\n crtAvailability: () => crtAvailability,\n defaultUserAgent: () => defaultUserAgent\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_os = require(\"os\");\nvar import_process = require(\"process\");\n\n// src/crt-availability.ts\nvar crtAvailability = {\n isCrtAvailable: false\n};\n\n// src/is-crt-available.ts\nvar isCrtAvailable = /* @__PURE__ */ __name(() => {\n if (crtAvailability.isCrtAvailable) {\n return [\"md/crt-avail\"];\n }\n return null;\n}, \"isCrtAvailable\");\n\n// src/index.ts\nvar UA_APP_ID_ENV_NAME = \"AWS_SDK_UA_APP_ID\";\nvar UA_APP_ID_INI_NAME = \"sdk-ua-app-id\";\nvar defaultUserAgent = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => {\n const sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // ua-metadata\n [\"ua\", \"2.0\"],\n // os-metadata\n [`os/${(0, import_os.platform)()}`, (0, import_os.release)()],\n // language-metadata\n // ECMAScript edition doesn't matter in JS, so no version needed.\n [\"lang/js\"],\n [\"md/nodejs\", `${import_process.versions.node}`]\n ];\n const crtAvailable = isCrtAvailable();\n if (crtAvailable) {\n sections.push(crtAvailable);\n }\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n if (import_process.env.AWS_EXECUTION_ENV) {\n sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);\n }\n const appIdPromise = (0, import_node_config_provider.loadConfig)({\n environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],\n configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME],\n default: void 0\n })();\n let resolvedUserAgent = void 0;\n return async () => {\n if (!resolvedUserAgent) {\n const appId = await appIdPromise;\n resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];\n }\n return resolvedUserAgent;\n };\n}, \"defaultUserAgent\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n crtAvailability,\n UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME,\n defaultUserAgent\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nconst pureJs_1 = require(\"./pureJs\");\nconst whatwgEncodingApi_1 = require(\"./whatwgEncodingApi\");\nconst fromUtf8 = (input) => typeof TextEncoder === \"function\" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input);\nexports.fromUtf8 = fromUtf8;\nconst toUtf8 = (input) => typeof TextDecoder === \"function\" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input);\nexports.toUtf8 = toUtf8;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nconst fromUtf8 = (input) => {\n const bytes = [];\n for (let i = 0, len = input.length; i < len; i++) {\n const value = input.charCodeAt(i);\n if (value < 0x80) {\n bytes.push(value);\n }\n else if (value < 0x800) {\n bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);\n }\n else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);\n bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);\n }\n else {\n bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);\n }\n }\n return Uint8Array.from(bytes);\n};\nexports.fromUtf8 = fromUtf8;\nconst toUtf8 = (input) => {\n let decoded = \"\";\n for (let i = 0, len = input.length; i < len; i++) {\n const byte = input[i];\n if (byte < 0x80) {\n decoded += String.fromCharCode(byte);\n }\n else if (0b11000000 <= byte && byte < 0b11100000) {\n const nextByte = input[++i];\n decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));\n }\n else if (0b11110000 <= byte && byte < 0b101101101) {\n const surrogatePair = [byte, input[++i], input[++i], input[++i]];\n const encoded = \"%\" + surrogatePair.map((byteValue) => byteValue.toString(16)).join(\"%\");\n decoded += decodeURIComponent(encoded);\n }\n else {\n decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));\n }\n }\n return decoded;\n};\nexports.toUtf8 = toUtf8;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toUtf8 = exports.fromUtf8 = void 0;\nfunction fromUtf8(input) {\n return new TextEncoder().encode(input);\n}\nexports.fromUtf8 = fromUtf8;\nfunction toUtf8(input) {\n return new TextDecoder(\"utf-8\").decode(input);\n}\nexports.toUtf8 = toUtf8;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT,\n ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,\n ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getRegionInfo: () => getRegionInfo,\n resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,\n resolveEndpointsConfig: () => resolveEndpointsConfig,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts\nvar import_util_config_provider = require(\"@smithy/util-config-provider\");\nvar ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nvar CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nvar DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nvar NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts\n\nvar ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nvar CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nvar DEFAULT_USE_FIPS_ENDPOINT = false;\nvar NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/resolveCustomEndpointsConfig.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const { endpoint, urlParser } = input;\n return {\n ...input,\n tls: input.tls ?? true,\n endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false)\n };\n}, \"resolveCustomEndpointsConfig\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\n\n\n// src/endpointsConfig/utils/getEndpointFromRegion.ts\nvar getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => {\n const { tls = true } = input;\n const region = await input.region();\n const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n const useDualstackEndpoint = await input.useDualstackEndpoint();\n const useFipsEndpoint = await input.useFipsEndpoint();\n const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return input.urlParser(`${tls ? \"https:\" : \"http:\"}//${hostname}`);\n}, \"getEndpointFromRegion\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\nvar resolveEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser } = input;\n return {\n ...input,\n tls: input.tls ?? true,\n endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint\n };\n}, \"resolveEndpointsConfig\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n }\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return {\n ...input,\n region: async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }\n };\n}, \"resolveRegionConfig\");\n\n// src/regionInfo/getHostnameFromVariants.ts\nvar getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => {\n var _a;\n return (_a = variants.find(\n ({ tags }) => useFipsEndpoint === tags.includes(\"fips\") && useDualstackEndpoint === tags.includes(\"dualstack\")\n )) == null ? void 0 : _a.hostname;\n}, \"getHostnameFromVariants\");\n\n// src/regionInfo/getResolvedHostname.ts\nvar getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace(\"{region}\", resolvedRegion) : void 0, \"getResolvedHostname\");\n\n// src/regionInfo/getResolvedPartition.ts\nvar getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? \"aws\", \"getResolvedPartition\");\n\n// src/regionInfo/getResolvedSigningRegion.ts\nvar getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {\n if (signingRegion) {\n return signingRegion;\n } else if (useFipsEndpoint) {\n const regionRegexJs = regionRegex.replace(\"\\\\\\\\\", \"\\\\\").replace(/^\\^/g, \"\\\\.\").replace(/\\$$/g, \"\\\\.\");\n const regionRegexmatchArray = hostname.match(regionRegexJs);\n if (regionRegexmatchArray) {\n return regionRegexmatchArray[0].slice(1, -1);\n }\n }\n}, \"getResolvedSigningRegion\");\n\n// src/regionInfo/getRegionInfo.ts\nvar getRegionInfo = /* @__PURE__ */ __name((region, {\n useFipsEndpoint = false,\n useDualstackEndpoint = false,\n signingService,\n regionHash,\n partitionHash\n}) => {\n var _a, _b, _c, _d, _e;\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? void 0 : _a.endpoint) ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? void 0 : _b.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? void 0 : _c.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === void 0) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: (_d = regionHash[resolvedRegion]) == null ? void 0 : _d.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint\n });\n return {\n partition,\n signingService,\n hostname,\n ...signingRegion && { signingRegion },\n ...((_e = regionHash[resolvedRegion]) == null ? void 0 : _e.signingService) && {\n signingService: regionHash[resolvedRegion].signingService\n }\n };\n}, \"getRegionInfo\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n ENV_USE_FIPS_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n resolveCustomEndpointsConfig,\n resolveEndpointsConfig,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig,\n getRegionInfo\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,\n EXPIRATION_MS: () => EXPIRATION_MS,\n HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,\n HttpBearerAuthSigner: () => HttpBearerAuthSigner,\n NoAuthSigner: () => NoAuthSigner,\n RequestBuilder: () => RequestBuilder,\n createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,\n createPaginator: () => createPaginator,\n doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,\n getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,\n getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,\n getHttpSigningPlugin: () => getHttpSigningPlugin,\n getSmithyContext: () => getSmithyContext3,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,\n httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,\n httpSigningMiddleware: () => httpSigningMiddleware,\n httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,\n isIdentityExpired: () => isIdentityExpired,\n memoizeIdentityProvider: () => memoizeIdentityProvider,\n normalizeProvider: () => normalizeProvider,\n requestBuilder: () => requestBuilder\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = /* @__PURE__ */ new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\n__name(convertHttpAuthSchemesToMap, \"convertHttpAuthSchemesToMap\");\nvar httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => {\n var _a;\n const options = config.httpAuthSchemeProvider(\n await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)\n );\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const failureReasons = [];\n for (const option of options) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) == null ? void 0 : _a.call(option, config, context)) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n}, \"httpAuthSchemeMiddleware\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name\n};\nvar getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeEndpointRuleSetMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemeEndpointRuleSetPlugin\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemePlugin\");\n\n// src/middleware-http-signing/httpSigningMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => {\n throw error;\n}, \"defaultErrorHandler\");\nvar defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => {\n}, \"defaultSuccessHandler\");\nvar httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const {\n httpAuthOption: { signingProperties = {} },\n identity,\n signer\n } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties)\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n}, \"httpSigningMiddleware\");\n\n// src/middleware-http-signing/getHttpSigningMiddleware.ts\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\nvar httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: import_middleware_retry.retryMiddlewareOptions.name\n};\nvar getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n }\n}), \"getHttpSigningPlugin\");\n\n// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts\nvar _DefaultIdentityProviderConfig = class _DefaultIdentityProviderConfig {\n /**\n * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers.\n *\n * @param config scheme IDs and identity providers to configure\n */\n constructor(config) {\n this.authSchemes = /* @__PURE__ */ new Map();\n for (const [key, value] of Object.entries(config)) {\n if (value !== void 0) {\n this.authSchemes.set(key, value);\n }\n }\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n};\n__name(_DefaultIdentityProviderConfig, \"DefaultIdentityProviderConfig\");\nvar DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig;\n\n// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts\nvar import_types = require(\"@smithy/types\");\nvar _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\n \"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\"\n );\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = httpRequest.clone();\n if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;\n } else {\n throw new Error(\n \"request can only be signed with `apiKey` locations `query` or `header`, but found: `\" + signingProperties.in + \"`\"\n );\n }\n return clonedRequest;\n }\n};\n__name(_HttpApiKeyAuthSigner, \"HttpApiKeyAuthSigner\");\nvar HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner;\n\n// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts\nvar _HttpBearerAuthSigner = class _HttpBearerAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = httpRequest.clone();\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n};\n__name(_HttpBearerAuthSigner, \"HttpBearerAuthSigner\");\nvar HttpBearerAuthSigner = _HttpBearerAuthSigner;\n\n// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts\nvar _NoAuthSigner = class _NoAuthSigner {\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n};\n__name(_NoAuthSigner, \"NoAuthSigner\");\nvar NoAuthSigner = _NoAuthSigner;\n\n// src/util-identity-and-auth/memoizeIdentityProvider.ts\nvar createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, \"createIsIdentityExpiredFunction\");\nvar EXPIRATION_MS = 3e5;\nvar isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nvar doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, \"doesIdentityRequireRefresh\");\nvar memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n if (provider === void 0) {\n return void 0;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n}, \"memoizeIdentityProvider\");\n\n// src/getSmithyContext.ts\n\nvar getSmithyContext3 = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n\n// src/protocols/requestBuilder.ts\n\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\n__name(requestBuilder, \"requestBuilder\");\nvar _RequestBuilder = class _RequestBuilder {\n constructor(input, context) {\n this.input = input;\n this.context = context;\n this.query = {};\n this.method = \"\";\n this.headers = {};\n this.path = \"\";\n this.body = null;\n this.hostname = \"\";\n this.resolvePathStack = [];\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new import_protocol_http.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers\n });\n }\n /**\n * Brevity setter for \"hostname\".\n */\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n /**\n * Brevity initial builder for \"basepath\".\n */\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${(basePath == null ? void 0 : basePath.endsWith(\"/\")) ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n /**\n * Brevity incremental builder for \"path\".\n */\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n /**\n * Brevity setter for \"headers\".\n */\n h(headers) {\n this.headers = headers;\n return this;\n }\n /**\n * Brevity setter for \"query\".\n */\n q(query) {\n this.query = query;\n return this;\n }\n /**\n * Brevity setter for \"body\".\n */\n b(body) {\n this.body = body;\n return this;\n }\n /**\n * Brevity setter for \"method\".\n */\n m(method) {\n this.method = method;\n return this;\n }\n};\n__name(_RequestBuilder, \"RequestBuilder\");\nvar RequestBuilder = _RequestBuilder;\n\n// src/pagination/createPaginator.ts\nvar makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, ...args) => {\n return await client.send(new CommandCtor(input), ...args);\n}, \"makePagedClientRequest\");\nfunction createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) {\n let token = config.startingToken || void 0;\n let hasNext = true;\n let page;\n while (hasNext) {\n input[inputTokenName] = token;\n if (pageSizeTokenName) {\n input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments);\n } else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return void 0;\n }, \"paginateOperation\");\n}\n__name(createPaginator, \"createPaginator\");\nvar get = /* @__PURE__ */ __name((fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return void 0;\n }\n cursor = cursor[step];\n }\n return cursor;\n}, \"get\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n createPaginator,\n httpAuthSchemeMiddleware,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n getHttpAuthSchemeEndpointRuleSetPlugin,\n httpAuthSchemeMiddlewareOptions,\n getHttpAuthSchemePlugin,\n httpSigningMiddleware,\n httpSigningMiddlewareOptions,\n getHttpSigningPlugin,\n DefaultIdentityProviderConfig,\n HttpApiKeyAuthSigner,\n HttpBearerAuthSigner,\n NoAuthSigner,\n createIsIdentityExpiredFunction,\n EXPIRATION_MS,\n isIdentityExpired,\n doesIdentityRequireRefresh,\n memoizeIdentityProvider,\n getSmithyContext,\n normalizeProvider,\n requestBuilder,\n RequestBuilder\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES,\n DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT,\n ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,\n ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,\n Endpoint: () => Endpoint,\n fromContainerMetadata: () => fromContainerMetadata,\n fromInstanceMetadata: () => fromInstanceMetadata,\n getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,\n httpRequest: () => httpRequest,\n providerConfigFromInit: () => providerConfigFromInit\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromContainerMetadata.ts\n\nvar import_url = require(\"url\");\n\n// src/remoteProvider/httpRequest.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_buffer = require(\"buffer\");\nvar import_http = require(\"http\");\nfunction httpRequest(options) {\n return new Promise((resolve, reject) => {\n var _a;\n const req = (0, import_http.request)({\n method: \"GET\",\n ...options,\n // Node.js http module doesn't accept hostname with square brackets\n // Refs: https://github.com/nodejs/node/issues/39738\n hostname: (_a = options.hostname) == null ? void 0 : _a.replace(/^\\[(.+)\\]$/, \"$1\")\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new import_property_provider.ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new import_property_provider.ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(\n Object.assign(new import_property_provider.ProviderError(\"Error response received from instance metadata service\"), { statusCode })\n );\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(import_buffer.Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n__name(httpRequest, \"httpRequest\");\n\n// src/remoteProvider/ImdsCredentials.ts\nvar isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.AccessKeyId === \"string\" && typeof arg.SecretAccessKey === \"string\" && typeof arg.Token === \"string\" && typeof arg.Expiration === \"string\", \"isImdsCredentials\");\nvar fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration)\n}), \"fromImdsCredentials\");\n\n// src/remoteProvider/RemoteProviderInit.ts\nvar DEFAULT_TIMEOUT = 1e3;\nvar DEFAULT_MAX_RETRIES = 0;\nvar providerConfigFromInit = /* @__PURE__ */ __name(({\n maxRetries = DEFAULT_MAX_RETRIES,\n timeout = DEFAULT_TIMEOUT\n}) => ({ maxRetries, timeout }), \"providerConfigFromInit\");\n\n// src/remoteProvider/retry.ts\nvar retry = /* @__PURE__ */ __name((toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n}, \"retry\");\n\n// src/fromContainerMetadata.ts\nvar ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nvar ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nvar ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nvar fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri();\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\");\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n}, \"fromContainerMetadata\");\nvar requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN]\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout\n });\n return buffer.toString();\n}, \"requestFromEcsImds\");\nvar CMDS_IP = \"169.254.170.2\";\nvar GREENGRASS_HOSTS = {\n localhost: true,\n \"127.0.0.1\": true\n};\nvar GREENGRASS_PROTOCOLS = {\n \"http:\": true,\n \"https:\": true\n};\nvar getCmdsUri = /* @__PURE__ */ __name(async () => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI]\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]);\n if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {\n throw new import_property_provider.CredentialsProviderError(\n `${parsed.hostname} is not a valid container metadata service hostname`,\n false\n );\n }\n if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {\n throw new import_property_provider.CredentialsProviderError(\n `${parsed.protocol} is not a valid container metadata service protocol`,\n false\n );\n }\n return {\n ...parsed,\n port: parsed.port ? parseInt(parsed.port, 10) : void 0\n };\n }\n throw new import_property_provider.CredentialsProviderError(\n `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`,\n false\n );\n}, \"getCmdsUri\");\n\n// src/fromInstanceMetadata.ts\n\n\n\n// src/error/InstanceMetadataV1FallbackError.ts\n\nvar _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"InstanceMetadataV1FallbackError\";\n Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype);\n }\n};\n__name(_InstanceMetadataV1FallbackError, \"InstanceMetadataV1FallbackError\");\nvar InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError;\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_url_parser = require(\"@smithy/url-parser\");\n\n// src/config/Endpoint.ts\nvar Endpoint = /* @__PURE__ */ ((Endpoint2) => {\n Endpoint2[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint2[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n return Endpoint2;\n})(Endpoint || {});\n\n// src/config/EndpointConfigOptions.ts\nvar ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nvar CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nvar ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: void 0\n};\n\n// src/config/EndpointMode.ts\nvar EndpointMode = /* @__PURE__ */ ((EndpointMode2) => {\n EndpointMode2[\"IPv4\"] = \"IPv4\";\n EndpointMode2[\"IPv6\"] = \"IPv6\";\n return EndpointMode2;\n})(EndpointMode || {});\n\n// src/config/EndpointModeConfigOptions.ts\nvar ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nvar CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nvar ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: \"IPv4\" /* IPv4 */\n};\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), \"getInstanceMetadataEndpoint\");\nvar getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), \"getFromEndpointConfig\");\nvar getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => {\n const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case \"IPv4\" /* IPv4 */:\n return \"http://169.254.169.254\" /* IPv4 */;\n case \"IPv6\" /* IPv6 */:\n return \"http://[fd00:ec2::254]\" /* IPv6 */;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`);\n }\n}, \"getFromEndpointModeConfig\");\n\n// src/utils/getExtendedInstanceMetadataCredentials.ts\nvar STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nvar STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nvar STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nvar getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1e3);\n logger.warn(\n `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: ` + STATIC_STABILITY_DOC_URL\n );\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...originalExpiration ? { originalExpiration } : {},\n expiration: newExpiration\n };\n}, \"getExtendedInstanceMetadataCredentials\");\n\n// src/utils/staticStabilityProvider.ts\nvar staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => {\n const logger = (options == null ? void 0 : options.logger) || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n } catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n } else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n}, \"staticStabilityProvider\");\n\n// src/fromInstanceMetadata.ts\nvar IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nvar IMDS_TOKEN_PATH = \"/latest/api/token\";\nvar AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nvar PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nvar X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nvar fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), \"fromInstanceMetadata\");\nvar getInstanceImdsProvider = /* @__PURE__ */ __name((init) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => {\n var _a;\n const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await (0, import_node_config_provider.loadConfig)(\n {\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === void 0) {\n throw new import_property_provider.CredentialsProviderError(\n `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`\n );\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile2) => {\n const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false\n },\n {\n profile\n }\n )();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(\n `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\n \", \"\n )}].`\n );\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile2;\n try {\n profile2 = await getProfile(options);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile2;\n }, maxRetries2)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries2);\n }, \"getCredentials\");\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger == null ? void 0 : logger.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n } else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n } catch (error) {\n if ((error == null ? void 0 : error.statusCode) === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\"\n });\n } else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger == null ? void 0 : logger.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token\n },\n timeout\n });\n }\n };\n}, \"getInstanceImdsProvider\");\nvar getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\"\n }\n}), \"getMetadataToken\");\nvar getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), \"getProfile\");\nvar getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options) => {\n const credsResponse = JSON.parse(\n (await httpRequest({\n ...options,\n path: IMDS_PATH + profile\n })).toString()\n );\n if (!isImdsCredentials(credsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\");\n }\n return fromImdsCredentials(credsResponse);\n}, \"getCredentialsFromProfile\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n httpRequest,\n getInstanceMetadataEndpoint,\n Endpoint,\n ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI,\n ENV_CMDS_AUTH_TOKEN,\n fromContainerMetadata,\n fromInstanceMetadata,\n DEFAULT_TIMEOUT,\n DEFAULT_MAX_RETRIES,\n providerConfigFromInit\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n EventStreamCodec: () => EventStreamCodec,\n HeaderMarshaller: () => HeaderMarshaller,\n Int64: () => Int64,\n MessageDecoderStream: () => MessageDecoderStream,\n MessageEncoderStream: () => MessageEncoderStream,\n SmithyMessageDecoderStream: () => SmithyMessageDecoderStream,\n SmithyMessageEncoderStream: () => SmithyMessageEncoderStream\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/EventStreamCodec.ts\nvar import_crc322 = require(\"@aws-crypto/crc32\");\n\n// src/HeaderMarshaller.ts\n\n\n// src/Int64.ts\nvar import_util_hex_encoding = require(\"@smithy/util-hex-encoding\");\nvar _Int64 = class _Int64 {\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9223372036854776e3 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new _Int64(bytes);\n }\n /**\n * Called implicitly by infix arithmetic operators.\n */\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n};\n__name(_Int64, \"Int64\");\nvar Int64 = _Int64;\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 255;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n__name(negate, \"negate\");\n\n// src/HeaderMarshaller.ts\nvar _HeaderMarshaller = class _HeaderMarshaller {\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]);\n case \"byte\":\n return Uint8Array.from([2 /* byte */, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3 /* short */);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4 /* integer */);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5 /* long */;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6 /* byteArray */);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7 /* string */);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8 /* timestamp */;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9 /* uuid */;\n uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0 /* boolTrue */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true\n };\n break;\n case 1 /* boolFalse */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false\n };\n break;\n case 2 /* byte */:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++)\n };\n break;\n case 3 /* short */:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false)\n };\n position += 2;\n break;\n case 4 /* integer */:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false)\n };\n position += 4;\n break;\n case 5 /* long */:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))\n };\n position += 8;\n break;\n case 6 /* byteArray */:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)\n };\n position += binaryLength;\n break;\n case 7 /* string */:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))\n };\n position += stringLength;\n break;\n case 8 /* timestamp */:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())\n };\n position += 8;\n break;\n case 9 /* uuid */:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)(\n uuidBytes.subarray(6, 8)\n )}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}`\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n};\n__name(_HeaderMarshaller, \"HeaderMarshaller\");\nvar HeaderMarshaller = _HeaderMarshaller;\nvar BOOLEAN_TAG = \"boolean\";\nvar BYTE_TAG = \"byte\";\nvar SHORT_TAG = \"short\";\nvar INT_TAG = \"integer\";\nvar LONG_TAG = \"long\";\nvar BINARY_TAG = \"binary\";\nvar STRING_TAG = \"string\";\nvar TIMESTAMP_TAG = \"timestamp\";\nvar UUID_TAG = \"uuid\";\nvar UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n\n// src/splitMessage.ts\nvar import_crc32 = require(\"@aws-crypto/crc32\");\nvar PRELUDE_MEMBER_LENGTH = 4;\nvar PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nvar CHECKSUM_LENGTH = 4;\nvar MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nfunction splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digest()) {\n throw new Error(\n `The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`\n );\n }\n checksummer.update(\n new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))\n );\n if (expectedMessageChecksum !== checksummer.digest()) {\n throw new Error(\n `The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`\n );\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(\n buffer,\n byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength,\n messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)\n )\n };\n}\n__name(splitMessage, \"splitMessage\");\n\n// src/EventStreamCodec.ts\nvar _EventStreamCodec = class _EventStreamCodec {\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n }\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n }\n };\n }\n /**\n * Convert a structured JavaScript object with tagged headers into a binary\n * event stream message.\n */\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new import_crc322.Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);\n return out;\n }\n /**\n * Convert a binary event stream message into a JavaScript object with an\n * opaque, binary body and tagged, parsed headers.\n */\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n /**\n * Convert a structured JavaScript object with tagged headers into a binary\n * event stream message header.\n */\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n};\n__name(_EventStreamCodec, \"EventStreamCodec\");\nvar EventStreamCodec = _EventStreamCodec;\n\n// src/MessageDecoderStream.ts\nvar _MessageDecoderStream = class _MessageDecoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n};\n__name(_MessageDecoderStream, \"MessageDecoderStream\");\nvar MessageDecoderStream = _MessageDecoderStream;\n\n// src/MessageEncoderStream.ts\nvar _MessageEncoderStream = class _MessageEncoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n};\n__name(_MessageEncoderStream, \"MessageEncoderStream\");\nvar MessageEncoderStream = _MessageEncoderStream;\n\n// src/SmithyMessageDecoderStream.ts\nvar _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === void 0)\n continue;\n yield deserialized;\n }\n }\n};\n__name(_SmithyMessageDecoderStream, \"SmithyMessageDecoderStream\");\nvar SmithyMessageDecoderStream = _SmithyMessageDecoderStream;\n\n// src/SmithyMessageEncoderStream.ts\nvar _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream {\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n};\n__name(_SmithyMessageEncoderStream, \"SmithyMessageEncoderStream\");\nvar SmithyMessageEncoderStream = _SmithyMessageEncoderStream;\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n EventStreamCodec,\n HeaderMarshaller,\n Int64,\n MessageDecoderStream,\n MessageEncoderStream,\n SmithyMessageDecoderStream,\n SmithyMessageEncoderStream\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Hash: () => Hash\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar import_buffer = require(\"buffer\");\nvar import_crypto = require(\"crypto\");\nvar _Hash = class _Hash {\n constructor(algorithmIdentifier, secret) {\n this.algorithmIdentifier = algorithmIdentifier;\n this.secret = secret;\n this.reset();\n }\n update(toHash, encoding) {\n this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding)));\n }\n digest() {\n return Promise.resolve(this.hash.digest());\n }\n reset() {\n this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier);\n }\n};\n__name(_Hash, \"Hash\");\nvar Hash = _Hash;\nfunction castSourceData(toCast, encoding) {\n if (import_buffer.Buffer.isBuffer(toCast)) {\n return toCast;\n }\n if (typeof toCast === \"string\") {\n return (0, import_util_buffer_from.fromString)(toCast, encoding);\n }\n if (ArrayBuffer.isView(toCast)) {\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength);\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast);\n}\n__name(castSourceData, \"castSourceData\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Hash\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n contentLengthMiddleware: () => contentLengthMiddleware,\n contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions,\n getContentLengthPlugin: () => getContentLengthPlugin\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length)\n };\n } catch (error) {\n }\n }\n }\n return next({\n ...args,\n request\n });\n };\n}\n__name(contentLengthMiddleware, \"contentLengthMiddleware\");\nvar contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true\n};\nvar getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n }\n}), \"getContentLengthPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n contentLengthMiddleware,\n contentLengthMiddlewareOptions,\n getContentLengthPlugin\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointFromConfig = void 0;\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst getEndpointUrlConfig_1 = require(\"./getEndpointUrlConfig\");\nconst getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))();\nexports.getEndpointFromConfig = getEndpointFromConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointUrlConfig = void 0;\nconst shared_ini_file_loader_1 = require(\"@smithy/shared-ini-file-loader\");\nconst ENV_ENDPOINT_URL = \"AWS_ENDPOINT_URL\";\nconst CONFIG_ENDPOINT_URL = \"endpoint_url\";\nconst getEndpointUrlConfig = (serviceId) => ({\n environmentVariableSelector: (env) => {\n const serviceSuffixParts = serviceId.split(\" \").map((w) => w.toUpperCase());\n const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join(\"_\")];\n if (serviceEndpointUrl)\n return serviceEndpointUrl;\n const endpointUrl = env[ENV_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n configFileSelector: (profile, config) => {\n if (config && profile.services) {\n const servicesSection = config[[\"services\", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (servicesSection) {\n const servicePrefixParts = serviceId.split(\" \").map((w) => w.toLowerCase());\n const endpointUrl = servicesSection[[servicePrefixParts.join(\"_\"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (endpointUrl)\n return endpointUrl;\n }\n }\n const endpointUrl = profile[CONFIG_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n default: undefined,\n});\nexports.getEndpointUrlConfig = getEndpointUrlConfig;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n endpointMiddleware: () => endpointMiddleware,\n endpointMiddlewareOptions: () => endpointMiddlewareOptions,\n getEndpointFromInstructions: () => getEndpointFromInstructions,\n getEndpointPlugin: () => getEndpointPlugin,\n resolveEndpointConfig: () => resolveEndpointConfig,\n resolveParams: () => resolveParams,\n toEndpointV1: () => toEndpointV1\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/service-customizations/s3.ts\nvar resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => {\n const bucket = (endpointParams == null ? void 0 : endpointParams.Bucket) || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\") || bucket.toLowerCase() !== bucket || bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n}, \"resolveParamsForS3\");\nvar DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nvar IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nvar DOTS_PATTERN = /\\.\\./;\nvar isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), \"isDnsCompatibleBucketName\");\nvar isArnBucketName = /* @__PURE__ */ __name((bucketName) => {\n const [arn, partition, service, region, account, typeOrId] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5;\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return arn === \"arn\" && !!partition && !!service && !!account && !!typeOrId;\n}, \"isArnBucketName\");\n\n// src/adaptors/createConfigValueProvider.ts\nvar createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => {\n const configProvider = /* @__PURE__ */ __name(async () => {\n const configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n }, \"configProvider\");\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = (credentials == null ? void 0 : credentials.credentialScope) ?? (credentials == null ? void 0 : credentials.CredentialScope);\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n}, \"createConfigValueProvider\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar import_getEndpointFromConfig = require(\"./adaptors/getEndpointFromConfig\");\n\n// src/adaptors/toEndpointV1.ts\nvar import_url_parser = require(\"@smithy/url-parser\");\nvar toEndpointV1 = /* @__PURE__ */ __name((endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return (0, import_url_parser.parseUrl)(endpoint.url);\n }\n return endpoint;\n }\n return (0, import_url_parser.parseUrl)(endpoint);\n}, \"toEndpointV1\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.endpoint) {\n const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || \"\");\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n return endpoint;\n}, \"getEndpointFromInstructions\");\nvar resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => {\n var _a;\n const endpointParams = {};\n const instructions = ((_a = instructionsSupplier == null ? void 0 : instructionsSupplier.getEndpointParameterInstructions) == null ? void 0 : _a.call(instructionsSupplier)) || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n}, \"resolveParams\");\n\n// src/endpointMiddleware.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar endpointMiddleware = /* @__PURE__ */ __name(({\n config,\n instructions\n}) => {\n return (next, context) => async (args) => {\n var _a, _b, _c;\n const endpoint = await getEndpointFromInstructions(\n args.input,\n {\n getEndpointParameterInstructions() {\n return instructions;\n }\n },\n { ...config },\n context\n );\n context.endpointV2 = endpoint;\n context.authSchemes = (_a = endpoint.properties) == null ? void 0 : _a.authSchemes;\n const authScheme = (_b = context.authSchemes) == null ? void 0 : _b[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const httpAuthOption = (_c = smithyContext == null ? void 0 : smithyContext.selectedHttpAuthScheme) == null ? void 0 : _c.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(\n httpAuthOption.signingProperties || {},\n {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet\n },\n authScheme.properties\n );\n }\n }\n return next({\n ...args\n });\n };\n}, \"endpointMiddleware\");\n\n// src/getEndpointPlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n endpointMiddleware({\n config,\n instructions\n }),\n endpointMiddlewareOptions\n );\n }\n}), \"getEndpointPlugin\");\n\n// src/resolveEndpointConfig.ts\n\nvar resolveEndpointConfig = /* @__PURE__ */ __name((input) => {\n const tls = input.tls ?? true;\n const { endpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0;\n const isCustomEndpoint = !!endpoint;\n return {\n ...input,\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false),\n useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false)\n };\n}, \"resolveEndpointConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getEndpointFromInstructions,\n resolveParams,\n toEndpointV1,\n endpointMiddleware,\n endpointMiddlewareOptions,\n getEndpointPlugin,\n resolveEndpointConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS,\n CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE,\n ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS,\n ENV_RETRY_MODE: () => ENV_RETRY_MODE,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS,\n StandardRetryStrategy: () => StandardRetryStrategy,\n defaultDelayDecider: () => defaultDelayDecider,\n defaultRetryDecider: () => defaultRetryDecider,\n getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin,\n getRetryAfterHint: () => getRetryAfterHint,\n getRetryPlugin: () => getRetryPlugin,\n omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions,\n resolveRetryConfig: () => resolveRetryConfig,\n retryMiddleware: () => retryMiddleware,\n retryMiddlewareOptions: () => retryMiddlewareOptions\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/AdaptiveRetryStrategy.ts\n\n\n// src/StandardRetryStrategy.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n\nvar import_uuid = require(\"uuid\");\n\n// src/defaultRetryQuota.ts\nvar import_util_retry = require(\"@smithy/util-retry\");\nvar getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => {\n const MAX_CAPACITY = initialRetryTokens;\n const noRetryIncrement = (options == null ? void 0 : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT;\n const retryCost = (options == null ? void 0 : options.retryCost) ?? import_util_retry.RETRY_COST;\n const timeoutRetryCost = (options == null ? void 0 : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST;\n let availableCapacity = initialRetryTokens;\n const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === \"TimeoutError\" ? timeoutRetryCost : retryCost, \"getCapacityAmount\");\n const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, \"hasRetryTokens\");\n const retrieveRetryTokens = /* @__PURE__ */ __name((error) => {\n if (!hasRetryTokens(error)) {\n throw new Error(\"No retry token available\");\n }\n const capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n }, \"retrieveRetryTokens\");\n const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => {\n availableCapacity += capacityReleaseAmount ?? noRetryIncrement;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n }, \"releaseRetryTokens\");\n return Object.freeze({\n hasRetryTokens,\n retrieveRetryTokens,\n releaseRetryTokens\n });\n}, \"getDefaultRetryQuota\");\n\n// src/delayDecider.ts\n\nvar defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), \"defaultDelayDecider\");\n\n// src/retryDecider.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar defaultRetryDecider = /* @__PURE__ */ __name((error) => {\n if (!error) {\n return false;\n }\n return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);\n}, \"defaultRetryDecider\");\n\n// src/util.ts\nvar asSdkError = /* @__PURE__ */ __name((error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n}, \"asSdkError\");\n\n// src/StandardRetryStrategy.ts\nvar _StandardRetryStrategy = class _StandardRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = import_util_retry.RETRY_MODES.STANDARD;\n this.retryDecider = (options == null ? void 0 : options.retryDecider) ?? defaultRetryDecider;\n this.delayDecider = (options == null ? void 0 : options.delayDecider) ?? defaultDelayDecider;\n this.retryQuota = (options == null ? void 0 : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS);\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n } catch (error) {\n maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options == null ? void 0 : options.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options == null ? void 0 : options.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n } catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(\n (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE,\n attempts\n );\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n};\n__name(_StandardRetryStrategy, \"StandardRetryStrategy\");\nvar StandardRetryStrategy = _StandardRetryStrategy;\nvar getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1e3;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n}, \"getDelayFromRetryAfterHeader\");\n\n// src/AdaptiveRetryStrategy.ts\nvar _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy extends StandardRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter();\n this.mode = import_util_retry.RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n }\n });\n }\n};\n__name(_AdaptiveRetryStrategy, \"AdaptiveRetryStrategy\");\nvar AdaptiveRetryStrategy = _AdaptiveRetryStrategy;\n\n// src/configurations.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\nvar ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nvar CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nvar NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: import_util_retry.DEFAULT_MAX_ATTEMPTS\n};\nvar resolveRetryConfig = /* @__PURE__ */ __name((input) => {\n const { retryStrategy } = input;\n const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS);\n return {\n ...input,\n maxAttempts,\n retryStrategy: async () => {\n if (retryStrategy) {\n return retryStrategy;\n }\n const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)();\n if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) {\n return new import_util_retry.AdaptiveRetryStrategy(maxAttempts);\n }\n return new import_util_retry.StandardRetryStrategy(maxAttempts);\n }\n };\n}, \"resolveRetryConfig\");\nvar ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nvar CONFIG_RETRY_MODE = \"retry_mode\";\nvar NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: import_util_retry.DEFAULT_RETRY_MODE\n};\n\n// src/omitRetryHeadersMiddleware.ts\n\n\nvar omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => {\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n delete request.headers[import_util_retry.INVOCATION_ID_HEADER];\n delete request.headers[import_util_retry.REQUEST_HEADER];\n }\n return next(args);\n}, \"omitRetryHeadersMiddleware\");\nvar omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true\n};\nvar getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n }\n}), \"getOmitRetryHeadersPlugin\");\n\n// src/retryMiddleware.ts\n\n\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n\nvar import_isStreamingPayload = require(\"./isStreamingPayload/isStreamingPayload\");\nvar retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n var _a;\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = import_protocol_http.HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n } catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) {\n (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null ? void 0 : _a.warn(\n \"An error was encountered in a non-retryable streaming request.\"\n );\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n } catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n } else {\n retryStrategy = retryStrategy;\n if (retryStrategy == null ? void 0 : retryStrategy.mode)\n context.userAgent = [...context.userAgent || [], [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n}, \"retryMiddleware\");\nvar isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" && typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" && typeof retryStrategy.recordSuccess !== \"undefined\", \"isRetryStrategyV2\");\nvar getRetryErrorInfo = /* @__PURE__ */ __name((error) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error)\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n}, \"getRetryErrorInfo\");\nvar getRetryErrorType = /* @__PURE__ */ __name((error) => {\n if ((0, import_service_error_classification.isThrottlingError)(error))\n return \"THROTTLING\";\n if ((0, import_service_error_classification.isTransientError)(error))\n return \"TRANSIENT\";\n if ((0, import_service_error_classification.isServerError)(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n}, \"getRetryErrorType\");\nvar retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true\n};\nvar getRetryPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n }\n}), \"getRetryPlugin\");\nvar getRetryAfterHint = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1e3);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n}, \"getRetryAfterHint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n StandardRetryStrategy,\n ENV_MAX_ATTEMPTS,\n CONFIG_MAX_ATTEMPTS,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n resolveRetryConfig,\n ENV_RETRY_MODE,\n CONFIG_RETRY_MODE,\n NODE_RETRY_MODE_CONFIG_OPTIONS,\n defaultDelayDecider,\n omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions,\n getOmitRetryHeadersPlugin,\n defaultRetryDecider,\n retryMiddleware,\n retryMiddlewareOptions,\n getRetryPlugin,\n getRetryAfterHint\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isStreamingPayload = void 0;\nconst stream_1 = require(\"stream\");\nconst isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable ||\n (typeof ReadableStream !== \"undefined\" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream);\nexports.isStreamingPayload = isStreamingPayload;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n randomUUID: _crypto.default.randomUUID\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nexports.unsafeStringify = unsafeStringify;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nfunction unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.unsafeStringify)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.URL = exports.DNS = void 0;\nexports.default = v35;\n\nvar _stringify = require(\"./stringify.js\");\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _native = _interopRequireDefault(require(\"./native.js\"));\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = require(\"./stringify.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n if (_native.default.randomUUID && !buf && !options) {\n return _native.default.randomUUID();\n }\n\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.unsafeStringify)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nvar _default = version;\nexports.default = _default;","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n deserializerMiddleware: () => deserializerMiddleware,\n deserializerMiddlewareOption: () => deserializerMiddlewareOption,\n getSerdePlugin: () => getSerdePlugin,\n serializerMiddleware: () => serializerMiddleware,\n serializerMiddlewareOption: () => serializerMiddlewareOption\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/deserializerMiddleware.ts\nvar deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed\n };\n } catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n error.message += \"\\n \" + hint;\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n }\n throw error;\n }\n}, \"deserializerMiddleware\");\n\n// src/serializerMiddleware.ts\nvar serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => {\n var _a;\n const endpoint = ((_a = context.endpointV2) == null ? void 0 : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request\n });\n}, \"serializerMiddleware\");\n\n// src/serdePlugin.ts\nvar deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nvar serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nfunction getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n }\n };\n}\n__name(getSerdePlugin, \"getSerdePlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n deserializerMiddleware,\n deserializerMiddlewareOption,\n serializerMiddlewareOption,\n getSerdePlugin,\n serializerMiddleware\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n constructStack: () => constructStack\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MiddlewareStack.ts\nvar getAllAliases = /* @__PURE__ */ __name((name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n}, \"getAllAliases\");\nvar getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n}, \"getMiddlewareNameWithAliases\");\nvar constructStack = /* @__PURE__ */ __name(() => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = /* @__PURE__ */ new Set();\n const sort = /* @__PURE__ */ __name((entries) => entries.sort(\n (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]\n ), \"sort\");\n const removeByName = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByName\");\n const removeByReference = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByReference\");\n const cloneTo = /* @__PURE__ */ __name((toStack) => {\n var _a;\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n (_a = toStack.identifyOnResolve) == null ? void 0 : _a.call(toStack, stack.identifyOnResolve());\n return toStack;\n }, \"cloneTo\");\n const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n }, \"expandRelativeMiddlewareList\");\n const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === void 0) {\n if (debug) {\n return;\n }\n throw new Error(\n `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`\n );\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n }, []);\n return mainChain;\n }, \"getMiddlewareList\");\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex(\n (entry2) => {\n var _a;\n return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias));\n }\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ${entry.priority} priority in ${entry.step} step.`\n );\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex(\n (entry2) => {\n var _a;\n return entry2.name === alias || ((_a = entry2.aliases) == null ? void 0 : _a.some((a) => a === alias));\n }\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} \"${entry.toMiddleware}\" middleware.`\n );\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n var _a;\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(\n identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? void 0 : _a.call(from)) ?? false)\n );\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ?? mw.relation + \" \" + mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n }\n };\n return stack;\n}, \"constructStack\");\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n constructStack\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n loadConfig: () => loadConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/configLoader.ts\n\n\n// src/fromEnv.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar fromEnv = /* @__PURE__ */ __name((envVarSelector) => async () => {\n try {\n const config = envVarSelector(process.env);\n if (config === void 0) {\n throw new Error();\n }\n return config;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`\n );\n }\n}, \"fromEnv\");\n\n// src/fromSharedConfigFiles.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = (0, import_shared_ini_file_loader.getProfileName)(init);\n const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === void 0) {\n throw new Error();\n }\n return configValue;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`\n );\n }\n}, \"fromSharedConfigFiles\");\n\n// src/fromStatic.ts\n\nvar isFunction = /* @__PURE__ */ __name((func) => typeof func === \"function\", \"isFunction\");\nvar fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), \"fromStatic\");\n\n// src/configLoader.ts\nvar loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n fromEnv(environmentVariableSelector),\n fromSharedConfigFiles(configFileSelector, configuration),\n fromStatic(defaultValue)\n )\n), \"loadConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loadConfig\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler: () => NodeHttp2Handler,\n NodeHttpHandler: () => NodeHttpHandler,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/node-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\nvar import_http = require(\"http\");\nvar import_https = require(\"https\");\n\n// src/constants.ts\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/get-transformed-headers.ts\nvar getTransformedHeaders = /* @__PURE__ */ __name((headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n}, \"getTransformedHeaders\");\n\n// src/set-connection-timeout.ts\nvar setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return;\n }\n const timeoutId = setTimeout(() => {\n request.destroy();\n reject(\n Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\"\n })\n );\n }, timeoutInMs);\n request.on(\"socket\", (socket) => {\n if (socket.connecting) {\n socket.on(\"connect\", () => {\n clearTimeout(timeoutId);\n });\n } else {\n clearTimeout(timeoutId);\n }\n });\n}, \"setConnectionTimeout\");\n\n// src/set-socket-keep-alive.ts\nvar setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }) => {\n if (keepAlive !== true) {\n return;\n }\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n}, \"setSocketKeepAlive\");\n\n// src/set-socket-timeout.ts\nvar setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n request.setTimeout(timeoutInMs, () => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n });\n}, \"setSocketTimeout\");\n\n// src/write-request-body.ts\nvar import_stream = require(\"stream\");\nvar MIN_WAIT_TIME = 1e3;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let hasError = false;\n if (expect === \"100-continue\") {\n await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n clearTimeout(timeoutId);\n resolve();\n });\n httpRequest.on(\"error\", () => {\n hasError = true;\n clearTimeout(timeoutId);\n resolve();\n });\n })\n ]);\n }\n if (!hasError) {\n writeBody(httpRequest, request.body);\n }\n}\n__name(writeRequestBody, \"writeRequestBody\");\nfunction writeBody(httpRequest, body) {\n if (body instanceof import_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n if (Buffer.isBuffer(body) || typeof body === \"string\") {\n httpRequest.end(body);\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" && uint8.buffer && typeof uint8.byteOffset === \"number\" && typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n__name(writeBody, \"writeBody\");\n\n// src/node-http-handler.ts\nvar DEFAULT_REQUEST_TIMEOUT = 0;\nvar _NodeHttpHandler = class _NodeHttpHandler {\n constructor(options) {\n this.socketWarningTimestamp = 0;\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n }).catch(reject);\n } else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttpHandler(instanceOrOptions);\n }\n /**\n * @internal\n *\n * @param agent - http(s) agent in use by the NodeHttpHandler instance.\n * @returns timestamp of last emitted warning.\n */\n static checkSocketUsage(agent, socketWarningTimestamp) {\n var _a, _b;\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15e3;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0;\n const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n console.warn(\n \"@smithy/node-http-handler:WARN\",\n `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`,\n \"See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\",\n \"or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.\"\n );\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n httpAgent: (() => {\n if (httpAgent instanceof import_http.Agent || typeof (httpAgent == null ? void 0 : httpAgent.destroy) === \"function\") {\n return httpAgent;\n }\n return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent });\n })(),\n httpsAgent: (() => {\n if (httpsAgent instanceof import_https.Agent || typeof (httpsAgent == null ? void 0 : httpsAgent.destroy) === \"function\") {\n return httpsAgent;\n }\n return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })()\n };\n }\n destroy() {\n var _a, _b, _c, _d;\n (_b = (_a = this.config) == null ? void 0 : _a.httpAgent) == null ? void 0 : _b.destroy();\n (_d = (_c = this.config) == null ? void 0 : _c.httpsAgent) == null ? void 0 : _d.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n let socketCheckTimeoutId;\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n clearTimeout(socketCheckTimeoutId);\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;\n socketCheckTimeoutId = setTimeout(() => {\n this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp);\n }, this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3));\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n let auth = void 0;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: request.hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth\n };\n const requestFunc = isSSL ? import_https.request : import_http.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n } else {\n reject(err);\n }\n });\n setConnectionTimeout(req, reject, this.config.connectionTimeout);\n setSocketTimeout(req, reject, this.config.requestTimeout);\n if (abortSignal) {\n abortSignal.onabort = () => {\n req.abort();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n };\n }\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n setSocketKeepAlive(req, {\n // @ts-expect-error keepAlive is not public on httpAgent.\n keepAlive: httpAgent.keepAlive,\n // @ts-expect-error keepAliveMsecs is not public on httpAgent.\n keepAliveMsecs: httpAgent.keepAliveMsecs\n });\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n__name(_NodeHttpHandler, \"NodeHttpHandler\");\nvar NodeHttpHandler = _NodeHttpHandler;\n\n// src/node-http2-handler.ts\n\n\nvar import_http22 = require(\"http2\");\n\n// src/node-http2-connection-manager.ts\nvar import_http2 = __toESM(require(\"http2\"));\n\n// src/node-http2-connection-pool.ts\nvar _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool {\n constructor(sessions) {\n this.sessions = [];\n this.sessions = sessions ?? [];\n }\n poll() {\n if (this.sessions.length > 0) {\n return this.sessions.shift();\n }\n }\n offerLast(session) {\n this.sessions.push(session);\n }\n contains(session) {\n return this.sessions.includes(session);\n }\n remove(session) {\n this.sessions = this.sessions.filter((s) => s !== session);\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n destroy(connection) {\n for (const session of this.sessions) {\n if (session === connection) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n }\n }\n};\n__name(_NodeHttp2ConnectionPool, \"NodeHttp2ConnectionPool\");\nvar NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool;\n\n// src/node-http2-connection-manager.ts\nvar _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager {\n constructor(config) {\n this.sessionCache = /* @__PURE__ */ new Map();\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const existingPool = this.sessionCache.get(url);\n if (existingPool) {\n const existingSession = existingPool.poll();\n if (existingSession && !this.config.disableConcurrency) {\n return existingSession;\n }\n }\n const session = import_http2.default.connect(url);\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\n \"Fail to set maxConcurrentStreams to \" + this.config.maxConcurrency + \"when creating new session for \" + requestContext.destination.toString()\n );\n }\n });\n }\n session.unref();\n const destroySessionCb = /* @__PURE__ */ __name(() => {\n session.destroy();\n this.deleteSession(url, session);\n }, \"destroySessionCb\");\n session.on(\"goaway\", destroySessionCb);\n session.on(\"error\", destroySessionCb);\n session.on(\"frameError\", destroySessionCb);\n session.on(\"close\", () => this.deleteSession(url, session));\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);\n }\n const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();\n connectionPool.offerLast(session);\n this.sessionCache.set(url, connectionPool);\n return session;\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSession(authority, session) {\n const existingConnectionPool = this.sessionCache.get(authority);\n if (!existingConnectionPool) {\n return;\n }\n if (!existingConnectionPool.contains(session)) {\n return;\n }\n existingConnectionPool.remove(session);\n this.sessionCache.set(authority, existingConnectionPool);\n }\n release(requestContext, session) {\n var _a;\n const cacheKey = this.getUrlString(requestContext);\n (_a = this.sessionCache.get(cacheKey)) == null ? void 0 : _a.offerLast(session);\n }\n destroy() {\n for (const [key, connectionPool] of this.sessionCache) {\n for (const session of connectionPool) {\n if (!session.destroyed) {\n session.destroy();\n }\n connectionPool.remove(session);\n }\n this.sessionCache.delete(key);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n};\n__name(_NodeHttp2ConnectionManager, \"NodeHttp2ConnectionManager\");\nvar NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager;\n\n// src/node-http2-handler.ts\nvar _NodeHttp2Handler = class _NodeHttp2Handler {\n constructor(options) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.connectionManager = new NodeHttp2ConnectionManager({});\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((opts) => {\n resolve(opts || {});\n }).catch(reject);\n } else {\n resolve(options || {});\n }\n });\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof (instanceOrOptions == null ? void 0 : instanceOrOptions.handle) === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttp2Handler(instanceOrOptions);\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);\n if (this.config.maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);\n }\n }\n const { requestTimeout, disableConcurrentStreams } = this.config;\n return new Promise((_resolve, _reject) => {\n var _a;\n let fulfilled = false;\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (abortSignal == null ? void 0 : abortSignal.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const session = this.connectionManager.lease(requestContext, {\n requestTimeout: (_a = this.config) == null ? void 0 : _a.sessionTimeout,\n disableConcurrentStreams: disableConcurrentStreams || false\n });\n const rejectWithDestroy = /* @__PURE__ */ __name((err) => {\n if (disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n reject(err);\n }, \"rejectWithDestroy\");\n const queryString = (0, import_querystring_builder.buildQueryString)(query || {});\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const req = session.request({\n ...request.headers,\n [import_http22.constants.HTTP2_HEADER_PATH]: path,\n [import_http22.constants.HTTP2_HEADER_METHOD]: method\n });\n session.ref();\n req.on(\"response\", (headers) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: getTransformedHeaders(headers),\n body: req\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (disableConcurrentStreams) {\n session.close();\n this.connectionManager.deleteSession(authority, session);\n }\n });\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n abortSignal.onabort = () => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectWithDestroy(abortError);\n };\n }\n req.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", rejectWithDestroy);\n req.on(\"aborted\", () => {\n rejectWithDestroy(\n new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)\n );\n });\n req.on(\"close\", () => {\n session.unref();\n if (disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n /**\n * Destroys a session.\n * @param session The session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n};\n__name(_NodeHttp2Handler, \"NodeHttp2Handler\");\nvar NodeHttp2Handler = _NodeHttp2Handler;\n\n// src/stream-collector/collector.ts\n\nvar _Collector = class _Collector extends import_stream.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n};\n__name(_Collector, \"Collector\");\nvar Collector = _Collector;\n\n// src/stream-collector/index.ts\nvar streamCollector = /* @__PURE__ */ __name((stream) => new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function() {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n}), \"streamCollector\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_REQUEST_TIMEOUT,\n NodeHttpHandler,\n NodeHttp2Handler,\n streamCollector\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CredentialsProviderError: () => CredentialsProviderError,\n ProviderError: () => ProviderError,\n TokenProviderError: () => TokenProviderError,\n chain: () => chain,\n fromStatic: () => fromStatic,\n memoize: () => memoize\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/ProviderError.ts\nvar _ProviderError = class _ProviderError extends Error {\n constructor(message, tryNextLink = true) {\n super(message);\n this.tryNextLink = tryNextLink;\n this.name = \"ProviderError\";\n Object.setPrototypeOf(this, _ProviderError.prototype);\n }\n static from(error, tryNextLink = true) {\n return Object.assign(new this(error.message, tryNextLink), error);\n }\n};\n__name(_ProviderError, \"ProviderError\");\nvar ProviderError = _ProviderError;\n\n// src/CredentialsProviderError.ts\nvar _CredentialsProviderError = class _CredentialsProviderError extends ProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"CredentialsProviderError\";\n Object.setPrototypeOf(this, _CredentialsProviderError.prototype);\n }\n};\n__name(_CredentialsProviderError, \"CredentialsProviderError\");\nvar CredentialsProviderError = _CredentialsProviderError;\n\n// src/TokenProviderError.ts\nvar _TokenProviderError = class _TokenProviderError extends ProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"TokenProviderError\";\n Object.setPrototypeOf(this, _TokenProviderError.prototype);\n }\n};\n__name(_TokenProviderError, \"TokenProviderError\");\nvar TokenProviderError = _TokenProviderError;\n\n// src/chain.ts\nvar chain = /* @__PURE__ */ __name((...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n } catch (err) {\n lastProviderError = err;\n if (err == null ? void 0 : err.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n}, \"chain\");\n\n// src/fromStatic.ts\nvar fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), \"fromStatic\");\n\n// src/memoize.ts\nvar memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || (options == null ? void 0 : options.forceRefresh)) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n}, \"memoize\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CredentialsProviderError,\n ProviderError,\n TokenProviderError,\n chain,\n fromStatic,\n memoize\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Field: () => Field,\n Fields: () => Fields,\n HttpRequest: () => HttpRequest,\n HttpResponse: () => HttpResponse,\n getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,\n isValidHostname: () => isValidHostname,\n resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/httpExtensionConfiguration.ts\nvar getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let httpHandler = runtimeConfig.httpHandler;\n return {\n setHttpHandler(handler) {\n httpHandler = handler;\n },\n httpHandler() {\n return httpHandler;\n },\n updateHttpClientConfig(key, value) {\n httpHandler.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return httpHandler.httpHandlerConfigs();\n }\n };\n}, \"getHttpHandlerExtensionConfiguration\");\nvar resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler()\n };\n}, \"resolveHttpHandlerRuntimeConfig\");\n\n// src/Field.ts\nvar import_types = require(\"@smithy/types\");\nvar _Field = class _Field {\n constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n /**\n * Appends a value to the field.\n *\n * @param value The value to append.\n */\n add(value) {\n this.values.push(value);\n }\n /**\n * Overwrite existing field values.\n *\n * @param values The new field values.\n */\n set(values) {\n this.values = values;\n }\n /**\n * Remove all matching entries from list.\n *\n * @param value Value to remove.\n */\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n /**\n * Get comma-delimited string.\n *\n * @returns String representation of {@link Field}.\n */\n toString() {\n return this.values.map((v) => v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v).join(\", \");\n }\n /**\n * Get string values as a list\n *\n * @returns Values in {@link Field} as a list.\n */\n get() {\n return this.values;\n }\n};\n__name(_Field, \"Field\");\nvar Field = _Field;\n\n// src/Fields.ts\nvar _Fields = class _Fields {\n constructor({ fields = [], encoding = \"utf-8\" }) {\n this.entries = {};\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n /**\n * Set entry for a {@link Field} name. The `name`\n * attribute will be used to key the collection.\n *\n * @param field The {@link Field} to set.\n */\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n /**\n * Retrieve {@link Field} entry by name.\n *\n * @param name The name of the {@link Field} entry\n * to retrieve\n * @returns The {@link Field} if it exists.\n */\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n /**\n * Delete entry from collection.\n *\n * @param name Name of the entry to delete.\n */\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n /**\n * Helper function for retrieving specific types of fields.\n * Used to grab all headers or all trailers.\n *\n * @param kind {@link FieldPosition} of entries to retrieve.\n * @returns The {@link Field} entries with the specified\n * {@link FieldPosition}.\n */\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n};\n__name(_Fields, \"Fields\");\nvar Fields = _Fields;\n\n// src/httpRequest.ts\nvar _HttpRequest = class _HttpRequest {\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.slice(-1) !== \":\" ? `${options.protocol}:` : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static isInstance(request) {\n if (!request)\n return false;\n const req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n }\n clone() {\n const cloned = new _HttpRequest({\n ...this,\n headers: { ...this.headers }\n });\n if (cloned.query)\n cloned.query = cloneQuery(cloned.query);\n return cloned;\n }\n};\n__name(_HttpRequest, \"HttpRequest\");\nvar HttpRequest = _HttpRequest;\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n }, {});\n}\n__name(cloneQuery, \"cloneQuery\");\n\n// src/httpResponse.ts\nvar _HttpResponse = class _HttpResponse {\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n};\n__name(_HttpResponse, \"HttpResponse\");\nvar HttpResponse = _HttpResponse;\n\n// src/isValidHostname.ts\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n__name(isValidHostname, \"isValidHostname\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHttpHandlerExtensionConfiguration,\n resolveHttpHandlerRuntimeConfig,\n Field,\n Fields,\n HttpRequest,\n HttpResponse,\n isValidHostname\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n buildQueryString: () => buildQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = (0, import_util_uri_escape.escapeUri)(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);\n }\n } else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n__name(buildQueryString, \"buildQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n buildQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseQueryString: () => parseQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nfunction parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n__name(parseQueryString, \"parseQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isClockSkewCorrectedError: () => isClockSkewCorrectedError,\n isClockSkewError: () => isClockSkewError,\n isRetryableByTrait: () => isRetryableByTrait,\n isServerError: () => isServerError,\n isThrottlingError: () => isThrottlingError,\n isTransientError: () => isTransientError\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/constants.ts\nvar CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\"\n];\nvar THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\"\n // DynamoDB\n];\nvar TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nvar TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/index.ts\nvar isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, \"isRetryableByTrait\");\nvar isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), \"isClockSkewError\");\nvar isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => {\n var _a;\n return (_a = error.$metadata) == null ? void 0 : _a.clockSkewCorrected;\n}, \"isClockSkewCorrectedError\");\nvar isThrottlingError = /* @__PURE__ */ __name((error) => {\n var _a, _b;\n return ((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? void 0 : _b.throttling) == true;\n}, \"isThrottlingError\");\nvar isTransientError = /* @__PURE__ */ __name((error) => {\n var _a;\n return isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? void 0 : error.code) || \"\") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) || 0);\n}, \"isTransientError\");\nvar isServerError = /* @__PURE__ */ __name((error) => {\n var _a;\n if (((_a = error.$metadata) == null ? void 0 : _a.httpStatusCode) !== void 0) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n}, \"isServerError\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isRetryableByTrait,\n isClockSkewError,\n isClockSkewCorrectedError,\n isThrottlingError,\n isTransientError,\n isServerError\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHomeDir = void 0;\nconst os_1 = require(\"os\");\nconst path_1 = require(\"path\");\nconst homeDirCache = {};\nconst getHomeDirCacheKey = () => {\n if (process && process.geteuid) {\n return `${process.geteuid()}`;\n }\n return \"DEFAULT\";\n};\nconst getHomeDir = () => {\n const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;\n if (HOME)\n return HOME;\n if (USERPROFILE)\n return USERPROFILE;\n if (HOMEPATH)\n return `${HOMEDRIVE}${HOMEPATH}`;\n const homeDirCacheKey = getHomeDirCacheKey();\n if (!homeDirCache[homeDirCacheKey])\n homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();\n return homeDirCache[homeDirCacheKey];\n};\nexports.getHomeDir = getHomeDir;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFilepath = void 0;\nconst crypto_1 = require(\"crypto\");\nconst path_1 = require(\"path\");\nconst getHomeDir_1 = require(\"./getHomeDir\");\nconst getSSOTokenFilepath = (id) => {\n const hasher = (0, crypto_1.createHash)(\"sha1\");\n const cacheName = hasher.update(id).digest(\"hex\");\n return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), \".aws\", \"sso\", \"cache\", `${cacheName}.json`);\n};\nexports.getSSOTokenFilepath = getSSOTokenFilepath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFromFile = void 0;\nconst fs_1 = require(\"fs\");\nconst getSSOTokenFilepath_1 = require(\"./getSSOTokenFilepath\");\nconst { readFile } = fs_1.promises;\nconst getSSOTokenFromFile = async (id) => {\n const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);\n const ssoTokenText = await readFile(ssoTokenFilepath, \"utf8\");\n return JSON.parse(ssoTokenText);\n};\nexports.getSSOTokenFromFile = getSSOTokenFromFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR,\n DEFAULT_PROFILE: () => DEFAULT_PROFILE,\n ENV_PROFILE: () => ENV_PROFILE,\n getProfileName: () => getProfileName,\n loadSharedConfigFiles: () => loadSharedConfigFiles,\n loadSsoSessionData: () => loadSsoSessionData,\n parseKnownFiles: () => parseKnownFiles\n});\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././getHomeDir\"), module.exports);\n\n// src/getProfileName.ts\nvar ENV_PROFILE = \"AWS_PROFILE\";\nvar DEFAULT_PROFILE = \"default\";\nvar getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, \"getProfileName\");\n\n// src/index.ts\n__reExport(src_exports, require(\"././getSSOTokenFilepath\"), module.exports);\n__reExport(src_exports, require(\"././getSSOTokenFromFile\"), module.exports);\n\n// src/getConfigData.ts\nvar import_types = require(\"@smithy/types\");\nvar getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n if (indexOfSeparator === -1) {\n return false;\n }\n return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator));\n}).reduce(\n (acc, [key, value]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;\n acc[updatedKey] = value;\n return acc;\n },\n {\n // Populate default profile, if present.\n ...data.default && { default: data.default }\n }\n), \"getConfigData\");\n\n// src/getConfigFilepath.ts\nvar import_path = require(\"path\");\nvar import_getHomeDir = require(\"././getHomeDir\");\nvar ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nvar getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), \".aws\", \"config\"), \"getConfigFilepath\");\n\n// src/getCredentialsFilepath.ts\n\nvar import_getHomeDir2 = require(\"././getHomeDir\");\nvar ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nvar getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), \".aws\", \"credentials\"), \"getCredentialsFilepath\");\n\n// src/parseIni.ts\n\nvar prefixKeyRegex = /^([\\w-]+)\\s([\"'])?([\\w-@\\+\\.%:/]+)\\2$/;\nvar profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nvar parseIni = /* @__PURE__ */ __name((iniData) => {\n const map = {};\n let currentSection;\n let currentSubSection;\n for (const iniLine of iniData.split(/\\r?\\n/)) {\n const trimmedLine = iniLine.split(/(^|\\s)[;#]/)[0].trim();\n const isSection = trimmedLine[0] === \"[\" && trimmedLine[trimmedLine.length - 1] === \"]\";\n if (isSection) {\n currentSection = void 0;\n currentSubSection = void 0;\n const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);\n const matches = prefixKeyRegex.exec(sectionName);\n if (matches) {\n const [, prefix, , name] = matches;\n if (Object.values(import_types.IniSectionType).includes(prefix)) {\n currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);\n }\n } else {\n currentSection = sectionName;\n }\n if (profileNameBlockList.includes(sectionName)) {\n throw new Error(`Found invalid profile name \"${sectionName}\"`);\n }\n } else if (currentSection) {\n const indexOfEqualsSign = trimmedLine.indexOf(\"=\");\n if (![0, -1].includes(indexOfEqualsSign)) {\n const [name, value] = [\n trimmedLine.substring(0, indexOfEqualsSign).trim(),\n trimmedLine.substring(indexOfEqualsSign + 1).trim()\n ];\n if (value === \"\") {\n currentSubSection = name;\n } else {\n if (currentSubSection && iniLine.trimStart() === iniLine) {\n currentSubSection = void 0;\n }\n map[currentSection] = map[currentSection] || {};\n const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;\n map[currentSection][key] = value;\n }\n }\n }\n }\n return map;\n}, \"parseIni\");\n\n// src/loadSharedConfigFiles.ts\nvar import_slurpFile = require(\"././slurpFile\");\nvar swallowError = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar CONFIG_PREFIX_SEPARATOR = \".\";\nvar loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => {\n const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;\n const parsedFiles = await Promise.all([\n (0, import_slurpFile.slurpFile)(configFilepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).then(getConfigData).catch(swallowError),\n (0, import_slurpFile.slurpFile)(filepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).catch(swallowError)\n ]);\n return {\n configFile: parsedFiles[0],\n credentialsFile: parsedFiles[1]\n };\n}, \"loadSharedConfigFiles\");\n\n// src/getSsoSessionData.ts\n\nvar getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), \"getSsoSessionData\");\n\n// src/loadSsoSessionData.ts\nvar import_slurpFile2 = require(\"././slurpFile\");\nvar swallowError2 = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), \"loadSsoSessionData\");\n\n// src/mergeConfigFiles.ts\nvar mergeConfigFiles = /* @__PURE__ */ __name((...files) => {\n const merged = {};\n for (const file of files) {\n for (const [key, values] of Object.entries(file)) {\n if (merged[key] !== void 0) {\n Object.assign(merged[key], values);\n } else {\n merged[key] = values;\n }\n }\n }\n return merged;\n}, \"mergeConfigFiles\");\n\n// src/parseKnownFiles.ts\nvar parseKnownFiles = /* @__PURE__ */ __name(async (init) => {\n const parsedFiles = await loadSharedConfigFiles(init);\n return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n}, \"parseKnownFiles\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHomeDir,\n ENV_PROFILE,\n DEFAULT_PROFILE,\n getProfileName,\n getSSOTokenFilepath,\n getSSOTokenFromFile,\n CONFIG_PREFIX_SEPARATOR,\n loadSharedConfigFiles,\n loadSsoSessionData,\n parseKnownFiles\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slurpFile = void 0;\nconst fs_1 = require(\"fs\");\nconst { readFile } = fs_1.promises;\nconst filePromisesHash = {};\nconst slurpFile = (path, options) => {\n if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) {\n filePromisesHash[path] = readFile(path, \"utf8\");\n }\n return filePromisesHash[path];\n};\nexports.slurpFile = slurpFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n SignatureV4: () => SignatureV4,\n clearCredentialCache: () => clearCredentialCache,\n createScope: () => createScope,\n getCanonicalHeaders: () => getCanonicalHeaders,\n getCanonicalQuery: () => getCanonicalQuery,\n getPayloadHash: () => getPayloadHash,\n getSigningKey: () => getSigningKey,\n moveHeadersToQuery: () => moveHeadersToQuery,\n prepareRequest: () => prepareRequest\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SignatureV4.ts\nvar import_eventstream_codec = require(\"@smithy/eventstream-codec\");\n\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar import_util_utf83 = require(\"@smithy/util-utf8\");\n\n// src/constants.ts\nvar ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nvar CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nvar AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nvar SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nvar EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nvar SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nvar TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nvar AUTH_HEADER = \"authorization\";\nvar AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nvar DATE_HEADER = \"date\";\nvar GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nvar SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nvar SHA256_HEADER = \"x-amz-content-sha256\";\nvar TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nvar ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true\n};\nvar PROXY_HEADER_PATTERN = /^proxy-/;\nvar SEC_HEADER_PATTERN = /^sec-/;\nvar ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nvar EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nvar UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nvar MAX_CACHE_SIZE = 50;\nvar KEY_TYPE_IDENTIFIER = \"aws4_request\";\nvar MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n\n// src/credentialDerivation.ts\nvar import_util_hex_encoding = require(\"@smithy/util-hex-encoding\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar signingKeyCache = {};\nvar cacheQueue = [];\nvar createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, \"createScope\");\nvar getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return signingKeyCache[cacheKey] = key;\n}, \"getSigningKey\");\nvar clearCredentialCache = /* @__PURE__ */ __name(() => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n}, \"clearCredentialCache\");\nvar hmac = /* @__PURE__ */ __name((ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update((0, import_util_utf8.toUint8Array)(data));\n return hash.digest();\n}, \"hmac\");\n\n// src/getCanonicalHeaders.ts\nvar getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == void 0) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders == null ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n}, \"getCanonicalHeaders\");\n\n// src/getCanonicalQuery.ts\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nvar getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query).sort()) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n keys.push(key);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`;\n } else if (Array.isArray(value)) {\n serialized[key] = value.slice(0).reduce(\n (encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]),\n []\n ).sort().join(\"&\");\n }\n }\n return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join(\"&\");\n}, \"getCanonicalQuery\");\n\n// src/getPayloadHash.ts\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\n\nvar import_util_utf82 = require(\"@smithy/util-utf8\");\nvar getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == void 0) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n } else if (typeof body === \"string\" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update((0, import_util_utf82.toUint8Array)(body));\n return (0, import_util_hex_encoding.toHex)(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n}, \"getPayloadHash\");\n\n// src/headerUtil.ts\nvar hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n}, \"hasHeader\");\n\n// src/cloneRequest.ts\nvar cloneRequest = /* @__PURE__ */ __name(({ headers, query, ...rest }) => ({\n ...rest,\n headers: { ...headers },\n query: query ? cloneQuery(query) : void 0\n}), \"cloneRequest\");\nvar cloneQuery = /* @__PURE__ */ __name((query) => Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n}, {}), \"cloneQuery\");\n\n// src/moveHeadersToQuery.ts\nvar moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {\n var _a;\n const { headers, query = {} } = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if (lname.slice(0, 6) === \"x-amz-\" && !((_a = options.unhoistableHeaders) == null ? void 0 : _a.has(lname))) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query\n };\n}, \"moveHeadersToQuery\");\n\n// src/prepareRequest.ts\nvar prepareRequest = /* @__PURE__ */ __name((request) => {\n request = typeof request.clone === \"function\" ? request.clone() : cloneRequest(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n}, \"prepareRequest\");\n\n// src/utilDate.ts\nvar iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\\.\\d{3}Z$/, \"Z\"), \"iso8601\");\nvar toDate = /* @__PURE__ */ __name((time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1e3);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1e3);\n }\n return new Date(time);\n }\n return time;\n}, \"toDate\");\n\n// src/SignatureV4.ts\nvar _SignatureV4 = class _SignatureV4 {\n constructor({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath = true\n }) {\n this.headerMarshaller = new import_eventstream_codec.HeaderMarshaller(import_util_utf83.toUtf8, import_util_utf83.fromUtf8);\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = (0, import_util_middleware.normalizeProvider)(region);\n this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials);\n }\n async presign(originalRequest, options = {}) {\n const {\n signingDate = /* @__PURE__ */ new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n signingRegion,\n signingService\n } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { longDate, shortDate } = formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\n \"Signature version 4 presigned URLs must have an expiration date less than one week in the future\"\n );\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))\n );\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n } else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n } else if (toSign.message) {\n return this.signMessage(toSign, options);\n } else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate, longDate } = formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) {\n const promise = this.signEvent(\n {\n headers: this.headerMarshaller.format(signableMessage.message.headers),\n payload: signableMessage.message.body\n },\n {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature\n }\n );\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate } = formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update((0, import_util_utf83.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n async signRequest(requestToSign, {\n signingDate = /* @__PURE__ */ new Date(),\n signableHeaders,\n unsignableHeaders,\n signingRegion,\n signingService\n } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n );\n request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;\n return request;\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest) {\n const hash = new this.sha256();\n hash.update((0, import_util_utf83.toUint8Array)(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${ALGORITHM_IDENTIFIER}\n${longDate}\n${credentialScope}\n${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if ((pathSegment == null ? void 0 : pathSegment.length) === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n } else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${(path == null ? void 0 : path.startsWith(\"/\")) ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith(\"/\")) ? \"/\" : \"\"}`;\n const doubleEncoded = encodeURIComponent(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);\n const hash = new this.sha256(await keyPromise);\n hash.update((0, import_util_utf83.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339)\n typeof credentials.accessKeyId !== \"string\" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339)\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n};\n__name(_SignatureV4, \"SignatureV4\");\nvar SignatureV4 = _SignatureV4;\nvar formatDate = /* @__PURE__ */ __name((now) => {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8)\n };\n}, \"formatDate\");\nvar getCanonicalHeaderList = /* @__PURE__ */ __name((headers) => Object.keys(headers).sort().join(\";\"), \"getCanonicalHeaderList\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getCanonicalHeaders,\n getCanonicalQuery,\n getPayloadHash,\n moveHeadersToQuery,\n prepareRequest,\n SignatureV4,\n createScope,\n getSigningKey,\n clearCredentialCache\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Client: () => Client,\n Command: () => Command,\n LazyJsonString: () => LazyJsonString,\n NoOpLogger: () => NoOpLogger,\n SENSITIVE_STRING: () => SENSITIVE_STRING,\n ServiceException: () => ServiceException,\n StringWrapper: () => StringWrapper,\n _json: () => _json,\n collectBody: () => collectBody,\n convertMap: () => convertMap,\n createAggregatedClient: () => createAggregatedClient,\n dateToUtcString: () => dateToUtcString,\n decorateServiceException: () => decorateServiceException,\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n expectBoolean: () => expectBoolean,\n expectByte: () => expectByte,\n expectFloat32: () => expectFloat32,\n expectInt: () => expectInt,\n expectInt32: () => expectInt32,\n expectLong: () => expectLong,\n expectNonNull: () => expectNonNull,\n expectNumber: () => expectNumber,\n expectObject: () => expectObject,\n expectShort: () => expectShort,\n expectString: () => expectString,\n expectUnion: () => expectUnion,\n extendedEncodeURIComponent: () => extendedEncodeURIComponent,\n getArrayIfSingleItem: () => getArrayIfSingleItem,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,\n getValueFromTextNode: () => getValueFromTextNode,\n handleFloat: () => handleFloat,\n limitedParseDouble: () => limitedParseDouble,\n limitedParseFloat: () => limitedParseFloat,\n limitedParseFloat32: () => limitedParseFloat32,\n loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,\n logger: () => logger,\n map: () => map,\n parseBoolean: () => parseBoolean,\n parseEpochTimestamp: () => parseEpochTimestamp,\n parseRfc3339DateTime: () => parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime: () => parseRfc7231DateTime,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,\n resolvedPath: () => resolvedPath,\n serializeFloat: () => serializeFloat,\n splitEvery: () => splitEvery,\n strictParseByte: () => strictParseByte,\n strictParseDouble: () => strictParseDouble,\n strictParseFloat: () => strictParseFloat,\n strictParseFloat32: () => strictParseFloat32,\n strictParseInt: () => strictParseInt,\n strictParseInt32: () => strictParseInt32,\n strictParseLong: () => strictParseLong,\n strictParseShort: () => strictParseShort,\n take: () => take,\n throwDefaultError: () => throwDefaultError,\n withBaseException: () => withBaseException\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/NoOpLogger.ts\nvar _NoOpLogger = class _NoOpLogger {\n trace() {\n }\n debug() {\n }\n info() {\n }\n warn() {\n }\n error() {\n }\n};\n__name(_NoOpLogger, \"NoOpLogger\");\nvar NoOpLogger = _NoOpLogger;\n\n// src/client.ts\nvar import_middleware_stack = require(\"@smithy/middleware-stack\");\nvar _Client = class _Client {\n constructor(config) {\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n this.config = config;\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : void 0;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n if (callback) {\n handler(command).then(\n (result) => callback(null, result.output),\n (err) => callback(err)\n ).catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n () => {\n }\n );\n } else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n if (this.config.requestHandler.destroy)\n this.config.requestHandler.destroy();\n }\n};\n__name(_Client, \"Client\");\nvar Client = _Client;\n\n// src/collect-stream-body.ts\nvar import_util_stream = require(\"@smithy/util-stream\");\nvar collectBody = /* @__PURE__ */ __name(async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);\n}, \"collectBody\");\n\n// src/command.ts\n\nvar import_types = require(\"@smithy/types\");\nvar _Command = class _Command {\n constructor() {\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n }\n /**\n * Factory for Command ClassBuilder.\n * @internal\n */\n static classBuilder() {\n return new ClassBuilder();\n }\n /**\n * @internal\n */\n resolveMiddlewareWithContext(clientStack, configuration, options, {\n middlewareFn,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n smithyContext,\n additionalContext,\n CommandCtor\n }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger: logger2 } = configuration;\n const handlerExecutionContext = {\n logger: logger2,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [import_types.SMITHY_CONTEXT_KEY]: {\n ...smithyContext\n },\n ...additionalContext\n };\n const { requestHandler } = configuration;\n return stack.resolve(\n (request) => requestHandler.handle(request.request, options || {}),\n handlerExecutionContext\n );\n }\n};\n__name(_Command, \"Command\");\nvar Command = _Command;\nvar _ClassBuilder = class _ClassBuilder {\n constructor() {\n this._init = () => {\n };\n this._ep = {};\n this._middlewareFn = () => [];\n this._commandName = \"\";\n this._clientName = \"\";\n this._additionalContext = {};\n this._smithyContext = {};\n this._inputFilterSensitiveLog = (_) => _;\n this._outputFilterSensitiveLog = (_) => _;\n this._serializer = null;\n this._deserializer = null;\n }\n /**\n * Optional init callback.\n */\n init(cb) {\n this._init = cb;\n }\n /**\n * Set the endpoint parameter instructions.\n */\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n /**\n * Add any number of middleware.\n */\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n /**\n * Set the initial handler execution context Smithy field.\n */\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext\n };\n return this;\n }\n /**\n * Set the initial handler execution context.\n */\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n /**\n * Set constant string identifiers for the operation.\n */\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n /**\n * Set the input and output sensistive log filters.\n */\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n /**\n * Sets the serializer.\n */\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n /**\n * Sets the deserializer.\n */\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n /**\n * @returns a Command class with the classBuilder properties.\n */\n build() {\n var _a;\n const closure = this;\n let CommandRef;\n return CommandRef = (_a = class extends Command {\n /**\n * @public\n */\n constructor(...[input]) {\n super();\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.serialize = closure._serializer;\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.deserialize = closure._deserializer;\n this.input = input ?? {};\n closure._init(this);\n }\n /**\n * @public\n */\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n /**\n * @internal\n */\n resolveMiddleware(stack, configuration, options) {\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog,\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog,\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext\n });\n }\n }, __name(_a, \"CommandRef\"), _a);\n }\n};\n__name(_ClassBuilder, \"ClassBuilder\");\nvar ClassBuilder = _ClassBuilder;\n\n// src/constants.ts\nvar SENSITIVE_STRING = \"***SensitiveInformation***\";\n\n// src/create-aggregated-client.ts\nvar createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => {\n for (const command of Object.keys(commands)) {\n const CommandCtor = commands[command];\n const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) {\n const command2 = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command2, optionsOrCb);\n } else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command2, optionsOrCb || {}, cb);\n } else {\n return this.send(command2, optionsOrCb);\n }\n }, \"methodImpl\");\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client2.prototype[methodName] = methodImpl;\n }\n}, \"createAggregatedClient\");\n\n// src/parse-utils.ts\nvar parseBoolean = /* @__PURE__ */ __name((value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n}, \"parseBoolean\");\nvar expectBoolean = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n}, \"expectBoolean\");\nvar expectNumber = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n}, \"expectNumber\");\nvar MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nvar expectFloat32 = /* @__PURE__ */ __name((value) => {\n const expected = expectNumber(value);\n if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n}, \"expectFloat32\");\nvar expectLong = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n}, \"expectLong\");\nvar expectInt = expectLong;\nvar expectInt32 = /* @__PURE__ */ __name((value) => expectSizedInt(value, 32), \"expectInt32\");\nvar expectShort = /* @__PURE__ */ __name((value) => expectSizedInt(value, 16), \"expectShort\");\nvar expectByte = /* @__PURE__ */ __name((value) => expectSizedInt(value, 8), \"expectByte\");\nvar expectSizedInt = /* @__PURE__ */ __name((value, size) => {\n const expected = expectLong(value);\n if (expected !== void 0 && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n}, \"expectSizedInt\");\nvar castInt = /* @__PURE__ */ __name((value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n}, \"castInt\");\nvar expectNonNull = /* @__PURE__ */ __name((value, location) => {\n if (value === null || value === void 0) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n}, \"expectNonNull\");\nvar expectObject = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n}, \"expectObject\");\nvar expectString = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n}, \"expectString\");\nvar expectUnion = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n}, \"expectUnion\");\nvar strictParseDouble = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n}, \"strictParseDouble\");\nvar strictParseFloat = strictParseDouble;\nvar strictParseFloat32 = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n}, \"strictParseFloat32\");\nvar NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nvar parseNumber = /* @__PURE__ */ __name((value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n}, \"parseNumber\");\nvar limitedParseDouble = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n}, \"limitedParseDouble\");\nvar handleFloat = limitedParseDouble;\nvar limitedParseFloat = limitedParseDouble;\nvar limitedParseFloat32 = /* @__PURE__ */ __name((value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n}, \"limitedParseFloat32\");\nvar parseFloatString = /* @__PURE__ */ __name((value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n}, \"parseFloatString\");\nvar strictParseLong = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n}, \"strictParseLong\");\nvar strictParseInt = strictParseLong;\nvar strictParseInt32 = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n}, \"strictParseInt32\");\nvar strictParseShort = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n}, \"strictParseShort\");\nvar strictParseByte = /* @__PURE__ */ __name((value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n}, \"strictParseByte\");\nvar stackTraceWarning = /* @__PURE__ */ __name((message) => {\n return String(new TypeError(message).stack || message).split(\"\\n\").slice(0, 5).filter((s) => !s.includes(\"stackTraceWarning\")).join(\"\\n\");\n}, \"stackTraceWarning\");\nvar logger = {\n warn: console.warn\n};\n\n// src/date-utils.ts\nvar DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nvar MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nfunction dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\n__name(dateToUtcString, \"dateToUtcString\");\nvar RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nvar parseRfc3339DateTime = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n}, \"parseRfc3339DateTime\");\nvar RFC3339_WITH_OFFSET = new RegExp(\n /^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/\n);\nvar parseRfc3339DateTimeWithOffset = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n}, \"parseRfc3339DateTimeWithOffset\");\nvar IMF_FIXDATE = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar RFC_850_DATE = new RegExp(\n /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar ASC_TIME = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/\n);\nvar parseRfc7231DateTime = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr, \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(\n buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds\n })\n );\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr.trimLeft(), \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n}, \"parseRfc7231DateTime\");\nvar parseEpochTimestamp = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n } else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n } else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1e3));\n}, \"parseEpochTimestamp\");\nvar buildDate = /* @__PURE__ */ __name((year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(\n Date.UTC(\n year,\n adjustedMonth,\n day,\n parseDateValue(time.hours, \"hour\", 0, 23),\n parseDateValue(time.minutes, \"minute\", 0, 59),\n // seconds can go up to 60 for leap seconds\n parseDateValue(time.seconds, \"seconds\", 0, 60),\n parseMilliseconds(time.fractionalMilliseconds)\n )\n );\n}, \"buildDate\");\nvar parseTwoDigitYear = /* @__PURE__ */ __name((value) => {\n const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n}, \"parseTwoDigitYear\");\nvar FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;\nvar adjustRfc850Year = /* @__PURE__ */ __name((input) => {\n if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(\n Date.UTC(\n input.getUTCFullYear() - 100,\n input.getUTCMonth(),\n input.getUTCDate(),\n input.getUTCHours(),\n input.getUTCMinutes(),\n input.getUTCSeconds(),\n input.getUTCMilliseconds()\n )\n );\n }\n return input;\n}, \"adjustRfc850Year\");\nvar parseMonthByShortName = /* @__PURE__ */ __name((value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n}, \"parseMonthByShortName\");\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar validateDayOfMonth = /* @__PURE__ */ __name((year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n}, \"validateDayOfMonth\");\nvar isLeapYear = /* @__PURE__ */ __name((year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}, \"isLeapYear\");\nvar parseDateValue = /* @__PURE__ */ __name((value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n}, \"parseDateValue\");\nvar parseMilliseconds = /* @__PURE__ */ __name((value) => {\n if (value === null || value === void 0) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1e3;\n}, \"parseMilliseconds\");\nvar parseOffsetToMilliseconds = /* @__PURE__ */ __name((value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n } else if (directionStr == \"-\") {\n direction = -1;\n } else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1e3;\n}, \"parseOffsetToMilliseconds\");\nvar stripLeadingZeroes = /* @__PURE__ */ __name((value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n}, \"stripLeadingZeroes\");\n\n// src/exceptions.ts\nvar _ServiceException = class _ServiceException extends Error {\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, _ServiceException.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n};\n__name(_ServiceException, \"ServiceException\");\nvar ServiceException = _ServiceException;\nvar decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => {\n Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {\n if (exception[k] == void 0 || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n}, \"decorateServiceException\");\n\n// src/default-error-handler.ts\nvar throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : void 0;\n const response = new exceptionCtor({\n name: (parsedBody == null ? void 0 : parsedBody.code) || (parsedBody == null ? void 0 : parsedBody.Code) || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata\n });\n throw decorateServiceException(response, parsedBody);\n}, \"throwDefaultError\");\nvar withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n}, \"withBaseException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\n\n// src/defaults-mode.ts\nvar loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3e4\n };\n default:\n return {};\n }\n}, \"loadConfigsForDefaultMode\");\n\n// src/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 14) {\n warningEmitted = true;\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/extensions/checksum.ts\n\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in import_types.AlgorithmId) {\n const algorithmId = import_types.AlgorithmId[id];\n if (runtimeConfig[algorithmId] === void 0) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId]\n });\n }\n return {\n _checksumAlgorithms: checksumAlgorithms,\n addChecksumAlgorithm(algo) {\n this._checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return this._checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/retry.ts\nvar getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n let _retryStrategy = runtimeConfig.retryStrategy;\n return {\n setRetryStrategy(retryStrategy) {\n _retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return _retryStrategy;\n }\n };\n}, \"getRetryConfiguration\");\nvar resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n}, \"resolveRetryRuntimeConfig\");\n\n// src/extensions/defaultExtensionConfiguration.ts\nvar getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n ...getChecksumConfiguration(runtimeConfig),\n ...getRetryConfiguration(runtimeConfig)\n };\n}, \"getDefaultExtensionConfiguration\");\nvar getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n ...resolveChecksumRuntimeConfig(config),\n ...resolveRetryRuntimeConfig(config)\n };\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/extended-encode-uri-component.ts\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n__name(extendedEncodeURIComponent, \"extendedEncodeURIComponent\");\n\n// src/get-array-if-single-item.ts\nvar getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], \"getArrayIfSingleItem\");\n\n// src/get-value-from-text-node.ts\nvar getValueFromTextNode = /* @__PURE__ */ __name((obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) {\n obj[key] = obj[key][textNodeName];\n } else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n}, \"getValueFromTextNode\");\n\n// src/lazy-json.ts\nvar StringWrapper = /* @__PURE__ */ __name(function() {\n const Class = Object.getPrototypeOf(this).constructor;\n const Constructor = Function.bind.apply(String, [null, ...arguments]);\n const instance = new Constructor();\n Object.setPrototypeOf(instance, Class.prototype);\n return instance;\n}, \"StringWrapper\");\nStringWrapper.prototype = Object.create(String.prototype, {\n constructor: {\n value: StringWrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n});\nObject.setPrototypeOf(StringWrapper, String);\nvar _LazyJsonString = class _LazyJsonString extends StringWrapper {\n deserializeJSON() {\n return JSON.parse(super.toString());\n }\n toJSON() {\n return super.toString();\n }\n static fromObject(object) {\n if (object instanceof _LazyJsonString) {\n return object;\n } else if (object instanceof String || typeof object === \"string\") {\n return new _LazyJsonString(object);\n }\n return new _LazyJsonString(JSON.stringify(object));\n }\n};\n__name(_LazyJsonString, \"LazyJsonString\");\nvar LazyJsonString = _LazyJsonString;\n\n// src/object-mapping.ts\nfunction map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n } else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n } else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\n__name(map, \"map\");\nvar convertMap = /* @__PURE__ */ __name((target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n}, \"convertMap\");\nvar take = /* @__PURE__ */ __name((source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n}, \"take\");\nvar mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => {\n return map(\n target,\n Object.entries(instructions).reduce(\n (_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n } else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n } else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n },\n {}\n )\n );\n}, \"mapWithFilter\");\nvar applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if (typeof filter2 === \"function\" && filter2(source[sourceKey]) || typeof filter2 !== \"function\" && !!filter2) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === void 0 && (_value = value()) != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(void 0) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n } else if (customFilterPassed) {\n target[targetKey] = value();\n }\n } else {\n const defaultFilterPassed = filter === void 0 && value != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(value) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n}, \"applyInstruction\");\nvar nonNullish = /* @__PURE__ */ __name((_) => _ != null, \"nonNullish\");\nvar pass = /* @__PURE__ */ __name((_) => _, \"pass\");\n\n// src/resolve-path.ts\nvar resolvedPath = /* @__PURE__ */ __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== void 0) {\n const labelValue = labelValueProvider();\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath2 = resolvedPath2.replace(\n uriLabel,\n isGreedyLabel ? labelValue.split(\"/\").map((segment) => extendedEncodeURIComponent(segment)).join(\"/\") : extendedEncodeURIComponent(labelValue)\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath2;\n}, \"resolvedPath\");\n\n// src/ser-utils.ts\nvar serializeFloat = /* @__PURE__ */ __name((value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n}, \"serializeFloat\");\n\n// src/serde-json.ts\nvar _json = /* @__PURE__ */ __name((obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n}, \"_json\");\n\n// src/split-every.ts\nfunction splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n } else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n__name(splitEvery, \"splitEvery\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n NoOpLogger,\n Client,\n collectBody,\n Command,\n SENSITIVE_STRING,\n createAggregatedClient,\n dateToUtcString,\n parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime,\n parseEpochTimestamp,\n throwDefaultError,\n withBaseException,\n loadConfigsForDefaultMode,\n emitWarningIfUnsupportedVersion,\n getDefaultExtensionConfiguration,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n ServiceException,\n decorateServiceException,\n extendedEncodeURIComponent,\n getArrayIfSingleItem,\n getValueFromTextNode,\n StringWrapper,\n LazyJsonString,\n map,\n convertMap,\n take,\n parseBoolean,\n expectBoolean,\n expectNumber,\n expectFloat32,\n expectLong,\n expectInt,\n expectInt32,\n expectShort,\n expectByte,\n expectNonNull,\n expectObject,\n expectString,\n expectUnion,\n strictParseDouble,\n strictParseFloat,\n strictParseFloat32,\n limitedParseDouble,\n handleFloat,\n limitedParseFloat,\n limitedParseFloat32,\n strictParseLong,\n strictParseInt,\n strictParseInt32,\n strictParseShort,\n strictParseByte,\n logger,\n resolvedPath,\n serializeFloat,\n _json,\n splitEvery\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n _checksumAlgorithms: checksumAlgorithms,\n addChecksumAlgorithm(algo) {\n this._checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return this._checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n ...getChecksumConfiguration(runtimeConfig)\n };\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n ...resolveChecksumRuntimeConfig(config)\n };\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseUrl: () => parseUrl\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_querystring_parser = require(\"@smithy/querystring-parser\");\nvar parseUrl = /* @__PURE__ */ __name((url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = (0, import_querystring_parser.parseQueryString)(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : void 0,\n protocol,\n path: pathname,\n query\n };\n}, \"parseUrl\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseUrl\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nconst fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = (0, util_buffer_from_1.fromString)(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\nexports.fromBase64 = fromBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromBase64\"), module.exports);\n__reExport(src_exports, require(\"././toBase64\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromBase64,\n toBase64\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst toBase64 = (_input) => {\n let input;\n if (typeof _input === \"string\") {\n input = (0, util_utf8_1.fromUtf8)(_input);\n }\n else {\n input = _input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n};\nexports.toBase64 = toBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n calculateBodyLength: () => calculateBodyLength\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/calculateBodyLength.ts\nvar import_fs = require(\"fs\");\nvar calculateBodyLength = /* @__PURE__ */ __name((body) => {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return Buffer.byteLength(body);\n } else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n } else if (typeof body.size === \"number\") {\n return body.size;\n } else if (typeof body.start === \"number\" && typeof body.end === \"number\") {\n return body.end + 1 - body.start;\n } else if (typeof body.path === \"string\" || Buffer.isBuffer(body.path)) {\n return (0, import_fs.lstatSync)(body.path).size;\n } else if (typeof body.fd === \"number\") {\n return (0, import_fs.fstatSync)(body.fd).size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n}, \"calculateBodyLength\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n calculateBodyLength\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n SelectorType: () => SelectorType,\n booleanSelector: () => booleanSelector,\n numberSelector: () => numberSelector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/booleanSelector.ts\nvar booleanSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n if (obj[key] === \"true\")\n return true;\n if (obj[key] === \"false\")\n return false;\n throw new Error(`Cannot load ${type} \"${key}\". Expected \"true\" or \"false\", got ${obj[key]}.`);\n}, \"booleanSelector\");\n\n// src/numberSelector.ts\nvar numberSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n const numberValue = parseInt(obj[key], 10);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);\n }\n return numberValue;\n}, \"numberSelector\");\n\n// src/types.ts\nvar SelectorType = /* @__PURE__ */ ((SelectorType2) => {\n SelectorType2[\"ENV\"] = \"env\";\n SelectorType2[\"CONFIG\"] = \"shared config entry\";\n return SelectorType2;\n})(SelectorType || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n booleanSelector,\n numberSelector,\n SelectorType\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n resolveDefaultsModeConfig: () => resolveDefaultsModeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/resolveDefaultsModeConfig.ts\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/constants.ts\nvar AWS_EXECUTION_ENV = \"AWS_EXECUTION_ENV\";\nvar AWS_REGION_ENV = \"AWS_REGION\";\nvar AWS_DEFAULT_REGION_ENV = \"AWS_DEFAULT_REGION\";\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\nvar IMDS_REGION_PATH = \"/latest/meta-data/placement/region\";\n\n// src/defaultsModeConfig.ts\nvar AWS_DEFAULTS_MODE_ENV = \"AWS_DEFAULTS_MODE\";\nvar AWS_DEFAULTS_MODE_CONFIG = \"defaults_mode\";\nvar NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n return env[AWS_DEFAULTS_MODE_ENV];\n },\n configFileSelector: (profile) => {\n return profile[AWS_DEFAULTS_MODE_CONFIG];\n },\n default: \"legacy\"\n};\n\n// src/resolveDefaultsModeConfig.ts\nvar resolveDefaultsModeConfig = /* @__PURE__ */ __name(({\n region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS),\n defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS)\n} = {}) => (0, import_property_provider.memoize)(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode == null ? void 0 : mode.toLowerCase()) {\n case \"auto\":\n return resolveNodeDefaultsModeAuto(region);\n case \"in-region\":\n case \"cross-region\":\n case \"mobile\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode == null ? void 0 : mode.toLocaleLowerCase());\n case void 0:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(\n `Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`\n );\n }\n}), \"resolveDefaultsModeConfig\");\nvar resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => {\n if (clientRegion) {\n const resolvedRegion = typeof clientRegion === \"function\" ? await clientRegion() : clientRegion;\n const inferredRegion = await inferPhysicalRegion();\n if (!inferredRegion) {\n return \"standard\";\n }\n if (resolvedRegion === inferredRegion) {\n return \"in-region\";\n } else {\n return \"cross-region\";\n }\n }\n return \"standard\";\n}, \"resolveNodeDefaultsModeAuto\");\nvar inferPhysicalRegion = /* @__PURE__ */ __name(async () => {\n if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {\n return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];\n }\n if (!process.env[ENV_IMDS_DISABLED]) {\n try {\n const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n const endpoint = await getInstanceMetadataEndpoint();\n return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();\n } catch (e) {\n }\n }\n}, \"inferPhysicalRegion\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveDefaultsModeConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n EndpointError: () => EndpointError,\n customEndpointFunctions: () => customEndpointFunctions,\n isIpAddress: () => isIpAddress,\n isValidHostLabel: () => isValidHostLabel,\n resolveEndpoint: () => resolveEndpoint\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/lib/isIpAddress.ts\nvar IP_V4_REGEX = new RegExp(\n `^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`\n);\nvar isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith(\"[\") && value.endsWith(\"]\"), \"isIpAddress\");\n\n// src/lib/isValidHostLabel.ts\nvar VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nvar isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n}, \"isValidHostLabel\");\n\n// src/utils/customEndpointFunctions.ts\nvar customEndpointFunctions = {};\n\n// src/debug/debugId.ts\nvar debugId = \"endpoints\";\n\n// src/debug/toDebugString.ts\nfunction toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n__name(toDebugString, \"toDebugString\");\n\n// src/types/EndpointError.ts\nvar _EndpointError = class _EndpointError extends Error {\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n};\n__name(_EndpointError, \"EndpointError\");\nvar EndpointError = _EndpointError;\n\n// src/lib/booleanEquals.ts\nvar booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"booleanEquals\");\n\n// src/lib/getAttrPathList.ts\nvar getAttrPathList = /* @__PURE__ */ __name((path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n } else {\n pathList.push(part);\n }\n }\n return pathList;\n}, \"getAttrPathList\");\n\n// src/lib/getAttr.ts\nvar getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n } else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value), \"getAttr\");\n\n// src/lib/isSet.ts\nvar isSet = /* @__PURE__ */ __name((value) => value != null, \"isSet\");\n\n// src/lib/not.ts\nvar not = /* @__PURE__ */ __name((value) => !value, \"not\");\n\n// src/lib/parseURL.ts\nvar import_types3 = require(\"@smithy/types\");\nvar DEFAULT_PORTS = {\n [import_types3.EndpointURLScheme.HTTP]: 80,\n [import_types3.EndpointURLScheme.HTTPS]: 443\n};\nvar parseURL = /* @__PURE__ */ __name((value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname: hostname2, port, protocol: protocol2 = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join(\"&\");\n return url;\n }\n return new URL(value);\n } catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp\n };\n}, \"parseURL\");\n\n// src/lib/stringEquals.ts\nvar stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"stringEquals\");\n\n// src/lib/substring.ts\nvar substring = /* @__PURE__ */ __name((input, start, stop, reverse) => {\n if (start >= stop || input.length < stop) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n}, \"substring\");\n\n// src/lib/uriEncode.ts\nvar uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), \"uriEncode\");\n\n// src/utils/endpointFunctions.ts\nvar endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode\n};\n\n// src/utils/evaluateTemplate.ts\nvar evaluateTemplate = /* @__PURE__ */ __name((template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n } else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n}, \"evaluateTemplate\");\n\n// src/utils/getReferenceValue.ts\nvar getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n return referenceRecord[ref];\n}, \"getReferenceValue\");\n\n// src/utils/evaluateExpression.ts\nvar evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n } else if (obj[\"fn\"]) {\n return callFunction(obj, options);\n } else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n}, \"evaluateExpression\");\n\n// src/utils/callFunction.ts\nvar callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => {\n const evaluatedArgs = argv.map(\n (arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : evaluateExpression(arg, \"arg\", options)\n );\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n}, \"callFunction\");\n\n// src/utils/evaluateCondition.ts\nvar evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => {\n var _a, _b;\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...assign != null && { toAssign: { name: assign, value } }\n };\n}, \"evaluateCondition\");\n\n// src/utils/evaluateConditions.ts\nvar evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => {\n var _a, _b;\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord\n }\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n}, \"evaluateConditions\");\n\n// src/utils/getEndpointHeaders.ts\nvar getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce(\n (acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n })\n }),\n {}\n), \"getEndpointHeaders\");\n\n// src/utils/getEndpointProperty.ts\nvar getEndpointProperty = /* @__PURE__ */ __name((property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n}, \"getEndpointProperty\");\n\n// src/utils/getEndpointProperties.ts\nvar getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce(\n (acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: getEndpointProperty(propertyVal, options)\n }),\n {}\n), \"getEndpointProperties\");\n\n// src/utils/getEndpointUrl.ts\nvar getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n } catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n}, \"getEndpointUrl\");\n\n// src/utils/evaluateEndpointRule.ts\nvar evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => {\n var _a, _b;\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n };\n const { url, properties, headers } = endpoint;\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, debugId, `Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...headers != void 0 && {\n headers: getEndpointHeaders(headers, endpointRuleOptions)\n },\n ...properties != void 0 && {\n properties: getEndpointProperties(properties, endpointRuleOptions)\n },\n url: getEndpointUrl(url, endpointRuleOptions)\n };\n}, \"evaluateEndpointRule\");\n\n// src/utils/evaluateErrorRule.ts\nvar evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(\n evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n })\n );\n}, \"evaluateErrorRule\");\n\n// src/utils/evaluateTreeRule.ts\nvar evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n });\n}, \"evaluateTreeRule\");\n\n// src/utils/evaluateRules.ts\nvar evaluateRules = /* @__PURE__ */ __name((rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n } else if (rule.type === \"tree\") {\n const endpointOrUndefined = evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n}, \"evaluateRules\");\n\n// src/resolveEndpoint.ts\nvar resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => {\n var _a, _b, _c, _d, _e;\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n (_b = (_a = options.logger) == null ? void 0 : _a.debug) == null ? void 0 : _b.call(_a, `${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n if ((_c = options.endpointParams) == null ? void 0 : _c.Endpoint) {\n try {\n const givenEndpoint = new URL(options.endpointParams.Endpoint);\n const { protocol, port } = givenEndpoint;\n endpoint.url.protocol = protocol;\n endpoint.url.port = port;\n } catch (e) {\n }\n }\n (_e = (_d = options.logger) == null ? void 0 : _d.debug) == null ? void 0 : _e.call(_d, `${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n}, \"resolveEndpoint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isIpAddress,\n isValidHostLabel,\n customEndpointFunctions,\n resolveEndpoint,\n EndpointError\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromHex: () => fromHex,\n toHex: () => toHex\n});\nmodule.exports = __toCommonJS(src_exports);\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nfunction fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\n__name(fromHex, \"fromHex\");\nfunction toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n__name(toHex, \"toHex\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromHex,\n toHex\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getSmithyContext: () => getSmithyContext,\n normalizeProvider: () => normalizeProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/getSmithyContext.ts\nvar import_types = require(\"@smithy/types\");\nvar getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getSmithyContext,\n normalizeProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n ConfiguredRetryStrategy: () => ConfiguredRetryStrategy,\n DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE,\n DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE,\n DefaultRateLimiter: () => DefaultRateLimiter,\n INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS,\n INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER,\n MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY,\n NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT,\n REQUEST_HEADER: () => REQUEST_HEADER,\n RETRY_COST: () => RETRY_COST,\n RETRY_MODES: () => RETRY_MODES,\n StandardRetryStrategy: () => StandardRetryStrategy,\n THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE,\n TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/config.ts\nvar RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => {\n RETRY_MODES2[\"STANDARD\"] = \"standard\";\n RETRY_MODES2[\"ADAPTIVE\"] = \"adaptive\";\n return RETRY_MODES2;\n})(RETRY_MODES || {});\nvar DEFAULT_MAX_ATTEMPTS = 3;\nvar DEFAULT_RETRY_MODE = \"standard\" /* STANDARD */;\n\n// src/DefaultRateLimiter.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar _DefaultRateLimiter = class _DefaultRateLimiter {\n constructor(options) {\n // Pre-set state variables\n this.currentCapacity = 0;\n this.enabled = false;\n this.lastMaxRate = 0;\n this.measuredTxRate = 0;\n this.requestCount = 0;\n this.lastTimestamp = 0;\n this.timeWindow = 0;\n this.beta = (options == null ? void 0 : options.beta) ?? 0.7;\n this.minCapacity = (options == null ? void 0 : options.minCapacity) ?? 1;\n this.minFillRate = (options == null ? void 0 : options.minFillRate) ?? 0.5;\n this.scaleConstant = (options == null ? void 0 : options.scaleConstant) ?? 0.4;\n this.smooth = (options == null ? void 0 : options.smooth) ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1e3;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if ((0, import_service_error_classification.isThrottlingError)(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n } else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(\n this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate\n );\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n};\n__name(_DefaultRateLimiter, \"DefaultRateLimiter\");\nvar DefaultRateLimiter = _DefaultRateLimiter;\n\n// src/constants.ts\nvar DEFAULT_RETRY_DELAY_BASE = 100;\nvar MAXIMUM_RETRY_DELAY = 20 * 1e3;\nvar THROTTLING_RETRY_DELAY_BASE = 500;\nvar INITIAL_RETRY_TOKENS = 500;\nvar RETRY_COST = 5;\nvar TIMEOUT_RETRY_COST = 10;\nvar NO_RETRY_INCREMENT = 1;\nvar INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nvar REQUEST_HEADER = \"amz-sdk-request\";\n\n// src/defaultRetryBackoffStrategy.ts\nvar getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n }, \"computeNextBackoffDelay\");\n const setDelayBase = /* @__PURE__ */ __name((delay) => {\n delayBase = delay;\n }, \"setDelayBase\");\n return {\n computeNextBackoffDelay,\n setDelayBase\n };\n}, \"getDefaultRetryBackoffStrategy\");\n\n// src/defaultRetryToken.ts\nvar createDefaultRetryToken = /* @__PURE__ */ __name(({\n retryDelay,\n retryCount,\n retryCost\n}) => {\n const getRetryCount = /* @__PURE__ */ __name(() => retryCount, \"getRetryCount\");\n const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), \"getRetryDelay\");\n const getRetryCost = /* @__PURE__ */ __name(() => retryCost, \"getRetryCost\");\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost\n };\n}, \"createDefaultRetryToken\");\n\n// src/StandardRetryStrategy.ts\nvar _StandardRetryStrategy = class _StandardRetryStrategy {\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.mode = \"standard\" /* STANDARD */;\n this.capacity = INITIAL_RETRY_TOKENS;\n this.retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(\n errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE\n );\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n /**\n * @returns the current available retry capacity.\n *\n * This number decreases when retries are executed and refills when requests or retries succeed.\n */\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n } catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n};\n__name(_StandardRetryStrategy, \"StandardRetryStrategy\");\nvar StandardRetryStrategy = _StandardRetryStrategy;\n\n// src/AdaptiveRetryStrategy.ts\nvar _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = \"adaptive\" /* ADAPTIVE */;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n};\n__name(_AdaptiveRetryStrategy, \"AdaptiveRetryStrategy\");\nvar AdaptiveRetryStrategy = _AdaptiveRetryStrategy;\n\n// src/ConfiguredRetryStrategy.ts\nvar _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy extends StandardRetryStrategy {\n /**\n * @param maxAttempts - the maximum number of retry attempts allowed.\n * e.g., if set to 3, then 4 total requests are possible.\n * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt\n * and returns the delay.\n *\n * @example exponential backoff.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2)\n * });\n * ```\n * @example constant delay.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, 2000)\n * });\n * ```\n */\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n } else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n};\n__name(_ConfiguredRetryStrategy, \"ConfiguredRetryStrategy\");\nvar ConfiguredRetryStrategy = _ConfiguredRetryStrategy;\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n ConfiguredRetryStrategy,\n DefaultRateLimiter,\n StandardRetryStrategy,\n RETRY_MODES,\n DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_MODE,\n DEFAULT_RETRY_DELAY_BASE,\n MAXIMUM_RETRY_DELAY,\n THROTTLING_RETRY_DELAY_BASE,\n INITIAL_RETRY_TOKENS,\n RETRY_COST,\n TIMEOUT_RETRY_COST,\n NO_RETRY_INCREMENT,\n INVOCATION_ID_HEADER,\n REQUEST_HEADER\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAwsChunkedEncodingStream = void 0;\nconst stream_1 = require(\"stream\");\nconst getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } });\n readableStream.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readableStream.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n};\nexports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/blob/transforms.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nfunction transformToString(payload, encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return (0, import_util_base64.toBase64)(payload);\n }\n return (0, import_util_utf8.toUtf8)(payload);\n}\n__name(transformToString, \"transformToString\");\nfunction transformFromString(str, encoding) {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));\n }\n return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));\n}\n__name(transformFromString, \"transformFromString\");\n\n// src/blob/Uint8ArrayBlobAdapter.ts\nvar _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {\n /**\n * @param source - such as a string or Stream.\n * @returns a new Uint8ArrayBlobAdapter extending Uint8Array.\n */\n static fromString(source, encoding = \"utf-8\") {\n switch (typeof source) {\n case \"string\":\n return transformFromString(source, encoding);\n default:\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n }\n /**\n * @param source - Uint8Array to be mutated.\n * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter.\n */\n static mutate(source) {\n Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n /**\n * @param encoding - default 'utf-8'.\n * @returns the blob as string.\n */\n transformToString(encoding = \"utf-8\") {\n return transformToString(this, encoding);\n }\n};\n__name(_Uint8ArrayBlobAdapter, \"Uint8ArrayBlobAdapter\");\nvar Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter;\n\n// src/index.ts\n__reExport(src_exports, require(\"././getAwsChunkedEncodingStream\"), module.exports);\n__reExport(src_exports, require(\"././sdk-stream-mixin\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Uint8ArrayBlobAdapter,\n getAwsChunkedEncodingStream,\n sdkStreamMixin\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst stream_1 = require(\"stream\");\nconst util_1 = require(\"util\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!(stream instanceof stream_1.Readable)) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, node_http_handler_1.streamCollector)(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new util_1.TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof stream_1.Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.\");\n }\n transformed = true;\n return stream_1.Readable.toWeb(stream);\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n escapeUri: () => escapeUri,\n escapeUriPath: () => escapeUriPath\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/escape-uri.ts\nvar escapeUri = /* @__PURE__ */ __name((uri) => (\n // AWS percent-encodes some extra non-standard characters in a URI\n encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode)\n), \"escapeUri\");\nvar hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, \"hexEncode\");\n\n// src/escape-uri-path.ts\nvar escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split(\"/\").map(escapeUri).join(\"/\"), \"escapeUriPath\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n escapeUri,\n escapeUriPath\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n","'use strict';\n\nconst validator = require('./validator');\nconst XMLParser = require('./xmlparser/XMLParser');\nconst XMLBuilder = require('./xmlbuilder/json2xml');\n\nmodule.exports = {\n XMLParser: XMLParser,\n XMLValidator: validator,\n XMLBuilder: XMLBuilder\n}","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nconst getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n};\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n};\n\nexports.isExist = function(v) {\n return typeof v !== 'undefined';\n};\n\nexports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nexports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n};\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nexports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n};\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\nexports.isName = isName;\nexports.getAllMatches = getAllMatches;\nexports.nameRegexp = nameRegexp;\n","'use strict';\n\nconst util = require('./util');\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexports.validate = function (xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n \n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if(options.unpairedTags.indexOf(tagName) !== -1){\n //don't push into stack\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }else{\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if ( isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char){\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return util.isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return util.isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n","'use strict';\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = require('./orderedJs2Xml');\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup ){\n listTagVal += this.j2x(item, level + 1).val;\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level)\n }\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, '', level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `>` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n ' 0 && this.options.processEntities){\n for (let i=0; i 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\n\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n\n return xmlStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\") return key;\n }\n}\n\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nmodule.exports = toXml;\n","const util = require('../util');\n\n//TODO: handle comments\nfunction readDocType(xmlData, i){\n \n const entities = {};\n if( xmlData[i + 3] === 'O' &&\n xmlData[i + 4] === 'C' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'Y' &&\n xmlData[i + 7] === 'P' &&\n xmlData[i + 8] === 'E')\n { \n i = i+9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for(;i') { //Read tag content\n if(comment){\n if( xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\"){\n comment = false;\n angleBracketsCount--;\n }\n }else{\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n }else if( xmlData[i] === '['){\n hasBody = true;\n }else{\n exp += xmlData[i];\n }\n }\n if(angleBracketsCount !== 0){\n throw new Error(`Unclosed DOCTYPE`);\n }\n }else{\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return {entities, i};\n}\n\nfunction readEntityExp(xmlData,i){\n //External entities are not supported\n // \n\n //Parameter entities are not supported\n // \n\n //Internal entities are supported\n // \n \n //read EntityName\n let entityName = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"' ); i++) {\n // if(xmlData[i] === \" \") continue;\n // else \n entityName += xmlData[i];\n }\n entityName = entityName.trim();\n if(entityName.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n\n //read Entity Value\n const startChar = xmlData[i++];\n let val = \"\"\n for (; i < xmlData.length && xmlData[i] !== startChar ; i++) {\n val += xmlData[i];\n }\n return [entityName, val, i];\n}\n\nfunction isComment(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === '-' &&\n xmlData[i+3] === '-') return true\n return false\n}\nfunction isEntity(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'N' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'I' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'Y') return true\n return false\n}\nfunction isElement(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'L' &&\n xmlData[i+4] === 'E' &&\n xmlData[i+5] === 'M' &&\n xmlData[i+6] === 'E' &&\n xmlData[i+7] === 'N' &&\n xmlData[i+8] === 'T') return true\n return false\n}\n\nfunction isAttlist(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'A' &&\n xmlData[i+3] === 'T' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'L' &&\n xmlData[i+6] === 'I' &&\n xmlData[i+7] === 'S' &&\n xmlData[i+8] === 'T') return true\n return false\n}\nfunction isNotation(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'N' &&\n xmlData[i+3] === 'O' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'A' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'I' &&\n xmlData[i+8] === 'O' &&\n xmlData[i+9] === 'N') return true\n return false\n}\n\nfunction validateEntityName(name){\n if (util.isName(name))\n\treturn name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\n\nmodule.exports = readDocType;\n","\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val) {\n return val;\n },\n attributeValueProcessor: function(attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs){\n return tagName\n },\n // skipEmptyListItem: false\n};\n \nconst buildOptions = function(options) {\n return Object.assign({}, defaultOptions, options);\n};\n\nexports.buildOptions = buildOptions;\nexports.defaultOptions = defaultOptions;","'use strict';\n///@ts-check\n\nconst util = require('../util');\nconst xmlNode = require('./xmlNode');\nconst readDocType = require(\"./DocTypeReader\");\nconst toNumber = require(\"strnum\");\n\nconst regx =\n '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\nclass OrderedObjParser{\n constructor(options){\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\" : { regex: /&(apos|#39|#x27);/g, val : \"'\"},\n \"gt\" : { regex: /&(gt|#62|#x3E);/g, val : \">\"},\n \"lt\" : { regex: /&(lt|#60|#x3C);/g, val : \"<\"},\n \"quot\" : { regex: /&(quot|#34|#x22);/g, val : \"\\\"\"},\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : \"&\"};\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\" : { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\" : { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\" : { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\" : { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\" : { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\" : { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\" : { regex: /&(inr|#8377);/g, val: \"₹\" },\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n\n}\n\nfunction addExternalEntities(externalEntities){\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\"+ent+\";\",\"g\"),\n val : externalEntities[ent]\n }\n }\n}\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string} jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val !== undefined) {\n if (this.options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if(val.length > 0){\n if(!escapeEntities) val = this.replaceEntitiesValue(val);\n \n const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);\n if(newval === null || newval === undefined){\n //don't parse\n return val;\n }else if(typeof newval !== typeof val || newval !== val){\n //overwrite\n return newval;\n }else if(this.options.trimValues){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n const trimmedVal = val.trim();\n if(trimmedVal === val){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === 'string') {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if(aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== undefined) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if(newVal === null || newVal === undefined){\n //don't parse\n attrs[aName] = oldVal;\n }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){\n //overwrite\n attrs[aName] = newVal;\n }else{\n //parse\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs\n }\n}\n\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for(let i=0; i< xmlData.length; i++){//for each char in XML data\n const ch = xmlData[i];\n if(ch === '<'){\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(this.options.removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n if(currentNode){\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n\n //check if last tag of nested tag was unpaired tag\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\")+1);\n if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0\n if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){\n propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1)\n this.tagsNodeStack.pop();\n }else{\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n\n currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n\n let tagData = readTagExp(xmlData,i, false, \"?>\");\n if(!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if( (this.options.ignoreDeclaration && tagData.tagName === \"?xml\") || this.options.ignorePiTags){\n\n }else{\n \n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n \n if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n\n }\n\n\n i = tagData.closeIndex + 1;\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n const endIndex = findClosingIndex(xmlData, \"-->\", i+4, \"Comment is not closed.\")\n if(this.options.commentPropName){\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);\n }\n i = endIndex;\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n //cdata should be set even if it is 0 length string\n if(this.options.cdataPropName){\n // let val = this.parseTextData(tagExp, this.options.cdataPropName, jPath + \".\" + this.options.cdataPropName, true, false, true);\n // if(!val) val = \"\";\n currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);\n }else{\n let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true);\n if(val == undefined) val = \"\";\n currentNode.add(this.options.textNodeName, val);\n }\n \n i = closeIndex + 2;\n }else {//Opening tag\n let result = readTagExp(xmlData,i, this.options.removeNSPrefix);\n let tagName= result.tagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n \n //save text as child node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if(tagName !== xmlObj.tagname){\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { //TODO: namespace\n let tagContent = \"\";\n //self-closing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n i = result.closeIndex;\n }\n //unpaired tag\n else if(this.options.unpairedTags.indexOf(tagName) !== -1){\n i = result.closeIndex;\n }\n //normal tag\n else{\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, tagName, closeIndex + 1);\n if(!result) throw new Error(`Unexpected end of ${tagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if(tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n \n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n \n this.addChild(currentNode, childNode, jPath)\n }else{\n //selfClosing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n \n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n const childNode = new xmlNode(tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n }\n //opening tag\n else{\n const childNode = new xmlNode( tagName);\n this.tagsNodeStack.push(currentNode);\n \n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nfunction addChild(currentNode, childNode, jPath){\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"])\n if(result === false){\n }else if(typeof result === \"string\"){\n childNode.tagname = result\n currentNode.addChild(childNode);\n }else{\n currentNode.addChild(childNode);\n }\n}\n\nconst replaceEntitiesValue = function(val){\n\n if(this.options.processEntities){\n for(let entityName in this.docTypeEntities){\n const entity = this.docTypeEntities[entityName];\n val = val.replace( entity.regx, entity.val);\n }\n for(let entityName in this.lastEntities){\n const entity = this.lastEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n if(this.options.htmlEntities){\n for(let entityName in this.htmlEntities){\n const entity = this.htmlEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n }\n val = val.replace( this.ampEntity.regex, this.ampEntity.val);\n }\n return val;\n}\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0\n \n textData = this.parseTextData(textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n//TODO: use jPath to simplify the logic\n/**\n * \n * @param {string[]} stopNodes \n * @param {string} jPath\n * @param {string} currentTagName \n */\nfunction isItStopNode(stopNodes, jPath, currentTagName){\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;\n }\n return false;\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-double quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\"){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if(closingChar[1]){\n if(xmlData[index + 1] === closingChar[1]){\n return {\n data: tagExp,\n index: index\n }\n }\n }else{\n return {\n data: tagExp,\n index: index\n }\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nfunction readTagExp(xmlData,i, removeNSPrefix, closingChar = \">\"){\n const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);\n if(!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if(separatorIndex !== -1){//separate tag name and attributes expression\n tagName = tagExp.substr(0, separatorIndex).replace(/\\s\\s*$/, '');\n tagExp = tagExp.substr(separatorIndex + 1);\n }\n\n if(removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i){\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n for (; i < xmlData.length; i++) {\n if( xmlData[i] === \"<\"){ \n if (xmlData[i+1] === \"/\") {//close tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i+2,closeIndex).trim();\n if(closeTagName === tagName){\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i : closeIndex\n }\n }\n }\n i=closeIndex;\n } else if(xmlData[i+1] === '?') { \n const closeIndex = findClosingIndex(xmlData, \"?>\", i+1, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 3) === '!--') { \n const closeIndex = findClosingIndex(xmlData, \"-->\", i+3, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 2) === '![') { \n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i=closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, '>')\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== \"/\") {\n openTagCount++;\n }\n i=tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return toNumber(val, options);\n } else {\n if (util.isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n\nmodule.exports = OrderedObjParser;\n","const { buildOptions} = require(\"./OptionsBuilder\");\nconst OrderedObjParser = require(\"./OrderedObjParser\");\nconst { prettify} = require(\"./node2json\");\nconst validator = require('../validator');\n\nclass XMLParser{\n \n constructor(options){\n this.externalEntities = {};\n this.options = buildOptions(options);\n \n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData,validationOption){\n if(typeof xmlData === \"string\"){\n }else if( xmlData.toString){\n xmlData = xmlData.toString();\n }else{\n throw new Error(\"XML data is accepted in String or Bytes[] form.\")\n }\n if( validationOption){\n if(validationOption === true) validationOption = {}; //validate with default options\n \n const result = validator.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` )\n }\n }\n const orderedObjParser = new OrderedObjParser(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if(this.options.preserveOrder || orderedResult === undefined) return orderedResult;\n else return prettify(orderedResult, this.options);\n }\n\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value){\n if(value.indexOf(\"&\") !== -1){\n throw new Error(\"Entity value can't have '&'\")\n }else if(key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1){\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\")\n }else if(value === \"&\"){\n throw new Error(\"An entity with value '&' is not permitted\");\n }else{\n this.externalEntities[key] = value;\n }\n }\n}\n\nmodule.exports = XMLParser;","'use strict';\n\n/**\n * \n * @param {array} node \n * @param {any} options \n * @returns \n */\nfunction prettify(node, options){\n return compress( node, options);\n}\n\n/**\n * \n * @param {array} arr \n * @param {object} options \n * @param {string} jPath \n * @returns object\n */\nfunction compress(arr, options, jPath){\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName(tagObj);\n let newJpath = \"\";\n if(jPath === undefined) newJpath = property;\n else newJpath = jPath + \".\" + property;\n\n if(property === options.textNodeName){\n if(text === undefined) text = tagObj[property];\n else text += \"\" + tagObj[property];\n }else if(property === undefined){\n continue;\n }else if(tagObj[property]){\n \n let val = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val, options);\n\n if(tagObj[\":@\"]){\n assignAttributes( val, tagObj[\":@\"], newJpath, options);\n }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){\n val = val[options.textNodeName];\n }else if(Object.keys(val).length === 0){\n if(options.alwaysCreateTextNode) val[options.textNodeName] = \"\";\n else val = \"\";\n }\n\n if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) {\n if(!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [ compressedObj[property] ];\n }\n compressedObj[property].push(val);\n }else{\n //TODO: if a node is not an array, then check if it should be an array\n //also determine if it is a leaf node\n if (options.isArray(property, newJpath, isLeaf )) {\n compressedObj[property] = [val];\n }else{\n compressedObj[property] = val;\n }\n }\n }\n \n }\n // if(text && text.length > 0) compressedObj[options.textNodeName] = text;\n if(typeof text === \"string\"){\n if(text.length > 0) compressedObj[options.textNodeName] = text;\n }else if(text !== undefined) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\n\nfunction propName(obj){\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(key !== \":@\") return key;\n }\n}\n\nfunction assignAttributes(obj, attrMap, jpath, options){\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [ attrMap[atrrName] ];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\n\nfunction isLeafTag(obj, options){\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n \n if (propCount === 0) {\n return true;\n }\n\n if (\n propCount === 1 &&\n (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)\n ) {\n return true;\n }\n\n return false;\n}\nexports.prettify = prettify;\n","'use strict';\n\nclass XmlNode{\n constructor(tagname) {\n this.tagname = tagname;\n this.child = []; //nested tags, text, cdata, comments in order\n this[\":@\"] = {}; //attributes map\n }\n add(key,val){\n // this.child.push( {name : key, val: val, isCdata: isCdata });\n if(key === \"__proto__\") key = \"#__proto__\";\n this.child.push( {[key]: val });\n }\n addChild(node) {\n if(node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if(node[\":@\"] && Object.keys(node[\":@\"]).length > 0){\n this.child.push( { [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n }else{\n this.child.push( { [node.tagname]: node.child });\n }\n };\n};\n\n\nmodule.exports = XmlNode;","const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n// const octRegex = /0x[a-z0-9]+/;\n// const binRegex = /0x[a-z0-9]+/;\n\n\n//polyfill\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\n\n \nconst consider = {\n hex : true,\n leadingZeros: true,\n decimalPoint: \"\\.\",\n eNotation: true\n //skipLike: /regex/\n};\n\nfunction toNumber(str, options = {}){\n // const options = Object.assign({}, consider);\n // if(opt.leadingZeros === false){\n // options.leadingZeros = false;\n // }else if(opt.hex === false){\n // options.hex = false;\n // }\n\n options = Object.assign({}, consider, options );\n if(!str || typeof str !== \"string\" ) return str;\n \n let trimmedStr = str.trim();\n // if(trimmedStr === \"0.0\") return 0;\n // else if(trimmedStr === \"+0.0\") return 0;\n // else if(trimmedStr === \"-0.0\") return -0;\n\n if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n // } else if (options.parseOct && octRegex.test(str)) {\n // return Number.parseInt(val, 8);\n // }else if (options.parseBin && binRegex.test(str)) {\n // return Number.parseInt(val, 2);\n }else{\n //separate negative sign, leading zeros, and rest number\n const match = numRegex.exec(trimmedStr);\n if(match){\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros\n //trim ending zeros for floating number\n \n const eNotation = match[4] || match[6];\n if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str; //-0123\n else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str; //0123\n else{//no leading zeros or leading zeros are allowed\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation\n if(options.eNotation) return num;\n else return str;\n }else if(eNotation){ //given number has enotation\n if(options.eNotation) return num;\n else return str;\n }else if(trimmedStr.indexOf(\".\") !== -1){ //floating number\n // const decimalPart = match[5].substr(1);\n // const intPart = trimmedStr.substr(0,trimmedStr.indexOf(\".\"));\n\n \n // const p = numStr.indexOf(\".\");\n // const givenIntPart = numStr.substr(0,p);\n // const givenDecPart = numStr.substr(p+1);\n if(numStr === \"0\" && (numTrimmedByZeros === \"\") ) return num; //0.0\n else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000\n else if( sign && numStr === \"-\"+numTrimmedByZeros) return num;\n else return str;\n }\n \n if(leadingZeros){\n // if(numTrimmedByZeros === numStr){\n // if(options.leadingZeros) return num;\n // else return str;\n // }else return str;\n if(numTrimmedByZeros === numStr) return num;\n else if(sign+numTrimmedByZeros === numStr) return num;\n else return str;\n }\n\n if(trimmedStr === numStr) return num;\n else if(trimmedStr === sign+numStr) return num;\n // else{\n // //number with +/- sign\n // trimmedStr.test(/[-+][0-9]);\n\n // }\n return str;\n }\n // else if(!eNotation && trimmedStr && trimmedStr !== Number(trimmedStr) ) return str;\n \n }else{ //non-numeric string\n return str;\n }\n }\n}\n\n/**\n * \n * @param {string} numStr without leading zeros\n * @returns \n */\nfunction trimZeros(numStr){\n if(numStr && numStr.indexOf(\".\") !== -1){//float\n numStr = numStr.replace(/0+$/, \"\"); //remove ending zeros\n if(numStr === \".\") numStr = \"0\";\n else if(numStr[0] === \".\") numStr = \"0\"+numStr;\n else if(numStr[numStr.length-1] === \".\") numStr = numStr.substr(0,numStr.length-1);\n return numStr;\n }\n return numStr;\n}\nmodule.exports = toNumber\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global global, define, Symbol, Reflect, Promise, SuppressedError */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __esDecorate;\r\nvar __runInitializers;\r\nvar __propKey;\r\nvar __setFunctionName;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __spreadArray;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __classPrivateFieldIn;\r\nvar __createBinding;\r\nvar __addDisposableResource;\r\nvar __disposeResources;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n };\r\n\r\n __runInitializers = function (thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n };\r\n\r\n __propKey = function (x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n };\r\n\r\n __setFunctionName = function (f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __exportStar = function(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n };\r\n\r\n __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n }) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n });\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n /** @deprecated */\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __spreadArray = function (to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n var __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n }) : function(o, v) {\r\n o[\"default\"] = v;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n };\r\n\r\n __classPrivateFieldIn = function (state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n };\r\n\r\n __addDisposableResource = function (env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n };\r\n\r\n var _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n };\r\n\r\n __disposeResources = function (env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__esDecorate\", __esDecorate);\r\n exporter(\"__runInitializers\", __runInitializers);\r\n exporter(\"__propKey\", __propKey);\r\n exporter(\"__setFunctionName\", __setFunctionName);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__spreadArray\", __spreadArray);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n exporter(\"__classPrivateFieldIn\", __classPrivateFieldIn);\r\n exporter(\"__addDisposableResource\", __addDisposableResource);\r\n exporter(\"__disposeResources\", __disposeResources);\r\n});\r\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","module.exports = require(\"assert\");","module.exports = require(\"buffer\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"fs/promises\");","module.exports = require(\"http\");","module.exports = require(\"http2\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"process\");","module.exports = require(\"stream\");","module.exports = require(\"tls\");","module.exports = require(\"url\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3109);\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/licenses.txt b/dist/licenses.txt index f83d73b..829d6d1 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -3109,210 +3109,6 @@ Apache-2.0 limitations under the License. -@aws-sdk/middleware-signing -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 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - 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. - @aws-sdk/middleware-user-agent Apache-2.0 Apache License diff --git a/package-lock.json b/package-lock.json index b866d46..1dc1cd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", - "@aws-sdk/client-marketplace-catalog": "^3.511.0" + "@aws-sdk/client-marketplace-catalog": "^3.545.0" }, "devDependencies": { "@types/node": "^20.12.2", @@ -159,508 +159,504 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-sdk/client-marketplace-catalog": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-marketplace-catalog/-/client-marketplace-catalog-3.511.0.tgz", - "integrity": "sha512-weOWQ+PppwoF1A483dmJugEOyBj5ekvAkaGIsff3SFTvPlo3IGQmY3mBX65ARkjwCbHRd2dlO6fS12OXRzxeyw==", + "version": "3.545.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-marketplace-catalog/-/client-marketplace-catalog-3.545.0.tgz", + "integrity": "sha512-BOzfz4oU0KQwRMvnIjHVDX/UTOOxqTw4kW2IB9D5kFSar2lZQ4wyKTtCQxJZsQe3iGwew6rpM827fuEKWvujgg==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.511.0", - "@aws-sdk/core": "3.511.0", - "@aws-sdk/credential-provider-node": "3.511.0", - "@aws-sdk/middleware-host-header": "3.511.0", - "@aws-sdk/middleware-logger": "3.511.0", - "@aws-sdk/middleware-recursion-detection": "3.511.0", - "@aws-sdk/middleware-signing": "3.511.0", - "@aws-sdk/middleware-user-agent": "3.511.0", - "@aws-sdk/region-config-resolver": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@aws-sdk/util-endpoints": "3.511.0", - "@aws-sdk/util-user-agent-browser": "3.511.0", - "@aws-sdk/util-user-agent-node": "3.511.0", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", - "@smithy/util-base64": "^2.1.1", - "@smithy/util-body-length-browser": "^2.1.1", - "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.1.1", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "@aws-sdk/client-sts": "3.540.0", + "@aws-sdk/core": "3.535.0", + "@aws-sdk/credential-provider-node": "3.540.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.540.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.540.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-marketplace-catalog/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@aws-sdk/client-sso": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.511.0.tgz", - "integrity": "sha512-v1f5ZbuZWpad+fgTOpgFyIZT3A37wdqoSPh0hl+cKRu5kPsz96xCe9+UvLx+HdN2yJ/mV0UZcMq6ysj4xAGIEg==", + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.540.0.tgz", + "integrity": "sha512-rrQZMuw4sxIo3eyAUUzPQRA336mPRnrAeSlSdVHBKZD8Fjvoy0lYry2vNhkPLpFZLso1J66KRyuIv4LzRR3v1Q==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.511.0", - "@aws-sdk/middleware-host-header": "3.511.0", - "@aws-sdk/middleware-logger": "3.511.0", - "@aws-sdk/middleware-recursion-detection": "3.511.0", - "@aws-sdk/middleware-user-agent": "3.511.0", - "@aws-sdk/region-config-resolver": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@aws-sdk/util-endpoints": "3.511.0", - "@aws-sdk/util-user-agent-browser": "3.511.0", - "@aws-sdk/util-user-agent-node": "3.511.0", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", - "@smithy/util-base64": "^2.1.1", - "@smithy/util-body-length-browser": "^2.1.1", - "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.1.1", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0" + "@aws-sdk/core": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.540.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.540.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.511.0.tgz", - "integrity": "sha512-cITRRq54eTrq7ll9li+yYnLbNHKXG2P+ovdZSDiQ6LjCYBdcD4ela30qbs87Yye9YsopdslDzBhHHtrf5oiuMw==", + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.540.0.tgz", + "integrity": "sha512-LZYK0lBRQK8D8M3Sqc96XiXkAV2v70zhTtF6weyzEpgwxZMfSuFJjs0jFyhaeZBZbZv7BBghIdhJ5TPavNxGMQ==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.511.0", - "@aws-sdk/core": "3.511.0", - "@aws-sdk/middleware-host-header": "3.511.0", - "@aws-sdk/middleware-logger": "3.511.0", - "@aws-sdk/middleware-recursion-detection": "3.511.0", - "@aws-sdk/middleware-signing": "3.511.0", - "@aws-sdk/middleware-user-agent": "3.511.0", - "@aws-sdk/region-config-resolver": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@aws-sdk/util-endpoints": "3.511.0", - "@aws-sdk/util-user-agent-browser": "3.511.0", - "@aws-sdk/util-user-agent-node": "3.511.0", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", - "@smithy/util-base64": "^2.1.1", - "@smithy/util-body-length-browser": "^2.1.1", - "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.1.1", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0" + "@aws-sdk/client-sts": "3.540.0", + "@aws-sdk/core": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.540.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.540.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "@aws-sdk/credential-provider-node": "^3.511.0" + "@aws-sdk/credential-provider-node": "^3.540.0" } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.511.0.tgz", - "integrity": "sha512-lwVEEXK+1auEwmBuTv35m2GvbxPthi8SjNUpU4pRetZPVbGhnhCN6H7JqeMDP6GLf81Io2eySXRsmLMt7l/fjg==", + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.540.0.tgz", + "integrity": "sha512-ITHUQxvpqfQX6obfpIi3KYGzZYfe/I5Ixjfxoi5lB7ISCtmxqObKB1fzD93wonkMJytJ7LUO8panZl/ojiJ1uw==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.511.0", - "@aws-sdk/middleware-host-header": "3.511.0", - "@aws-sdk/middleware-logger": "3.511.0", - "@aws-sdk/middleware-recursion-detection": "3.511.0", - "@aws-sdk/middleware-user-agent": "3.511.0", - "@aws-sdk/region-config-resolver": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@aws-sdk/util-endpoints": "3.511.0", - "@aws-sdk/util-user-agent-browser": "3.511.0", - "@aws-sdk/util-user-agent-node": "3.511.0", - "@smithy/config-resolver": "^2.1.1", - "@smithy/core": "^1.3.1", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/hash-node": "^2.1.1", - "@smithy/invalid-dependency": "^2.1.1", - "@smithy/middleware-content-length": "^2.1.1", - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", - "@smithy/util-base64": "^2.1.1", - "@smithy/util-body-length-browser": "^2.1.1", - "@smithy/util-body-length-node": "^2.2.1", - "@smithy/util-defaults-mode-browser": "^2.1.1", - "@smithy/util-defaults-mode-node": "^2.1.1", - "@smithy/util-endpoints": "^1.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" + "@aws-sdk/core": "3.535.0", + "@aws-sdk/middleware-host-header": "3.535.0", + "@aws-sdk/middleware-logger": "3.535.0", + "@aws-sdk/middleware-recursion-detection": "3.535.0", + "@aws-sdk/middleware-user-agent": "3.540.0", + "@aws-sdk/region-config-resolver": "3.535.0", + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.540.0", + "@aws-sdk/util-user-agent-browser": "3.535.0", + "@aws-sdk/util-user-agent-node": "3.535.0", + "@smithy/config-resolver": "^2.2.0", + "@smithy/core": "^1.4.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/hash-node": "^2.2.0", + "@smithy/invalid-dependency": "^2.2.0", + "@smithy/middleware-content-length": "^2.2.0", + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.2.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-body-length-browser": "^2.2.0", + "@smithy/util-body-length-node": "^2.3.0", + "@smithy/util-defaults-mode-browser": "^2.2.0", + "@smithy/util-defaults-mode-node": "^2.3.0", + "@smithy/util-endpoints": "^1.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "@aws-sdk/credential-provider-node": "^3.511.0" + "@aws-sdk/credential-provider-node": "^3.540.0" } }, "node_modules/@aws-sdk/core": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.511.0.tgz", - "integrity": "sha512-0gbDvQhToyLxPyr/7KP6uavrBYKh7exld2lju1Lp65U61XgEjTVP/thJmHTvH4BAKGSqeIz/rrwJ0KrC8nwBtw==", - "dependencies": { - "@smithy/core": "^1.3.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/signature-v4": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.535.0.tgz", + "integrity": "sha512-+Yusa9HziuaEDta1UaLEtMAtmgvxdxhPn7jgfRY6PplqAqgsfa5FR83sxy5qr2q7xjQTwHtV4MjQVuOjG9JsLw==", + "dependencies": { + "@smithy/core": "^1.4.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/signature-v4": "^2.2.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.511.0.tgz", - "integrity": "sha512-4VUsnLRox8YzxnZwnFrfZM4bL5KKLhsjjjX7oiuLyzFkhauI4HFYt7rTB8YNGphpqAg/Wzw5DBZfO3Bw1iR1HA==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.535.0.tgz", + "integrity": "sha512-XppwO8c0GCGSAvdzyJOhbtktSEaShg14VJKg8mpMa1XcgqzmcqqHQjtDWbx5rZheY1VdpXZhpEzJkB6LpQejpA==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.511.0.tgz", - "integrity": "sha512-y83Gt8GPpgMe/lMFxIq+0G2rbzLTC6lhrDocHUzqcApLD6wet8Esy2iYckSRlJgYY+qsVAzpLrSMtt85DwRPTw==", - "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/property-provider": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/util-stream": "^2.1.1", - "tslib": "^2.5.0" + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.535.0.tgz", + "integrity": "sha512-kdj1wCmOMZ29jSlUskRqN04S6fJ4dvt0Nq9Z32SA6wO7UG8ht6Ot9h/au/eTWJM3E1somZ7D771oK7dQt9b8yw==", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-stream": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.511.0.tgz", - "integrity": "sha512-AgIOCtYzm61jbTQCY/2Vf/yu7DeLG0TLZa05a3VVRN9XE4ERtEnMn7TdbxM+hS24MTX8xI0HbMcWxCBkXRIg9w==", - "dependencies": { - "@aws-sdk/client-sts": "3.511.0", - "@aws-sdk/credential-provider-env": "3.511.0", - "@aws-sdk/credential-provider-process": "3.511.0", - "@aws-sdk/credential-provider-sso": "3.511.0", - "@aws-sdk/credential-provider-web-identity": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@smithy/credential-provider-imds": "^2.2.1", - "@smithy/property-provider": "^2.1.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.540.0.tgz", + "integrity": "sha512-igN/RbsnulIBwqXbwsWmR3srqmtbPF1dm+JteGvUY31FW65fTVvWvSr945Y/cf1UbhPmIQXntlsqESqpkhTHwg==", + "dependencies": { + "@aws-sdk/client-sts": "3.540.0", + "@aws-sdk/credential-provider-env": "3.535.0", + "@aws-sdk/credential-provider-process": "3.535.0", + "@aws-sdk/credential-provider-sso": "3.540.0", + "@aws-sdk/credential-provider-web-identity": "3.540.0", + "@aws-sdk/types": "3.535.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.511.0.tgz", - "integrity": "sha512-5JDZXsSluliJmxOF+lYYFgJdSKQfVLQyic5NxScHULTERGoEwEHMgucFGwJ9MV9FoINjNTQLfAiWlJL/kGkCEQ==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.511.0", - "@aws-sdk/credential-provider-http": "3.511.0", - "@aws-sdk/credential-provider-ini": "3.511.0", - "@aws-sdk/credential-provider-process": "3.511.0", - "@aws-sdk/credential-provider-sso": "3.511.0", - "@aws-sdk/credential-provider-web-identity": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@smithy/credential-provider-imds": "^2.2.1", - "@smithy/property-provider": "^2.1.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.540.0.tgz", + "integrity": "sha512-HKQZJbLHlrHX9A0B1poiYNXIIQfy8whTjuosTCYKPDBhhUyVAQfxy/KG726j0v43IhaNPLgTGZCJve4hAsazSw==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.535.0", + "@aws-sdk/credential-provider-http": "3.535.0", + "@aws-sdk/credential-provider-ini": "3.540.0", + "@aws-sdk/credential-provider-process": "3.535.0", + "@aws-sdk/credential-provider-sso": "3.540.0", + "@aws-sdk/credential-provider-web-identity": "3.540.0", + "@aws-sdk/types": "3.535.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.511.0.tgz", - "integrity": "sha512-88hLUPqcTwjSubPS+34ZfmglnKeLny8GbmZsyllk96l26PmDTAqo5RScSA8BWxL0l5pRRWGtcrFyts+oibHIuQ==", - "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/property-provider": "^2.1.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.535.0.tgz", + "integrity": "sha512-9O1OaprGCnlb/kYl8RwmH7Mlg8JREZctB8r9sa1KhSsWFq/SWO0AuJTyowxD7zL5PkeS4eTvzFFHWCa3OO5epA==", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.511.0.tgz", - "integrity": "sha512-aEei9UdXYEE2e0Htf28/IcuHcWk3VkUkpcg3KDR/AyzXA3i/kxmixtAgRmHOForC5CMqoJjzVPFUITNkAscyag==", - "dependencies": { - "@aws-sdk/client-sso": "3.511.0", - "@aws-sdk/token-providers": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@smithy/property-provider": "^2.1.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.540.0.tgz", + "integrity": "sha512-tKkFqK227LF5ajc5EL6asXS32p3nkofpP8G7NRpU7zOEOQCg01KUc4JRX+ItI0T007CiN1J19yNoFqHLT/SqHg==", + "dependencies": { + "@aws-sdk/client-sso": "3.540.0", + "@aws-sdk/token-providers": "3.540.0", + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.511.0.tgz", - "integrity": "sha512-/3XMyN7YYefAsES/sMMY5zZGRmZ5QJisJw798DdMYmYMsb1dt0Qy8kZTu+59ZzOiVIcznsjSTCEB81QmGtDKcA==", - "dependencies": { - "@aws-sdk/client-sts": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.540.0.tgz", + "integrity": "sha512-OpDm9w3A168B44hSjpnvECP4rvnFzD86rN4VYdGADuCvEa5uEcdA/JuT5WclFPDqdWEmFBqS1pxBIJBf0g2Q9Q==", + "dependencies": { + "@aws-sdk/client-sts": "3.540.0", + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.511.0.tgz", - "integrity": "sha512-DbBzQP/6woSHR/+g9dHN3YiYaLIqFw9u8lQFMxi3rT3hqITFVYLzzXtEaHjDD6/is56pNT84CIKbyJ6/gY5d1Q==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.535.0.tgz", + "integrity": "sha512-0h6TWjBWtDaYwHMQJI9ulafeS4lLaw1vIxRjbpH0svFRt6Eve+Sy8NlVhECfTU2hNz/fLubvrUxsXoThaLBIew==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.535.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/middleware-logger": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.511.0.tgz", - "integrity": "sha512-EYU9dBlJXvQcCsM2Tfgi0NQoXrqovfDv/fDy8oGJgZFrgNuHDti8tdVVxeJTUJNEAF67xlDl5o+rWEkKthkYGQ==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.535.0.tgz", + "integrity": "sha512-huNHpONOrEDrdRTvSQr1cJiRMNf0S52NDXtaPzdxiubTkP+vni2MohmZANMOai/qT0olmEVX01LhZ0ZAOgmg6A==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.535.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.511.0.tgz", - "integrity": "sha512-PlNPCV/6zpDVdNx1K69xDTh/wPNU4WyP4qa6hUo2/+4/PNG5HI9xbCWtpb4RjhdTRw6qDtkBNcPICHbtWx5aHg==", - "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.511.0.tgz", - "integrity": "sha512-IMijFLfm+QQHD6NNDX9k3op9dpBSlWKnqjcMU38Tytl2nbqV4gktkarOK1exHAmH7CdoYR5BufVtBzbASNSF/A==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.535.0.tgz", + "integrity": "sha512-am2qgGs+gwqmR4wHLWpzlZ8PWhm4ktj5bYSgDrsOfjhdBlWNxvPoID9/pDAz5RWL48+oH7I6SQzMqxXsFDikrw==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/property-provider": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/signature-v4": "^2.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.535.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.511.0.tgz", - "integrity": "sha512-eLs+CxP2QCXh3tCGYCdAml3oyWj8MSIwKbH+8rKw0k/5vmY1YJDBy526whOxx61ivhz2e0muuijN4X5EZZ2Pnw==", - "dependencies": { - "@aws-sdk/types": "3.511.0", - "@aws-sdk/util-endpoints": "3.511.0", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.540.0.tgz", + "integrity": "sha512-8Rd6wPeXDnOYzWj1XCmOKcx/Q87L0K1/EHqOBocGjLVbN3gmRxBvpmR1pRTjf7IsWfnnzN5btqtcAkfDPYQUMQ==", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@aws-sdk/util-endpoints": "3.540.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.511.0.tgz", - "integrity": "sha512-RzBLSNaRd4iEkQyEGfiSNvSnWU/x23rsiFgA9tqYFA0Vqx7YmzSWC8QBUxpwybB8HkbbL9wNVKQqTbhI3mYneQ==", - "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/types": "^2.9.1", - "@smithy/util-config-provider": "^2.2.1", - "@smithy/util-middleware": "^2.1.1", - "tslib": "^2.5.0" + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.535.0.tgz", + "integrity": "sha512-IXOznDiaItBjsQy4Fil0kzX/J3HxIOknEphqHbOfUf+LpA5ugcsxuQQONrbEQusCBnfJyymrldBvBhFmtlU9Wg==", + "dependencies": { + "@aws-sdk/types": "3.535.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.511.0.tgz", - "integrity": "sha512-92dXjMHBJcRoUkJHc0Bvtsz7Sal8t6VASRJ5vfs5c2ZpTVgLpVnM4dBmwUgGUdnvHov0cZTXbbadTJ/qOWx5Zw==", - "dependencies": { - "@aws-sdk/client-sso-oidc": "3.511.0", - "@aws-sdk/types": "3.511.0", - "@smithy/property-provider": "^2.1.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.540.0.tgz", + "integrity": "sha512-9BvtiVEZe5Ev88Wa4ZIUbtT6BVcPwhxmVInQ6c12MYNb0WNL54BN6wLy/eknAfF05gpX2/NDU2pUDOyMPdm/+g==", + "dependencies": { + "@aws-sdk/client-sso-oidc": "3.540.0", + "@aws-sdk/types": "3.535.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/types": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.511.0.tgz", - "integrity": "sha512-P03ufufxmkvd7nO46oOeEqYIMPJ8qMCKxAsfJk1JBVPQ1XctVntbail4/UFnrnzij8DTl4Mk/D62uGo7+RolXA==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.535.0.tgz", + "integrity": "sha512-aY4MYfduNj+sRR37U7XxYR8wemfbKP6lx00ze2M2uubn7mZotuVrWYAafbMSXrdEMSToE5JDhr28vArSOoLcSg==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.511.0.tgz", - "integrity": "sha512-J/5hsscJkg2pAOdLx1YKlyMCk5lFRxRxEtup9xipzOxVBlqOIE72Tuu31fbxSlF8XzO/AuCJcZL4m1v098K9oA==", + "version": "3.540.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.540.0.tgz", + "integrity": "sha512-1kMyQFAWx6f8alaI6UT65/5YW/7pDWAKAdNwL6vuJLea03KrZRX3PMoONOSJpAS5m3Ot7HlWZvf3wZDNTLELZw==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/types": "^2.9.1", - "@smithy/util-endpoints": "^1.1.1", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.535.0", + "@smithy/types": "^2.12.0", + "@smithy/util-endpoints": "^1.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/util-locate-window": { - "version": "3.495.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.495.0.tgz", - "integrity": "sha512-MfaPXT0kLX2tQaR90saBT9fWQq2DHqSSJRzW+MZWsmF+y5LGCOhO22ac/2o6TKSQm7h0HRc2GaADqYYYor62yg==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.535.0.tgz", + "integrity": "sha512-PHJ3SL6d2jpcgbqdgiPxkXpu7Drc2PYViwxSIqvvMKhDwzSB1W3mMvtpzwKM4IE7zLFodZo0GKjJ9AsoXndXhA==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.511.0.tgz", - "integrity": "sha512-5LuESdwtIcA10aHcX7pde7aCIijcyTPBXFuXmFlDTgm/naAayQxelQDpvgbzuzGLgePf8eTyyhDKhzwPZ2EqiQ==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.535.0.tgz", + "integrity": "sha512-RWMcF/xV5n+nhaA/Ff5P3yNP3Kur/I+VNZngog4TEs92oB/nwOdAg/2JL8bVAhUbMrjTjpwm7PItziYFQoqyig==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/types": "^2.9.1", + "@aws-sdk/types": "3.535.0", + "@smithy/types": "^2.12.0", "bowser": "^2.11.0", - "tslib": "^2.5.0" + "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.511.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.511.0.tgz", - "integrity": "sha512-UopdlRvYY5mxlS4wwFv+QAWL6/T302wmoQj7i+RY+c/D3Ej3PKBb/mW3r2wEOgZLJmPpeeM1SYMk+rVmsW1rqw==", + "version": "3.535.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.535.0.tgz", + "integrity": "sha512-dRek0zUuIT25wOWJlsRm97nTkUlh1NDcLsQZIN2Y8KxhwoXXWtJs5vaDPT+qAg+OpcNj80i1zLR/CirqlFg/TQ==", "dependencies": { - "@aws-sdk/types": "3.511.0", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@aws-sdk/types": "3.535.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" @@ -1975,522 +1971,535 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.1.1.tgz", - "integrity": "sha512-1+qdrUqLhaALYL0iOcN43EP6yAXXQ2wWZ6taf4S2pNGowmOc5gx+iMQv+E42JizNJjB0+gEadOXeV1Bf7JWL1Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.2.0.tgz", + "integrity": "sha512-wRlta7GuLWpTqtFfGo+nZyOO1vEvewdNR1R4rTxpC8XU6vG/NDyrFBhwLZsqg1NUoR1noVaXJPC/7ZK47QCySw==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/config-resolver": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.1.1.tgz", - "integrity": "sha512-lxfLDpZm+AWAHPFZps5JfDoO9Ux1764fOgvRUBpHIO8HWHcSN1dkgsago1qLRVgm1BZ8RCm8cgv99QvtaOWIhw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.2.0.tgz", + "integrity": "sha512-fsiMgd8toyUba6n1WRmr+qACzXltpdDkPTAaDqc8QqPBUzO+/JKwL6bUBseHVi8tu9l+3JOK+tSf7cay+4B3LA==", "dependencies": { - "@smithy/node-config-provider": "^2.2.1", - "@smithy/types": "^2.9.1", - "@smithy/util-config-provider": "^2.2.1", - "@smithy/util-middleware": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-config-provider": "^2.3.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/core": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.3.2.tgz", - "integrity": "sha512-tYDmTp0f2TZVE18jAOH1PnmkngLQ+dOGUlMd1u67s87ieueNeyqhja6z/Z4MxhybEiXKOWFOmGjfTZWFxljwJw==", - "dependencies": { - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-retry": "^2.1.1", - "@smithy/middleware-serde": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", - "tslib": "^2.5.0" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.4.1.tgz", + "integrity": "sha512-jCnbEQHvTOUQXxXOS110FIMc83dCXUlrqiG/q0QzUSYhglDj9bJVPFjXmxc6qUfARe0mEb8h9LeVoh7FUYHuUg==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-retry": "^2.3.0", + "@smithy/middleware-serde": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.2.1.tgz", - "integrity": "sha512-7XHjZUxmZYnONheVQL7j5zvZXga+EWNgwEAP6OPZTi7l8J4JTeNh9aIOfE5fKHZ/ee2IeNOh54ZrSna+Vc6TFA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.3.0.tgz", + "integrity": "sha512-BWB9mIukO1wjEOo1Ojgl6LrG4avcaC7T/ZP6ptmAaW4xluhSIPZhY+/PI5YKzlk+jsm+4sQZB45Bt1OfMeQa3w==", "dependencies": { - "@smithy/node-config-provider": "^2.2.1", - "@smithy/property-provider": "^2.1.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/node-config-provider": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/eventstream-codec": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.1.1.tgz", - "integrity": "sha512-E8KYBxBIuU4c+zrpR22VsVrOPoEDzk35bQR3E+xm4k6Pa6JqzkDOdMyf9Atac5GPNKHJBdVaQ4JtjdWX2rl/nw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz", + "integrity": "sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==", "dependencies": { "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.9.1", - "@smithy/util-hex-encoding": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.4.1.tgz", - "integrity": "sha512-VYGLinPsFqH68lxfRhjQaSkjXM7JysUOJDTNjHBuN/ykyRb2f1gyavN9+VhhPTWCy32L4yZ2fdhpCs/nStEicg==", - "dependencies": { - "@smithy/protocol-http": "^3.1.1", - "@smithy/querystring-builder": "^2.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-base64": "^2.1.1", - "tslib": "^2.5.0" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.5.0.tgz", + "integrity": "sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw==", + "dependencies": { + "@smithy/protocol-http": "^3.3.0", + "@smithy/querystring-builder": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/util-base64": "^2.3.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/hash-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.1.1.tgz", - "integrity": "sha512-Qhoq0N8f2OtCnvUpCf+g1vSyhYQrZjhSwvJ9qvR8BUGOtTXiyv2x1OD2e6jVGmlpC4E4ax1USHoyGfV9JFsACg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.2.0.tgz", + "integrity": "sha512-zLWaC/5aWpMrHKpoDF6nqpNtBhlAYKF/7+9yMN7GpdR8CzohnWfGtMznPybnwSS8saaXBMxIGwJqR4HmRp6b3g==", "dependencies": { - "@smithy/types": "^2.9.1", - "@smithy/util-buffer-from": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/invalid-dependency": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.1.1.tgz", - "integrity": "sha512-7WTgnKw+VPg8fxu2v9AlNOQ5yaz6RA54zOVB4f6vQuR0xFKd+RzlCpt0WidYTsye7F+FYDIaS/RnJW4pxjNInw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.2.0.tgz", + "integrity": "sha512-nEDASdbKFKPXN2O6lOlTgrEEOO9NHIeO+HVvZnkqc8h5U9g3BIhWsvzFo+UcUbliMHvKNPD/zVxDrkP1Sbgp8Q==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/is-array-buffer": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.1.1.tgz", - "integrity": "sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/middleware-content-length": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.1.1.tgz", - "integrity": "sha512-rSr9ezUl9qMgiJR0UVtVOGEZElMdGFyl8FzWEF5iEKTlcWxGr2wTqGfDwtH3LAB7h+FPkxqv4ZU4cpuCN9Kf/g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.2.0.tgz", + "integrity": "sha512-5bl2LG1Ah/7E5cMSC+q+h3IpVHMeOkG0yLRyQT1p2aMJkSrZG7RlXHPuAgb7EyaFeidKEnnd/fNaLLaKlHGzDQ==", "dependencies": { - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.4.1.tgz", - "integrity": "sha512-XPZTb1E2Oav60Ven3n2PFx+rX9EDsU/jSTA8VDamt7FXks67ekjPY/XrmmPDQaFJOTUHJNKjd8+kZxVO5Ael4Q==", - "dependencies": { - "@smithy/middleware-serde": "^2.1.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/url-parser": "^2.1.1", - "@smithy/util-middleware": "^2.1.1", - "tslib": "^2.5.0" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.5.0.tgz", + "integrity": "sha512-OBhI9ZEAG8Xen0xsFJwwNOt44WE2CWkfYIxTognC8x42Lfsdf0VN/wCMqpdkySMDio/vts10BiovAxQp0T0faA==", + "dependencies": { + "@smithy/middleware-serde": "^2.3.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "@smithy/url-parser": "^2.2.0", + "@smithy/util-middleware": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/middleware-retry": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.1.1.tgz", - "integrity": "sha512-eMIHOBTXro6JZ+WWzZWd/8fS8ht5nS5KDQjzhNMHNRcG5FkNTqcKpYhw7TETMYzbLfhO5FYghHy1vqDWM4FLDA==", - "dependencies": { - "@smithy/node-config-provider": "^2.2.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/service-error-classification": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-retry": "^2.1.1", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.3.0.tgz", + "integrity": "sha512-5H7kD0My2RkZryvYIWA4C9w6t/pdJfbgEdq+fcZhbnZsqHm/4vYFVjDsOzb5pC7PEpksuijoM9fGbM6eN4rLSg==", + "dependencies": { + "@smithy/node-config-provider": "^2.3.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/service-error-classification": "^2.1.5", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-retry": "^2.2.0", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@smithy/middleware-serde": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.1.1.tgz", - "integrity": "sha512-D8Gq0aQBeE1pxf3cjWVkRr2W54t+cdM2zx78tNrVhqrDykRA7asq8yVJij1u5NDtKzKqzBSPYh7iW0svUKg76g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.3.0.tgz", + "integrity": "sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/middleware-stack": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.1.1.tgz", - "integrity": "sha512-KPJhRlhsl8CjgGXK/DoDcrFGfAqoqvuwlbxy+uOO4g2Azn1dhH+GVfC3RAp+6PoL5PWPb+vt6Z23FP+Mr6qeCw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.2.0.tgz", + "integrity": "sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/node-config-provider": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.2.1.tgz", - "integrity": "sha512-epzK3x1xNxA9oJgHQ5nz+2j6DsJKdHfieb+YgJ7ATWxzNcB7Hc+Uya2TUck5MicOPhDV8HZImND7ZOecVr+OWg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.3.0.tgz", + "integrity": "sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg==", "dependencies": { - "@smithy/property-provider": "^2.1.1", - "@smithy/shared-ini-file-loader": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/property-provider": "^2.2.0", + "@smithy/shared-ini-file-loader": "^2.4.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/node-http-handler": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.3.1.tgz", - "integrity": "sha512-gLA8qK2nL9J0Rk/WEZSvgin4AppvuCYRYg61dcUo/uKxvMZsMInL5I5ZdJTogOvdfVug3N2dgI5ffcUfS4S9PA==", - "dependencies": { - "@smithy/abort-controller": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/querystring-builder": "^2.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.5.0.tgz", + "integrity": "sha512-mVGyPBzkkGQsPoxQUbxlEfRjrj6FPyA3u3u2VXGr9hT8wilsoQdZdvKpMBFMB8Crfhv5dNkKHIW0Yyuc7eABqA==", + "dependencies": { + "@smithy/abort-controller": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/querystring-builder": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/property-provider": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.1.1.tgz", - "integrity": "sha512-FX7JhhD/o5HwSwg6GLK9zxrMUrGnb3PzNBrcthqHKBc3dH0UfgEAU24xnJ8F0uow5mj17UeBEOI6o3CF2k7Mhw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.2.0.tgz", + "integrity": "sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/protocol-http": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.1.1.tgz", - "integrity": "sha512-6ZRTSsaXuSL9++qEwH851hJjUA0OgXdQFCs+VDw4tGH256jQ3TjYY/i34N4vd24RV3nrjNsgd1yhb57uMoKbzQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.3.0.tgz", + "integrity": "sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/querystring-builder": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.1.1.tgz", - "integrity": "sha512-C/ko/CeEa8jdYE4gt6nHO5XDrlSJ3vdCG0ZAc6nD5ZIE7LBp0jCx4qoqp7eoutBu7VrGMXERSRoPqwi1WjCPbg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.2.0.tgz", + "integrity": "sha512-L1kSeviUWL+emq3CUVSgdogoM/D9QMFaqxL/dd0X7PCNWmPXqt+ExtrBjqT0V7HLN03Vs9SuiLrG3zy3JGnE5A==", "dependencies": { - "@smithy/types": "^2.9.1", - "@smithy/util-uri-escape": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "@smithy/util-uri-escape": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/querystring-parser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.1.1.tgz", - "integrity": "sha512-H4+6jKGVhG1W4CIxfBaSsbm98lOO88tpDWmZLgkJpt8Zkk/+uG0FmmqMuCAc3HNM2ZDV+JbErxr0l5BcuIf/XQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.2.0.tgz", + "integrity": "sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/service-error-classification": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.1.tgz", - "integrity": "sha512-txEdZxPUgM1PwGvDvHzqhXisrc5LlRWYCf2yyHfvITWioAKat7srQvpjMAvgzf0t6t7j8yHrryXU9xt7RZqFpw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.5.tgz", + "integrity": "sha512-uBDTIBBEdAQryvHdc5W8sS5YX7RQzF683XrHePVdFmAgKiMofU15FLSM0/HU03hKTnazdNRFa0YHS7+ArwoUSQ==", "dependencies": { - "@smithy/types": "^2.9.1" + "@smithy/types": "^2.12.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.3.1.tgz", - "integrity": "sha512-2E2kh24igmIznHLB6H05Na4OgIEilRu0oQpYXo3LCNRrawHAcfDKq9004zJs+sAMt2X5AbY87CUCJ7IpqpSgdw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.4.0.tgz", + "integrity": "sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/signature-v4": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.1.1.tgz", - "integrity": "sha512-Hb7xub0NHuvvQD3YwDSdanBmYukoEkhqBjqoxo+bSdC0ryV9cTfgmNjuAQhTPYB6yeU7hTR+sPRiFMlxqv6kmg==", - "dependencies": { - "@smithy/eventstream-codec": "^2.1.1", - "@smithy/is-array-buffer": "^2.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-hex-encoding": "^2.1.1", - "@smithy/util-middleware": "^2.1.1", - "@smithy/util-uri-escape": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.2.0.tgz", + "integrity": "sha512-+B5TNzj/fRZzVW3z8UUJOkNx15+4E0CLuvJmJUA1JUIZFp3rdJ/M2H5r2SqltaVPXL0oIxv/6YK92T9TsFGbFg==", + "dependencies": { + "@smithy/eventstream-codec": "^2.2.0", + "@smithy/is-array-buffer": "^2.2.0", + "@smithy/types": "^2.12.0", + "@smithy/util-hex-encoding": "^2.2.0", + "@smithy/util-middleware": "^2.2.0", + "@smithy/util-uri-escape": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/smithy-client": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.3.1.tgz", - "integrity": "sha512-YsTdU8xVD64r2pLEwmltrNvZV6XIAC50LN6ivDopdt+YiF/jGH6PY9zUOu0CXD/d8GMB8gbhnpPsdrjAXHS9QA==", - "dependencies": { - "@smithy/middleware-endpoint": "^2.4.1", - "@smithy/middleware-stack": "^2.1.1", - "@smithy/protocol-http": "^3.1.1", - "@smithy/types": "^2.9.1", - "@smithy/util-stream": "^2.1.1", - "tslib": "^2.5.0" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.5.0.tgz", + "integrity": "sha512-DDXWHWdimtS3y/Kw1Jo46KQ0ZYsDKcldFynQERUGBPDpkW1lXOTHy491ALHjwfiBQvzsVKVxl5+ocXNIgJuX4g==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.5.0", + "@smithy/middleware-stack": "^2.2.0", + "@smithy/protocol-http": "^3.3.0", + "@smithy/types": "^2.12.0", + "@smithy/util-stream": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/types": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.9.1.tgz", - "integrity": "sha512-vjXlKNXyprDYDuJ7UW5iobdmyDm6g8dDG+BFUncAg/3XJaN45Gy5RWWWUVgrzIK7S4R1KWgIX5LeJcfvSI24bw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.12.0.tgz", + "integrity": "sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/url-parser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.1.1.tgz", - "integrity": "sha512-qC9Bv8f/vvFIEkHsiNrUKYNl8uKQnn4BdhXl7VzQRP774AwIjiSMMwkbT+L7Fk8W8rzYVifzJNYxv1HwvfBo3Q==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.2.0.tgz", + "integrity": "sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ==", "dependencies": { - "@smithy/querystring-parser": "^2.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/querystring-parser": "^2.2.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" } }, "node_modules/@smithy/util-base64": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.1.1.tgz", - "integrity": "sha512-UfHVpY7qfF/MrgndI5PexSKVTxSZIdz9InghTFa49QOvuu9I52zLPLUHXvHpNuMb1iD2vmc6R+zbv/bdMipR/g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.3.0.tgz", + "integrity": "sha512-s3+eVwNeJuXUwuMbusncZNViuhv2LjVJ1nMwTqSA0XAC7gjKhqqxRdJPhR8+YrkoZ9IiIbFk/yK6ACe/xlF+hw==", "dependencies": { - "@smithy/util-buffer-from": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-body-length-browser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.1.1.tgz", - "integrity": "sha512-ekOGBLvs1VS2d1zM2ER4JEeBWAvIOUKeaFch29UjjJsxmZ/f0L3K3x0dEETgh3Q9bkZNHgT+rkdl/J/VUqSRag==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.2.0.tgz", + "integrity": "sha512-dtpw9uQP7W+n3vOtx0CfBD5EWd7EPdIdsQnWTDoFf77e3VUf05uA7R7TGipIo8e4WL2kuPdnsr3hMQn9ziYj5w==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" } }, "node_modules/@smithy/util-body-length-node": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.2.1.tgz", - "integrity": "sha512-/ggJG+ta3IDtpNVq4ktmEUtOkH1LW64RHB5B0hcr5ZaWBmo96UX2cIOVbjCqqDickTXqBWZ4ZO0APuaPrD7Abg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.3.0.tgz", + "integrity": "sha512-ITWT1Wqjubf2CJthb0BuT9+bpzBfXeMokH/AAa5EJQgbv9aPMVfnM76iFIZVFf50hYXGbtiV71BHAthNWd6+dw==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-buffer-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.1.1.tgz", - "integrity": "sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", "dependencies": { - "@smithy/is-array-buffer": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-config-provider": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.2.1.tgz", - "integrity": "sha512-50VL/tx9oYYcjJn/qKqNy7sCtpD0+s8XEBamIFo4mFFTclKMNp+rsnymD796uybjiIquB7VCB/DeafduL0y2kw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.3.0.tgz", + "integrity": "sha512-HZkzrRcuFN1k70RLqlNK4FnPXKOpkik1+4JaBoHNJn+RnJGYqaa3c5/+XtLOXhlKzlRgNvyaLieHTW2VwGN0VQ==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.1.1.tgz", - "integrity": "sha512-lqLz/9aWRO6mosnXkArtRuQqqZBhNpgI65YDpww4rVQBuUT7qzKbDLG5AmnQTCiU4rOquaZO/Kt0J7q9Uic7MA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.2.0.tgz", + "integrity": "sha512-2okTdZaCBvOJszAPU/KSvlimMe35zLOKbQpHhamFJmR7t95HSe0K3C92jQPjKY3PmDBD+7iMkOnuW05F5OlF4g==", "dependencies": { - "@smithy/property-provider": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", + "@smithy/property-provider": "^2.2.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", "bowser": "^2.11.0", - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">= 10.0.0" } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.2.0.tgz", - "integrity": "sha512-iFJp/N4EtkanFpBUtSrrIbtOIBf69KNuve03ic1afhJ9/korDxdM0c6cCH4Ehj/smI9pDCfVv+bqT3xZjF2WaA==", - "dependencies": { - "@smithy/config-resolver": "^2.1.1", - "@smithy/credential-provider-imds": "^2.2.1", - "@smithy/node-config-provider": "^2.2.1", - "@smithy/property-provider": "^2.1.1", - "@smithy/smithy-client": "^2.3.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.3.0.tgz", + "integrity": "sha512-hfKXnNLmsW9cmLb/JXKIvtuO6Cf4SuqN5PN1C2Ru/TBIws+m1wSgb+A53vo0r66xzB6E82inKG2J7qtwdi+Kkw==", + "dependencies": { + "@smithy/config-resolver": "^2.2.0", + "@smithy/credential-provider-imds": "^2.3.0", + "@smithy/node-config-provider": "^2.3.0", + "@smithy/property-provider": "^2.2.0", + "@smithy/smithy-client": "^2.5.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">= 10.0.0" } }, "node_modules/@smithy/util-endpoints": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.1.1.tgz", - "integrity": "sha512-sI4d9rjoaekSGEtq3xSb2nMjHMx8QXcz2cexnVyRWsy4yQ9z3kbDpX+7fN0jnbdOp0b3KSTZJZ2Yb92JWSanLw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.2.0.tgz", + "integrity": "sha512-BuDHv8zRjsE5zXd3PxFXFknzBG3owCpjq8G3FcsXW3CykYXuEqM3nTSsmLzw5q+T12ZYuDlVUZKBdpNbhVtlrQ==", "dependencies": { - "@smithy/node-config-provider": "^2.2.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/node-config-provider": "^2.3.0", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@smithy/util-hex-encoding": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.1.1.tgz", - "integrity": "sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz", + "integrity": "sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-middleware": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.1.1.tgz", - "integrity": "sha512-mKNrk8oz5zqkNcbcgAAepeJbmfUW6ogrT2Z2gDbIUzVzNAHKJQTYmH9jcy0jbWb+m7ubrvXKb6uMjkSgAqqsFA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.2.0.tgz", + "integrity": "sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw==", "dependencies": { - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-retry": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.1.1.tgz", - "integrity": "sha512-Mg+xxWPTeSPrthpC5WAamJ6PW4Kbo01Fm7lWM1jmGRvmrRdsd3192Gz2fBXAMURyXpaNxyZf6Hr/nQ4q70oVEA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.2.0.tgz", + "integrity": "sha512-q9+pAFPTfftHXRytmZ7GzLFFrEGavqapFc06XxzZFcSIGERXMerXxCitjOG1prVDR9QdjqotF40SWvbqcCpf8g==", "dependencies": { - "@smithy/service-error-classification": "^2.1.1", - "@smithy/types": "^2.9.1", - "tslib": "^2.5.0" + "@smithy/service-error-classification": "^2.1.5", + "@smithy/types": "^2.12.0", + "tslib": "^2.6.2" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@smithy/util-stream": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.1.1.tgz", - "integrity": "sha512-J7SMIpUYvU4DQN55KmBtvaMc7NM3CZ2iWICdcgaovtLzseVhAqFRYqloT3mh0esrFw+3VEK6nQFteFsTqZSECQ==", - "dependencies": { - "@smithy/fetch-http-handler": "^2.4.1", - "@smithy/node-http-handler": "^2.3.1", - "@smithy/types": "^2.9.1", - "@smithy/util-base64": "^2.1.1", - "@smithy/util-buffer-from": "^2.1.1", - "@smithy/util-hex-encoding": "^2.1.1", - "@smithy/util-utf8": "^2.1.1", - "tslib": "^2.5.0" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.2.0.tgz", + "integrity": "sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA==", + "dependencies": { + "@smithy/fetch-http-handler": "^2.5.0", + "@smithy/node-http-handler": "^2.5.0", + "@smithy/types": "^2.12.0", + "@smithy/util-base64": "^2.3.0", + "@smithy/util-buffer-from": "^2.2.0", + "@smithy/util-hex-encoding": "^2.2.0", + "@smithy/util-utf8": "^2.3.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-uri-escape": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.1.1.tgz", - "integrity": "sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.2.0.tgz", + "integrity": "sha512-jtmJMyt1xMD/d8OtbVJ2gFZOSKc+ueYJZPW20ULW1GOp/q/YIM0wNh+u8ZFao9UaIGz4WoPW8hC64qlWLIfoDA==", "dependencies": { - "tslib": "^2.5.0" + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/util-utf8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.1.1.tgz", - "integrity": "sha512-BqTpzYEcUMDwAKr7/mVRUtHDhs6ZoXDi9NypMvMfOr/+u1NW7JgqodPDECiiLboEm6bobcPcECxzjtQh865e9A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", "dependencies": { - "@smithy/util-buffer-from": "^2.1.1", - "tslib": "^2.5.0" + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=14.0.0" diff --git a/package.json b/package.json index 1925457..96f40e3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", - "@aws-sdk/client-marketplace-catalog": "^3.511.0" + "@aws-sdk/client-marketplace-catalog": "^3.545.0" }, "devDependencies": { "@types/node": "^20.12.2",